/* Dealer websites. Brand colours come from the page as --brand, --brand-dark, --brand-soft and --brand-ink. */
/* Light and dark themes. Dark follows the visitor's device unless they've picked one with the header's button,
   which sets data-theme on <html> (remembered in their browser; see SiteHeader and site.js). */
:root {
  color-scheme: light;
  --ink: #0f172a;          /* Headings and strong text */
  --body: #334155;         /* Text */
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;           /* The page */
  --card: #ffffff;         /* Cards, panels, fields, menus */
  --card-border: rgba(226, 232, 240, .7);
  --skeleton: #e2e8f0;     /* Behind pictures while they load */
  --topbar: rgba(255, 255, 255, .92);
  --night: #0f172a;        /* Dark areas in both themes: the top of the home page, dark buttons */
  --footer: #0b1220;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --ok: #166534;
  --ok-bg: #f0fdf4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .14);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #f1f5f9; --body: #cbd5e1; --muted: #94a3b8; --line: #243044; --bg: #0b1120; --card: #121a2b;
    --card-border: rgba(36, 48, 68, .9); --skeleton: #1c263a; --topbar: rgba(11, 17, 32, .88); --night: #0f172a; --footer: #060a14;
    --danger: #fca5a5; --danger-bg: rgba(220, 38, 38, .14); --ok: #86efac; --ok-bg: rgba(22, 163, 74, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    /* The brand's light tint (set by the page) would glare on a dark background */
    --brand-soft: color-mix(in srgb, var(--brand) 18%, transparent);
  }
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f1f5f9; --body: #cbd5e1; --muted: #94a3b8; --line: #243044; --bg: #0b1120; --card: #121a2b;
  --card-border: rgba(36, 48, 68, .9); --skeleton: #1c263a; --topbar: rgba(11, 17, 32, .88); --night: #0f172a; --footer: #060a14;
  --danger: #fca5a5; --danger-bg: rgba(220, 38, 38, .14); --ok: #86efac; --ok-bg: rgba(22, 163, 74, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
  --brand-soft: color-mix(in srgb, var(--brand) 18%, transparent);
}

/* EN | FR in the header: the other language */
.lang-toggle { height: 44px; min-width: 44px; padding: 0 10px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.lang-toggle:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* The theme button in the header: a moon in light, a sun in dark */
.theme-toggle { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle .sun { display: none; }
html[data-theme="dark"] .theme-toggle .sun { display: block; }
html[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  html:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.015em; margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Jumping to a section (#inventory, #contact...) stops below the sticky header instead of under it */
[id] { scroll-margin-top: 88px; }
/* iPhones zoom into any field with text under 16px */
input, select, textarea { font-size: 16px !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg); }
.btn.dark { background: var(--night); color: #fff; }
.btn.dark:hover { background: #1e293b; }
.btn.block { width: 100%; }
.btn.lg { padding: 15px 24px; font-size: 16px; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--topbar); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand { --logo-h: 44px; }
.brand img { max-height: var(--logo-h); width: auto; }
/* The logo in dark mode (SiteLogo in index.php): a light tile behind logos that would disappear on the dark background,
   or the dealer's own dark mode version in place of their logo */
.brand .logo { display: inline-flex; align-items: center; min-width: 0; }
.brand .logo img { display: block; }
.brand .logo .logo-dark { display: none; }
html[data-theme="dark"] .brand .logo-tile { padding: 5px 10px; border-radius: 10px; background: #fff; }
html[data-theme="dark"] .brand .logo-tile img { max-height: calc(var(--logo-h) - 10px); }
html[data-theme="dark"] .brand .has-dark .logo-main { display: none; }
html[data-theme="dark"] .brand .has-dark .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .brand .logo-tile { padding: 5px 10px; border-radius: 10px; background: #fff; }
  html:not([data-theme="light"]) .brand .logo-tile img { max-height: calc(var(--logo-h) - 10px); }
  html:not([data-theme="light"]) .brand .has-dark .logo-main { display: none; }
  html:not([data-theme="light"]) .brand .has-dark .logo-dark { display: block; }
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--body); font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.topbar .btn { padding: 10px 16px; }
/* A long dealer name shortens with … rather than pushing the buttons off screen */
.brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Small-screen menu, shown in place of .nav below 900px */
.menu { display: none; position: relative; }
.menu summary { list-style: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg.i { width: 22px; height: 22px; }
.menu[open] summary { border-color: var(--brand); color: var(--brand); }
.menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px; }
.menu-panel a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.menu-panel a:hover { background: var(--bg); text-decoration: none; }

/* Hero */
.hero { position: relative; color: #fff; background: var(--night); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.03); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15, 23, 42, .92) 0%, rgba(15, 23, 42, .72) 45%, rgba(15, 23, 42, .35) 100%); }
.hero.plain { background: linear-gradient(135deg, var(--night) 0%, var(--brand-dark) 100%); }
.hero.plain::after { display: none; }
.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 120px; }
.hero h1 { color: #fff; font-size: clamp(32px, 5vw, 54px); font-weight: 800; max-width: 760px; margin: 0 0 14px; }
.hero p.lead { font-size: 18px; color: rgba(255, 255, 255, .85); max-width: 620px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.hero-actions .btn.ghost:hover { background: rgba(255, 255, 255, .2); }

/* Search panel, overlapping the bottom of the hero */
.search-panel { position: relative; z-index: 5; margin-top: -64px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-left: 2px; }
.field input, .field select, .toolbar select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px;
  color: var(--ink); background: var(--card); appearance: none; -webkit-appearance: none;
}
.field select, .toolbar select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field input:focus, .field select:focus, .toolbar select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search-panel .btn { align-self: end; height: 48px; padding: 0 26px; }

/* Search suggestions under the search box */
.ac { position: relative; }
.ac input[type=search]::-webkit-search-cancel-button { cursor: pointer; }
.ac-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 100%; min-width: min(480px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; }
.ac-list[hidden] { display: none; }
.ac-head { padding: 10px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ac-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--ink); }
.ac-item:hover, .ac-item.active { background: var(--brand-soft); text-decoration: none; }
.ac-model .ac-label { flex: 1; font-weight: 600; }
.ac-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ac-thumb { width: 72px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--skeleton); flex-shrink: 0; }
.ac-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ac-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-text span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.ac-all { justify-content: center; margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; padding: 12px 10px; font-weight: 600; color: var(--brand); }
.ac-empty { padding: 16px 12px; color: var(--muted); font-size: 14px; }

/* Body style shortcuts */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; }
.chip span { color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip.active span { color: inherit; opacity: .8; }

/* Results */
.section { padding-top: 48px; padding-bottom: 48px; } /* Top and bottom only, so .wrap keeps its side padding */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 32px 0 20px; flex-wrap: wrap; }
.toolbar h2 { font-size: 24px; }
.toolbar .count { color: var(--muted); font-weight: 500; font-size: 15px; margin-left: 8px; }
.toolbar .right { display: flex; align-items: center; gap: 12px; }
.toolbar select { width: auto; min-width: 210px; padding-top: 10px; padding-bottom: 10px; }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -8px 0 20px; }
.active-filters a { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--ink); padding: 6px 10px 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; }
.active-filters a:hover { text-decoration: none; filter: brightness(.96); }
.active-filters svg.i { width: 14px; height: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; color: var(--body); box-shadow: var(--shadow); border: 1px solid var(--card-border); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.card .photo { position: relative; aspect-ratio: 4 / 3; background: var(--skeleton); overflow: hidden; }
.card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .photo img { transform: scale(1.05); }
.badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 6px; background: rgba(255, 255, 255, .95); color: #0f172a; letter-spacing: .02em; } /* On photos: dark on white in both themes */
.badge.brand { background: var(--brand); color: var(--brand-ink); }
.badge.new { background: #16a34a; color: #fff; }

/* Website status (set per vehicle): Incoming, Sale Pending, Sold. Also an export vehicle's upcoming release date. */
.badge.status-1, .status-pill.status-1 { background: #2563eb; color: #fff; }
.badge.status-2, .status-pill.status-2 { background: #d97706; color: #fff; }
.badge.status-3, .status-pill.status-3 { background: #dc2626; color: #fff; }
.badge.release { background: #0f172a; color: #fff; }
.status-pill { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; margin-bottom: 10px; }
.card.sold .photo img { filter: grayscale(.6); opacity: .85; }
.price.sold { color: #dc2626; }
/* CARFAX Canada logo (assets/carfax.svg), per go.carfax.ca/logo-guide: the standard version on white, at least
   15px tall, never stretched or given effects, with clear space of about half its height all round.
   It's sized by height only so it keeps its proportions. */
.carfax-logo { display: block; height: 100%; width: auto; }
.carfax-word { font-weight: 800; letter-spacing: .06em; color: #0f172a; } /* Always on the logo's white box */

/* On the vehicle page: a full-width tile above the key specs */
.carfax-tile { grid-column: 1 / -1; gap: 20px; color: var(--body); border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.carfax-tile:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow-lg); }
.carfax-tile .logo { height: 48px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; flex-shrink: 0; }
.carfax-tile .text { flex: 1; min-width: 0; }
.carfax-tile .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.price-card .btn + .btn, .price-card .btn + .inquire { margin-top: 10px; }
.photo-count { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(15, 23, 42, .7); padding: 4px 8px; border-radius: 6px; }
.photo-count svg.i { width: 14px; height: 14px; }
.nophoto { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; background: linear-gradient(135deg, var(--bg), var(--skeleton)); }
.nophoto svg.i { width: 32px; height: 32px; opacity: .6; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card .year-make { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.card h3 { font-size: 18px; margin: 3px 0 12px; }
.specs-inline { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.spec-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--body); background: var(--bg); border: 1px solid var(--line); padding: 4px 9px; border-radius: 7px; }
.spec-chip svg.i { width: 14px; height: 14px; color: var(--muted); }
.card .foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.price { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price.call { font-size: 17px; font-weight: 700; color: var(--brand); }
.price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.card .more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--brand); }

.pages { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 40px 0 0; flex-wrap: wrap; }
.pages a, .pages span { min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 10px; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line); }
.pages a:hover { border-color: var(--brand); text-decoration: none; }
.pages .current { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.pages .gap { border: 0; background: none; min-width: 20px; }

.empty { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 56px 24px; text-align: center; }
.empty svg.i { width: 40px; height: 40px; color: var(--muted); margin: 0 auto 12px; }
.empty h3 { margin-bottom: 8px; }
.empty p { margin: 0 0 18px; }

/* About and visit */
.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.panel h2 { font-size: 26px; margin-bottom: 14px; }
.panel .kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 8px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-list strong { display: block; color: var(--ink); font-size: 14px; }
.contact-list a, .contact-list span { color: var(--body); }
.hours { white-space: pre-line; }
.about-text { color: var(--body); line-height: 1.7; }
.more-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 600; color: var(--brand); }
.more-link svg.i { width: 16px; height: 16px; transition: transform .15s; }
.more-link:hover svg.i { transform: translateX(3px); }
/* The About page: the story beside where to find them, then the team, reviews and the message form */
.about-page + .section { padding-top: 0; } /* The team or reviews right under the story: one gap, not two */
.about-page .crumbs { margin-top: 0; }
.about-story h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin-bottom: 10px; }
.about-tagline { font-size: 19px; font-weight: 600; color: var(--ink); margin: 0 0 16px; }
.about-story .about-text { font-size: 16.5px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
/* The Contact page: the form beside the visit details */
.contact-page { align-items: start; }
.contact-page h1 { font-size: clamp(28px, 3.6vw, 38px); font-weight: 800; margin-bottom: 10px; }
.contact-intro { color: var(--body); font-size: 16.5px; line-height: 1.65; margin: 0 0 20px; }
.contact-quick { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }

.cta { background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%); color: var(--brand-ink); border-radius: var(--radius); padding: 48px; display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: 40px; align-items: center; }
.cta h2 { color: inherit; font-size: 32px; }
.cta p { margin: 12px 0 0; opacity: .9; font-size: 17px; }
.cta .kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-bottom: 10px; }
.cta-phone { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cta-phone a { color: inherit; text-decoration: underline; }
.cta-form { background: var(--card); color: var(--body); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg); }

/* Lead forms */
.lead-form { display: grid; gap: 12px; }
.lead-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: var(--card); resize: vertical; min-height: 90px; }
.lead-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.lead-form .field input.invalid { border-color: #dc2626; }
.lead-form .fine { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.lead-form button[disabled] { opacity: .7; cursor: wait; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg:empty { display: none; }
.form-msg { font-size: 14px; padding: 10px 12px; border-radius: 8px; background: var(--danger-bg); color: var(--danger); }
.lead-done { text-align: center; padding: 20px 8px; }
.lead-done svg.i { width: 44px; height: 44px; color: #16a34a; margin: 0 auto 10px; }
.lead-done h3 { margin-bottom: 6px; }
.lead-done p { margin: 0; color: var(--body); }
.lead-form .field select.invalid { border-color: #dc2626; }

/* Get an offer: the "Sell or trade" page and the band linking to it from the home page */
.section-tight { padding-top: 8px; }
.offer-band { display: flex; align-items: center; gap: 18px; padding: 22px 26px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--body); border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.offer-band:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow-lg); }
.offer-band .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.offer-band .ic svg.i { width: 22px; height: 22px; }
.offer-band .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offer-band strong { color: var(--ink); font-size: 18px; }
.offer-band .go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); white-space: nowrap; }

.offer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.offer-main h1 { font-size: 32px; margin-bottom: 8px; }
.offer-intro { margin: 0 0 24px; font-size: 17px; color: var(--body); }
.offer-form { gap: 18px; }
.offer-form fieldset { border: 0; margin: 0; padding: 0 0 20px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; min-width: 0; }
.offer-form fieldset:last-of-type { border-bottom: 0; padding-bottom: 0; }
.offer-form legend { font-size: 17px; font-weight: 700; color: var(--ink); padding: 0; margin-bottom: 12px; }
.offer-form .field-row.three { grid-template-columns: 1fr 1.4fr 1.4fr; }
.offer-form .optional { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); opacity: .8; }
.offer-form [hidden] { display: none !important; }
/* Steps: progress, questions as tappable cards, and Back / Next */
.offer-progress { display: grid; gap: 8px; scroll-margin-top: 100px; }
.offer-progress-text { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.offer-progress-text strong { font-size: 19px; color: var(--ink); }
.offer-progress-text span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.offer-progress-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.offer-progress-bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 3px; transition: width .25s; }
.offer-form.stepped .offer-step legend { display: none; }
.offer-form.stepped .offer-step { border-bottom: 0; padding-bottom: 0; gap: 22px; }
.offer-nav { display: flex; gap: 10px; }
.offer-nav .btn { flex: 1; }
.offer-nav [data-step-back] { flex: 0 0 auto; }
.question { display: grid; gap: 8px; scroll-margin-top: 100px; }
.question-ask, .question .field label { font-weight: 600; color: var(--ink); font-size: 15px; text-transform: none; letter-spacing: 0; padding-left: 0; }
.question-hint { font-size: 13px; color: var(--muted); margin-top: -4px; }
.question.invalid .question-ask { color: var(--danger); }
.question.invalid .choice > span { border-color: #fca5a5; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.choices.wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice > span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); transition: border-color .12s, background .12s, box-shadow .12s; }
.choice strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.choice small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.choice:hover > span { border-color: var(--brand); }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px var(--brand-soft); border-color: var(--brand); }
.choice input[type=checkbox] + span strong::before { content: ""; display: inline-block; width: 14px; height: 14px; margin: 0 8px -2px 0; border: 1.5px solid var(--muted); border-radius: 4px; background: var(--card) no-repeat center / 10px; }
.choice input[type=checkbox]:checked + span strong::before { border-color: var(--brand); background-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 600; margin: 4px 0; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.vin-lookup { display: flex; gap: 8px; }
.vin-lookup input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.vin-lookup input::placeholder { text-transform: none; letter-spacing: 0; }
.vin-lookup .btn { flex-shrink: 0; }
.vin-where { font-size: 14px; }
.vin-where summary { cursor: pointer; color: var(--brand); font-weight: 600; padding: 2px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.vin-where summary::-webkit-details-marker { display: none; }
.vin-where summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.vin-where[open] summary::before { transform: rotate(45deg); }
.vin-spots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.vin-spots figure { margin: 0; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.vin-spots svg { width: 100%; height: auto; aspect-ratio: 200 / 125; background: var(--card); border-radius: 8px; }
/* The drawings: a white car outlined in the text colour, grey glass and tires, and the spot to look in the brand colour */
.vin-spots .body, .vin-spots .door { fill: #fff; stroke: #334155; stroke-width: 2; stroke-linejoin: round; }
.vin-spots .door { fill: #f1f5f9; }
.vin-spots .glass { fill: #cfe0f1; stroke: #334155; stroke-width: 1.5; stroke-linejoin: round; }
.vin-spots .glare { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; opacity: .8; }
.vin-spots .cabin { fill: #475569; }
.vin-spots .seat { fill: #1e293b; }
.vin-spots .tire { fill: #1e293b; }
.vin-spots .hub { fill: #cbd5e1; stroke: #64748b; stroke-width: 1.5; }
.vin-spots .lamp { fill: #fef9c3; stroke: #334155; stroke-width: 1.5; }
.vin-spots .grille { fill: #334155; }
.vin-spots .grille + .crease { stroke: #64748b; }
.vin-spots .plate { fill: #fff; stroke: #334155; stroke-width: 1.2; }
.vin-spots .crease { fill: none; stroke: #94a3b8; stroke-width: 1.5; stroke-linecap: round; }
.vin-spots .paper { fill: #fff; stroke: #334155; stroke-width: 2; }
.vin-spots .header { fill: #e2e8f0; }
.vin-spots .doc-title { font: 700 7.5px system-ui, sans-serif; fill: #334155; letter-spacing: .06em; }
.vin-spots .doc-label { font: 600 6.5px system-ui, sans-serif; fill: #64748b; letter-spacing: .04em; }
.vin-spots .doc-vin-label { font: 800 8px system-ui, sans-serif; fill: var(--brand); }
.vin-spots .doc-vin { font: 700 9px ui-monospace, Menlo, Consolas, monospace; fill: #0f172a; letter-spacing: .04em; }
.vin-spots .spot { fill: var(--brand); }

/* Dark theme: a slightly lighter panel, and outlined tires, so the dark parts of the drawings don't disappear */
html[data-theme="dark"] .vin-spots svg { background: #1a2436; }
html[data-theme="dark"] .vin-spots .tire { fill: #0b1120; stroke: #64748b; stroke-width: 1.5; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .vin-spots svg { background: #1a2436; }
  html:not([data-theme="light"]) .vin-spots .tire { fill: #0b1120; stroke: #64748b; stroke-width: 1.5; }
}
.vin-spots .soft-spot { fill: var(--brand-soft); stroke: var(--brand); stroke-width: 1.5; }
.vin-spots .ring { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 4 3; }
.vin-spots figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.4; color: var(--body); }
.vin-spots figcaption strong { color: var(--ink); font-size: 14px; }
.vin-result { font-size: 14px; padding: 10px 12px; border-radius: 8px; margin-top: 4px; }
.vin-result.ok { background: var(--ok-bg); color: var(--ok); }
.vin-result.error { background: var(--danger-bg); color: var(--danger); }
.offer-manual { display: grid; gap: 12px; }
/* Get pre-approved (/financing): the vehicle they came from, the address boxes two to a row, money and date boxes,
   and the consent box */
.finance-vehicle { display: flex; align-items: center; gap: 14px; margin: -6px 0 24px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--body); }
.finance-vehicle:hover { border-color: var(--brand); text-decoration: none; }
.finance-vehicle .mini-photo { width: 96px; }
.finance-vehicle .text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.finance-vehicle small { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.finance-vehicle strong { color: var(--ink); font-size: 16px; }
.finance-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.finance-fields .question:first-child { grid-column: 1 / -1; }
.finance-form .question.field label { margin-bottom: 2px; }
.finance-form .question.invalid input, .finance-form .question.invalid select, .finance-form .question.invalid .input-money { border-color: #dc2626; }
.finance-form .question.invalid label { color: var(--danger); }
.input-money { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.input-money:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input-money span { padding-left: 14px; color: var(--muted); font-weight: 600; }
.field .input-money input { border: 0; padding-left: 6px; background: none; box-shadow: none; }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--body); }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); }
.consent.invalid { border-color: #dc2626; }
/* The vehicle page's link to it, under the estimated payment */
.approve-link { display: flex; align-items: center; gap: 12px; margin: -6px 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--body); transition: border-color .15s; }
.approve-link:hover { border-color: var(--brand); text-decoration: none; }
.approve-link > svg.i:first-child { width: 20px; height: 20px; padding: 7px; box-sizing: content-box; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.approve-link span { flex: 1; display: flex; flex-direction: column; }
.approve-link strong { color: var(--ink); font-size: 15px; }
.approve-link small { color: var(--muted); font-size: 13px; }
.approve-link > svg.i:last-child { width: 18px; height: 18px; color: var(--brand); }
@media (max-width: 760px) { .finance-fields { grid-template-columns: 1fr; } }

.input-unit { display: flex; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.field .input-unit select { width: auto; flex-shrink: 0; border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; background-color: var(--bg); }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo-add { display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; color: var(--body); transition: border-color .15s, background .15s; }
.photo-add:hover, .photo-input:focus-visible + .photo-add { border-color: var(--brand); background: var(--brand-soft); }
.photo-add svg.i { width: 28px; height: 28px; color: var(--brand); }
.photo-add span { display: flex; flex-direction: column; }
.photo-add strong { color: var(--ink); }
.photo-add small { color: var(--muted); font-size: 13px; }
.photo-add.full { display: none; }
.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.photo-list:empty { display: none; }
.photo-item { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .75); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.photo-item button svg.i { width: 14px; height: 14px; }
.photo-count-note { font-size: 13px; color: var(--muted); }
.offer-steps h3 { font-size: 18px; margin-bottom: 14px; }
.offer-steps ol { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 16px; }
.offer-steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; }
.offer-steps li::before { content: counter(step); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.offer-steps strong { color: var(--ink); }
.offer-steps span { color: var(--body); font-size: 14px; }

.inquire { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.inquire h3 { font-size: 18px; }
.inquire .note { margin: 4px 0 14px; }

/* Vehicle page */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin: 24px 0 18px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs svg.i { width: 14px; height: 14px; }
.vehicle-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.vehicle-head h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
/* On desktop the price card beside the photos shows the price, so the one by the title only shows once the
   layout stacks and the price card drops below the photos */
.vehicle-head .price { font-size: 34px; text-align: right; display: none; }
/* Desktop: photos, key specs and details down the left, the price card down the right. The last row takes any
   extra height from the tall price card, so the left side doesn't spread apart. */
.vehicle-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto auto 1fr; grid-template-areas: "gallery side" "specs side" "details side"; gap: 28px; align-items: start; }
.v-gallery { grid-area: gallery; min-width: 0; }
.v-specs { grid-area: specs; }
/* The video is a slide of the gallery: it plays in the stage, letterboxed on its dark background */
.gallery .stage-video { position: absolute; inset: 0; background: #000; }
.gallery .stage-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery .stage.playing, .gallery .stage:has(> .stage-video:only-child) { cursor: default; }
.gallery .stage [hidden] { display: none; }
.gallery .stage.poster { cursor: pointer; }
.gallery .stage.poster img { filter: brightness(.75); }
.stage-play { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-weight: 700; font-size: 15px; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); cursor: pointer; }
.stage-play .circle { width: 76px; height: 76px; border-radius: 50%; background: rgba(15, 23, 42, .72); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .15s, background .15s; }
.stage.poster:hover .stage-play .circle { background: rgba(15, 23, 42, .92); }
.stage-play .circle svg.i { width: 30px; height: 30px; }
.stage.poster:hover .stage-play .circle { transform: scale(1.06); }
.gallery .stage .nav-btn { z-index: 1; }
.thumb-video { position: relative; }
.thumb-video img { filter: brightness(.6); }
.thumb-video .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%); width: 34px; height: 34px; border-radius: 50%; background: rgba(15, 23, 42, .72); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); display: flex; align-items: center; justify-content: center; }
.thumb-video .play svg.i { width: 16px; height: 16px; }
.thumb-video .tag { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.v-details { grid-area: details; }
.vehicle-layout .side { grid-area: side; }

.gallery .stage { position: relative; aspect-ratio: 16 / 10; background: #0f172a; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.gallery .stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery .stage .nophoto { cursor: default; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .72); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); transition: background .15s; } /* See-through in both themes, like the photo counter and full screen pills */
.nav-btn:hover { background: rgba(15, 23, 42, .92); }
.nav-btn.prev { left: 14px; }
.nav-btn.next { right: 14px; }
.nav-btn svg.i { width: 22px; height: 22px; }
.stage .counter, .stage .expand { position: absolute; bottom: 14px; font-size: 13px; font-weight: 600; color: #fff; background: rgba(15, 23, 42, .72); padding: 6px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.stage .counter { left: 14px; }
.stage .expand { right: 14px; }
.stage .expand svg.i { width: 14px; height: 14px; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 12px 0 4px; scroll-snap-type: x mandatory; }
.thumb { flex: 0 0 104px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--skeleton); opacity: .65; transition: opacity .15s, border-color .15s; scroll-snap-align: start; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.active { border-color: var(--brand); opacity: 1; }

.key-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.key-spec { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); padding: 16px; display: flex; gap: 12px; align-items: center; }
.key-spec .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.key-spec small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.key-spec strong { color: var(--ink); font-size: 15px; }

.v-details .description { margin-bottom: 32px; color: var(--body); font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.v-details .description p, .v-details .description ul, .v-details .description ol { margin: 0 0 14px; }
.v-details .description ul, .v-details .description ol { padding-left: 24px; }
.v-details .description li { margin-bottom: 4px; }
.v-details .description h3 { font-size: 18px; margin: 22px 0 8px; color: var(--ink); }
.v-details .description h3:first-child { margin-top: 0; }
.v-details .description strong { color: var(--ink); }
.v-details .description a { color: var(--brand); text-decoration: underline; }
.v-details .description > :last-child { margin-bottom: 0; }
.spec-table { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec-row span { color: var(--muted); }
.spec-row strong { color: var(--ink); font-weight: 600; text-align: right; word-break: break-word; }

.side { position: sticky; top: 92px; display: grid; gap: 18px; }
.price-card .price { font-size: 38px; }
.price-card .note { color: var(--muted); font-size: 14px; margin: 4px 0 22px; }
.price-card .btn + .btn { margin-top: 10px; }
.price-card .stock { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.price-card .stock strong { color: var(--ink); }
.dealer-card h3 { font-size: 17px; margin-bottom: 14px; }
/* Beside the price card, except on phones where it comes after Vehicle details */
.dealer-card-end { display: none; grid-column: 1 / -1; }
.dealer-card .contact-list { margin-bottom: 0; gap: 14px; }
.dealer-card .contact-list .ic { width: 36px; height: 36px; }

.mobile-bar { display: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(2, 6, 23, .95); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.lightbox .close { top: 18px; right: 18px; transform: none; }.lightbox .counter { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 600; font-size: 14px; }
body.no-scroll { overflow: hidden; }

/* Footer */
footer { background: var(--footer); color: #94a3b8; margin-top: 64px; padding: 56px 0 28px; font-size: 15px; }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
footer .brand { color: #fff; margin-bottom: 12px; }
footer a { color: #cbd5e1; }
footer a:hover { color: #fff; }
footer p { margin: 0 0 8px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer .bottom { border-top: 1px solid #1e293b; margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; }
footer .bottom a { color: #94a3b8; }
/* Announcement bar above the header */
.announcement { background: var(--brand); color: var(--brand-ink); font-size: 14px; font-weight: 600; }
.announcement .wrap { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 9px; padding-bottom: 9px; text-align: center; }
.announcement svg.i { width: 16px; height: 16px; flex-shrink: 0; }

/* Social links: icons in the footer, buttons with names in the contact panel */
.social-icons { display: flex; gap: 8px; margin: 14px 0 12px; }
.social-icons a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #cbd5e1; display: inline-flex; align-items: center; justify-content: center; }
.social-icons a:hover { background: var(--brand); color: var(--brand-ink); }
.social-icons span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.social-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 20px; }
.social-buttons a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 14px; font-weight: 600; background: var(--card); }
.social-buttons a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.social-buttons svg.i { width: 16px; height: 16px; }
footer .licence { font-size: 13px; color: #94a3b8; }

/* Sale pricing and featured */
.badge.featured { background: var(--brand); color: var(--brand-ink); }
.badge.drop { background: #16a34a; color: #fff; }
.price s.was, s.was { color: var(--muted); font-weight: 500; font-size: .62em; margin-right: 6px; text-decoration-thickness: 1.5px; }
.price-drop { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.price-drop s.was { font-size: 16px; }

/* Payment estimate on cards, and the calculator on vehicle pages */
.price .pay { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.calc { margin: 6px 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.calc summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.calc summary::-webkit-details-marker { display: none; }
.calc-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.calc-head { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.calc-head small { font-size: 12px; color: var(--muted); }
.calc-head strong { font-size: 18px; color: var(--ink); }
.calc-open { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--brand); }
.calc-open svg.i { width: 16px; height: 16px; transition: transform .15s; }
.calc[open] .calc-open svg.i { transform: rotate(90deg); }
.calc-body { padding: 4px 14px 14px; display: grid; gap: 10px; }
.calc-row { display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 10px; }
.calc-row label { font-size: 14px; color: var(--body); }
.calc-row select, .calc-input { height: 40px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; }
.calc-row select { padding: 0 10px; }
.calc-input { display: flex; align-items: center; padding: 0 10px; gap: 4px; color: var(--muted); }
.calc-input input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; outline: none; text-align: right; }
.calc-row select:focus, .calc-input:focus-within { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.calc-result { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.calc-result span { font-size: 28px; font-weight: 800; color: var(--ink); }
.calc-result small { font-size: 14px; color: var(--muted); }
.calc-fine { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* Opening hours */
.hours-list { margin: 4px 0 0; display: grid; gap: 2px; }
.hours-list > div { display: flex; justify-content: space-between; gap: 16px; }
.hours-list dt { font-weight: 500; }
.hours-list dd { margin: 0; text-align: right; white-space: nowrap; }
.hours-note { display: block; margin-top: 6px; font-size: 13px; opacity: .85; }
.open-status { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 4px; font-size: 13px; font-weight: 600; color: #b45309; }
.open-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.open-status.is-open { color: #16a34a; }
footer .hours-list { gap: 4px; }
footer .hours-list dt { color: #cbd5e1; }

/* Reviews on the home page */
.reviews-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.reviews-head .kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 8px; }
.reviews-head h2 { font-size: 28px; }
/* Staggered: each review is as tall as its words, stacked in columns like a pinboard. site.js places them left to
   right into the shortest column (.reviews-grid.masonry); without it, CSS columns stagger them top to bottom. */
.reviews-grid { columns: 280px; column-gap: 18px; }
.reviews-grid > .review { break-inside: avoid; margin-bottom: 18px; }
.reviews-grid.masonry { columns: auto; display: flex; align-items: flex-start; gap: 18px; }
.reviews-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.reviews-grid.masonry .review { margin: 0; }
.review { margin: 0; padding: 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 12px; }
.review .stars { display: flex; gap: 2px; }
.review .stars span { color: var(--line); }
.review .stars span.on { color: #f59e0b; }
.review .stars svg.i { width: 18px; height: 18px; fill: currentColor; }
.review blockquote { margin: 0; color: var(--body); line-height: 1.65; }
.review figcaption { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-weight: 600; color: var(--ink); font-size: 14px; }
.review-name { min-width: 0; overflow-wrap: anywhere; }
/* The reviewer's initials (ReviewAvatar in index.php). Each colour keeps white text readable in light and dark. */
.review-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .02em; line-height: 1; user-select: none; }
.review-avatar.c0 { background: #2563eb; }
.review-avatar.c1 { background: #7c3aed; }
.review-avatar.c2 { background: #db2777; }
.review-avatar.c3 { background: #dc2626; }
.review-avatar.c4 { background: #c2410c; }
.review-avatar.c5 { background: #047857; }
.review-avatar.c6 { background: #0e7490; }
.review-avatar.c7 { background: #4f46e5; }

/* The team on the home page: round photos (or initials in the brand colour), name, role and a short bio */
.team-head { margin-bottom: 22px; }
.team-head .kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 8px; }
.team-head h2 { font-size: 28px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.team-member { margin: 0; padding: 26px 22px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--card-border); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.team-photo { width: 124px; height: 124px; border-radius: 50%; object-fit: cover; background: var(--skeleton); }
.team-initials { display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-size: 38px; font-weight: 800; letter-spacing: .02em; }
.team-member figcaption { display: flex; flex-direction: column; gap: 4px; }
.team-member strong { font-size: 17px; color: var(--ink); }
.team-role { font-size: 14px; font-weight: 600; color: var(--brand); }
.team-member p { margin: 8px 0 0; color: var(--body); font-size: 14px; line-height: 1.6; }

/* Saving: the heart over each card, and the Save button on vehicle pages */
.card-wrap { position: relative; display: flex; }
.card-wrap > .card { flex: 1; }
.save-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer; font: inherit; }
.card-wrap > .save-btn { position: absolute; z-index: 3; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; background: rgba(15, 23, 42, .72); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .2s, color .15s, background .15s; }
.card-wrap > .save-btn:hover { background: rgba(15, 23, 42, .92); }
.card-wrap:hover > .save-btn { transform: translateY(-3px); }
.save-btn svg.i { width: 19px; height: 19px; }
.save-btn.on { color: #e11d48; }
/* On the card's photo: see-through in both themes, like the photo arrows. A lighter red reads better on it. */
.card-wrap > .save-btn.on { color: #fb7185; }
.save-btn.on svg.i { fill: currentColor; }

/* Save and Share beside the vehicle's title: two quiet buttons, Share opening a small menu */
.share { display: flex; align-items: center; gap: 8px; }
.share .save-btn.with-label, .share-btn { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: border-color .15s, color .15s; }
.share .save-btn.with-label:hover, .share-btn:hover { border-color: var(--brand); color: var(--brand); }
.share .save-btn.with-label.on { color: #e11d48; border-color: #fecdd3; }
.share .save-btn svg.i, .share-btn svg.i { width: 17px; height: 17px; }
.share-wrap { position: relative; }
.share-menu { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; min-width: 190px; padding: 6px; background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .18); display: grid; }
.share-menu[hidden] { display: none; }
.share-menu a, .share-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--bg); text-decoration: none; }
.share-menu svg.i { width: 17px; height: 17px; color: var(--muted); }
.share-menu button.copied, .share-menu button.copied svg.i { color: #16a34a; }

/* Saved vehicles: the heart in the header, and the panel it opens */
.saved-toggle { position: relative; width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: #e11d48; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.saved-toggle[hidden] { display: none; }
.saved-toggle svg.i { fill: currentColor; }
.saved-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #e11d48; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.saved-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(2, 6, 23, .5); }
.saved-overlay[hidden], .saved-panel[hidden] { display: none; }
.saved-panel { position: fixed; z-index: 91; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--card); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.saved-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.saved-head h3 { font-size: 18px; }
.saved-close { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.saved-list { flex: 1; overflow-y: auto; padding: 12px; display: grid; align-content: start; gap: 8px; }
.saved-row { position: relative; }
.saved-remove { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--bg); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.saved-remove:hover { color: #e11d48; }
.saved-remove svg.i { width: 15px; height: 15px; }
.saved-empty { color: var(--muted); text-align: center; padding: 40px 16px; margin: 0; }
.saved-note { margin: 0; padding: 12px 20px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

/* A small vehicle row: saved vehicles and recently viewed */
.mini { display: flex; gap: 12px; align-items: center; padding: 8px 44px 8px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--body); }
.mini:hover { border-color: var(--brand); text-decoration: none; }
.mini-photo { width: 92px; aspect-ratio: 4 / 3; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--skeleton); }
.mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.mini-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.mini-text strong { color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-price { font-weight: 700; color: var(--ink); margin-top: 2px; }

/* Recently viewed on the home page: a row that scrolls sideways */
.recent { margin-top: 28px; }
.recent[hidden] { display: none; }
.recent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.recent-head h2 { font-size: 20px; }
.recent-nav { display: flex; gap: 8px; }
.recent-nav[hidden] { display: none; }
.recent-nav button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: border-color .15s, color .15s, opacity .15s; }
.recent-nav button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.recent-nav button:disabled { opacity: .4; cursor: default; }
.recent-nav svg.i { width: 17px; height: 17px; }
/* Scrolls sideways without a scrollbar: swipe, trackpad, or the arrows above */
.recent-list { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.recent-list::-webkit-scrollbar { display: none; }
.mini.mini-card { flex: 0 0 280px; padding-right: 12px; scroll-snap-align: start; }

/* Cookie choice buttons, and Cookie settings in the footer */
.cookie-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-buttons .btn { padding: 10px 18px; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: #94a3b8; cursor: pointer; }
.link-button:hover { color: #fff; }

footer .legal-links { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }

/* Privacy policy and terms of use */
.legal { max-width: 820px; margin: 0 auto; }
.legal h1 { font-size: 34px; margin-bottom: 6px; }
.legal-updated { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.legal h2 { font-size: 20px; margin: 32px 0 10px; scroll-margin-top: 96px; }
.legal p, .legal li { color: var(--body); line-height: 1.7; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.legal strong { color: var(--ink); }

/* Cookie notice along the bottom, until it's closed */
.cookie-notice { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 20px; background: var(--card); color: var(--body); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; font-size: 14px; line-height: 1.5; flex: 1; }
.cookie-notice .btn { padding: 10px 22px; flex-shrink: 0; }

/* "Website by" with the AutoTrack car (white, for the dark footer) */
footer .made-by { display: inline-flex; align-items: center; gap: 6px; }
footer .made-by img { height: 14px; width: auto; opacity: .75; transition: opacity .15s; margin-left: 2px; }
footer .made-by strong { color: #cbd5e1; font-weight: 700; }
footer .made-by:hover { text-decoration: none; }
footer .made-by:hover img { opacity: 1; }
footer .made-by:hover strong { color: #fff; }

/* Touch screens have no hover, so a tapped card shouldn't stay lifted */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: var(--shadow); }
  .card:hover .photo img { transform: none; }
}

/* Tablets (landscape) and small laptops */
@media (max-width: 1100px) {
  .search-panel { grid-template-columns: 1fr 1fr 1fr; }
  .search-panel .field:first-child { grid-column: 1 / -1; }
  .search-panel .btn { grid-column: 1 / -1; }
  .vehicle-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* Tablets: the vehicle page stacks as photos, key specs, price and contact, then details */
@media (max-width: 1024px) {
  .vehicle-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "gallery" "specs" "side" "details"; gap: 24px; }
  .vehicle-head .price { display: block; }
  /* Title on its own line, then the price with Save and Share across from it */
  .vehicle-head > div:first-child { flex-basis: 100%; }
  .vehicle-head .price { order: 1; }
  .vehicle-head .share { order: 2; margin-left: auto; }
  .side { position: static; grid-template-columns: 1fr 1fr; align-items: start; }
  .cta { grid-template-columns: 1fr; padding: 36px; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .offer-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* Small tablets: the header menu replaces the links */
@media (max-width: 900px) {
  .topbar .wrap { gap: 10px; }
  .topbar .brand { margin-right: auto; }
  .nav { display: none; }
  .menu { display: block; }
  .about-grid { grid-template-columns: 1fr; }
}

/* Phones */
@media (max-width: 760px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  [id] { scroll-margin-top: 72px; }

  .topbar .wrap { min-height: 60px; }
  .brand { font-size: 17px; }
  .brand { --logo-h: 34px; }
  .topbar .btn { width: 44px; height: 44px; padding: 0; }
  .topbar .btn .label { display: none; }

  .hero .wrap { padding-top: 36px; padding-bottom: 88px; }
  .hero h1 { font-size: clamp(28px, 8vw, 36px); margin: 0 0 10px; }
  .hero p.lead { font-size: 16px; margin-bottom: 22px; }
  .hero-actions .btn { flex: 1 1 100%; }

  /* Search: the text box and button full width, the menus two to a row */
  .search-panel { grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; margin-top: -56px; }
  .search-panel .field label { font-size: 11px; }
  .search-panel .btn { height: 50px; }
  .search-panel .field:nth-of-type(4) { grid-column: 1 / -1; } /* The third menu gets its own row */
  .ac-list { min-width: 100%; }
  .ac-thumb { width: 60px; }

  /* Body styles scroll sideways in one row instead of wrapping into a block */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 20px -16px 0; padding: 0 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }

  .toolbar { margin: 24px 0 16px; }
  .toolbar h2 { font-size: 20px; }
  .toolbar .right { flex: 1 1 100%; }
  .toolbar select { width: 100%; min-width: 0; }
  .grid { gap: 16px; }
  .card .body { padding: 14px 16px 16px; }
  .pages a, .pages span { min-width: 40px; height: 40px; padding: 0 10px; }

  .section { padding-top: 32px; padding-bottom: 32px; }
  .panel { padding: 20px; }
  .panel h2 { font-size: 22px; }
  .cta { padding: 22px; gap: 22px; }
  .cta h2 { font-size: 24px; }
  .cta p { font-size: 16px; }
  .cta-form { padding: 16px; }
  .lead-form .field-row { grid-template-columns: 1fr; }
  .cookie-notice { left: 12px; right: 12px; bottom: 12px; flex-wrap: wrap; gap: 12px; padding: 14px; }
  .cookie-notice .btn { width: 100%; }
  .cookie-buttons { width: 100%; }
  .cookie-buttons .btn { flex: 1; }
  .calc-row { grid-template-columns: 1fr 140px; }
  .dealer-card-side { display: none; }
  .dealer-card-end { display: block; }
  .reviews-head h2 { font-size: 22px; }
  /* Above the Call / Message bar on vehicle pages */
  body.has-mobile-bar .cookie-notice { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .legal h1 { font-size: 26px; }
  .offer-form .field-row.three { grid-template-columns: 1fr 1fr; }
  .vin-spots { grid-template-columns: 1fr; }
  .vin-spots figure { flex-direction: row; align-items: center; }
  .vin-spots svg { width: 120px; flex-shrink: 0; }
  .offer-form .field-row.three .field:first-child { grid-column: 1 / -1; }
  .offer-main h1 { font-size: 26px; }
  .offer-intro { font-size: 16px; margin-bottom: 18px; }
  .offer-band { flex-wrap: wrap; padding: 18px; gap: 14px; }
  .offer-band .go { width: 100%; justify-content: center; padding-top: 12px; border-top: 1px solid var(--line); }

  /* Vehicle page */
  .crumbs { margin: 14px 0 12px; font-size: 13px; }
  .crumbs > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
  .vehicle-head { margin-bottom: 16px; gap: 6px; }
  .vehicle-head .price { text-align: left; font-size: 30px; }
  .vehicle-layout { gap: 16px; }
  .gallery .stage { aspect-ratio: 4 / 3; margin: 0 -16px; border-radius: 0; }
  .stage .expand .label { display: none; }
  .thumbs { gap: 8px; }
  .thumb { flex-basis: 78px; border-radius: 8px; }
  .stage-play .circle { width: 60px; height: 60px; }
  .stage-play .circle svg.i { width: 24px; height: 24px; }
  .thumb-video .play { width: 26px; height: 26px; }
  .thumb-video .play svg.i { width: 12px; height: 12px; }
  .thumb-video .tag { font-size: 10px; bottom: 3px; }
  .nav-btn { width: 38px; height: 38px; }
  .nav-btn.prev { left: 10px; }
  .nav-btn.next { right: 10px; }
  .key-specs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .key-spec { padding: 12px; gap: 10px; }
  .key-spec .ic { width: 36px; height: 36px; }
  .key-spec strong { font-size: 14px; word-break: break-word; }
  .carfax-tile { flex-wrap: wrap; gap: 14px; }
  .carfax-tile .go { width: 100%; justify-content: center; padding-top: 12px; border-top: 1px solid var(--line); }
  .side { grid-template-columns: 1fr; gap: 16px; }
  .price-card .price { font-size: 32px; }
  .spec-table { grid-template-columns: 1fr; }

  .lightbox img { max-width: 100vw; max-height: 78vh; border-radius: 0; }
  .lightbox .nav-btn.prev, .lightbox .nav-btn.next { top: auto; bottom: 24px; transform: none; }
  .lightbox .nav-btn.prev { left: calc(50% - 54px); }
  .lightbox .nav-btn.next { right: calc(50% - 54px); }

  footer { margin-top: 40px; padding-top: 40px; }
  footer .cols { grid-template-columns: 1fr; gap: 24px; }

  /* Call / Message bar fixed to the bottom of vehicle pages, with room left so it never covers the page */
  .mobile-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(15, 23, 42, .08); }
  .mobile-bar .btn { flex: 1; }
  body.has-mobile-bar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* Small phones */
@media (max-width: 380px) {
  .key-specs { grid-template-columns: 1fr; }
  .search-panel { grid-template-columns: 1fr; }
}
