/* ══════════════════════════════════════════════════════════════
   CheapestGoldPrices.com — Main Stylesheet
   Based on approved mockup-v3 design
   ══════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold:        #E8960C;
    --gold-dk:     #C97D00;
    --charcoal:    #2C2C2C;
    --charcoal-lt: #3D3D3D;
    --bg:          #F4F4F4;
    --white:       #FFFFFF;
    --text:        #444444;
    --border:      #E0E0E0;
    --red:         #E74C3C;
    --green:       #27ae60;
    --font:        'Montserrat', sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
}
a { text-decoration: none; color: inherit; }

/* ── TIER 1: Utility Bar ── */
.utility-bar {
    background: var(--charcoal);
    color: #aaa;
    font-size: 12px;
    padding: 6px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.utility-bar a { color: #ccc; margin-left: 16px; }
.utility-bar a:hover { color: var(--gold); }
.spot-ticker { display: flex; gap: 24px; }
.spot-ticker span { color: #fff; font-weight: 600; }
.spot-ticker em { color: #6be16b; font-style: normal; font-size: 11px; }
.spot-ticker em.down { color: var(--red); }

/* ── TIER 2: Main Header ── */
.main-header {
    background: var(--charcoal-lt);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--gold);
    position: relative;
    z-index: 200;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.logo h1 { font-size: 22px; font-weight: 800; color: var(--white); letter-spacing: -0.5px; }
.logo h1 span { color: var(--gold); }
.search-bar {
    flex: 1; max-width: 500px; margin: 0 32px;
    display: flex; position: relative;
}
.search-bar input {
    flex: 1; padding: 10px 16px; border: none; border-radius: 4px 0 0 4px;
    font-family: var(--font); font-size: 14px;
}
.search-bar button {
    background: var(--gold); color: var(--charcoal);
    border: none; padding: 10px 18px; border-radius: 0 4px 4px 0;
    font-weight: 700; font-size: 14px; cursor: pointer;
}
.search-bar button:hover { background: var(--gold-dk); }
.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
    z-index: 9999;
    max-height: 360px;
    overflow-y: auto;
}
.search-dropdown.open { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    color: #2C2C2C;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.12s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item.focused { background: #fff8ec; }
.search-result-img {
    width: 36px; height: 36px;
    object-fit: cover; border-radius: 4px;
    background: #f0f0f0; flex-shrink: 0;
}
.search-result-name { font-size: 0.88rem; font-weight: 700; color: #2C2C2C; line-height: 1.3; }
.search-result-meta { font-size: 0.75rem; color: #999; margin-top: 1px; }
.search-result-price { font-size: 0.85rem; font-weight: 700; color: #E8960C; margin-left: auto; white-space: nowrap; }
.search-no-results { padding: 16px 14px; font-size: 0.85rem; color: #aaa; text-align: center; }
.header-utils { display: flex; gap: 20px; align-items: center; color: #ccc; font-size: 13px; }
.header-utils div { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.header-utils div:hover { color: var(--gold); }
.header-utils .icon { font-size: 20px; }

/* ── TIER 3: Nav Bar ── */
.nav-bar {
    background: var(--charcoal);
    padding: 0 16px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    scrollbar-width: none; /* Firefox — hide scrollbar on desktop */
}
.nav-bar::-webkit-scrollbar { display: none; } /* Chrome/Safari — hide scrollbar on desktop */
#nav-placeholder {
    position: relative;
}
.nav-bar a {
    color: #ddd; padding: 12px 12px;
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.4px; text-transform: uppercase;
    display: block; white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.nav-bar a:hover, .nav-bar a.active {
    background: var(--gold); color: var(--charcoal);
}
.nav-bar a [data-lucide] { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.nav-mobile-menu a [data-lucide] { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; }

/* ── Hero Banner ── */
.hero {
    background: linear-gradient(135deg, rgba(44,44,44,0.92) 0%, rgba(74,56,0,0.88) 100%),
                url(../images/zlataky-cz-y7jRMXOz7pE-unsplash.jpg) center/cover no-repeat;
    padding: 48px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}
/* .hero::before removed — decorative circle conflicts with hero photo */
/* .hero::before {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 300px; height: 300px;
    background: var(--gold); opacity: 0.07; border-radius: 50%;
} */
.hero-text h2 {
    font-size: 36px; font-weight: 800;
    color: var(--white); line-height: 1.2; margin-bottom: 12px;
}
.hero-text h2 span { color: var(--gold); }
.hero-text p { color: #ccc; font-size: 15px; margin-bottom: 24px; }
.hero-stats { display: flex; gap: 32px; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 28px; font-weight: 800; color: var(--gold); }
.hero-stat .lbl { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; }
.hero-badge {
    background: var(--gold);
    color: var(--charcoal);
    border: none;
    padding: 24px 32px; border-radius: 12px; text-align: center;
    font-weight: 800;
}
.hero-badge .badge-price { font-size: 42px; line-height: 1; }
.hero-badge .badge-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ── Main Layout ── */
.page-body {
    display: flex; max-width: 1400px; margin: 24px auto;
    padding: 0 24px; gap: 24px;
}

/* ── Sidebar ── */
.sidebar { width: 240px; flex-shrink: 0; }

/* Desktop sticky sidebar — stays visible while scrolling through product grid */
@media (min-width: 769px) {
    .sidebar {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}
.sidebar-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 8px; padding: 20px; margin-bottom: 16px;
}
.sidebar-card h3 {
    font-size: 13px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; color: var(--charcoal);
    border-bottom: 2px solid var(--gold); padding-bottom: 10px; margin-bottom: 14px;
}
.filter-item { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; cursor: pointer; }
.filter-item input[type=checkbox] { accent-color: var(--gold); width: 15px; height: 15px; }
.filter-item .count { color: #aaa; margin-left: auto; font-size: 11px; }
.price-range { margin-top: 10px; }
.price-range input[type=range] { width: 100%; accent-color: var(--gold); margin: 8px 0; }
.price-range .range-labels { display: flex; justify-content: space-between; font-size: 12px; color: #888; }
.ad-block {
    background: linear-gradient(135deg, var(--charcoal), #4a3800);
    border-radius: 8px; padding: 20px; text-align: center; color: var(--white);
}
.ad-block .ad-label { font-size: 10px; text-transform: uppercase; color: #888; margin-bottom: 8px; }
.ad-block .ad-title { font-weight: 800; font-size: 16px; color: var(--gold); }
.ad-block .ad-text { font-size: 12px; color: #ccc; margin-top: 6px; }
.ad-block .ad-cta {
    background: var(--gold); color: var(--charcoal);
    padding: 8px 16px; border-radius: 4px;
    font-weight: 700; font-size: 13px;
    display: inline-block; margin-top: 10px;
}
.ad-block .ad-cta:hover { background: var(--gold-dk); }

/* ── Product Area ── */
.product-area { flex: 1; min-width: 0; }

/* ── Product Toolbar ── */
.product-toolbar {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 8px; padding: 12px 16px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.results-count { font-size: 13px; color: #888; }
.results-count strong { color: var(--charcoal); }
.toolbar-right { display: flex; align-items: center; gap: 16px; }
.sort-select {
    padding: 8px 12px; border: 1px solid var(--border);
    border-radius: 4px; font-family: var(--font); font-size: 13px;
}
.view-toggle { display: flex; gap: 4px; }
.view-btn {
    padding: 7px 10px; border: 1px solid var(--border); background: var(--white);
    border-radius: 4px; cursor: pointer; font-size: 16px;
    transition: background 0.15s;
}
.view-btn.active { background: var(--gold); border-color: var(--gold); color: var(--charcoal); }

/* ── Product Grid ── */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product-grid.list-view { grid-template-columns: 1fr; }

.product-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-2px); }

/* List view card layout */
.list-view .product-card { display: flex; align-items: stretch; }
.list-view .card-img { width: 140px; min-width: 140px; height: 140px; border-bottom: none; border-right: 1px solid var(--border); object-fit: contain; padding: 10px; background: #fafafa; }
.list-view .card-body { display: flex; flex: 1; flex-direction: column; padding: 16px 20px; }
.list-view .card-top-row { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; }
.list-view .card-meta { flex: 1; }
.list-view .card-pricing { text-align: right; min-width: 160px; flex-shrink: 0; }
.list-view .card-cta { display: inline-block; width: auto; padding: 10px 20px; }
.list-view .card-dealer-list { width: 100%; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }

/* Compact view */
.product-grid.compact-view { grid-template-columns: 1fr; gap: 4px; }

.compact-view .product-card {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 6px;
    min-height: 0;
}

.compact-view .card-img {
    width: 80px;
    min-width: 80px;
    height: 80px;
    object-fit: contain;
    border: none;
    border-radius: 4px;
    margin-right: 12px;
    padding: 6px;
    background: #fafafa;
}

.compact-view .card-body {
    display: flex;
    flex: 1;
    align-items: center;
    padding: 0;
    flex-direction: row;
}

.compact-view .card-top-row {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.compact-view .card-meta { flex: 1; min-width: 0; }
.compact-view .card-dealer { font-size: 10px; margin-bottom: 1px; }
.compact-view .card-name { font-size: 13px; margin-bottom: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-view .card-pricing { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.compact-view .card-price { font-size: 16px; }
.compact-view .card-premium { font-size: 11px; margin: 0; }
.compact-view .card-cta { padding: 7px 14px; font-size: 12px; width: auto; display: inline-block; flex-shrink: 0; }

/* Hide badges, tags, dealer list by default in compact view */
.compact-view .card-badge,
.compact-view .card-tags { display: none; }
.compact-view .card-dealer-list { display: none; }

/* Expand button */
.card-expand-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1;
    position: relative; /* anchor for tooltip */
}
.card-expand-btn:hover {
    background: #f5f5f5;
    border-color: var(--gold);
    color: var(--charcoal);
}

/* Tooltip on hover */
.card-expand-btn::after {
    content: 'Click to see more dealers';
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: var(--charcoal);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
    z-index: 10;
}
/* Small arrow pointing down */
.card-expand-btn::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    right: 10px;
    border: 4px solid transparent;
    border-top-color: var(--charcoal);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}
.card-expand-btn:hover::after,
.card-expand-btn:hover::before { opacity: 1; transform: translateY(0); }

/* Swap tooltip text when expanded */
.card-expand-btn[data-expanded="1"]::after { content: 'Click to collapse'; }

/* Hide expand button outside compact view */
.product-grid:not(.compact-view) .card-expand-btn { display: none; }

/* Expanded card in compact view */
.compact-view .product-card.expanded {
    flex-wrap: wrap;
}
.compact-view .product-card.expanded .card-body {
    flex-wrap: wrap;
    width: 100%;
}
.compact-view .product-card.expanded .card-dealer-list {
    display: block;
    width: 100%;
    margin-top: 8px;
    border-top: 1px solid #eee;
    padding-top: 8px;
    flex-basis: 100%;
}

.card-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--red); color: #fff;
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    padding: 4px 8px; border-radius: 3px; letter-spacing: 0.5px;
    z-index: 1;
}
.card-badge.new { background: var(--green); }
.card-badge.hot { background: var(--gold); color: var(--charcoal); }

.card-img {
    width: 100%; height: 180px; object-fit: contain;
    background: #fafafa; border-bottom: 1px solid var(--border);
    padding: 16px;
}
.card-body { padding: 14px; }
.card-dealer {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--gold); margin-bottom: 4px;
}
.card-name { font-size: 14px; font-weight: 600; color: var(--charcoal); margin-bottom: 6px; line-height: 1.3; }
.card-rating { color: #FFD700; font-size: 12px; margin-bottom: 8px; }
.card-rating span { color: #aaa; font-size: 11px; }
.card-price { font-size: 22px; font-weight: 800; color: var(--gold); }
.card-premium { font-size: 12.5px; font-weight: 600; color: #666; margin-top: 2px; margin-bottom: 12px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card-tag { display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #555; background: #f0f0f0; border: 1px solid #ddd; border-radius: 3px; padding: 2px 5px; line-height: 1.4; }
.card-tags-inline { float: right; display: inline-flex; gap: 3px; margin-left: 12px; margin-top: 1px; vertical-align: middle; }
.card-cta {
    display: block; text-align: center;
    background: var(--charcoal); color: var(--white);
    padding: 10px; border-radius: 4px;
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    transition: background 0.2s;
}
.card-cta:hover { background: var(--gold); color: var(--charcoal); }

/* ── Promo Banner ── */
.promo-banner {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--charcoal) 0%, #5a4000 100%);
    border-radius: 8px; padding: 28px 32px;
    display: flex; justify-content: space-between; align-items: center;
    color: var(--white);
}
.promo-banner h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.promo-banner h3 span { color: var(--gold); }
.promo-banner p { color: #ccc; font-size: 14px; }
.promo-banner .promo-cta {
    background: var(--gold); color: var(--charcoal);
    padding: 12px 28px; border-radius: 4px;
    font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; white-space: nowrap;
}
.promo-banner .promo-cta:hover { background: var(--gold-dk); }

/* ── Footer ── */
footer {
    background: var(--charcoal); color: #aaa;
    text-align: center; padding: 32px 24px;
    margin-top: 48px; font-size: 12px; line-height: 1.8;
}
footer a { color: #ccc; }
footer a:hover { color: var(--gold); }
footer .footer-brand { color: var(--gold); font-weight: 800; }

/* ── Content Pages ── */
.content-page {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 24px;
}
.content-page h1 {
    font-size: 32px; font-weight: 800; color: var(--charcoal);
    margin-bottom: 8px;
}
.content-page h2 {
    font-size: 22px; font-weight: 700; color: var(--charcoal);
    margin: 32px 0 12px; border-bottom: 2px solid var(--gold);
    padding-bottom: 8px;
}
.content-page h3 {
    font-size: 16px; font-weight: 700; color: var(--charcoal);
    margin: 20px 0 8px;
}
.content-page p {
    line-height: 1.8; margin-bottom: 16px; color: var(--text);
}
.content-page .subtitle {
    font-size: 16px; color: #888; margin-bottom: 32px;
}
.content-page ul, .content-page ol {
    margin: 0 0 16px 24px; line-height: 1.8;
}

/* ── Blog Cards ── */
.blog-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px; margin-top: 24px;
}
.blog-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.blog-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-2px); }
.blog-card-img {
    width: 100%; height: 160px; object-fit: cover;
    background: #eee;
}
.blog-card-body { padding: 20px; }
.blog-card-body .date { font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; }
.blog-card-body h3 { font-size: 16px; font-weight: 700; color: var(--charcoal); margin: 8px 0; }
.blog-card-body p { font-size: 13px; color: var(--text); line-height: 1.6; }
.blog-card-body .read-more {
    display: inline-block; margin-top: 12px;
    color: var(--gold); font-weight: 700; font-size: 13px;
}

/* ── Investment Calculator ── */
.calculator-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; padding: 32px; margin: 32px 0;
}
.calculator-card h3 {
    font-size: 18px; font-weight: 800; color: var(--charcoal);
    margin-bottom: 24px; text-align: center;
}
.calc-row {
    margin-bottom: 20px;
}
.calc-row label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--charcoal); margin-bottom: 8px;
}
.calc-row input[type=range] {
    width: 100%; accent-color: var(--gold); margin: 8px 0;
}
.calc-row .calc-value {
    font-size: 22px; font-weight: 800; color: var(--gold);
    text-align: center; margin-top: 4px;
}
.calc-results {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; margin-top: 24px;
    background: var(--charcoal); border-radius: 8px; padding: 24px;
}
.calc-result-item { text-align: center; }
.calc-result-item .label {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 1px; color: #aaa; margin-bottom: 6px;
}
.calc-result-item .value {
    font-size: 24px; font-weight: 800; color: var(--gold);
}
.calc-result-item .value.positive { color: #6be16b; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { flex-direction: column; text-align: center; gap: 24px; }
    .hero-stats { justify-content: center; }
}
/* ── Hamburger Button ── */
.nav-hamburger {
    display: none;
    background: var(--charcoal);
    border: none;
    cursor: pointer;
    padding: 14px 20px;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    align-items: flex-end;
}
.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Dropdown Menu ── */
.nav-mobile-menu {
    display: none;
    background: #1a1a1a;
    border-top: 2px solid var(--gold);
    position: fixed;
    top: 164px; /* utility-bar(36) + header(80) + nav(48) */
    left: 0;
    right: 0;
    z-index: 9998;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    max-height: calc(100vh - 164px);
    overflow-y: auto;
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-section { padding: 12px 0; border-bottom: 1px solid #2a2a2a; }
.nav-mobile-section.metals-section { display: grid; grid-template-columns: 1fr 1fr; }
.nav-mobile-section:last-child { border-bottom: none; }
.nav-mobile-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #666;
    padding: 4px 20px 8px;
}
.nav-mobile-menu a {
    display: block;
    color: #ddd;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a.active { background: var(--gold); color: var(--charcoal); }

/* ── Mobile search toggle ── */
.mobile-search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    margin: 0;
    border-radius: 6px;
    transition: background 0.15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    box-shadow: none;
}
.mobile-search-toggle:hover,
.mobile-search-toggle:focus { background: rgba(255,255,255,0.1); outline: none; box-shadow: none; }

.mobile-search-row {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #1a1a1a;
    border-top: 2px solid var(--gold);
    padding: 12px 16px 14px;
    z-index: 999;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
.mobile-search-row.open { display: block; }
.mobile-search-inner {
    display: flex;
}
.mobile-search-inner input {
    flex: 1;
    padding: 11px 14px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
}
#mobile-search-close {
    background: var(--gold);
    color: var(--charcoal);
    border: none;
    padding: 11px 16px;
    border-radius: 0 4px 4px 0;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.mobile-search-dropdown {
    margin-top: 8px;
    position: static !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    border-radius: 6px;
}

/* ── Tablet breakpoint ── */
@media (max-width: 900px) {
    /* #8: Larger touch targets for toolbar on tablet/mobile */
    .sort-select { font-size: 14px; padding: 10px 14px; }
    .view-btn { padding: 10px 14px; font-size: 18px; min-width: 44px; min-height: 44px; }
    /* Show mobile search toggle whenever desktop bar is hidden */
    .search-bar { display: none; }
    .mobile-search-toggle { display: flex; }
}

@media (max-width: 768px) {
    /* #1: Hide utility bar on mobile — spot tickers overflow */
    .utility-bar { display: none; }

    .page-body { flex-direction: column; }

    /* #7: Sidebar filters above product grid on mobile */
    .page-body { display: flex; flex-direction: column; }
    .sidebar { width: 100%; order: -1; }
    .sidebar-card { margin-bottom: 12px; }

    .product-grid { grid-template-columns: 1fr; }
    .main-header { flex-direction: row; gap: 0; justify-content: space-between; align-items: center; padding: 12px 14px 12px 16px; overflow: visible; }
    .main-header .logo { flex: 1; min-width: 0; overflow: hidden; }
    .main-header .logo h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .main-header .mobile-search-toggle { flex-shrink: 0; margin-left: 8px; }
    .logo-icon { display: none; }

    /* #2: Hide desktop search bar on mobile — replaced by icon toggle */
    .search-bar { display: none; }

    .nav-bar { display: none; }
    .nav-hamburger { display: flex; }
    .promo-banner { flex-direction: column; gap: 16px; text-align: center; }

    /* #3: Hero stats wrap properly on small screens */
    .hero-stats { flex-wrap: wrap; gap: 16px; justify-content: center; }
    .hero-stat .num { font-size: 22px; }
    .hero-stat .lbl { font-size: 10px; }

    /* #4: Hero badge price font smaller on mobile */
    .hero-badge { padding: 16px 20px; }
    .hero-badge .badge-price { font-size: 28px; }
    .hero-badge .badge-label { font-size: 11px; }

    /* #5: Investment calculator fits mobile screen */
    .calculator-card { padding: 16px; margin: 20px 0; }
    .calculator-card h3 { font-size: 16px; margin-bottom: 16px; }
    .calc-row { margin-bottom: 14px; }
    .calc-row .calc-value { font-size: 18px; }
    .calc-results { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
    .calc-result-item .value { font-size: 20px; }

    /* #8: Touch-friendly toolbar */
    .product-toolbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
    .toolbar-right { gap: 8px; }
    .sort-select { font-size: 14px; padding: 10px 14px; min-height: 44px; }
    .view-btn { padding: 10px 14px; font-size: 18px; min-width: 44px; min-height: 44px; }

    /* List view cards stack on mobile */
    .list-view .product-card { flex-direction: column; }
    .list-view .card-img { width: 100%; min-width: unset; height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
    .list-view .card-body { flex-direction: column; }
    .list-view .card-top-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .list-view .card-pricing { text-align: left; min-width: auto; margin-top: 4px; }
}

/* ── Small phone breakpoint ── */
@media (max-width: 480px) {
    .hero-text h2 { font-size: 24px; }
    .hero-text p { font-size: 13px; }
    .hero-stats { gap: 12px; }
    .hero-stat .num { font-size: 20px; }

    .hero-badge .badge-price { font-size: 24px; }

    .card-price { font-size: 18px; }
    .card-name { font-size: 13px; }
}

/* ── Coming Soon badge (dealer placeholders) ── */
.coming-soon-badge {
    display: inline-block;
    background: #e0e0e0;
    color: #888;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ── Per-dealer price list inside product card ── */
.card-dealer-list {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    padding-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dealer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.dealer-row:last-child {
    border-bottom: none;
}

.dealer-row-name {
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.dealer-row-link {
    color: #E8960C;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.dealer-row-link:hover {
    color: #c97a09;
    text-decoration: underline;
}

.dealer-row-name--muted {
    color: #aaa;
    font-style: italic;
}

.dealer-row-price {
    font-weight: 600;
    color: #333;
}

/* ── Lucide SVG Icons ── */
.icon-svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; }
[data-lucide] { display: inline-block; vertical-align: middle; }
.view-btn [data-lucide] { width: 16px; height: 16px; }
.header-utils [data-lucide] { width: 20px; height: 20px; }



/* iOS Safari scroll lock */
body.no-scroll { position: fixed; top: 0; left: 0; right: 0; width: 100%; overflow-y: scroll; }
