/* CycleMarket Adverts */

/* Notices */
.cm-notice { padding: 12px 16px; border-radius: 6px; background: #f0f4f8; margin: 0 0 16px; }
.cm-notice-success { background: #e6f6ea; border-left: 4px solid #2e9e4f; }
.cm-notice-error { background: #fdeaea; border-left: 4px solid #d63638; }

/* Badges */
.cm-badge { display: inline-block; padding: 2px 10px; border-radius: 3px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin: 4px 4px 4px 0; }
.cm-badge-featured { background: #ffb900; color: #1d2327; }
.cm-badge-sold { background: #d63638; color: #fff; }
ul.products li.product .cm-badge { position: absolute; top: 8px; left: 8px; z-index: 9; }
ul.products li.product { position: relative; }

/* Loop */
.cm-loop-location { font-size: 13px; color: #666; margin-top: 2px; }
.cm-view-ad { margin-top: 6px; }

/* Details table */
.cm-details { width: 100%; max-width: 420px; margin: 12px 0; border-collapse: collapse; }
.cm-details th, .cm-details td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #eee; font-size: 14px; }
.cm-details th { color: #666; font-weight: 600; width: 40%; }

/* Sell form */
.cm-form { max-width: 720px; }
.cm-form h3 { margin-top: 28px; }
.cm-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.cm-form input[type=text], .cm-form input[type=number], .cm-form input[type=email], .cm-form select, .cm-form textarea { width: 100%; }
.cm-form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.cm-form-row p { flex: 1 1 180px; }
.cm-hint { font-size: 13px; color: #666; display: block; margin-top: 4px; }
.cm-submit { font-weight: 700; }
.cm-existing-photos { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.cm-photo-thumb { text-align: center; font-size: 12px; }
.cm-photo-thumb img { display: block; width: 90px; height: 90px; object-fit: cover; border-radius: 4px; }

/* Tiers */
.cm-tiers { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.cm-tier { flex: 1 1 240px; border: 2px solid #ddd; border-radius: 8px; padding: 16px; cursor: pointer; display: block; }
.cm-tier:has(input:checked) { border-color: #2271b1; background: #f0f6fb; }
.cm-tier-name { display: block; font-size: 18px; font-weight: 700; }
.cm-tier-fee { display: block; font-size: 22px; font-weight: 700; color: #2271b1; margin: 6px 0; }
.cm-tier-desc { display: block; font-size: 13px; color: #555; }

/* Favourite button */
.cm-fav { background: #fff; border: 1px solid #ccc; border-radius: 20px; padding: 4px 14px; cursor: pointer; font-size: 14px; color: #888; margin: 6px 0; }
.cm-fav-active { color: #d63638; border-color: #d63638; }

/* Enquiry */
.cm-enquiry { margin-top: 24px; padding: 16px; background: #f8f9fa; border-radius: 8px; max-width: 560px; }
.cm-enquiry label { display: block; font-weight: 600; }
.cm-enquiry input, .cm-enquiry textarea { width: 100%; }
.cm-hp { position: absolute !important; left: -9999px !important; }

/* Sold note */
.cm-sold-note { font-weight: 700; color: #d63638; }

/* Dashboard */
.cm-dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cm-dash-table th, .cm-dash-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; vertical-align: middle; }
.cm-dash-thumb img { border-radius: 4px; display: block; }
.cm-dash-actions { white-space: nowrap; }
.cm-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 3px; }
.cm-status-live { background: #e6f6ea; color: #1d7a35; }
.cm-status-pending { background: #fff3cd; color: #856404; }
.cm-status-sold { background: #fdeaea; color: #b32d2e; }
.cm-saved-list { margin-top: 8px; }

/* Stat cards */
.cm-stat-cards { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.cm-stat-card { flex: 1 1 130px; background: #f8f9fa; border-radius: 8px; padding: 16px; text-align: center; }
.cm-stat-value { display: block; font-size: 28px; font-weight: 700; }
.cm-stat-label { display: block; font-size: 13px; color: #666; margin-top: 4px; }

/* Shop hero (product archive) */
body.post-type-archive-product .woocommerce-products-header,
body.post-type-archive-product h1.page-title { display: none; }
.cm-shop-hero { background: #0F6E56; border-radius: 12px; padding: 36px 24px 30px; text-align: center; margin: 0 0 28px; width: 100%; grid-column: 1 / -1; flex: 1 1 100%; box-sizing: border-box; }
.cm-shop-hero h1 { color: #fff !important; font-size: 32px; line-height: 1.2; margin: 0 0 8px; }
.cm-shop-hero p { color: #9FE1CB; font-size: 15px; margin: 0 0 22px; }
.cm-shop-search { display: flex; max-width: 740px; margin: 0 auto 18px; background: #fff; border-radius: 10px; overflow: hidden; height: 52px; box-shadow: 0 4px 24px rgba(0,0,0,.2); }
.cm-shop-search select { width: 150px; flex-shrink: 0; border: none !important; outline: none; padding: 0 12px; font-size: 14px; color: #374151; border-right: 1px solid #e5e7eb !important; background: #fff; border-radius: 0; height: 52px; margin: 0; }
.cm-shop-search input[type=text] { flex: 1; min-width: 0; border: none !important; outline: none; padding: 0 16px; font-size: 14px; border-right: 1px solid #e5e7eb !important; border-radius: 0; height: 52px; background: #fff; margin: 0; }
.cm-shop-search .cm-postcode { flex: 0 0 110px; }
.cm-shop-search button { border: none; background: #1D9E75 !important; color: #fff !important; padding: 0 26px; font-size: 15px; font-weight: 600; cursor: pointer; border-radius: 0; height: 52px; margin: 0; }
.cm-shop-search button:hover { background: #17845F !important; }
.cm-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cm-chips a { padding: 6px 18px; border-radius: 20px; font-size: 14px; text-decoration: none !important; color: #fff !important; border: 1px solid rgba(255,255,255,.4); }
.cm-chips a:hover { color: #fff !important; border-color: #fff; }
.cm-chips a.active { background: #fff; color: #0F6E56 !important; font-weight: 600; border-color: #fff; }
@media (max-width: 640px) {
  .cm-shop-search { flex-wrap: wrap; height: auto; }
  .cm-shop-search select, .cm-shop-search input[type=text], .cm-shop-search button { width: 100%; flex: 1 1 100%; }
}

/* Chart */
.cm-chart { width: 100%; height: auto; background: #fbfbfc; border: 1px solid #eee; border-radius: 8px; }
.cm-chart rect { fill: #2271b1; }
.cm-chart rect:hover { fill: #135e96; }
.cm-chart-axis { stroke: #ccc; stroke-width: 1; }
.cm-chart-max { font-size: 11px; fill: #888; }

/* Sidebar filter panel */
.cm-side { margin-bottom: 24px; }
.cm-side-eyebrow { font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .7px; margin-bottom: 12px; }
.cm-clear { display: inline-block; font-size: 13px; color: #b32d2e !important; margin-bottom: 10px; text-decoration: none !important; font-weight: 600; }
.cm-side-group { margin-bottom: 20px; }
.cm-side-group h4 { font-size: 14px; margin: 0 0 6px; }
.cm-side-link { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; color: #374151 !important; text-decoration: none !important; border-bottom: 1px solid #f3f4f6; }
.cm-side-link span { color: #9ca3af; font-size: 12px; }
.cm-side-link:hover { color: #0F6E56 !important; }
.cm-side-link.active { color: #0F6E56 !important; font-weight: 700; }
.cm-side-link.active::after { content: "\2715"; font-size: 10px; margin-left: 6px; }

/* Price slider */
.cm-price-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.cm-dual { position: relative; height: 28px; margin-bottom: 12px; }
.cm-dual-track { position: absolute; top: 12px; left: 0; right: 0; height: 4px; background: #e5e7eb; border-radius: 2px; }
.cm-dual-fill { position: absolute; top: 12px; height: 4px; background: #1D9E75; border-radius: 2px; }
.cm-dual input[type=range] { position: absolute; top: 2px; left: 0; width: 100%; height: 24px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; outline: none; }
.cm-dual input[type=range]::-webkit-slider-runnable-track { background: transparent; border: none; height: 24px; }
.cm-dual input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; width: 16px; height: 16px; margin-top: 4px; border-radius: 50%; background: #fff; border: 2px solid #1D9E75; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cm-dual input[type=range]::-moz-range-track { background: transparent; border: none; }
.cm-dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2px solid #1D9E75; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.cm-price-apply { background: #1D9E75; color: #fff; border: none; border-radius: 6px; padding: 6px 18px; font-size: 13px; font-weight: 600; cursor: pointer; }
.cm-price-apply:hover { background: #0F6E56; }
