/* Drivers Collective — shared styles (hardening + floating contact buttons) */

/* Samsung / wide-device hardening: stop text inflation and horizontal overflow */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    max-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

img, video {
    max-width: 100%;
}

/* Hard line: grid/flex children may never force the page wider */
.about-content > *,
.contact-wrapper > * {
    min-width: 0;
    max-width: 100%;
}

nav ul {
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 769px) and (max-width: 1100px) {
    nav { padding: 1.25rem 1.5rem; }
    nav ul { gap: 1rem 1.4rem; }
}

/* Floating contact buttons */
.float-contact { position: fixed; right: 18px; bottom: 18px; z-index: 999; display: flex; flex-direction: column; gap: 12px; }
.float-contact a { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.25); transition: transform 0.2s; }
.float-contact a:hover { transform: scale(1.08); }
.float-wa { background: #25D366; }
.float-call { background: #1a1a1a; }
.float-contact a.float-call { display: none; }
.float-contact svg { width: 30px; height: 30px; fill: #fff; }
@media (max-width: 768px) { .float-contact a.float-call { display: flex; } .float-contact a { width: 52px; height: 52px; } }

/* Share buttons on listings */
.card-share {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
}

.card-share:hover { background: #D4AF37; }
.card-share svg { width: 18px; height: 18px; fill: #fff; }

.share-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #1a1a1a;
    font-family: inherit;
}

.share-inline:hover { border-color: #D4AF37; color: #B8941E; }
.share-inline svg { width: 16px; height: 16px; fill: currentColor; }

.dc-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-size: 0.9rem;
    z-index: 1200;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.dc-toast.show { opacity: 1; }

/* Stock alert signup */
.stock-alert {
    background: #1a1a1a;
    color: #fff;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    margin: 3rem 0 1rem;
}

.stock-alert h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stock-alert p {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.stock-alert-form {
    display: flex;
    gap: 0.6rem;
    max-width: 440px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.stock-alert-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.85rem 1rem;
    border: 1px solid #444;
    background: #2a2a2a;
    color: #fff;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.stock-alert-form input::placeholder { color: #888; }
.stock-alert-form input:focus { outline: none; border-color: #D4AF37; }

.stock-alert-form button {
    padding: 0.85rem 1.75rem;
    background: #D4AF37;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.stock-alert-form button:hover { background: #fff; }
.stock-alert-form button:disabled { opacity: 0.6; cursor: default; }

.stock-alert-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 1.2rem;
}

/* Recently sold strip */
.sold-strip {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
    overscroll-behavior-x: contain;
}

.sold-card {
    flex: 0 0 220px;
}

.sold-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    border-radius: 10px;
    position: relative;
    filter: grayscale(35%);
}

.sold-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #c0392b;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
}

.sold-card-name {
    margin-top: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* ===== Dark mode (site-wide) ===== */
html[data-theme="dark"] body { background-color: #121212 !important; color: #e6e6e6 !important; }
html[data-theme="dark"] header { background-color: #1c1c1e !important; border-bottom-color: #2c2c2e !important; }
html[data-theme="dark"] .logo,
html[data-theme="dark"] nav a { color: #f0f0f0 !important; }
html[data-theme="dark"] nav a:hover { color: #D4AF37 !important; }
html[data-theme="dark"] section { background-color: #121212 !important; border-bottom-color: #2c2c2e !important; }
html[data-theme="dark"] section h2 { color: #f2f2f2 !important; }
html[data-theme="dark"] .about-text p { color: #c2c2c2 !important; }

/* Cards and panels that are white in light mode */
html[data-theme="dark"] [class*="card"]:not(.card-share):not([class*="card-img"]):not(.sold-card-img) {
    background-color: #1c1c1e !important;
    background-image: none !important;
    border-color: #3a3a3c !important;
}
html[data-theme="dark"] [class*="card"] h3 { color: #f2f2f2 !important; }
html[data-theme="dark"] [class*="card"] p { color: #c2c2c2 !important; }
html[data-theme="dark"] .car-card-caption,
html[data-theme="dark"] .sold-card-name { color: #e6e6e6 !important; }

/* Booking modal internals (overlay .booking-modal itself keeps its dim) */
html[data-theme="dark"] .booking-modal-content,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .modal-footer,
html[data-theme="dark"] .modal-calendar { background-color: #1c1c1e !important; border-color: #3a3a3c !important; color: #e6e6e6 !important; }
html[data-theme="dark"] .modal-header h3,
html[data-theme="dark"] .modal-back,
html[data-theme="dark"] .modal-close { color: #f2f2f2 !important; }
html[data-theme="dark"] .booking-date,
html[data-theme="dark"] .booking-time { color: #e6e6e6 !important; border-color: #3a3a3c !important; }
html[data-theme="dark"] .booking-date.disabled,
html[data-theme="dark"] .booking-time.disabled { color: #55555a !important; }
html[data-theme="dark"] .booking-date.other-month { color: #44444a !important; }
html[data-theme="dark"] .calendar-day-header { color: #8e8e93 !important; }
html[data-theme="dark"] [class*="summary"],
html[data-theme="dark"] [class*="selector"] { background-color: #242426 !important; border-color: #3a3a3c !important; color: #e6e6e6 !important; }

/* Forms */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background-color: #242426 !important; color: #e6e6e6 !important; border-color: #3a3a3c !important; }
html[data-theme="dark"] label { color: #c2c2c2 !important; }
html[data-theme="dark"] .form-group label { color: #c2c2c2 !important; }

/* Inventory search + filters, FAQ, vehicle spec chips */
html[data-theme="dark"] [class*="filter"],
html[data-theme="dark"] [class*="search"],
html[data-theme="dark"] [class*="suggest"] { background-color: #1c1c1e !important; color: #e6e6e6 !important; border-color: #3a3a3c !important; }
html[data-theme="dark"] [class*="faq"] { background-color: transparent !important; color: #e6e6e6 !important; border-color: #3a3a3c !important; }
html[data-theme="dark"] [class*="spec"] { background-color: #242426 !important; color: #c2c2c2 !important; }
html[data-theme="dark"] .vehicle-btn { background-color: #1c1c1e !important; color: #e6e6e6 !important; }
html[data-theme="dark"] .vehicle-btn.active { background-color: rgba(212, 175, 55, 0.15) !important; }

/* Gold buttons keep dark text in both themes */
html[data-theme="dark"] .btn { color: #1a1a1a !important; }

/* Floating theme toggle */
.float-theme { background: #1a1a1a; border: 1px solid #D4AF37; cursor: pointer; }
.float-theme svg { fill: #D4AF37 !important; }
html[data-theme="dark"] .float-theme { background: #f5f5f5; }

/* ============================================================
   Dark mode for service-page content blocks.
   These blocks were hardcoded #f9f9f9 in each page's inline
   <style>, so they stayed white while the page went dark.
   Matched to the homepage service cards:
     bg #1c1c1e -> #232326, border #3a3a3c,
     headings #f2f2f2, body copy #c2c2c2.
   Light mode is untouched.
   ============================================================ */

/* Blocks that carry a gold accent edge — keep the accent, swap the fill */
html[data-theme="dark"] .service-item,
html[data-theme="dark"] .feature-item {
    background: linear-gradient(135deg, #1c1c1e 0%, #232326 100%) !important;
}

/* Plain blocks — fill plus a hairline border */
html[data-theme="dark"] .process-section,
html[data-theme="dark"] .cta-section,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .consign-section,
html[data-theme="dark"] .no-results,
html[data-theme="dark"] .detail-specs {
    background: linear-gradient(135deg, #1c1c1e 0%, #232326 100%) !important;
    border: 1px solid #3a3a3c !important;
}

/* Headings inside those blocks */
html[data-theme="dark"] .service-item h3,
html[data-theme="dark"] .service-item h4,
html[data-theme="dark"] .feature-item h3,
html[data-theme="dark"] .feature-item h4,
html[data-theme="dark"] .process-section h2,
html[data-theme="dark"] .process-section h3,
html[data-theme="dark"] .process-step h4,
html[data-theme="dark"] .cta-section h2,
html[data-theme="dark"] .cta-section h3,
html[data-theme="dark"] .form-section h2,
html[data-theme="dark"] .form-section h3,
html[data-theme="dark"] .consign-section h2,
html[data-theme="dark"] .detail-specs h3 {
    color: #f2f2f2 !important;
}

/* Body copy inside those blocks */
html[data-theme="dark"] .service-item p,
html[data-theme="dark"] .service-item li,
html[data-theme="dark"] .feature-item p,
html[data-theme="dark"] .feature-item li,
html[data-theme="dark"] .process-section p,
html[data-theme="dark"] .process-step p,
html[data-theme="dark"] .cta-section p,
html[data-theme="dark"] .form-section p,
html[data-theme="dark"] .consign-section p,
html[data-theme="dark"] .no-results p,
html[data-theme="dark"] .detail-specs li,
html[data-theme="dark"] .detail-specs td {
    color: #c2c2c2 !important;
}


/* ============================================================
   Seamless sections (dark mode).
   Superseded the alternating tonal bands. Every section used to
   carry its own background plus a hairline, which read as hard
   splits. Sections are transparent now so ONE continuous page
   background runs behind the lot and the rhythm comes from
   spacing, matching the original layout skeleton.

   These rules live here rather than in the page's inline <style>
   because site.css loads afterwards and would otherwise win.
   Section IDs and anchor navigation are untouched.
   ============================================================ */
html[data-theme="dark"] body,
html[data-theme="dark"] html,
html[data-theme="dark"] main {
    background: #000000 !important;
}

html[data-theme="dark"] section,
html[data-theme="dark"] .app-section,
html[data-theme="dark"] #about,
html[data-theme="dark"] #services-small,
html[data-theme="dark"] #inventory,
html[data-theme="dark"] #faq-home,
html[data-theme="dark"] #contact {
    background-color: transparent !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
}

/* #services-small keeps its photo - only the flat colour fills go */
html[data-theme="dark"] #about,
html[data-theme="dark"] #inventory,
html[data-theme="dark"] #faq-home,
html[data-theme="dark"] .app-section,
html[data-theme="dark"] #contact {
    background-image: none !important;
}

/* The footer stays a distinct zone. The page is black now, so it
   separates by sitting slightly ABOVE black rather than below it,
   with a faint hairline for definition. Deliberate exception to the
   seamless rule above. */
html[data-theme="dark"] footer {
    background: #101014 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.09) !important;
}

/* Nothing on the page may draw a horizontal edge in dark mode. */
html[data-theme="dark"] section,
html[data-theme="dark"] section > div,
html[data-theme="dark"] header,
html[data-theme="dark"] hr {
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
}
html[data-theme="dark"] header {
    background: #000000 !important;
    border-bottom: 0 !important;
}


/* ============================================================
   FIX 1 — Booking modal calendar in dark mode.
   The dark rules set colour and border on .booking-date /
   .booking-time but never the background, so the cells stayed
   pure white against the dark modal.
   ============================================================ */
html[data-theme="dark"] .booking-date,
html[data-theme="dark"] .booking-time {
    background-color: #242426 !important;
    color: #e6e6e6 !important;
    border-color: #3a3a3c !important;
}
html[data-theme="dark"] .booking-date:hover:not(.disabled):not(.other-month),
html[data-theme="dark"] .booking-time:hover:not(.disabled) {
    background-color: #2e2e31 !important;
    border-color: #D4AF37 !important;
}
html[data-theme="dark"] .booking-date.selected,
html[data-theme="dark"] .booking-time.selected {
    background-color: #D4AF37 !important;
    color: #1a1a1a !important;
    border-color: #D4AF37 !important;
}
html[data-theme="dark"] .booking-date.disabled,
html[data-theme="dark"] .booking-time.disabled {
    background-color: #1a1a1c !important;
    color: #55555a !important;
}
html[data-theme="dark"] .booking-date.other-month {
    background-color: #1a1a1c !important;
    color: #44444a !important;
}

/* ============================================================
   FIX 2 — "Build Your Service" panel.
   Its class names contain "card" and "summary", so the generic
   [class*="card"] / [class*="summary"] dark rules above were
   winning on !important and flattening the panel: the gold total
   went grey and the glass card lost its gradient. These are more
   specific, so they take precedence.
   ============================================================ */
html[data-theme="dark"] .builder-card {
    background: linear-gradient(135deg, #1c1c1e 0%, #232326 100%) !important;
    border-color: #3a3a3c !important;
}
html[data-theme="dark"] .builder-card .builder-summary { background-color: #0d0d0e !important; }
html[data-theme="dark"] .builder-card .builder-total   { color: #D4AF37 !important; }
html[data-theme="dark"] .builder-card .builder-time    { color: #e6e6e6 !important; }
html[data-theme="dark"] .builder-card .builder-note    { color: #b8b8b3 !important; }
html[data-theme="dark"] .builder-card .bp              { color: #D4AF37 !important; }
html[data-theme="dark"] .builder-card .builder-lede    { color: #c2c2c2 !important; }
html[data-theme="dark"] .builder-card .builder-eyebrow { color: #D4AF37 !important; }
html[data-theme="dark"] .builder-card h3               { color: #f2f2f2 !important; }
html[data-theme="dark"] .builder-card .builder-row b   { color: #f2f2f2 !important; }
html[data-theme="dark"] .builder-card .builder-row small { color: #a5a5a0 !important; }


/* ============================================================
   FIX 3 — Booking summary text.
   .booking-summary-box gets a dark background from the generic
   [class*="summary"] rule, but the <p>/<strong> inside inherit a
   near-black #1a1a1a from the modal's own styles, so the text was
   invisible against it.
   ============================================================ */
html[data-theme="dark"] .booking-summary-box,
html[data-theme="dark"] .booking-summary-box p,
html[data-theme="dark"] .booking-summary-box strong,
html[data-theme="dark"] .booking-summary,
html[data-theme="dark"] .booking-summary p,
html[data-theme="dark"] .booking-summary strong {
    color: #e6e6e6 !important;
}

/* ============================================================
   FIX 4 — Chrome autofill.
   Chrome paints its own pale background on autofilled inputs and
   ignores background-color. The inset box-shadow trick is the only
   way to override it; -webkit-text-fill-color handles the text.
   Applies to every form on the site in dark mode, not just booking.
   ============================================================ */
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] input:-webkit-autofill:active,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] textarea:-webkit-autofill:hover,
html[data-theme="dark"] textarea:-webkit-autofill:focus,
html[data-theme="dark"] select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #242426 inset !important;
    box-shadow: 0 0 0 1000px #242426 inset !important;
    -webkit-text-fill-color: #e6e6e6 !important;
    caret-color: #e6e6e6 !important;
    border-color: #3a3a3c !important;
}


/* ============================================================
   FIX 5 — Hero buttons in dark mode.
   `html[data-theme="dark"] .btn { color:#1a1a1a !important }` above
   is right for gold-FILLED buttons, but the hero CTAs are outline
   style on smoked glass, so it painted their text near-black on a
   near-black fill and made them unreadable. Restore the outline
   colours; on hover the buttons fill solid, so dark text is correct.
   ============================================================ */
html[data-theme="dark"] .hero-buttons .btn {
    color: #D4AF37 !important;
    border-color: #D4AF37 !important;
}
html[data-theme="dark"] .hero-buttons .btn.btn-secondary {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}
html[data-theme="dark"] .hero-buttons .btn:hover,
html[data-theme="dark"] .hero-buttons .btn.btn-secondary:hover {
    color: #1a1a1a !important;
}


/* ============================================================
   FIX 6 — Touch target sizes.
   31 interactive elements measured under 44px, mostly text links
   16-20px tall (footer columns, contact list, nav). Google's
   guidance is a 44-48px minimum on touch devices.

   Icon buttons are enlarged everywhere. Text links only get the
   padding on touch-sized screens, so desktop spacing is unchanged.
   ============================================================ */

/* Icon buttons: enlarge on all screens */
.card-share { width: 44px !important; height: 44px !important; }
.footer-social a { width: 44px !important; height: 44px !important; }
.about-gallery-arrow { width: 44px !important; height: 44px !important; }

@media (max-width: 768px) {
    /* Text links: pad to a 44px hit area without changing the type */
    .footer-col a,
    .contact-list dd a,
    footer nav a,
    nav ul a {
        display: inline-block;
        padding-top: 14px;
        padding-bottom: 14px;
        line-height: 1.15;
    }

    /* keep the columns from becoming over-tall now each row is bigger */
    .footer-col ul { gap: 0 !important; }

    /* small close/dismiss controls */
    .dc-toast button,
    button[aria-label*="ismiss"],
    button[aria-label*="lose"] {
        min-width: 44px;
        min-height: 44px;
    }
}


/* ============================================================
   FIX 7 — Contact form: subtle white field borders.
   The generic dark-mode input rule paints every field border
   #3a3a3c; the contact form is meant to read as crisp white boxes.
   ============================================================ */
html[data-theme="dark"] .contact-form input,
html[data-theme="dark"] .contact-form textarea {
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .contact-form input:focus,
html[data-theme="dark"] .contact-form textarea:focus {
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.18) !important;
}


/* ============================================================
   Plain content headings in dark mode.
   detailing.html and ppf.html put their <h1> inside a .page-hero
   with a photo behind it, so it is white already. storage.html and
   consignment.html do not - their `section h1 { color:#1a1a1a }`
   sat on the #121212 dark background at a 1.08:1 contrast ratio,
   which is invisible. .intro-text at #666 was only 3.26:1.
   ============================================================ */
html[data-theme="dark"] section h1 { color: #f2f2f2 !important; }
html[data-theme="dark"] .intro-text { color: #c2c2c2 !important; }


/* ============================================================
   FIX 8 — TEXT LEGIBILITY / WCAG AA CONTRAST
   ------------------------------------------------------------
   A rendered audit (computed colour vs. computed background, per
   element, both themes, every public page) found 16 text/background
   pairs below the WCAG AA threshold of 4.5:1 for body copy and
   3:1 for large text. Most were greys that had drifted too light
   against white, plus a few dark-mode rules that were never written
   and left near-black text on a near-black page.

   The replacement palette:
     light-mode muted grey  #5f5f5f   6.4:1 on #fff, 6.1:1 on #f9f9f9
     light-mode gold text   #8a6d1f   4.9:1 on #fff, 4.7:1 on #f9f9f9
     dark-mode muted grey   #a0a0a0   8.0:1 on #000, 6.5:1 on #1c1c1e
     dark-mode body copy    #c2c2c2   (matches the existing dark scale)
     dark-mode headings     #f2f2f2   (matches the existing dark scale)

   Brand gold #D4AF37 is untouched as a fill, border and icon colour,
   and untouched as TEXT in dark mode where it already reads at 8:1.
   It is only darkened where it sits as text on a white/near-white
   background, which is the one place it fails.

   !important is required throughout: several of these values are set
   via inline style attributes, which outrank any stylesheet rule.
   ============================================================ */

/* ---- Light mode: greys that were washed out on white ---------- */
html:not([data-theme="dark"]) .card-ref,
html:not([data-theme="dark"]) .intro,
html:not([data-theme="dark"]) .updated,
html:not([data-theme="dark"]) .faq-shortcuts h2,
html:not([data-theme="dark"]) [style*="color:#888" i],
html:not([data-theme="dark"]) [style*="color: #888" i],
html:not([data-theme="dark"]) [style*="color:#999" i],
html:not([data-theme="dark"]) [style*="color: #999" i] {
    color: #5f5f5f !important;
}

/* The footer sits on a dark panel in BOTH themes, so its own #999
   links stay light — exclude them from the rule above. */
html:not([data-theme="dark"]) footer [style*="color:#999" i],
html:not([data-theme="dark"]) footer [style*="color: #999" i],
html[data-theme="dark"] footer [style*="color:#999" i],
html[data-theme="dark"] footer [style*="color: #999" i] {
    color: #b5b5b5 !important;
}

/* ---- Light mode: gold used as TEXT on a white background ------ */
html:not([data-theme="dark"]) .about-text .about-eyebrow,
html:not([data-theme="dark"]) .car-price,
html:not([data-theme="dark"]) .service-price,
html:not([data-theme="dark"]) .detail-price,
html:not([data-theme="dark"]) .simple-price,
html:not([data-theme="dark"]) .cc-price,
html:not([data-theme="dark"]) .faq-eyebrow,
html:not([data-theme="dark"]) .film-life,
html:not([data-theme="dark"]) .fp-reset,
html:not([data-theme="dark"]) .faq-home-item a,
html:not([data-theme="dark"]) [style*="color:#B8941E" i],
html:not([data-theme="dark"]) [style*="color: #B8941E" i],
html:not([data-theme="dark"]) [style*="color:#D4AF37" i],
html:not([data-theme="dark"]) [style*="color: #D4AF37" i] {
    color: #8a6d1f !important;
}

/* Gold links on light backgrounds (faq / privacy set a bare `a`) */
html:not([data-theme="dark"]) .container a:not(.btn):not(.footer-col a),
html:not([data-theme="dark"]) .faq-shortcuts a,
html:not([data-theme="dark"]) .legal-body a {
    color: #8a6d1f;
}

/* ---- About-gallery arrows: white glyph on pale gold (1.66:1) ---
   Fill the button with solid brand gold and set the glyph near-black,
   which reads at 8.3:1 and keeps the gold identity in both themes. */
.about-gallery-arrow {
    background: #D4AF37 !important;
    color: #1a1a1a !important;
}
.about-gallery-arrow:hover {
    background: #b8941e !important;
    color: #1a1a1a !important;
}

/* ---- Footer meta line: #6e6e73 on the near-black footer -------- */
.footer-base,
.footer-base a {
    color: #a0a0a0 !important;
}

/* ============================================================
   Dark mode gaps.
   faq.html and privacy.html wrap their content in a plain
   .container rather than a <section>, so the existing
   `html[data-theme="dark"] section h2` rule never matched them and
   their headings stayed #1a1a1a on a black page — 1.21:1, i.e.
   completely invisible. Their body copy at #555 was 2.82:1.
   ============================================================ */
html[data-theme="dark"] .container h1,
html[data-theme="dark"] .container h2,
html[data-theme="dark"] .container h3,
html[data-theme="dark"] .faq-item h2,
html[data-theme="dark"] .legal-body h2 {
    color: #f2f2f2 !important;
}

html[data-theme="dark"] .faq-item p,
html[data-theme="dark"] .faq-cta p,
html[data-theme="dark"] .legal-body p,
html[data-theme="dark"] .legal-body li,
html[data-theme="dark"] .container > p,
html[data-theme="dark"] .container li {
    color: #c2c2c2 !important;
}

/* Muted greys that are fine on white but too dark on black */
html[data-theme="dark"] .inventory-count,
html[data-theme="dark"] .intro,
html[data-theme="dark"] .updated,
html[data-theme="dark"] .faq-shortcuts h2,
html[data-theme="dark"] [style*="color:#666" i],
html[data-theme="dark"] [style*="color: #666" i],
html[data-theme="dark"] [style*="color:#555" i],
html[data-theme="dark"] [style*="color: #555" i],
html[data-theme="dark"] [style*="color:#888" i],
html[data-theme="dark"] [style*="color: #888" i] {
    color: #a0a0a0 !important;
}

/* Icon buttons that inherited near-black text onto a dark panel */
html[data-theme="dark"] .fp-close,
html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .lb-close {
    color: #e6e6e6 !important;
}


/* ============================================================
   FIX 8b — where the gold rule above reached too far.
   Darkening gold is only correct when the gold is TEXT sitting on a
   light background. Two cases break that assumption and a re-audit
   caught both:

     1. Gold-FILLED buttons (.cta-btn). The label needs to go DARK,
        not to a darker gold — #8a6d1f on #D4AF37 is 2.33:1, whereas
        #1a1a1a on #D4AF37 is 8.3:1.
     2. Gold text that already sits on the near-black panels (car card
        captions, the contact list). That was brand gold on #1a1a1a at
        8.3:1 and was never a problem; darkening it made it 3.55:1.

   Listed after the rule they correct so they win on source order.
   ============================================================ */
html:not([data-theme="dark"]) .cta-btn,
html:not([data-theme="dark"]) .enquire-btn {
    color: #1a1a1a !important;
}

html:not([data-theme="dark"]) .car-card-caption .cc-price,
html:not([data-theme="dark"]) .contact-list dd a,
html:not([data-theme="dark"]) #contact a,
html:not([data-theme="dark"]) footer a {
    color: #D4AF37 !important;
}

/* One inline gold link on detailing.html landed at 4.47:1 — just under
   the 4.5 line. Same treatment as the rest of the gold body links. */
html:not([data-theme="dark"]) [style*="color: #887138" i],
html:not([data-theme="dark"]) [style*="color:#887138" i] {
    color: #8a6d1f !important;
}
