/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: rgba(20, 22, 26, 0.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}
.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
/* Custom logo: fixed height from site-config, width follows the image's aspect ratio. */
.brand-logo {
    display: block;
    height: var(--logo-height, 44px);
    width: auto;
    max-width: var(--logo-max-width, 220px);
    object-fit: contain;
    flex-shrink: 0;
}
.brand-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.3px;
    line-height: 1.1;
}
.brand-name small {
    display: block;
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a.is-active {
    color: var(--text);
    text-decoration: none;
}
.nav-links a.is-active { color: var(--accent); }

.nav-cta {
    display: flex;
    align-items: center;
    gap: 18px;
}
.nav-phone {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1rem;
    white-space: nowrap;
}
.nav-phone:hover { color: var(--accent); text-decoration: none; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    width: 42px;
    height: 42px;
    cursor: pointer;
}

@media (max-width: 860px) {
    .brand-logo { height: var(--logo-height-mobile, 36px); }
    .nav-links { display: none; }
    .nav-phone span.nav-phone-label { display: none; }
    .nav-toggle { display: block; }

    .nav-links.is-open {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 8px 24px 20px;
    }
    .nav-links.is-open li { width: 100%; }
    .nav-links.is-open a {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    padding: 64px 0 80px;
    /* Static soft red glow: a wide band across the full width under the header,
       plus a broader, fainter wash that reaches further down on the right. */
    background:
        radial-gradient(ellipse 120% 380px at 50% -60px, var(--accent-glow, rgba(240,0,0,0.12)), transparent 75%),
        radial-gradient(ellipse 1100px 700px at 85% -10%, var(--accent-glow, rgba(240,0,0,0.12)), transparent 65%),
        var(--bg);
}
/* Same soft red glow as the hero, centered behind a section. Fades to transparent
   before the section edges so there's no visible seam. */
.section--glow {
    background: radial-gradient(ellipse 60% 55% at 50% 50%, var(--accent-glow, rgba(240,0,0,0.12)), transparent);
}
.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}
@media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; }
}
.hero h1 { margin-bottom: 0.4em; }
.hero-lede {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 46ch;
}
.hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 28px 0 40px;
}
.hero-stats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
}
.hero-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--accent);
}
.hero-stat span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Featured "window sticker" card */
.sticker-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.sticker-flag {
    position: absolute;
    top: 16px;
    left: -34px;
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 1px;
    padding: 5px 40px;
    transform: rotate(-45deg);
    z-index: 2;
}
.sticker-photo {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #23262d, #191b1f);
}
.sticker-body { padding: 22px 24px 24px; }
.sticker-body h3 { margin-bottom: 4px; }
.sticker-specs {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 14px;
}
.sticker-price {
    font-family: var(--font-display);
    font-size: 1.7rem;
    color: var(--accent);
}
.sticker-price .price-original { font-size: 0.6em; margin-left: 6px; }

/* ==========================================================================
   Photo placeholder (used anywhere a car has no uploaded photos yet)
   ========================================================================== */
.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-faint);
    background: repeating-linear-gradient(
        135deg, #1a1c21, #1a1c21 12px, #1d2026 12px, #1d2026 24px
    );
}
.no-photo svg { width: 30%; height: 30%; opacity: 0.5; }

/* ==========================================================================
   Section headers
   ========================================================================== */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.section-head p { color: var(--text-muted); margin: 0; }
/* A page's main <h1> in a section header looks identical to the <h2> headers on other pages. */
.section-head h1 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }

/* ==========================================================================
   Inventory grid + car card
   ========================================================================== */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 26px;
}
.car-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 150ms ease;
}
.car-card:hover { border-color: #3a4048; }
.car-card-photo {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.car-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.car-card-status {
    position: absolute;
    top: 12px;
    right: 12px;
}
.sold-stamp {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20,22,26,0.55);
}
.sold-stamp span {
    border: 3px solid var(--sold);
    color: var(--sold);
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 3px;
    padding: 6px 22px;
    transform: rotate(-8deg);
    background: rgba(20,22,26,0.4);
}
.car-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.car-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 2px;
}
.car-card-title a { color: var(--text); }
.car-card-title a:hover { color: var(--accent); text-decoration: none; }
.car-card-trim { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 10px; }
.car-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 14px;
}
.car-card-specs span:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--text-faint);
    margin-left: 10px;
    vertical-align: middle;
}
.car-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.car-card-price {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--accent);
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state p { margin-left: auto; margin-right: auto; }
/* Bordered panel with an icon, used when a search/filter returns nothing. */
.empty-state--card {
    /* Full width, matching the filter bar above it. */
    margin: 0;
    padding: 64px 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.empty-state--card h3 { color: var(--text); margin-bottom: 8px; }
.empty-state--card p { margin-bottom: 24px; }

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 32px;
}
/* Dropdowns/inputs keep a fixed width; they wrap onto a new line when the row is full
   (and only shrink when alone on a line narrower than their width). */
.filter-bar .field { margin-bottom: 0; flex: 0 1 296px; min-width: 0; }
.filter-bar .field label { margin-bottom: 4px; }
/* Apply button fills whatever space is left in the row; when less than 140px is left it
   wraps onto its own line and spans the full width. */
.filter-bar-submit { flex: 1 1 140px; min-width: 140px; }

/* Medium screens: two equal columns. Row 1 = two filters, row 2 = third filter + button. */
@media (max-width: 1180px) {
    .filter-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
    .filter-bar .field, .filter-bar-submit { min-width: 0; }
}
/* Small screens: everything stacked in its own row, all the same full width. */
@media (max-width: 640px) {
    .filter-bar { grid-template-columns: minmax(0, 1fr); }
}

/* Result summary above the public inventory grid (pagination styles live in base.css). */
.results-summary { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

/* ==========================================================================
   Car detail page
   ========================================================================== */
.detail-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
}
.gallery-main {
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gallery-thumbs label {
    width: 84px; height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    margin: 0;
    display: block;
}
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-radio { display: none; }
.gallery-radio:checked + label { border-color: var(--accent); }

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 6px;
}
.detail-price {
    font-family: var(--font-display);
    font-size: 2.1rem;
    color: var(--accent);
    margin: 10px 0 20px;
}
/* Struck-through original price shown next to a discounted price. */
.price-original {
    color: var(--text-faint);
    text-decoration: line-through;
    font-size: 0.62em;
    margin-left: 8px;
    font-weight: 400;
}
.price-sale-tag {
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    padding: 2px 10px;
    font-size: 0.42em;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent-ink);
    background: var(--accent);
    border-radius: 20px;
}
.car-card-price .price-original { font-size: 0.72em; margin-left: 6px; }
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 28px;
}
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:last-child { border-bottom: none; }
.spec-table th, .spec-table td {
    text-align: left;
    padding: 10px 0;
    font-size: 0.92rem;
}
.spec-table th {
    color: var(--text-muted);
    font-weight: 400;
    width: 42%;
}
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 8px;
}
.feature-tag {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 12px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.contact-panel {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    padding: 26px;
}
.contact-panel h3 { margin-bottom: 4px; }
.contact-panel .stock-line {
    color: var(--text-faint);
    font-size: 0.82rem;
    margin-bottom: 18px;
}
.contact-panel .btn { margin-bottom: 10px; }
.contact-panel-divider {
    border-top: 1px solid var(--border);
    margin: 18px 0;
}
.contact-panel address {
    font-style: normal;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}
.share-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.share-row input {
    font-size: 0.82rem;
    height: var(--control-height-sm);
    padding: 0 10px;
}
.copy-btn {
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    height: var(--control-height-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.82rem;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* ==========================================================================
   How it works / process (a genuine sequence, so numbering is earned)
   ========================================================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step-num {
    font-family: var(--font-display);
    font-size: 2.4rem;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 10px;
}

/* ==========================================================================
   Reviews
   ========================================================================== */
.rating-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.rating-summary strong {
    font-family: var(--font-display);
    font-size: 2.6rem;
    color: var(--accent);
}
.stars { color: var(--accent); letter-spacing: 2px; }
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}
.review-card { padding: 24px; }
.review-quote-mark {
    font-family: var(--font-display);
    font-size: 2.6rem;
    color: var(--border);
    line-height: 0.6;
    display: block;
    margin-bottom: 6px;
}
.review-name { font-family: var(--font-display); font-size: 0.95rem; margin-top: 14px; }
.review-date { color: var(--text-faint); font-size: 0.8rem; }

/* ==========================================================================
   FAQ accordion (native <details>, no JS needed)
   ========================================================================== */
.faq-item {
    border-bottom: 1px solid var(--border);
}
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 20px 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--accent);
    flex-shrink: 0;
}
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { padding-bottom: 20px; color: var(--text-muted); }

/* ==========================================================================
   About / values grid
   ========================================================================== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 760px) { .values-grid { grid-template-columns: 1fr; } }
.value-card { padding: 26px; }

/* ==========================================================================
   Location / map
   ========================================================================== */
.location-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* equal widths, same as the contact page */
    gap: 32px;
    align-items: stretch;             /* map matches the height of the info card */
}
@media (max-width: 860px) { .location-layout { grid-template-columns: 1fr; } }
/* Side by side: the map fills the card's height. Stacked: fall back to a fixed ratio. */
.location-layout .map-frame { aspect-ratio: auto; min-height: 360px; }
@media (max-width: 860px) { .location-layout .map-frame { aspect-ratio: 16/10; min-height: 0; } }
.hours-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.hours-table td { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.hours-table td:last-child { text-align: right; color: var(--text-muted); }
.map-frame {
    width: 100%;
    aspect-ratio: 16/10;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   Contact / sell-your-car layout
   ========================================================================== */
.form-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 44px;
    align-items: start;
}
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; } }

/* Contact page: two equal-width, equal-height cards side by side. */
.form-layout--equal { grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
@media (max-width: 860px) { .form-layout--equal { grid-template-columns: 1fr; } }
.form-layout--equal > .card { display: flex; flex-direction: column; padding: 30px !important; }
.form-layout--equal form { display: flex; flex-direction: column; flex: 1; }
.form-layout--equal .field--grow { flex: 1; display: flex; flex-direction: column; }
.form-layout--equal .field--grow textarea { flex: 1; min-height: 120px; }
.form-layout--equal form .btn { align-self: flex-start; }
/* Spread the info groups evenly so the card fills its height. */
.info-card--spread { justify-content: space-between; gap: 20px; }
.info-card--spread .info-group h4 { margin-top: 0; }
.info-card { padding: 26px; }
.info-card h4 { color: var(--text-muted); font-weight: 400; margin: 18px 0 4px; font-size: 0.82rem; text-transform: none; }
.info-card h4:first-child { margin-top: 0; }
.info-card .info-value { font-family: var(--font-display); font-size: 1.05rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 56px 0 28px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-grid h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-faint);
    font-size: 0.82rem;
}
.footer-bottom a { color: var(--text-faint); }
.footer-bottom a:hover { color: var(--text-muted); }
.footer-credit::before { content: "\00b7"; margin: 0 8px; }
