/* ============================================================
   Zero Max — catalog.css (Catalog page)
   Prefix: zm-ct-  |  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 (catalog.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; }

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

/* ══════════════════════════════════════════
   HERO / BANNER
   catelogueBanner.webp (1920x660): car on the right, so the
   text block sits on the left over a dark gradient. The
   .nft-reveal classes (footer.css) drive the staggered text
   entrance; the image settle + accent line are catalog-only.
   ══════════════════════════════════════════ */
.zm-ct-hero {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    /* 1920:660 ratio, but never shorter than the text needs */
    min-height: clamp(360px, 34.375vw, 700px);
    padding: calc(var(--gv-header-h, 65px) * .4) 0 40px;
    background: var(--gv-black, #0A0A0A);
    overflow: hidden;
    isolation: isolate;
}
.zm-ct-hero-pic {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}
.zm-ct-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% center;
    animation: zm-ct-settle 2.4s cubic-bezier(.2, .7, .2, 1) both;
}
.zm-ct-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(10,10,10,.88) 0%, rgba(10,10,10,.62) 38%, rgba(10,10,10,0) 68%),
        linear-gradient(0deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,0) 40%);
}
.zm-ct-hero-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

/* Breadcrumb */
.zm-ct-crumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,.7);
}
.zm-ct-crumb li { display: flex; align-items: center; gap: 8px; }
.zm-ct-crumb li + li::before {
    content: '›';
    color: var(--zm-orange, #FF6A2B);
    font-size: 15px;
    line-height: 1;
}
.zm-ct-crumb a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s; }
.zm-ct-crumb a:hover, .zm-ct-crumb a:focus-visible { color: var(--zm-orange, #FF6A2B); }
.zm-ct-crumb [aria-current="page"] { color: #fff; font-weight: 600; }

.zm-ct-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    color: var(--zm-orange, #FF6A2B);
}
h1.zm-ct-hero-title {
    max-width: 640px;
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: clamp(28px, 4.6vw, 64px);
    font-weight: 800;
    line-height: 1.08;
    color: #fff;
    text-wrap: balance;
}
.zm-ct-hero-title em { font-style: normal; color: var(--zm-orange, #FF6A2B); }

/* Accent line — grows in once its reveal fires.
   Uses a nested scaleX so it doesn't fight .nft-reveal's own transform. */
.zm-ct-hero-line {
    display: block;
    width: 84px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--zm-orange, #FF6A2B), rgba(255,106,43,0));
}
.zm-ct-hero-line.nft-in { animation: zm-ct-grow .9s .35s cubic-bezier(.2, .7, .2, 1) both; }

.zm-ct-hero-sub {
    max-width: 520px;
    font-size: clamp(14px, 1.3vw, 17px);
    font-weight: 400;
    line-height: 1.65;
    color: rgba(255,255,255,.82);
}

@keyframes zm-ct-settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes zm-ct-grow   { from { width: 0; } to { width: 84px; } }

/* ══════════════════════════════════════════
   CATALOGUE LIST — brand tabs + model cards
   Dark charcoal cards on the black section: "Lease to Own" tab
   top-left, title/description/buttons on the left, and a
   transparent car cut-out on the right that pokes out above
   the card's top edge (layout per the client's reference).
   ══════════════════════════════════════════ */
.zm-ct-list {
    background: var(--gv-black, #0A0A0A);
    padding: 88px 0 96px;
    overflow: hidden; /* cars fly in from off to the left */
}
.zm-ct-head {
    max-width: 760px;
    margin: 0 auto 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.zm-ct-list-title {
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: clamp(24px, 3.2vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    text-wrap: balance;
}
.zm-ct-list-sub {
    font-size: clamp(14px, 1.2vw, 16px);
    line-height: 1.7;
    color: rgba(255,255,255,.7);
}

/* ── Tabs: plain text, orange underline on the active one ──
   Scrolls sideways instead of wrapping on narrow screens. */
.zm-ct-tabs {
    display: flex;
    gap: 8px;
    margin: 0 auto 88px; /* room for the first car poking out */
    max-width: 100%;
    width: fit-content;
    overflow-x: auto;
    scrollbar-width: none;
}
.zm-ct-tabs::-webkit-scrollbar { display: none; }
.zm-ct-tab {
    position: relative;
    flex: 0 0 auto;
    min-width: 120px;
    padding: 14px 24px 16px;
    border: 0;
    background: transparent;
    font: 500 16px/1 var(--gv-font, 'Poppins', sans-serif);
    color: rgba(255,255,255,.7);
    cursor: pointer;
    transition: color .3s;
}
.zm-ct-tab::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--zm-orange, #FF6A2B);
    transform: scaleX(0);
    transition: transform .4s cubic-bezier(.16, 1, .3, 1);
}
.zm-ct-tab:hover { color: #fff; }
.zm-ct-tab.is-active { color: var(--zm-orange, #FF6A2B); }
.zm-ct-tab.is-active::after { transform: scaleX(1); }
.zm-ct-tab:focus { outline: none; }
.zm-ct-tab:focus-visible { outline: 2px solid var(--zm-orange, #FF6A2B); outline-offset: 2px; border-radius: 8px; }

/* ── Cards ── */
.zm-ct-grid {
    display: flex;
    flex-direction: column;
    gap: 72px; /* each car overlaps the card above's gap */
    max-width: 1100px;
    margin: 0 auto;
}
.zm-ct-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 264px;
    /* Dark charcoal surface — a step lighter than the section so the
       card reads clearly on black, with a hairline edge. */
    background: linear-gradient(160deg, #202020 0%, #161616 55%, #121212 100%);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 48px -24px rgba(0,0,0,.9);
    overflow: visible; /* the car sticks out above the top edge */
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), border-color .4s;
}
.zm-ct-card[hidden] { display: none; }

.zm-ct-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    padding: 11px 38px;
    background: var(--zm-orange, #FF6A2B);
    border-radius: 17px 0 16px 0; /* 17px = card radius minus its 1px border */
    font: 600 14px/1.2 var(--gv-font, 'Poppins', sans-serif);
    letter-spacing: .3px;
    color: #fff;
}

.zm-ct-card-body {
    position: relative;
    z-index: 2; /* the car flies in behind the text */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 78px 20px 30px 40px;
}
.zm-ct-card-title {
    font-family: var(--gv-font, 'Poppins', sans-serif);
    font-size: clamp(26px, 3vw, 44px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    text-wrap: balance;
}
.zm-ct-card-desc {
    max-width: 420px;
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255,255,255,.62);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Buttons ── */
.zm-ct-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.zm-ct-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    font: 500 15px/1 var(--gv-font, 'Poppins', sans-serif);
    text-decoration: none;
    white-space: nowrap;
    transition: transform .3s cubic-bezier(.16, 1, .3, 1), background-color .3s, color .3s, border-color .3s;
}
.zm-ct-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.zm-ct-btn:focus-visible { outline: 2px solid var(--zm-orange, #FF6A2B); outline-offset: 3px; }
.zm-ct-btn--solid {
    min-width: 200px;
    background: var(--zm-orange, #FF6A2B);
    color: #fff;
    border: 1px solid var(--zm-orange, #FF6A2B);
}
.zm-ct-btn--solid.is-disabled {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.14);
    color: rgba(255,255,255,.55);
    cursor: not-allowed;
}
.zm-ct-btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
}
.zm-ct-arrow { transition: transform .35s cubic-bezier(.16, 1, .3, 1); }

/* ── Car ── */
.zm-ct-card-media {
    position: relative;
    z-index: 1;
    display: block;
    align-self: start;
    margin-top: -60px; /* poke out above the card */
    padding: 0 28px 18px 0;
}
.zm-ct-car { display: block; }
.zm-ct-car img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .8s cubic-bezier(.16, 1, .3, 1);
}

/* ── Hover (pointer devices only, so taps don't stick) ── */
@media (hover: hover) {
    .zm-ct-card:hover { transform: translateY(-4px); border-color: rgba(255,106,43,.5); }
    .zm-ct-card:hover .zm-ct-car img { transform: translateX(8px); }
    .zm-ct-btn--solid:not(.is-disabled):hover { background: #ff7f47; border-color: #ff7f47; transform: translateY(-2px); }
    .zm-ct-btn--ghost:hover { background: #fff; border-color: #fff; color: #111; }
    .zm-ct-btn--ghost:hover .zm-ct-arrow { transform: translateX(4px); }
}

.zm-ct-empty {
    text-align: center;
    padding: 56px 20px;
    color: rgba(255,255,255,.6);
    font-size: 15px;
    border: 1px dashed rgba(255,255,255,.15);
    border-radius: 18px;
    max-width: 1100px;
    margin: 0 auto;
}
.zm-ct-empty[hidden] { display: none; }

/* ══════════════════════════════════════════
   FLY-IN ANIMATION (assets/js/catalog.js adds .is-in)
   Keyframes, not transitions, so hover keeps its own timing.
   The card animates `translate` (separate from `transform`)
   so its hover lift still works afterwards; same for text.
   1. card slides + fades in               (1s)
   2. car flies in from the left & settles (1.6s, +.15s)
   3. text rows rise one after another     (+.4s, 110ms apart)
   --d = per-card stagger set by JS, --i = text row index.
   Only under html.zm-ct-js, so without JS cards stay visible.
   ══════════════════════════════════════════ */
.zm-ct-js .zm-ct-fly:not(.is-in),
.zm-ct-js .zm-ct-fly:not(.is-in) .zm-ct-car,
.zm-ct-js .zm-ct-fly:not(.is-in) .zm-ct-rise { opacity: 0; }

.zm-ct-js .zm-ct-fly.is-in {
    animation: zm-ct-card-in 1s cubic-bezier(.16, 1, .3, 1) var(--d, 0s) both;
}
.zm-ct-js .zm-ct-fly.is-in .zm-ct-car {
    animation: zm-ct-car-in 1.6s cubic-bezier(.16, 1, .3, 1) calc(var(--d, 0s) + .15s) both;
}
.zm-ct-js .zm-ct-fly.is-in .zm-ct-rise {
    animation: zm-ct-rise .8s cubic-bezier(.16, 1, .3, 1) calc(var(--d, 0s) + .4s + var(--i, 0) * .11s) both;
}

@keyframes zm-ct-card-in {
    from { opacity: 0; translate: -60px 0; }
    to   { opacity: 1; translate: 0 0; }
}
@keyframes zm-ct-car-in {
    0%   { opacity: 0; transform: translateX(-110%); filter: blur(4px); }
    30%  { opacity: 1; }
    70%  { filter: blur(0); }
    100% { opacity: 1; transform: none; filter: none; }
}
@keyframes zm-ct-rise {
    from { opacity: 0; translate: 0 18px; }
    to   { opacity: 1; translate: 0 0; }
}
@keyframes zm-ct-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .zm-ct-hero-shade {
        background:
            linear-gradient(90deg, rgba(10,10,10,.9) 0%, rgba(10,10,10,.65) 45%, rgba(10,10,10,.1) 80%),
            linear-gradient(0deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,0) 40%);
    }

    .zm-ct-list { padding: 72px 0 80px; }
    .zm-ct-tabs { margin-bottom: 72px; }
    .zm-ct-grid { gap: 60px; }
    .zm-ct-card { min-height: 230px; }
    .zm-ct-card-body { padding: 64px 16px 28px 28px; gap: 12px; }
    .zm-ct-card-title { font-size: clamp(24px, 3.4vw, 36px); letter-spacing: 1.5px; }
    .zm-ct-card-media { margin-top: -44px; padding: 0 18px 16px 0; }
    .zm-ct-btn { padding: 0 18px; font-size: 14px; }
    .zm-ct-btn--solid { min-width: 0; }
}

@media (max-width: 768px) {
    .zm-ct-wrap { padding: 0 20px; }
    /* Stack: text on the dark background first, then the car-centred
       mobile banner below it at its natural ratio — nothing cropped
       and no text sitting on top of the car. */
    .zm-ct-hero {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
        padding: 0;
    }
    .zm-ct-hero-inner {
        order: 1;
        gap: 12px;
        padding-top: 32px;
        padding-bottom: 24px;
        align-items: center;
        text-align: center;
    }
    .zm-ct-crumb ol { justify-content: center; }
    .zm-ct-hero-title { margin: 0 auto; }
    .zm-ct-hero-line { background: linear-gradient(90deg, rgba(255,106,43,0), var(--zm-orange, #FF6A2B), rgba(255,106,43,0)); }
    .zm-ct-hero-pic {
        position: relative;
        inset: auto;
        z-index: 0;
        order: 2;
        aspect-ratio: 1370 / 660;
    }
    .zm-ct-hero-img { height: 100%; object-position: center; }
    /* Soft fade from the text area into the photo */
    .zm-ct-hero-pic::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, var(--gv-black, #0A0A0A) 0%, rgba(10,10,10,0) 22%);
        pointer-events: none;
    }
    .zm-ct-hero-shade { display: none; }

    .zm-ct-list { padding: 56px 0 64px; }
    .zm-ct-head { margin-bottom: 24px; }
    .zm-ct-tabs { margin-bottom: 64px; }
    .zm-ct-tab { min-width: 0; padding: 12px 20px 14px; font-size: 15px; }
    .zm-ct-grid { gap: 56px; }

    /* Stack: car on top (still poking out), text below */
    .zm-ct-card { grid-template-columns: 1fr; min-height: 0; }
    .zm-ct-card-media {
        order: -1;
        justify-self: center;
        width: 86%;
        max-width: 520px;
        margin-top: -36px;
        padding: 0;
    }
    .zm-ct-card-body { padding: 4px 24px 26px; }
    .zm-ct-card-desc { max-width: none; }
}

@media (max-width: 480px) {
    .zm-ct-wrap { padding: 0 16px; }
    .zm-ct-hero-inner { padding-top: 26px; padding-bottom: 20px; }
    .zm-ct-eyebrow { font-size: 10px; letter-spacing: 3px; }
    .zm-ct-hero-sub { max-width: 100%; }

    .zm-ct-list { padding: 44px 0 52px; }
    .zm-ct-tabs { margin-bottom: 52px; }
    .zm-ct-tab { padding: 10px 14px 12px; font-size: 14px; }
    .zm-ct-grid { gap: 48px; }
    .zm-ct-card { border-radius: 16px; }
    .zm-ct-ribbon { padding: 8px 22px; font-size: 12.5px; border-radius: 15px 0 14px 0; }
    .zm-ct-card-media { width: 92%; margin-top: -28px; }
    .zm-ct-card-body { padding: 2px 18px 22px; gap: 10px; }
    .zm-ct-card-title { font-size: 24px; letter-spacing: 1px; }
    .zm-ct-card-desc { font-size: 13px; }
    .zm-ct-actions { width: 100%; flex-direction: column; }
    .zm-ct-btn { width: 100%; }
}

@media (max-width: 360px) {
    .zm-ct-tab { padding: 10px 10px 12px; font-size: 13px; }
    .zm-ct-card-title { font-size: 22px; }
    .zm-ct-card-body { padding: 2px 14px 20px; }
    .zm-ct-btn { font-size: 13px; padding: 0 12px; }
}

@media (min-width: 1700px) {
    .zm-ct-hero-sub { max-width: 600px; }
}

@media (prefers-reduced-motion: reduce) {
    .zm-ct-hero-img,
    .zm-ct-hero-line.nft-in { animation: none; }

    /* Fade only — no travel or blur */
    .zm-ct-js .zm-ct-fly.is-in,
    .zm-ct-js .zm-ct-fly.is-in .zm-ct-car,
    .zm-ct-js .zm-ct-fly.is-in .zm-ct-rise { animation: zm-ct-fade .5s ease both; }
    .zm-ct-card,
    .zm-ct-car img { transition: none; }
}
