/* ============================================================
   Zero Max — all-cars.css (new All Cars page, built section by section)
   Prefix: zm-ac-  |  H1→H2→H3 hierarchy enforced
   Color tokens (--zm-orange, --gv-gray-900, --gv-black, etc.)
   come from header.css, already loaded sitewide before this file.
   ============================================================ */

/* ══════════════════════════════════════════
   RESET (all-cars.php has no other stylesheet to
   inherit this from — header.css doesn't reset)
   ══════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
    font-family: var(--gv-font, 'Poppins', sans-serif);
    background: var(--gv-black, #0A0A0A);
    min-height: 100vh;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }

/* Visually hidden but present for SEO/screen readers — same technique
   used on the homepage hero's <h1> (see home.css .zm-sr-only). */
.zm-ac-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Shared contained-width wrap, matching the 1380px convention used
   sitewide (home.css, all-cars_old.css, contact.css, etc.). */
.zm-ac-wrap { max-width: 1380px; margin: 0 auto; padding: 0 32px; }

/* ══════════════════════════════════════════
   HERO / BANNER
   Glow, cars and feature badges are baked into
   AllCarsBanner.webp, but the headline is not —
   the real <h1> is overlaid in the open sky
   above the cars (same idea on mobile, with its
   own positioning below in the 640px query).
   ══════════════════════════════════════════ */
.zm-ac-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 900;
    overflow: hidden;
}
.zm-ac-hero picture { display: block; width: 100%; height: 100%; }
.zm-ac-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overrides the .zm-ac-sr-only clip so the heading renders as a real,
   visible heading instead of staying screen-reader-only. */
.zm-ac-hero-heading {
    position: absolute;
    top: 9%;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    max-width: 70%;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    z-index: 2;

    color: #fff;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-weight: 800;
    font-size: clamp(24px, 3.2vw, 44px);
    line-height: 1.15;
    text-align: center;
    text-shadow: 0 3px 14px rgba(0, 0, 0, .5);
}

/* ══════════════════════════════════════════
   BRANDS — static logo grid, same component
   as home.css's .zm-brands (ported, zm-ac- prefixed)
   ══════════════════════════════════════════ */
.zm-ac-brands {
    background: var(--gv-gray-900, #1A1A1A);
    padding: 32px 0;
}

/* All 7 logos in one row down to 769px; below that it becomes a
   centred flex wrap (3, then 2 per row) so the odd last logo sits
   in the middle — same as home.css's .zm-brands. */
.zm-ac-brands-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
}

.zm-ac-brand-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 2.6 / 1;
    padding: 10px 14px;

    border: 1px solid var(--gv-gray-300, #9A9A9A);
    border-radius: 16px;

    transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.zm-ac-brand-card:hover {
    border-color: var(--gv-white, #fff);
    background: rgba(255, 255, 255, .04);
    transform: translateY(-3px);
}
.zm-ac-brand-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ══════════════════════════════════════════
   ALL CARS — vehicle grid, same card design as
   home.css's .zm-fleet-card (ported, zm-ac- prefixed)
   ══════════════════════════════════════════ */
.zm-ac-cars {
    background: var(--gv-black, #0A0A0A);
    padding: 64px 0;
}

.zm-ac-cars-heading {
    margin: 0 0 40px;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: clamp(26px, 3.6vw, 40px);
    font-weight: 800;
    text-align: center;
    color: var(--gv-white, #fff);
}

.zm-ac-cars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

/* ── Fuel filter (all-cars.js toggles [hidden] on cards — the
      URL never changes). Centred pill row on desktop; a
      sideways-scrolling row on tablets; 2×2 grid on phones. ── */
.zm-ac-cars-heading { margin-bottom: 24px; }

.zm-ac-filter {
    position: relative; /* offsetParent for the JS scroll-into-view */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
}

.zm-ac-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid var(--gv-gray-700, #333);
    border-radius: 999px;
    background: var(--gv-gray-900, #1A1A1A);
    color: var(--gv-white, #fff);
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
    -webkit-tap-highlight-color: transparent;
}
.zm-ac-filter-btn:hover { border-color: var(--zm-orange, #FF6A2B); }
.zm-ac-filter-btn:focus-visible {
    outline: 2px solid var(--zm-orange, #FF6A2B);
    outline-offset: 2px;
}
.zm-ac-filter-btn.is-active {
    background: linear-gradient(160deg, #FF8A52, #FF6A2B);
    border-color: var(--zm-orange, #FF6A2B);
}

.zm-ac-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: 12px;
    font-weight: 700;
}
.zm-ac-filter-btn.is-active .zm-ac-filter-count { background: rgba(0, 0, 0, .22); }

/* `display:flex` on .zm-ac-card would otherwise beat the [hidden] attribute */
.zm-ac-card[hidden],
.zm-ac-filter-empty[hidden] { display: none; }

.zm-ac-filter-empty {
    max-width: 520px;
    margin: 0 auto;
    padding: 36px 24px;
    border: 1px dashed var(--gv-gray-700, #333);
    border-radius: 12px;
    text-align: center;
    color: rgba(255, 255, 255, .8);
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 15px;
    line-height: 1.6;
}
.zm-ac-filter-empty strong { color: var(--gv-white, #fff); }
.zm-ac-filter-reset {
    margin-top: 16px;
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid var(--zm-orange, #FF6A2B);
    border-radius: 999px;
    background: transparent;
    color: var(--zm-orange, #FF6A2B);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.zm-ac-filter-reset:hover { background: var(--zm-orange, #FF6A2B); color: #fff; }

.zm-ac-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--zm-orange, #FF6A2B);
    border-radius: 12px;
    overflow: hidden;
    background: var(--gv-gray-900, #1A1A1A);
}

.zm-ac-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    background: var(--gv-white, #fff);
}
.zm-ac-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.zm-ac-namebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: var(--gv-gray-800, #222222);
}

.zm-ac-title-link { min-width: 0; text-decoration: none; }
.zm-ac-card-title {
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--gv-white, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zm-ac-brand-badge { flex-shrink: 0; display: flex; align-items: center; }
.zm-ac-brand-badge img { height: 34px; width: auto; max-width: 90px; object-fit: contain; }

.zm-ac-actions {
    display: flex;
    gap: 8px;
    padding: 12px 14px 14px;
    margin-top: auto;
}

.zm-ac-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 8px;
    color: var(--gv-white, #fff);
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity .25s ease, transform .25s ease;
}
.zm-ac-btn:hover { opacity: .88; transform: translateY(-1px); }
.zm-ac-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.zm-ac-btn-call {
    background: linear-gradient(160deg, var(--zm-orange-light, #FF8A52), var(--zm-orange, #FF6A2B));
}
.zm-ac-btn-wa { background: #25D366; }

/* ══════════════════════════════════════════
   SEO CONTENT — card-framed heading+prose block
   (matches the site's existing "content in a box"
   language: .zm-ac-card / .zm-ac-faq-card — gray-900
   panel, subtle border, rounded corners — instead of
   bare text on the page background).
   ══════════════════════════════════════════ */
.zm-ac-content, .zm-ac-steps-section {
    background: var(--gv-black, #0A0A0A);
    padding: 64px 0;
}

.zm-ac-content-heading {
    margin: 0 0 16px;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: clamp(26px, 3.6vw, 40px);
    font-weight: 800;
    text-align: center;
    color: var(--gv-white, #fff);
}

/* Short centered intro/closing lines (1-2 sentences) — the steps
   section's lead-in and wrap-up text. */
.zm-ac-content-desc {
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 15.5px;
    line-height: 1.7;
    text-align: center;
    color: var(--gv-gray-300, #9A9A9A);
}
.zm-ac-content-desc + .zm-ac-content-desc { margin-top: 16px; }

/* Card panel wrapping each long-form content block — fills the page's
   normal content width (matches the vehicle grid/brand strip above it)
   instead of floating as a narrow island with dead space either side.
   Icon+heading sit in a left column, paragraph fills the rest, so line
   length stays readable without needing a narrow overall card. */
.zm-ac-content-card {
    width: 100%;
    margin: 28px 0 0;
    padding: 44px 48px;
    background: var(--gv-gray-900, #1A1A1A);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 20px;
    display: flex;
    align-items: flex-start;
    gap: 36px;
}
.zm-ac-content-card-body { flex: 1; min-width: 0; }
.zm-ac-content-card .zm-ac-content-heading { margin: 0 0 14px; text-align: left; }

.zm-ac-content-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--zm-orange-light, #FF8A52), var(--zm-orange, #FF6A2B));
    color: var(--gv-white, #fff);
}
.zm-ac-content-icon svg { width: 26px; height: 26px; }

/* Long-form paragraph body copy — left-aligned (centering a full
   paragraph produces a ragged, hard-to-read shape), readable measure. */
.zm-ac-content-desc--body {
    max-width: none;
    margin: 0;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 16px;
    line-height: 1.8;
    text-align: left;
    color: var(--gv-gray-300, #9A9A9A);
}
.zm-ac-content-desc--body a, .zm-ac-step-desc a, .zm-ac-faq-answer a {
    color: var(--zm-orange, #FF6A2B);
    text-decoration: underline;
}

/* ══════════════════════════════════════════
   STEPS — "Choose a Car That Fits Your Needs",
   a responsive card grid (5 items) instead of a
   flat divided list, so wide viewports don't leave
   a single narrow column surrounded by empty space.
   ══════════════════════════════════════════ */
.zm-ac-steps-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px 0 0;
    padding: 0;
}

.zm-ac-step {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    flex: 1 1 320px;
    max-width: 380px;
    padding: 28px;
    background: var(--gv-gray-900, #1A1A1A);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    transition: border-color .25s ease, transform .25s ease;
}
.zm-ac-step:hover { border-color: var(--zm-orange, #FF6A2B); transform: translateY(-3px); }

.zm-ac-step-num {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--zm-orange-light, #FF8A52), var(--zm-orange, #FF6A2B));
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 18px;
    font-weight: 800;
    color: var(--gv-white, #fff);
}

.zm-ac-step-title {
    margin: 0;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--gv-white, #fff);
}

.zm-ac-step-desc {
    margin: 0;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--gv-gray-300, #9A9A9A);
}

/* Closing paragraph after the grid needs its own breathing room. */
.zm-ac-steps-list + .zm-ac-content-desc { margin-top: 40px; }

/* ══════════════════════════════════════════
   FAQ — accordion, key/value content. Ported from
   home.css's .zm-faq (assets/js/all-cars.js drives
   the toggle behavior — zm-ac- prefixed so this page
   doesn't need to load home.js).
   ══════════════════════════════════════════ */
.zm-ac-faq {
    background: var(--gv-black, #0A0A0A);
    padding: 48px 0 64px;
}

.zm-ac-faq-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 32px;
}

.zm-ac-faq-card {
    background: var(--gv-gray-800, #222222);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: background .3s ease;
}
.zm-ac-faq-item--open .zm-ac-faq-card {
    background: linear-gradient(160deg, var(--zm-orange-light, #FF8A52), var(--zm-orange, #FF6A2B));
}

.zm-ac-faq-q-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}

.zm-ac-faq-qtext {
    margin: 0;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 15.5px;
    font-weight: 600;
    color: var(--gv-white, #fff);
    line-height: 1.4;
}

.zm-ac-faq-toggle {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gv-white, #fff);
    cursor: pointer;
    padding: 0;
}
.zm-ac-faq-toggle svg { width: 18px; height: 18px; }
.zm-ac-faq-vline { transition: opacity .25s ease; }
.zm-ac-faq-item--open .zm-ac-faq-vline { opacity: 0; }

.zm-ac-faq-answer {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 24px;
    transition: max-height .4s cubic-bezier(.4, 0, .2, 1), opacity .3s ease, padding .3s ease;
}
.zm-ac-faq-item--open .zm-ac-faq-answer { opacity: 1; padding-bottom: 22px; }
.zm-ac-faq-answer p {
    margin: 0;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: 14px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .92);
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .zm-ac-brands-grid { gap: 10px; }
    .zm-ac-brand-card { padding: 8px 10px; border-radius: 12px; }
    .zm-ac-cars-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .zm-ac-faq-list { grid-template-columns: 1fr; }

    .zm-ac-step { flex-basis: 45%; max-width: 48%; }
    .zm-ac-content-card { padding: 32px; gap: 24px; }
}

@media (max-width: 768px) {
    /* Brands: 3 per row, centred, so the 7th logo sits in the middle */
    .zm-ac-brands-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }
    .zm-ac-brand-card { flex: 0 0 calc((100% - 28px) / 3); }

    .zm-ac-content-card { flex-direction: column; padding: 32px 28px; gap: 16px; }
    .zm-ac-content-icon { margin: 0 auto; }
    .zm-ac-content-card .zm-ac-content-heading { text-align: center; }

    /* Fuel filter: one sideways-scrolling row instead of wrapping.
       Negative margins let it bleed to the screen edge while the
       padding keeps the first/last pill on .zm-ac-wrap's 32px gutter. */
    .zm-ac-filter {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        margin: 0 -32px 28px;
        padding: 2px 32px;
    }
    .zm-ac-filter::-webkit-scrollbar { display: none; }
    .zm-ac-filter-btn { flex: 0 0 auto; scroll-snap-align: center; }
}

@media (max-width: 640px) {
    /* Purpose-built portrait banner (1080x1550, see <picture> in
       all-cars.php) — sizing the hero to its exact ratio means
       object-fit:cover fits it perfectly with no cropping. */
    .zm-ac-hero { aspect-ratio: 1080 / 1550; background: var(--gv-black, #0A0A0A); }
    .zm-ac-hero img { object-fit: cover; }

    /* Mobile banner is a taller portrait crop with more open sky —
       re-tune the desktop heading overlay's position/size for it. */
    .zm-ac-hero-heading {
        position: absolute;
        top: 18%;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        height: auto;
        max-width: 85%;
        margin: 0;
        padding: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
        z-index: 2;

        color: #fff;
        font-family: var(--gv-font, 'Poppins', sans-serif);
        font-weight: 800;
        font-size: clamp(22px, 7vw, 32px);
        line-height: 1.15;
        text-align: center;
        text-shadow: 0 3px 14px rgba(0, 0, 0, .5);
    }

    .zm-ac-step { flex-basis: 100%; max-width: 100%; }
    .zm-ac-content-card { padding: 28px 24px; border-radius: 16px; }
    .zm-ac-content-desc--body { font-size: 15px; line-height: 1.75; }
    .zm-ac-content-icon { width: 48px; height: 48px; }
    .zm-ac-content-icon svg { width: 22px; height: 22px; }
}

@media (max-width: 480px) {
    .zm-ac-brands {
        padding: 28px 0;
    }

    /* Same 2-per-row look, as a centred flex wrap (see 768px rule) */
    .zm-ac-brands-grid {
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .zm-ac-brand-card {
        flex: 0 0 calc((100% - 12px) / 2);
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        border-radius: 12px;
        padding: 10px 12px;
    }

    .zm-ac-cars {
        padding: 40px 0;
    }

    .zm-ac-cars-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Fuel filter: 2×2 grid of equal pills — all four options visible
       at once with no sideways scroll on phones. */
    .zm-ac-filter {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        overflow: visible;
        margin: 0 0 24px;
        padding: 0;
    }
    .zm-ac-filter-btn {
        min-width: 0;
        padding: 0 12px;
        font-size: 13.5px;
        gap: 6px;
    }
    .zm-ac-filter-empty { padding: 28px 18px; font-size: 14px; }

    .zm-ac-content, .zm-ac-steps-section { padding: 36px 0; }
    .zm-ac-faq { padding: 36px 0 48px; }

    .zm-ac-step { padding: 22px; gap: 12px; }
    .zm-ac-step-num { width: 38px; height: 38px; font-size: 16px; }
    .zm-ac-step-title { font-size: 16.5px; }

    .zm-ac-faq-q-row { padding: 16px 18px; }
    .zm-ac-faq-answer { padding: 0 18px; }
}