/* ==========================================================================
   PGW Group Autos - public site layout
   Requires base.css, which supplies every token and every shared component.
   Layout only - no component may be redefined here.

   Light, clean pages to sit alongside www.pgw-group.com, with dark bands for
   the header, the hero and the footer: the places the logo lives.
   ========================================================================== */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s5); }

.section { padding: var(--s8) 0; }
.section-tight { padding-top: 0; }
.section-flush { padding-bottom: 0; }

.section-head { margin-bottom: var(--s6); }
.section-head h2 {
    margin: 0 0 var(--s2); font-size: 27px; font-weight: 800;
    letter-spacing: -.015em; color: var(--text);
}
.section-head h2 span { color: var(--accent-deep); }
.section-head p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 62ch; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 300;
    background: var(--accent); color: var(--on-accent);
    padding: var(--s3) var(--s5); font-weight: 700; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; color: var(--on-accent); }

/* ---------------------------------------------------------- Utility bar
   The thin strip above the header, matching www.pgw-group.com: welcome
   line and socials on the left, address / email / phone on the right.
   Not sticky - it scrolls away and leaves the main header pinned. */

.util-bar {
    background: var(--util-bg); color: var(--on-ink);
    /* A hairline of brand orange separates the strip from the header. */
    border-bottom: 2px solid var(--accent);
    font-size: 13px;
}
.util-bar .wrap {
    display: flex; align-items: center; gap: var(--s5);
    min-height: 46px; padding-top: var(--s2); padding-bottom: var(--s2);
}
.util-welcome { font-weight: 600; white-space: nowrap; }

.util-social { display: flex; align-items: center; gap: var(--s2); }
.util-social a {
    display: grid; place-items: center; width: 28px; height: 28px;
    border-radius: 50%; color: var(--accent);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.util-social a:hover { background: var(--accent); color: var(--on-accent); }
.util-social svg { width: 15px; height: 15px; }

.util-contact {
    margin-left: auto; display: flex; align-items: center;
    gap: var(--s5); min-width: 0;
}
.util-item {
    display: inline-flex; align-items: center; gap: var(--s2);
    color: var(--on-ink); white-space: nowrap;
}
a.util-item:hover { color: var(--accent); }
.util-item svg { width: 15px; height: 15px; color: var(--accent); }

/* Thin dividers between the right-hand items, as on the parent site. */
.util-contact .util-item + .util-item { border-left: 1px solid rgba(255, 255, 255, .16); padding-left: var(--s5); }
.util-welcome + .util-social { border-left: 1px solid rgba(255, 255, 255, .16); padding-left: var(--s5); }

/* ------------------------------------------------------------- Site head */

.site-head {
    position: sticky; top: 0; z-index: 60;
    background: var(--ink);
    border-bottom: 1px solid var(--ink-line);
}
.site-head .wrap {
    display: flex; align-items: center; gap: var(--s5);
    min-height: var(--head-h); padding-top: var(--s2); padding-bottom: var(--s2);
}

.brand { display: flex; align-items: center; gap: var(--s3); flex: none; }
.brand-logo { height: 60px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.brand-name em { font-style: normal; color: var(--accent); }
.brand-tag { font-size: 11px; color: var(--on-ink-muted); letter-spacing: .06em; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: var(--s1); }
/* :not(.btn) is kept deliberately now that the header has no button in it.
   Dropping it would take this rule from (0,2,1) to (0,1,1), a tie with the
   base sheet's `.pgw-ui a` that only resolves because site.css happens to
   load second - and load order is not where this project wants its
   navigation colours decided. It also leaves the nav ready for a button. */
.site-nav a:not(.btn) {
    color: var(--on-ink); font-size: 14.5px; font-weight: 600;
    padding: var(--s2) var(--s3); border-radius: var(--r-sm);
    transition: color .15s var(--ease), background .15s var(--ease);
}
.site-nav a:not(.btn):hover { background: rgba(255, 255, 255, .08); color: #fff; }
.site-nav a:not(.btn).is-active { color: var(--accent); }

.nav-toggle {
    display: none; margin-left: auto; cursor: pointer;
    background: var(--ink-3); border: 1px solid var(--ink-line);
    border-radius: var(--r-sm); padding: 10px 12px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--on-ink); margin: 4px 0; }

/* ================================================================== Hero
   Only ever rendered on the home view. The showcase is real stock: the
   newest featured cars that actually have photographs.
   ================================================================== */

.home-banner.is-collapsed { display: none; }

.hero {
    position: relative; overflow: hidden;
    background: var(--ink);
    color: var(--on-ink);
}
/* The angled orange speed streaks from the PGW banner. */
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
    background:
        linear-gradient(101deg, transparent 49.6%, rgba(247, 148, 29, .75) 50%, rgba(247, 148, 29, .75) 50.7%, transparent 51.1%),
        linear-gradient(101deg, transparent 54%, rgba(247, 148, 29, .38) 54.4%, rgba(247, 148, 29, .38) 55.7%, transparent 56.1%),
        linear-gradient(101deg, transparent 58.5%, rgba(247, 148, 29, .16) 58.9%, rgba(247, 148, 29, .16) 60.4%, transparent 60.8%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: var(--s8); padding-bottom: var(--s8); }

/*
 * Three blocks, two columns. The headline and the supporting copy stack in
 * the left column exactly as they read; the showcase spans both rows on the
 * right. Named areas because the phone layout reorders them - lead, car,
 * then the rest - and `order` cannot express that as clearly.
 *
 * row-gap is 0 on purpose: the gap belongs between the columns, not between
 * a headline and the paragraph that follows it.
 */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-areas: "lead  show"
                         "supp  show";
    column-gap: var(--s8); row-gap: 0;
    align-items: center;
}
.hero-lead    { grid-area: lead; }
.hero-support { grid-area: supp; }
.showcase     { grid-area: show; }

.hero-grid.is-solo {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lead" "supp";
    max-width: 720px;
}

.eyebrow {
    display: inline-flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4);
    font-size: 12px; font-weight: 800; letter-spacing: .16em;
    text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 32px; height: 3px; background: var(--gradient); transform: skewX(-25deg); }

.hero h1 {
    margin: 0 0 var(--s4); font-size: clamp(2.1rem, 4.6vw, 3.3rem); line-height: 1.06;
    font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; color: #fff;
}
.hero h1 em { font-style: normal; color: var(--accent); display: block; }
.hero > .wrap p { margin: 0 0 var(--s6); font-size: 16.5px; color: var(--on-ink-muted); max-width: 52ch; }

.hero-stats { display: flex; flex-wrap: wrap; gap: var(--s7); margin-top: var(--s7); }
.hero-stats div strong { display: block; font-size: 30px; font-weight: 800; color: #fff; line-height: 1; }
.hero-stats div span { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-muted); }

/* -- Photo showcase ----------------------------------------------------- */

.showcase { position: relative; }
.showcase-frame {
    position: relative; aspect-ratio: 3 / 2; overflow: hidden;
    background: var(--ink-2);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
    border: 1px solid var(--ink-line);
}
.showcase-slide {
    position: absolute; inset: 0; display: block; opacity: 0;
    transition: opacity .7s var(--ease);
    pointer-events: none;
}
.showcase-slide.is-active { opacity: 1; pointer-events: auto; }
.showcase-slide img { width: 100%; height: 100%; object-fit: cover; }
.showcase-slide::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(8, 9, 11, .92) 0%, rgba(8, 9, 11, .35) 38%, transparent 62%);
}
.showcase-caption {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    display: flex; align-items: flex-end; gap: var(--s4);
    padding: var(--s5);
}
.showcase-caption .who { min-width: 0; }
.showcase-caption strong {
    display: block; color: #fff; font-size: 17px; font-weight: 700; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.showcase-caption .price { color: var(--accent); font-weight: 800; font-size: 20px; margin-top: 2px; }
.showcase-caption .go {
    margin-left: auto; flex: none;
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--accent); color: var(--on-accent);
    padding: 9px var(--s4); border-radius: var(--r-pill);
    font-size: 13.5px; font-weight: 700;
}

.showcase-dots { display: flex; justify-content: center; gap: var(--s2); margin-top: var(--s2); }
/*
 * The visible bar is 4px; the button is 24px. A 4px-high control is fine
 * under a mouse and impossible under a thumb, so the padding carries the hit
 * area and background-clip keeps the paint on the bar. Anything that raises
 * the height from here needs the padding raised with it.
 */
.showcase-dots button {
    width: 28px; height: 24px; padding: 10px 0; border: 0; cursor: pointer;
    border-radius: var(--r-pill); background: rgba(255, 255, 255, .25);
    background-clip: content-box;
    transition: background .2s var(--ease), width .2s var(--ease);
}
/*
 * background-COLOR, not the background shorthand. The shorthand resets every
 * background-* longhand it does not mention - including the background-clip
 * above - so `background: var(--accent)` quietly painted the active dot over
 * its whole 24px hit area instead of the 4px bar, and it came out as a blob
 * beside four thin lines.
 */
.showcase-dots button:hover { background-color: rgba(255, 255, 255, .5); }
.showcase-dots button.is-active { background-color: var(--accent); width: 42px; }

.showcase-credit {
    margin: var(--s3) 0 0; font-size: 11px; color: rgba(255, 255, 255, .34); text-align: center;
}
.showcase-credit a { color: inherit; text-decoration: underline; }

/* -- Trust strip, straight off the banner -------------------------------- */

.trust {
    background: var(--ink-2); border-top: 1px solid var(--ink-line);
    border-bottom: 1px solid var(--ink-line);
}
.trust ul {
    list-style: none; margin: 0; padding: var(--s5) var(--s5);
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s4);
    max-width: var(--wrap); margin-inline: auto;
}
.trust li { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center; }
.trust .ico {
    width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    border: 2px solid var(--accent); color: var(--accent);
}
.trust .ico svg { width: 22px; height: 22px; }
.trust span {
    font-size: 12px; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--on-ink);
}

/* -- "Drive Your Dreams" ribbon ----------------------------------------- */

.slogan-bar { background: var(--gradient); color: var(--on-accent); overflow: hidden; }
.slogan-bar .wrap {
    display: flex; align-items: center; justify-content: center; gap: var(--s5);
    padding: var(--s3) var(--s5);
    font-style: italic; font-weight: 800; letter-spacing: .16em;
    text-transform: uppercase; font-size: 14px;
}
.slogan-bar .chev { display: flex; gap: var(--s1); }
.slogan-bar .chev i { display: block; width: 6px; height: 15px; background: rgba(36, 19, 0, .45); transform: skewX(-25deg); }

/* --------------------------------------------------------------- Filters */

.filter-bar {
    background: var(--surface); border-bottom: 1px solid var(--line);
    position: sticky; top: var(--head-h); z-index: 40;
    box-shadow: var(--shadow-1);
}
.filter-form { padding: var(--s4) 0; }
.filter-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.filter-row > .field { flex: 0 1 auto; }
.filter-search { position: relative; flex: 1 1 260px; min-width: 220px; }
.filter-search svg {
    position: absolute; left: var(--s3); top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--text-3); pointer-events: none;
}
/* .pgw-ui prefix is required: the base control rule is .pgw-ui input[type=search]
   (0,2,1), so a bare .filter-search input (0,1,1) loses and the text would run
   under the magnifier. */
.pgw-ui .filter-search input { padding-left: 42px; }

.filter-advanced {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--s3); padding-top: var(--s4); margin-top: var(--s4); border-top: 1px solid var(--line);
}
.filter-advanced[hidden] { display: none; }

.filter-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
    padding: var(--s5) 0 var(--s4); color: var(--text-2); font-size: 14px;
}
.filter-meta strong { color: var(--text); }

/* ------------------------------------------------------------ Stock grid */

.vehicle-grid { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fill, minmax(296px, 1fr)); }
.vehicle-grid.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s var(--ease); }
.vehicle-grid > .empty { grid-column: 1 / -1; }

.card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-3); }

.card-media { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--surface-3); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media.is-sold img { filter: grayscale(.8) brightness(.75); }

.badge {
    position: absolute; top: var(--s3); left: var(--s3); z-index: 2;
    padding: 5px var(--s3);
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
    box-shadow: var(--shadow-1);
}
.badge-available { background: var(--accent); color: var(--on-accent); }
.badge-sold { background: var(--red); color: #fff; }
.badge-reserved { background: var(--blue); color: #fff; }
.badge-featured {
    left: auto; right: var(--s3);
    background: rgba(14, 16, 19, .82); color: var(--accent);
}

.photo-count {
    position: absolute; right: var(--s3); bottom: var(--s3); z-index: 2;
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(14, 16, 19, .78); color: #fff;
    border-radius: var(--r-sm); padding: 4px var(--s2); font-size: 12px; font-weight: 600;
}
.photo-count svg { width: 14px; height: 14px; }

.sold-stamp { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; }
.sold-stamp span {
    transform: rotate(-9deg);
    border: 3px solid rgba(255, 255, 255, .95); color: #fff; background: rgba(207, 63, 48, .82);
    padding: 7px var(--s6); border-radius: var(--r-sm);
    font-size: 22px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
}

.card-body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.card-title { margin: 0 0 var(--s1); font-size: 17px; font-weight: 700; line-height: 1.32; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent-deep); }
.card-sub { margin: 0 0 var(--s3); font-size: 13px; color: var(--text-3); }

.card-price { font-size: 23px; font-weight: 800; color: var(--accent-ink); margin-bottom: var(--s4); letter-spacing: -.02em; }
.card-price small { display: block; font-size: 12px; font-weight: 600; color: var(--text-3); letter-spacing: .02em; }

.spec-row {
    display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4);
    padding-bottom: var(--s4); border-bottom: 1px solid var(--line);
}
.card-actions { display: flex; gap: var(--s2); margin-top: auto; }
.card-actions .btn { flex: 1; }

/* ------------------------------------------------------- Vehicle detail */

.crumbs { padding: var(--s5) 0; font-size: 13.5px; color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent-deep); }
.crumbs span { margin: 0 var(--s2); opacity: .5; }

.detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(310px, 1fr); gap: var(--s6); align-items: start; }
.detail > div > .panel:first-child { margin-top: 0; }

.gallery {
    border-radius: var(--r-lg); overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.gallery-main { position: relative; aspect-ratio: 3 / 2; background: var(--surface-3); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .92); border: 1px solid var(--line);
    color: var(--text); display: grid; place-items: center; box-shadow: var(--shadow-2);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.gallery-nav:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.gallery-nav.prev { left: var(--s3); }
.gallery-nav.next { right: var(--s3); }
.gallery-counter {
    position: absolute; right: var(--s3); bottom: var(--s3);
    background: rgba(14, 16, 19, .78); color: #fff;
    border-radius: var(--r-sm); padding: 4px var(--s3); font-size: 12.5px; font-weight: 600;
}
.gallery-thumbs { display: flex; gap: var(--s2); padding: var(--s3); overflow-x: auto; scrollbar-width: thin; }
.gallery-thumbs button {
    flex: none; width: 96px; aspect-ratio: 3 / 2; padding: 0; cursor: pointer; opacity: .7;
    border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden; background: none;
    transition: border-color .15s var(--ease), opacity .15s var(--ease);
}
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button.is-active { border-color: var(--accent); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-credit { padding: 0 var(--s3) var(--s3); font-size: 11px; color: var(--text-3); }

/* The sidebar deliberately does NOT stick.
   Sticking the buy box alone made it ride over the panels beneath it; sticking
   the whole sidebar then clipped whatever fell past the bottom of the viewport,
   because a sticky block taller than the screen can never be scrolled to.
   The sidebar carries a variable number of panels (colours, finance, related),
   so its height is not knowable - it simply scrolls with the page. The primary
   action stays reachable at all times through the floating WhatsApp button. */
/* Both detail columns are plain stacks. .panel + .panel alone was not enough:
   the gallery is not a panel, so the first panel after it sat flush against it. */
.detail > div > * + *,
.detail > aside > * + * { margin-top: var(--s5); }
.buy-box h1 { margin: 0 0 var(--s2); font-size: clamp(1.5rem, 3vw, 1.95rem); font-weight: 800; letter-spacing: -.02em; }
.buy-sub { color: var(--text-2); margin: 0 0 var(--s5); font-size: 14px; }
.buy-price { font-size: 34px; font-weight: 800; color: var(--accent-ink); line-height: 1.1; letter-spacing: -.03em; }
.buy-price small { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-top: var(--s1); letter-spacing: .02em; }
.buy-status { display: flex; align-items: center; gap: var(--s2); margin: var(--s4) 0 var(--s5); font-size: 14px; font-weight: 650; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.status-dot.available { background: var(--green); box-shadow: 0 0 0 4px rgba(26, 156, 83, .16); }
.status-dot.reserved  { background: var(--blue);  box-shadow: 0 0 0 4px rgba(43, 116, 208, .16); }
.status-dot.sold      { background: var(--red);   box-shadow: 0 0 0 4px rgba(207, 63, 48, .16); }
.buy-actions { display: grid; gap: var(--s3); }
.buy-note { margin: var(--s4) 0 0; font-size: 12.5px; color: var(--text-3); text-align: center; line-height: 1.55; }
.buy-contact { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); display: grid; gap: var(--s3); }
.buy-contact a { display: flex; align-items: center; gap: var(--s3); color: var(--text-2); font-size: 14px; font-weight: 600; }
.buy-contact a:hover { color: var(--accent-deep); }
.buy-contact svg { width: 17px; height: 17px; color: var(--accent-deep); }

/* white-space is normal now: the description holds real markup, and legacy
   plain-text entries are converted with nl2br on the way out. */
.prose { color: var(--text-2); margin: 0; line-height: 1.7; }

.spec-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1px; background: var(--line); border: 1px solid var(--line);
    border-radius: var(--r); overflow: hidden;
}
.spec-grid > div { background: var(--surface); padding: var(--s3) var(--s4); }
.spec-grid dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s1); }
.spec-grid dd { margin: 0; font-size: 15px; font-weight: 650; color: var(--text); }

.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: flex-start; gap: var(--s2); font-size: 14.5px; color: var(--text-2); }
.feature-list svg { width: 17px; height: 17px; color: var(--green); margin-top: 3px; }

.form-note { font-size: 13px; color: var(--text-3); margin: var(--s3) 0 0; }

/* Floating WhatsApp button */
/* .pgw-ui prefix required: bare .wa-float is (0,1,0) and loses its colour
   to the base link rule at (0,1,1). */
.pgw-ui .wa-float {
    position: fixed; right: var(--s5); bottom: var(--s5); z-index: 70;
    display: inline-flex; align-items: center; gap: var(--s3);
    background: var(--whatsapp-btn); color: #fff;
    padding: 14px var(--s5); border-radius: var(--r-pill); font-weight: 700; font-size: 14.5px;
    box-shadow: 0 12px 30px rgba(18, 120, 74, .38);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.pgw-ui .wa-float:hover { transform: translateY(-3px); color: #fff; background: var(--whatsapp-btn-hover); box-shadow: 0 18px 40px rgba(18, 120, 74, .45); }
.wa-float svg { width: 22px; height: 22px; }
.pgw-ui .wa-float.is-open { transform: translateY(-3px) scale(.96); }

/* ----------------------------------------------------- Chat panel */

/* Sits above the floating button on desktop; becomes a sheet on a phone,
   where a 380px card floating over the page reads as an advert. */
.chat-panel {
    position: fixed; inset: 0; z-index: 80;
    display: flex; align-items: flex-end; justify-content: flex-end;
    padding: var(--s5);
    background: rgba(14, 16, 19, .45);
    opacity: 0; transition: opacity .18s var(--ease);
}
/* Required, and not optional the way it looks.
   `display: flex` above is an author rule and beats the browser's own
   `[hidden] { display: none }`, so without this the panel is laid out from
   the moment the page loads: a full-screen fixed overlay at opacity 0,
   invisible but still on top of everything, swallowing every click on the
   site. Same reason .tab-panel[hidden] and .filter-advanced[hidden] exist. */
.chat-panel[hidden] { display: none; }
.chat-panel.is-open { opacity: 1; }

.chat-card {
    width: min(380px, 100%);
    /* 140px, not 48: the card sits above the floating button, so the room it
       has is the viewport minus the button and its gap, not the whole height. */
    max-height: min(660px, calc(100vh - 140px));
    display: flex; flex-direction: column;
    background: var(--surface);
    box-shadow: var(--shadow-3);
    margin-bottom: 86px;          /* clears the floating button */
    transform: translateY(12px);
    transition: transform .18s var(--ease);
    overflow: hidden;
}
.chat-panel.is-open .chat-card { transform: none; }

.chat-head {
    display: flex; align-items: center; gap: var(--s3);
    padding: var(--s4) var(--s5);
    background: var(--whatsapp-btn); color: #fff;
}
.chat-avatar {
    display: grid; place-items: center; flex: none;
    width: 38px; height: 38px; border-radius: var(--r-pill);
    background: rgba(255, 255, 255, .18);
}
.chat-head svg { width: 20px; height: 20px; }
.chat-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-who b { font-size: 14.5px; }
.chat-who small { font-size: 11.5px; opacity: .85; }
.chat-close {
    flex: none; background: transparent; border: 0; color: #fff;
    padding: 6px; cursor: pointer; opacity: .8; line-height: 0;
}
.chat-close:hover { opacity: 1; }

/* The car this message is about. Same reason as the rest of the panel:
   somebody who has scrolled past twenty listings should see which one. */
.chat-car {
    display: flex; align-items: center; gap: var(--s3);
    padding: var(--s3) var(--s5);
    background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.chat-car[hidden] { display: none; }
.chat-car img { width: 64px; height: 43px; object-fit: cover; flex: none; }
.chat-car span { min-width: 0; display: flex; flex-direction: column; }
.chat-car b {
    font-size: 13.5px; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-car small { font-size: 12px; color: var(--text-3); }

.chat-body { padding: var(--s4) var(--s5); overflow-y: auto; }

/* The base sheet gives every .f textarea a 140px floor, which is right on a
   full-width form and wrong in a 380px card: the message box then needs its
   own scrollbar inside a card that is already scrolling, and the reader gets
   three lines of their own message through two nested scrollers.
   (0,3,1) to clear `.pgw-ui .f > textarea` at (0,2,1) on purpose, rather than
   relying on which sheet happens to load last. */
.pgw-ui .chat-panel .f > textarea { min-height: 0; height: 96px; resize: vertical; }

/* The opening line, shaped like a received message. */
.chat-bubble {
    margin: 0 0 var(--s4); padding: var(--s3) var(--s4);
    background: var(--surface-2); border: 1px solid var(--line);
    font-size: 13px; color: var(--text-2); line-height: 1.5;
}
.chat-bubble strong { color: var(--text); }

.chat-fields { display: grid; gap: var(--s4); }

.chat-foot { padding: var(--s4) var(--s5) var(--s5); border-top: 1px solid var(--line); }
.chat-note { margin: var(--s3) 0 0; font-size: 11.5px; color: var(--text-3); text-align: center; }

@media (max-width: 560px) {
    .chat-panel { padding: 0; align-items: flex-end; }
    .chat-card {
        width: 100%; margin-bottom: 0;
        max-height: 92vh;
    }
}

/* --------------------------------------------------------------- Footer */

.site-foot { background: var(--ink); color: var(--on-ink-muted); margin-top: var(--s8); }
.foot-grid {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--s7);
    padding: var(--s8) 0 var(--s6);
}
.foot-brand .brand-logo { height: 68px; margin-bottom: var(--s4); }
.site-foot h4 {
    margin: 0 0 var(--s4); font-size: 12px; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase; color: #fff;
}
.site-foot p { color: var(--on-ink-muted); font-size: 14px; margin: 0 0 var(--s3); }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.site-foot li { font-size: 14px; }
.site-foot a { color: var(--on-ink-muted); display: inline-flex; align-items: center; gap: var(--s2); }
.site-foot a:hover { color: var(--accent); }
.site-foot a svg { width: 16px; height: 16px; color: var(--accent); }
.foot-bottom {
    border-top: 1px solid var(--ink-line); padding: var(--s5) 0;
    display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: space-between;
    font-size: 13px; color: #6b7380;
}

/* ----------------------------------------------------------- Responsive */

@media (max-width: 1080px) {
    /* One column, and the car goes between the headline and the rest. */
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "lead" "show" "supp";
        row-gap: var(--s6);
    }
    .hero-grid.is-solo { max-width: none; grid-template-areas: "lead" "supp"; }
    .trust ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
}
@media (max-width: 980px) {
    .detail { grid-template-columns: minmax(0, 1fr); }
    .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
}
@media (max-width: 760px) {
    .wrap { padding: 0 var(--s4); }
    .nav-toggle { display: block; }
    .brand-logo { height: 44px; }
    .site-head .wrap { min-height: 64px; }
    .site-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--ink-2); border-bottom: 1px solid var(--ink-line); padding: var(--s3);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a:not(.btn) { padding: var(--s3) var(--s4); }
    .filter-bar { position: static; }
    .filter-row > .field { flex: 1 1 calc(50% - var(--s2)); }
    .trust ul { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--s5) var(--s4); }
    .foot-grid { grid-template-columns: minmax(0, 1fr); }
    .wa-float { padding: 15px; right: var(--s4); bottom: var(--s4); }
    .wa-float .label { display: none; }
    .hero .wrap { padding-top: var(--s6); padding-bottom: var(--s6); }
    .section { padding: var(--s7) 0; }
    .showcase-caption { padding: var(--s4); }
    .showcase-caption .go span { display: none; }

    /* Three across rather than flex-wrapping to 2 + 1, which left the third
       statistic stranded on a line of its own looking like a mistake. */
    /* As many columns as there are figures - the dealer can switch any of
       them off, and a fixed three would leave a gap where one used to be. */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(var(--stat-count, 3), minmax(0, 1fr));
        gap: var(--s4); margin-top: var(--s5);
    }
    .hero-stats div strong { font-size: 24px; }
    .hero-stats div span { font-size: 10.5px; letter-spacing: .08em; }

    /* Both calls to action the same width. Ragged edges on the two most
       important buttons on the site read as unfinished. */
    .hero .btn-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
    .hero .btn-row .btn { width: 100%; }

    /* One line, or it wraps to "... AUTOS / DIVISION". */
    .eyebrow { font-size: 10.5px; letter-spacing: .1em; margin-bottom: var(--s3); }
    .eyebrow::before { width: 22px; }

}

/* ==========================================================================
   Availability card
   A coloured dot next to two words was not enough to carry the single most
   important fact on the page, so availability gets a real block: state,
   what it means for the buyer, and what happens next.
   ========================================================================== */

.status-card {
    display: flex; align-items: center; justify-content: center;
    padding: var(--s3) var(--s4); border-radius: var(--r);
    border: 1px solid transparent; margin: var(--s5) 0;
}
.status-card b { font-size: 14px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }

.status-card.available { background: var(--green-wash); border-color: #b7e4ca; color: #0f6b39; }

.status-card.reserved { background: var(--blue-wash); border-color: #bcd8f6; color: #1b5aa8; }

.status-card.sold { background: var(--red-wash); border-color: #f3c3bd; color: #a52d20; }


/* ------------------------------------------------------- Colour options */

.colours { display: flex; flex-wrap: wrap; gap: var(--s3); }
.colour {
    display: inline-flex; align-items: center; gap: var(--s2);
    padding: 5px var(--s3) 5px 5px; border-radius: var(--r-pill);
    background: var(--surface); border: 1px solid var(--line-strong);
    font-size: 13px; font-weight: 600; color: var(--text-2);
    cursor: default;
}
/* Flat. The bevel and gloss made every swatch look like a glass bead, which
   misrepresents the one thing it exists to show: the actual paint colour. A
   hairline border is enough to hold white and near-white against the card. */
.colour .swatch {
    width: 22px; height: 22px; border-radius: 50%; flex: none;
    border: 1px solid rgba(0, 0, 0, .18);
}
.colour.is-current { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-ink); }
.colour .this { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }

/* Swatch dots on a grid card */
.card-colours { display: flex; align-items: center; gap: 5px; margin-bottom: var(--s3); }
.card-colours .swatch {
    width: 15px; height: 15px; border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .2);
}
.card-colours .more { font-size: 11.5px; color: var(--text-3); font-weight: 600; }

/* ============================================================== Lightbox */

.lightbox {
    position: fixed; inset: 0; z-index: 300;
    display: none; flex-direction: column;
    background: rgba(8, 9, 11, .96);
    backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }

.lb-stage {
    flex: 1; min-height: 0; display: grid; place-items: center;
    overflow: hidden; padding: var(--s7) var(--s7) var(--s5);
}
.lb-stage img {
    max-width: 100%; max-height: 100%;
    transform-origin: center center;
    transition: transform .18s var(--ease);
    cursor: zoom-in; border-radius: var(--r-sm);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox.is-zoomed .lb-stage img { transition: none; }

.lb-close {
    position: absolute; top: var(--s4); right: var(--s4); z-index: 3;
    width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .12); color: #fff; font-size: 26px; line-height: 1;
    transition: background .15s var(--ease);
}
.lb-close:hover { background: var(--accent); color: var(--on-accent); }

.lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .12); color: #fff;
    display: grid; place-items: center;
    transition: background .15s var(--ease);
}
.lb-nav:hover { background: var(--accent); color: var(--on-accent); }
.lb-nav svg { width: 24px; height: 24px; }
.lb-prev { left: var(--s4); }
.lb-next { right: var(--s4); }
.lightbox.is-single .lb-nav { display: none; }

.lb-bar {
    display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap;
    padding: var(--s4) var(--s6) var(--s6);
    color: rgba(255, 255, 255, .75); font-size: 13px;
}
.lb-index { font-weight: 700; color: #fff; }
.lightbox.is-single .lb-index { display: none; }
.lb-caption { flex: 1; min-width: 0; text-align: right; font-size: 11.5px; color: rgba(255, 255, 255, .45); }

.lb-zoom { display: flex; gap: 2px; background: rgba(255, 255, 255, .1); border-radius: var(--r-pill); padding: 3px; }
.lb-zoom button {
    border: 0; background: none; color: #fff; cursor: pointer;
    padding: 6px var(--s3); border-radius: var(--r-pill);
    font: inherit; font-size: 13px; font-weight: 700; min-width: 34px;
}
.lb-zoom button:hover { background: rgba(255, 255, 255, .18); }

.gallery-zoom {
    position: absolute; left: var(--s3); bottom: var(--s3); z-index: 2;
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(14, 16, 19, .78); color: #fff; border: 0; cursor: pointer;
    border-radius: var(--r-sm); padding: 6px var(--s3);
    font: inherit; font-size: 12px; font-weight: 650;
    transition: background .15s var(--ease);
}
.gallery-zoom:hover { background: var(--accent); color: var(--on-accent); }
.gallery-zoom svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
    .lb-stage { padding: var(--s6) var(--s3) var(--s3); }
    .lb-nav { width: 42px; height: 42px; }
    .lb-bar { padding: var(--s3) var(--s4) var(--s5); gap: var(--s3); }
    .lb-caption { text-align: left; width: 100%; }
}

/* ------------------------------------------------------- Gallery groups */

.gallery-groups {
    display: flex; flex-wrap: wrap; gap: var(--s2);
    padding: var(--s3) var(--s3) 0;
}
.gallery-groups button {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px var(--s3); border-radius: var(--r-pill); cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--line);
    font: inherit; font-size: 13px; font-weight: 650; color: var(--text-2);
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.gallery-groups button:hover { border-color: var(--accent); color: var(--accent-ink); }
.gallery-groups button.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.gallery-groups button span {
    font-size: 11px; font-weight: 800; opacity: .7;
    background: rgba(0, 0, 0, .08); border-radius: var(--r-pill); padding: 1px 6px;
}
.gallery-groups button.is-active span { background: rgba(36, 19, 0, .18); opacity: 1; }
.gallery-thumbs button[hidden] { display: none; }

@media (max-width: 1180px) {
    /* The address is the longest item and the least urgent - it is repeated
       in the footer and on the contact page. */
    .util-address { display: none; }
}
@media (max-width: 900px) {
    .util-welcome { display: none; }
    .util-welcome + .util-social { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
    /* Below this the strip cannot hold anything legibly, and every item on it
       is available in the header, the footer and the floating button. */
    .util-bar { display: none; }
}

/* ------------------------------------------------------- Colour picker */

.colours input[type=radio]:checked + .colour {
    border-color: var(--accent); background: var(--accent-wash); color: var(--accent-ink);
    box-shadow: 0 0 0 3px rgba(247, 148, 29, .16);
}
.colours input[type=radio]:focus-visible + .colour { outline: 2px solid var(--accent); outline-offset: 2px; }
.colour { cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease); }
.colour:hover { border-color: var(--accent-line); }

/* A colour that cannot be had right now: greyed, struck, but still choosable
   so the buyer can ask us to source it. */
.colour.is-out { opacity: .62; }
.colour.is-out .name { text-decoration: line-through; text-decoration-thickness: 1px; }
.colour.is-out .swatch { filter: grayscale(.55); }
.colour .out {
    font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    color: var(--red); background: var(--red-wash);
    border-radius: var(--r-pill); padding: 2px 7px;
}

.colour-status { margin: var(--s4) 0 0; font-size: 13.5px; font-weight: 600; }
.colour-status.is-in { color: #10743c; }
.colour-status.is-out { color: #a52d20; }

/* Description written in the admin editor: real markup, already sanitised. */
.prose p { margin: 0 0 var(--s3); }
.prose p:last-child { margin-bottom: 0; }
.prose h3, .prose h4 { margin: var(--s5) 0 var(--s2); font-size: 16px; font-weight: 750; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 var(--s3); padding-left: var(--s5); }
.prose li { margin-bottom: var(--s1); }
.prose a { color: var(--accent-ink); text-decoration: underline; }
.prose strong, .prose b { color: var(--text); font-weight: 700; }

/* --------------------------------------------------------------- CAPTCHA */

.captcha-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--s3); }

/* The refresh control lives on the image it belongs to, rather than as a
   second labelled button competing with the form's real action. */
.captcha-box { position: relative; flex: none; line-height: 0; }
.captcha-box img {
    /* Fixed box, so a slow load cannot shift the form under the cursor. */
    width: 220px; height: 70px; display: block;
    border: 1px solid var(--line-strong); background: var(--surface-2);
}

.captcha-refresh {
    position: absolute; top: 5px; right: 5px;
    width: 28px; height: 28px; padding: 0; cursor: pointer;
    display: grid; place-items: center; line-height: 0;
    background: rgba(255, 255, 255, .9); color: var(--text-2);
    border: 1px solid var(--line-strong);
    transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.captcha-refresh:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.captcha-refresh svg { width: 15px; height: 15px; }
.captcha-refresh.is-spinning svg { animation: captcha-spin .5s var(--ease); }
@keyframes captcha-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.pgw-ui .captcha-row input[type=text] {
    flex: 1 1 180px; min-width: 0; align-self: stretch;
    font-family: var(--mono); font-size: 17px; letter-spacing: .22em; text-transform: uppercase;
}
.captcha .hint { margin-top: var(--s3); max-width: 62ch; }
.captcha .hint a { text-decoration: underline; }

@media (max-width: 560px) {
    .captcha-box, .captcha-box img { width: 100%; }
    .captcha-box img { height: auto; aspect-ratio: 220 / 70; }
    .pgw-ui .captcha-row input[type=text] { flex: 1 1 100%; }
}

/* The two alternatives to Buy Now share a row, so the panel is three
   decisions tall rather than three buttons tall. */
.buy-alt { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.buy-alt .btn { width: 100%; }

/* ==========================================================================
   Touch
   Keyed on the pointer, not the width. A tablet or a touchscreen laptop at
   1024px needs a thumb-sized target just as much as a phone does, and a
   narrow desktop window does not. Width decides layout; this decides reach.
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    /* The visible bar stays 4px - only the hit area grows. */
    .showcase-dots button { height: 40px; padding: 18px 0; }

    .gallery-groups button { padding: 11px var(--s4); }
    .gallery-zoom { padding: 11px var(--s4); }
    .captcha-refresh { width: 38px; height: 38px; top: 6px; right: 6px; }
    .lb-nav { width: 48px; height: 48px; }

    /* Filter and sort controls are how anyone actually finds a car. */
    .pgw-ui .filter-bar select,
    .pgw-ui .filter-bar input { min-height: 44px; }

    .pager a, .pager span { min-width: 44px; min-height: 44px; }
}
