/* ==========================================================================
   TJK Motors — design system
   Dark luxury: near-black surfaces, warm white type, one crimson accent.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  color-scheme: dark;

  --bg: #0a0a0b;
  --bg-2: #0f0f11;
  --surface: #151518;
  --surface-2: #1b1b1f;
  --surface-3: #232328;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --text: #f4f4f5;
  --text-2: #b4b4bb;
  --text-3: #8b8b94;

  --accent: #e11d2e;
  --accent-hover: #f23545;
  --accent-soft: rgba(225, 29, 46, 0.14);
  --accent-glow: rgba(225, 29, 46, 0.35);

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);
  --danger-soft: rgba(244, 63, 94, 0.14);
  --danger: #fb7185;

  --line-3: rgba(255, 255, 255, 0.28);
  --hover: rgba(255, 255, 255, 0.06);
  --sheen: rgba(255, 255, 255, 0.05);
  --sheen-strong: rgba(255, 255, 255, 0.08);
  --grid-line: rgba(255, 255, 255, 0.035);
  --glass: rgba(16, 16, 18, 0.75);
  --glass-strong: rgba(10, 10, 11, 0.97);
  --car-shadow: rgba(0, 0, 0, 0.55);
  --card-shadow: rgba(0, 0, 0, 0.8);
  --stage: radial-gradient(120% 90% at 50% 100%, #26262c 0%, #141417 55%, #0e0e10 100%);
  --cta-bg: linear-gradient(135deg, #1a0a0d 0%, #120708 40%, #0d0d0f 100%);
  --map-filter: grayscale(1) invert(0.92) contrast(0.9);
  --link: #ff6b76;
  --eyebrow: #ff5c68;
  --fb-text: #5aa0ff;

  --font-display: "Archivo", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 800ms;

  --z-header: 40;
  --z-menu: 50;
  --z-toast: 100;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(52px, 7vw, 92px); }
.section--tight { padding-block: clamp(40px, 5.5vw, 68px); }
/* Two plain sections in a row would stack both paddings; the second one starts closer. */
.section + .section:not([style*="background"]) { padding-top: clamp(28px, 3.5vw, 48px); }
/* A closing line under a section's grid: the note on the left, the "View all" link on the right. */
/* "Browse the full inventory" panel under the Featured cards: count on the left, a round arrow on the right. */
.lot-link { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(18px, 3vw, 36px); margin-top: 18px; padding: clamp(18px, 2.4vw, 26px) clamp(20px, 3vw, 32px); border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); color: var(--text); text-decoration: none; transition: border-color .3s ease, background-color .3s ease; }
.lot-count { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-right: clamp(18px, 3vw, 36px); border-right: 1px solid var(--line); font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 4.4vw, 52px); line-height: 1; font-variant-numeric: tabular-nums; }
.lot-count small { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body, inherit); font-weight: 500; font-size: 13px; line-height: 1.2; color: var(--text-2); white-space: nowrap; }
.lot-count small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
.lot-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lot-text strong { font-family: var(--font-display); font-size: clamp(17px, 1.6vw, 20px); font-weight: 700; }
.lot-text span { color: var(--text-2); font-size: 14px; }
.lot-arrow { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--text); color: var(--bg); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.lot-link .lot-arrow { display: flex; align-items: center; justify-content: center; flex: none; }
.lot-arrow svg { width: 20px; height: 20px; margin: 0; }
.lot-link:hover { border-color: color-mix(in srgb, var(--text) 28%, transparent); }
.lot-link:hover .lot-arrow { transform: translateX(4px) rotate(-45deg); }
.lot-link:focus-visible { outline: 2px solid var(--accent, #e11d2e); outline-offset: 3px; }
@media (max-width: 640px) {
  .lot-link { grid-template-columns: 1fr auto; gap: 14px; border-radius: 18px; }
  .lot-count { grid-column: 1 / -1; padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .lot-text span { font-size: 13px; }
  .lot-arrow { width: 44px; height: 44px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(30px, 4.2vw, 46px); margin-top: 14px; }
.section-head p { color: var(--text-2); max-width: 46ch; }

.muted { color: var(--text-2); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--surface-2);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--btn-bg); color: var(--text);
  font-weight: 600; font-size: 15px; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  touch-action: manipulation;
}
.btn:hover { border-color: var(--line-3); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { --btn-bg: var(--accent); border-color: transparent; color: #fff; }
.btn--primary:hover { --btn-bg: var(--accent-hover); }
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease-out);
}
.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost { --btn-bg: transparent; }
.btn--ghost:hover { --btn-bg: var(--hover); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.link-arrow svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset: 0 0 auto; z-index: var(--z-header);
  height: var(--header-h);
  transition: transform var(--dur) var(--ease-out), background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; flex: none; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 14px; letter-spacing: -0.02em;
}
.logo-text { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 18px; letter-spacing: 0.04em; }
.logo-text span { color: var(--text-3); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative; padding: 10px 14px; font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap;
  transition: color var(--dur) var(--ease-out);
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: right; transition: transform var(--dur) var(--ease-out);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
  display: none; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-2); background: transparent; position: relative;
}
.menu-toggle span {
  position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--text);
  transition: transform var(--dur) var(--ease-out), top var(--dur) var(--ease-out);
}
.menu-toggle span:nth-child(1) { top: 19px; }
.menu-toggle span:nth-child(2) { top: 27px; }
.menu-open .menu-toggle span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { top: 23px; transform: rotate(-45deg); }

/* Phone menu: a bottom sheet. The page stays visible behind a dimmed layer; the sheet slides up from the bottom. */
.mobile-menu { position: fixed; inset: 0; z-index: var(--z-menu); visibility: hidden; transition: visibility 0s 450ms; }
.menu-open .mobile-menu { visibility: visible; transition: none; }
.menu-open .site-header { z-index: calc(var(--z-menu) + 1); }
.menu-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity 400ms var(--ease-out); }
.menu-open .menu-scrim { opacity: 1; }
.menu-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--header-h) - 12px); overflow-y: auto;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; background: var(--bg-2); border-top: 1px solid var(--line-2);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(105%); transition: transform 450ms cubic-bezier(.2, .8, .2, 1);
}
.menu-open .menu-sheet { transform: none; }
.menu-handle { display: block; width: 40px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 0 auto 12px; }
.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu nav a {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 12px; border-radius: 16px;
  font-size: 16px; font-weight: 600; color: var(--text);
  opacity: 0; transform: translateY(12px);
  transition: opacity 350ms var(--ease-out), transform 400ms var(--ease-out), background-color var(--dur);
}
.mobile-menu nav a:active { background: var(--surface-2); }
.mobile-menu nav a[aria-current="page"] { background: var(--surface-2); }
.menu-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.menu-ic svg { width: 18px; height: 18px; }
.mobile-menu nav a[aria-current="page"] .menu-ic { background: var(--accent); border-color: var(--accent); color: #fff; }
.menu-label { flex: 1; }
.menu-meta { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.menu-meta b { font-weight: 600; color: var(--text); }
.menu-open .mobile-menu nav a { opacity: 1; transform: none; }
.menu-open .mobile-menu nav a:nth-child(1) { transition-delay: 80ms; }
.menu-open .mobile-menu nav a:nth-child(2) { transition-delay: 120ms; }
.menu-open .mobile-menu nav a:nth-child(3) { transition-delay: 160ms; }
.menu-open .mobile-menu nav a:nth-child(4) { transition-delay: 200ms; }
.menu-open .mobile-menu nav a:nth-child(5) { transition-delay: 240ms; }
.mobile-menu .mobile-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */

/* Split hero: the promise and two actions on the left; on the right two real cars from the lot as
   cards, a white card behind and a photo card in front, fanned slightly. Motion: the headline rises
   word by word, the cards are dealt in from below, follow the pointer a little, and straighten when
   you point at them. Nothing loops. */
.hero {
  position: relative; isolation: isolate; min-height: min(100svh, 920px); display: flex; align-items: center;
  padding-top: calc(var(--header-h) + clamp(32px, 5vh, 64px)); padding-bottom: clamp(48px, 8vh, 96px);
}
.hero-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: clamp(32px, 5vw, 80px); }
.hero h1 {
  font-family: var(--font-body); font-weight: 600; font-stretch: 100%;
  font-size: clamp(38px, 4.5vw, 70px); letter-spacing: -0.045em; line-height: 1.04; margin: 0;
}
/* "honest people." in a red italic serif: the human part of the promise. */
/* The word reveal clips each word to its box; italic letters like g, p and y hang below and lean past
   the left edge, so the italic words get extra room that is then taken back so the layout doesn't move. */
.hero h1 .serif .word { padding: 0 0.12em 0.28em; margin: 0 -0.12em -0.28em; }
.hero h1 .serif { display: block; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -0.01em; font-size: 1.14em; line-height: 0.9; }
.hero .lead { font-size: clamp(17px, 1.45vw, 21px); color: var(--text-2); max-width: 30ch; margin-top: 22px; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; margin-top: 34px; }
.btn--ink { --btn-bg: var(--text); color: var(--bg); border-color: transparent; min-height: 56px; padding: 0 30px; font-size: 16px; }
.btn--ink:hover { --btn-bg: var(--text); box-shadow: 0 10px 24px -12px var(--card-shadow); }
.hero-link { font-weight: 600; font-size: 16px; color: var(--text); display: inline-flex; gap: 6px; }
.hero-link span { transition: transform var(--dur) var(--ease-out); }
.hero-link:hover span { transform: translateX(4px); }

/* The deck: both cards share one tilt that follows the pointer (set by home.js as --tx / --ty). */
.hero-deck { position: relative; height: clamp(460px, 62vh, 580px); perspective: 1400px; }
.deck-card { position: absolute; top: 50%; width: clamp(260px, 22vw, 320px); color: var(--text);
  transition: transform 900ms var(--ease-quint, cubic-bezier(0.16, 1, 0.3, 1)), box-shadow 600ms var(--ease-out); }
.deck-card--back { left: 0; transform: translateY(-50%) rotate(-4deg) translate3d(calc(var(--tx, 0) * -6px), calc(var(--ty, 0) * -6px), 0); }
.deck-card--front { right: 0; transform: translateY(-50%) rotate(3deg) translate3d(calc(var(--tx, 0) * 10px), calc(var(--ty, 0) * 10px), 0); z-index: 2; }
.hero-deck .deck-card--back:hover { transform: translateY(-52%) rotate(-1.5deg); z-index: 3; }
.hero-deck .deck-card--front:hover { transform: translateY(-52%) rotate(1deg); }
.hero-deck.is-dealing .deck-card { animation: deal 1100ms var(--ease-quint, cubic-bezier(0.16, 1, 0.3, 1)) both; }
.hero-deck.is-dealing .deck-card--back { animation-delay: 350ms; }
.hero-deck.is-dealing .deck-card--front { animation-delay: 520ms; }
@keyframes deal { from { opacity: 0; translate: 0 90px; rotate: 6deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }

/* White card */
.deck-card--back { background: var(--surface); border-radius: 30px; padding: 9px; box-shadow: 0 40px 70px -30px var(--card-shadow), 0 0 0 1px var(--line); }
.deck-card--back .ph { display: block; height: 250px; border-radius: 22px; overflow: hidden; background: var(--stage); position: relative; }
.deck-card--back .ph .car-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.deck-card--back .ph .car-art { position: absolute; inset: 0; margin: auto; width: 88%; }
.deck-card--back .b { padding: 16px 10px 8px; }
.deck-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 20px; letter-spacing: -0.025em; }
.deck-card--back .pr { font-size: 14px; color: var(--text-2); margin-top: 3px; }
.deck-card--back .st { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.deck-card--back .st div { background: var(--surface-2); border-radius: 16px; text-align: center; padding: 11px 0; }
.deck-card--back .st small { display: block; font-size: 12px; color: var(--text-3); }
.deck-card--back .st b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.deck-card .go { display: block; text-align: center; border-radius: 18px; padding: 16px 0; font-weight: 600; font-size: 15px; margin-top: 12px; }
.deck-card--back .go { background: var(--text); color: var(--bg); }
.deck-card--back .go.is-sold { background: var(--surface-2); color: var(--text-3); }

/* Photo card: the bottom blurs into the photo's own colors. */
.deck-card--front { height: clamp(460px, 34vw, 520px); border-radius: 36px; overflow: hidden; color: #fff; background: #1b1b1e;
  box-shadow: 0 50px 80px -34px rgba(0, 0, 0, 0.55); }
/* The whole car sits in the top part of the card; the bottom is the same photo, blurred and darkened,
   so the text reads on the car's own colors. */
.deck-card--front .blur { position: absolute; inset: -40px; z-index: 0; background-size: cover; background-position: center;
  filter: blur(24px) brightness(0.5) saturate(1.25); transform: translateZ(0); }
.deck-card--front .photo { position: absolute; left: 0; right: 0; top: 0; height: 64%; z-index: 1;
  background-size: cover; background-repeat: no-repeat; background-position: 45% 60%;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
.deck-card--front .in { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 14px 14px; }
.deck-card--front .dots { display: flex; gap: 4px; justify-content: center; margin-bottom: 14px; }
.deck-card--front .dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); }
.deck-card--front .dots i:first-child { background: #fff; }
.hero-deck.is-carousel .deck-card--front .dots i:first-child { background: rgba(255, 255, 255, 0.45); }
.hero-deck.is-carousel .deck-card--front .dots i.on { background: #fff; width: 14px; border-radius: 3px; }

/* Carousel of cars for sale: swipe the front card, or use the arrows under the deck. */
.hero-deck.is-carousel .deck-card--front { touch-action: pan-y; cursor: grab; user-select: none; }
.hero-deck.is-carousel .deck-card--front .photo, .hero-deck.is-carousel .deck-card--front .blur { pointer-events: none; }
.hero-deck .deck-card--front.is-dragging { cursor: grabbing; transition: none;
  transform: translateY(-50%) translateX(var(--dx, 0px)) rotate(3deg); }
.hero-deck .deck-card--front.fly-left, .hero-deck .deck-card--front.fly-right { transition: transform 260ms ease-in, opacity 260ms ease-in; opacity: 0; }
.hero-deck .deck-card--front.fly-left { transform: translateY(-50%) translateX(-130%) rotate(-14deg); }
.hero-deck .deck-card--front.fly-right { transform: translateY(-50%) translateX(130%) rotate(16deg); }
/* Forward: the old front card slides left into the back slot, and the new car arrives from the right.
   Back: the old back card slides right to the front, and the car before it comes in from the left. */
/* Cards only slide (and fade in when new). Size, tilt and photo framing never change mid-move,
   so every car looks the same as it arrives as it does at rest. */
.deck-card--front.enter-next { animation: deck-new-right 380ms var(--ease-quint, cubic-bezier(0.16, 1, 0.3, 1)) both; }
.deck-card--back.back-from-front { animation: deck-front-to-back 380ms var(--ease-quint, cubic-bezier(0.16, 1, 0.3, 1)) both; }
.deck-card--front.enter-prev { animation: deck-back-to-front 380ms var(--ease-quint, cubic-bezier(0.16, 1, 0.3, 1)) both; }
.deck-card--back.back-from-left { animation: deck-new-left 380ms var(--ease-quint, cubic-bezier(0.16, 1, 0.3, 1)) both; }
@keyframes deck-new-right { from { opacity: 0; translate: 30% 0; } to { opacity: 1; translate: 0 0; } }
@keyframes deck-front-to-back { from { translate: 74% 0; } to { translate: 0 0; } }
@keyframes deck-back-to-front { from { translate: -74% 0; } to { translate: 0 0; } }
@keyframes deck-new-left { from { opacity: 0; translate: -30% 0; } to { opacity: 1; translate: 0 0; } }
.hero-deck.is-carousel .deck-card { will-change: transform, translate; }
.deck-nav { position: absolute; left: 50%; bottom: -54px; translate: -50% 0; z-index: 4; display: flex; align-items: center; gap: 14px; }
.deck-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  display: grid; place-items: center; box-shadow: 0 6px 18px -10px var(--card-shadow); transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur); }
.deck-arrow:hover { border-color: var(--line-3); }
.deck-arrow:active { transform: scale(0.92); }
.deck-arrow svg { width: 18px; height: 18px; }
.deck-count { min-width: 44px; text-align: center; font-size: 14px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.hero-deck.is-carousel { padding-bottom: 56px; box-sizing: content-box; }
.deck-card--front .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 6px; }
.deck-card--front h3 { font-size: 23px; color: #fff; }
.deck-card--front .price { flex: none; background: rgba(0, 0, 0, 0.38); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.deck-card--front p { font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.72); margin: 10px 6px 12px; }
.deck-card--front .chips { display: flex; gap: 6px; padding: 0 4px; flex-wrap: wrap; }
.deck-card--front .chips span { background: rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; }
.deck-card--front .go { background: #fff; color: #111113; border-radius: 22px; padding: 17px 0; font-size: 16px; margin-top: 16px; }
.deck-card .go:focus-visible, .deck-card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* One car only: the photo card stands alone in the middle. */
.hero-deck.is-single .deck-card--front { right: 50%; transform: translate(50%, -50%) rotate(2deg); }

@keyframes spin { to { transform: rotate(360deg); } }
/* Runs once each time a car is shown: a looping sweep inside the shadowed car redraws it every frame. */
.car-art .shine { transform: skewX(-20deg); animation: shine 5.5s var(--ease-in-out) 1.6s 1 both; }
@keyframes shine { 0% { transform: skewX(-20deg) translateX(0); } 40%, 100% { transform: skewX(-20deg) translateX(640px); } }
@keyframes glow-drift { to { transform: translate3d(-4%, 3%, 0) scale(1.08); } }

/* Word-by-word headline reveal */
.split .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.split .word > span { display: inline-block; transform: translateY(105%); animation: rise 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 70ms + 150ms); }
@keyframes rise { to { transform: none; } }

.fade-in { opacity: 0; animation: fade-up 900ms var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Marquee ---------- */

.marquee { border-block: 1px solid var(--line); overflow: hidden; padding-block: 22px; background: var(--bg-2); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: clamp(48px, 6vw, 88px); padding-right: clamp(48px, 6vw, 88px); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--text-3); white-space: nowrap; transition: color var(--dur) var(--ease-out); }
.brand svg { height: clamp(30px, 3.4vw, 42px); width: auto; flex: none; transition: transform 500ms var(--ease-out); }
.brand-name { font-family: var(--font-display); font-stretch: 125%; font-weight: 700; font-size: clamp(16px, 1.8vw, 22px); letter-spacing: 0.06em; text-transform: uppercase; }
.brand:hover { color: var(--text); }
.brand:hover svg { transform: scale(1.08); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.94); transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal-scale.is-visible { opacity: 1; transform: none; }

/* ---------- Vehicle cards ---------- */

.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(16px, 2vw, 24px); }

.car-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: transform 500ms var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow 500ms var(--ease-out);
}
.car-card:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: 0 30px 60px -30px var(--card-shadow); }
.car-card > a { display: flex; flex-direction: column; height: 100%; }
.car-card .media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--stage);
  display: grid; place-items: center;
}
.car-card .media::before {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}
.car-card .media .car-art { width: 88%; transition: transform 800ms var(--ease-out); }
.car-card:hover .media .car-art { transform: scale(1.06) translateX(-2%); }
.car-card .media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, var(--sheen-strong) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform 900ms var(--ease-out);
}
.car-card:hover .media::after { transform: translateX(100%); }
.car-card .tags { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; }
.car-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.car-card .title { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.car-card h3 { font-size: 19px; font-stretch: 105%; letter-spacing: -0.01em; line-height: 1.2; }
.car-card .trim { font-size: 14px; color: var(--text-3); margin-top: 4px; }
.car-card .price { font-family: var(--font-display); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.car-card .est { font-size: 12px; color: var(--text-3); text-align: right; margin-top: 2px; }
.car-card .specs { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 14px; margin-top: auto; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.car-card .specs span { display: inline-flex; align-items: center; gap: 6px; }
.car-card .specs svg { width: 15px; height: 15px; color: var(--text-3); }
.car-card.is-sold .media .car-art { filter: grayscale(0.85) brightness(0.7); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  background: var(--glass); border: 1px solid var(--line-2); color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--available { color: var(--success); }
.badge--pending { color: var(--warning); }
.badge--sold { color: var(--danger); }
.badge--title::before { display: none; }
.badge--new { background: var(--accent); border-color: transparent; color: #fff; }
.badge--new::before { background: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- Shop by model ---------- */

.make-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-weight: 500; font-size: 14px;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { font-size: 12px; opacity: 0.7; }

.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.model-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 180px;
  padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden;
  transition: border-color var(--dur), transform 500ms var(--ease-out), background var(--dur);
}
.model-tile:hover { border-color: var(--line-2); transform: translateY(-4px); background: var(--surface-2); }
.model-tile .make { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.model-tile h3 { font-size: 26px; margin-top: 6px; }
.model-tile .car-art { width: 78%; align-self: end; margin-right: -18%; transition: transform 700ms var(--ease-out); }
.model-tile:hover .car-art { transform: translateX(-10%); }
.model-tile .meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-2); }
.model-tile .arrow {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center;
  transition: background var(--dur), border-color var(--dur), transform var(--dur) var(--ease-out);
}
.model-tile .arrow svg { width: 16px; height: 16px; }
.model-tile:hover .arrow { background: var(--accent); border-color: var(--accent); transform: rotate(-45deg); }

/* ---------- Process ---------- */

.process { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.process-line { position: absolute; top: 28px; left: 28px; right: 28px; height: 1px; background: var(--line-2); overflow: hidden; }
.process-line::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1800ms var(--ease-in-out) 200ms; }
.process.is-visible .process-line::after { transform: scaleX(1); }
.step { position: relative; }
.step .num {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--text);
  transition: background 500ms var(--ease-out), border-color 500ms var(--ease-out);
}
.step .num svg { width: 22px; height: 22px; }
.process.is-visible .step .num { background: var(--surface-2); border-color: var(--accent); transition-delay: var(--d); }
.step h3 { font-size: 21px; margin: 24px 0 10px; }
.step p { color: var(--text-2); font-size: 15px; }
.step .label { font-size: 12px; color: var(--text-3); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 22px; }

/* ---------- Stats / why ---------- */

.why-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.stat .value { font-family: var(--font-display); font-stretch: 115%; font-weight: 800; font-size: clamp(36px, 4.5vw, 52px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 0.5em; color: var(--accent); margin-left: 2px; }
.stat p { color: var(--text-2); font-size: 14px; margin-top: 4px; }

.check-list { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.check-list li { display: flex; gap: 14px; align-items: start; color: var(--text-2); }
.check-list li strong { color: var(--text); display: block; }
.check-list .tick { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-top: 1px; }
.check-list .tick svg { width: 15px; height: 15px; }

/* ---------- CTA band ---------- */

.cta-band {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: clamp(20px, 3vw, 32px); padding: clamp(36px, 6vw, 72px);
  background: var(--cta-bg);
  border: 1px solid rgba(225, 29, 46, 0.25);
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto; align-items: center; gap: 32px;
}
.cta-band::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -200px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  animation: glow-drift 10s var(--ease-in-out) infinite alternate;
}
.cta-band h2 { font-size: clamp(30px, 4.4vw, 52px); }
.cta-band p { color: var(--text-2); margin-top: 14px; max-width: 52ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* Two smaller bands in one row (home page): text on top, buttons underneath. */
.cta-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 20px); }
.cta-band--half { grid-template-columns: 1fr; align-content: space-between; gap: 24px; padding: clamp(26px, 3.2vw, 40px); }
.cta-band.cta-band--half::before { width: 360px; height: 360px; }
.cta-band--half h2 { font-size: clamp(24px, 2.6vw, 32px); margin-top: 12px; }
.cta-band--half p { font-size: 15px; margin-top: 10px; }
@media (max-width: 860px) { .cta-pair { grid-template-columns: 1fr; } }

/* ---------- Page header (inner pages) ---------- */

.page-hero { position: relative; padding: calc(var(--header-h) + clamp(48px, 8vw, 96px)) 0 clamp(40px, 6vw, 64px); overflow: hidden; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 80% at 80% 0%, rgba(225, 29, 46, 0.16), transparent 70%);
}
.page-hero h1 { font-size: clamp(40px, 6.4vw, 80px); margin-top: 16px; }
.page-hero p { color: var(--text-2); font-size: clamp(16px, 1.5vw, 19px); max-width: 56ch; margin-top: 18px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text-3); list-style: none; padding: 0; margin: 0; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--text-3); }
.breadcrumb ol { display: contents; }

/* ---------- Inventory layout ---------- */

.inv-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters {
  position: sticky; top: calc(var(--header-h) + 20px);
  display: grid; gap: 22px; padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
}
.filters h2 { font-size: 18px; font-stretch: 105%; }
.filter-head { display: flex; justify-content: space-between; align-items: center; }
.filter-group { display: grid; gap: 10px; }
.filter-group > label, .filter-group legend, .field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.filter-group fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips .chip { min-height: 36px; padding: 0 14px; font-size: 13px; }
.text-btn { background: none; border: 0; padding: 6px 2px; color: var(--accent); font-weight: 600; font-size: 14px; }
.text-btn:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 4px; }

.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font-size: 16px;
  transition: border-color var(--dur), box-shadow var(--dur), background var(--dur);
}
.textarea { padding: 12px 14px; min-height: 120px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b4b4bb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.select option { background: var(--surface); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.search-field { position: relative; }
.search-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search-field .input { padding-left: 42px; }

.range-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; cursor: pointer; }

.inv-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.inv-toolbar .count { color: var(--text-2); font-size: 15px; }
.inv-toolbar .count strong { color: var(--text); }
.inv-toolbar .right { display: flex; gap: 10px; align-items: center; }
.inv-toolbar .select { width: auto; min-width: 200px; }
.filter-open { display: none; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.active-filters:empty { display: none; }
.active-filters button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; color: var(--text);
}
.active-filters button svg { width: 14px; height: 14px; color: var(--text-3); }
.active-filters button:hover svg { color: var(--accent); }

.card-enter { animation: card-enter 650ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes card-enter { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 64px 24px; border: 1px dashed var(--line-2); border-radius: var(--radius-lg); }
.empty-state h3 { font-size: 24px; margin-bottom: 8px; }
.empty-state p { color: var(--text-2); margin-bottom: 20px; }

.filters-backdrop { display: none; }

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

.vd { padding-top: calc(var(--header-h) + 28px); }
.vd-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; margin-top: 24px; }
.vd-stage {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line);
  background: var(--stage);
  display: grid; place-items: center;
}
.vd-stage .car-art { width: 86%; transition: transform 700ms var(--ease-out), opacity 400ms var(--ease-out); }
.vd-stage .tags { position: absolute; top: 16px; left: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.vd-stage .photo-note { position: absolute; bottom: 14px; right: 16px; font-size: 12px; color: var(--text-3); }
.vd-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.vd-thumbs button {
  aspect-ratio: 16 / 10; border-radius: var(--radius-sm); border: 1px solid var(--line); overflow: hidden; padding: 0;
  background: var(--stage); display: grid; place-items: center;
  transition: border-color var(--dur), opacity var(--dur);
  opacity: 0.6;
}
.vd-thumbs button .car-art { width: 80%; }
.vd-thumbs button { position: relative; }
.vd-thumbs button .car-photo { position: absolute; inset: 0; }

/* Gallery controls */
.vd-stage > .car-photo { user-select: none; -webkit-user-drag: none; touch-action: pan-y; }
.vd-stage.is-spin > .car-photo { cursor: grab; touch-action: none; }
.vd-stage.is-spin > .car-photo:active { cursor: grabbing; }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 10, 12, 0.55); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0.85; transition: opacity var(--dur), background var(--dur), transform var(--dur);
}
.gal-nav svg { width: 22px; height: 22px; }
.gal-nav:hover { opacity: 1; background: rgba(10, 10, 12, 0.8); }
.gal-nav:active { transform: translateY(-50%) scale(0.94); }
.gal-prev { left: 14px; }
.gal-next { right: 14px; }
.vd-stage.is-spin .gal-nav { display: none; }
.gal-bar { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: flex; gap: 8px; align-items: center; }
.gal-count, .gal-btn, .spin-hint {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: rgba(10, 10, 12, 0.6); color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255, 255, 255, 0.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.gal-btn { cursor: pointer; transition: background var(--dur); }
.gal-btn:hover { background: rgba(10, 10, 12, 0.85); }
.gal-btn svg, .spin-hint svg { width: 16px; height: 16px; }
.gal-btn--icon { width: 36px; padding: 0; justify-content: center; }
.gal-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.vd-stage.is-spin .gal-count { display: none; }
.spin-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; pointer-events: none; }
.spin-hint[hidden] { display: none; }

.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 5, 7, 0.97); display: grid; place-items: center; animation: lb-in 220ms var(--ease-out); }
.lightbox[hidden] { display: none; }
.lightbox > img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: 10px; user-select: none; touch-action: pan-y; }
.lightbox .lb-close { position: absolute; top: 16px; right: 16px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); }
.lightbox .lb-close svg { width: 22px; height: 22px; }
.lightbox .gal-prev { left: 20px; }
.lightbox .gal-next { right: 20px; }
.lightbox .lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.8); font-size: 14px; font-variant-numeric: tabular-nums; }
@keyframes lb-in { from { opacity: 0; } }
@media (max-width: 640px) {
  .gal-nav { width: 38px; height: 38px; }
  .gal-prev { left: 8px; } .gal-next { right: 8px; }
  .gal-bar { right: 8px; bottom: 8px; }
  .lightbox .gal-nav { top: auto; bottom: 12px; transform: none; }
}
.vd-thumbs button[aria-pressed="true"] { border-color: var(--accent); opacity: 1; }
.vd-thumbs button:hover { opacity: 1; }

.vd-summary { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 20px; }
.vd-panel { padding: clamp(20px, 3vw, 28px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.vd-summary h1 { font-size: clamp(30px, 3.6vw, 44px); }
.vd-summary .trim { color: var(--text-2); margin-top: 8px; }
.vd-price { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 22px 0; padding: 18px 0; border-block: 1px solid var(--line); }
.vd-price .amount { font-family: var(--font-display); font-stretch: 110%; font-weight: 800; font-size: clamp(34px, 4vw, 44px); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.vd-price .monthly { text-align: right; font-size: 14px; color: var(--text-2); }
.vd-price .monthly strong { display: block; color: var(--text); font-size: 18px; }
.vd-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 22px; }
.vd-quick div { font-size: 13px; color: var(--text-3); }
.vd-quick strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; }
.vd-actions { display: grid; gap: 10px; }
.vd-actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.vd-sections { display: grid; gap: clamp(20px, 3vw, 28px); margin-top: clamp(24px, 4vw, 40px); }
.vd-sections h2 { font-size: 24px; margin-bottom: 18px; }
.spec-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.spec-table div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.spec-table dt { color: var(--text-3); }
.spec-table dd { margin: 0; text-align: right; font-weight: 500; }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.feature-list li { padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }

.recon-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.recon-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.recon-list li:last-child { border-bottom: 0; }
.recon-list .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; }
.recon-list .tick svg { width: 14px; height: 14px; }

.title-note { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--warning-soft); border: 1px solid rgba(251, 191, 36, 0.25); font-size: 14px; color: var(--text-2); margin-top: 18px; }
.title-note svg { flex: none; width: 20px; height: 20px; color: var(--warning); margin-top: 2px; }
.title-note strong { color: var(--text); }

/* Payment calculator */
.calc { display: grid; gap: 18px; }
.calc .field { display: grid; gap: 8px; }
.calc-result { display: flex; justify-content: space-between; align-items: end; padding: 18px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.calc-result .value { font-family: var(--font-display); font-weight: 800; font-size: 36px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc-result .value small { font-size: 15px; color: var(--text-3); font-weight: 500; }
.calc-note { font-size: 12px; color: var(--text-3); }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg button { min-height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-weight: 600; font-size: 14px; transition: background var(--dur), color var(--dur), border-color var(--dur); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Forms ---------- */

.form-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.form-card { padding: clamp(22px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; align-content: start; }
.field .req { color: var(--accent); }
.field .hint { font-size: 13px; color: var(--text-3); }
.field .error { font-size: 13px; color: var(--danger); display: none; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field.has-error .error { display: block; }
.form-section-title { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.form-section-title:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.consent { display: flex; gap: 12px; align-items: start; font-size: 13px; color: var(--text-3); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-success { display: none; text-align: center; padding: 40px 16px; }
.form-success .icon { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--success-soft); color: var(--success); }
.form-success .icon svg { width: 34px; height: 34px; stroke-dasharray: 30; stroke-dashoffset: 30; }
.form-success.is-shown { display: block; animation: fade-up 600ms var(--ease-out); }
.form-success.is-shown .icon svg { animation: draw 700ms var(--ease-out) 250ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.form-success h3 { font-size: 26px; margin-bottom: 10px; }
.form-success p { color: var(--text-2); }
.btn.is-loading { pointer-events: none; color: transparent; }
.btn.is-loading::before {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 700ms linear infinite;
}

.side-list { display: grid; gap: 14px; }
.side-card { padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.side-card h3 { font-size: 18px; margin-bottom: 8px; }
.side-card p { color: var(--text-2); font-size: 15px; }

/* ---------- About / contact ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.contact-card { display: grid; gap: 10px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color var(--dur), transform 500ms var(--ease-out); }
a.contact-card:hover { border-color: var(--line-2); transform: translateY(-4px); }
.contact-card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.contact-card .icon svg { width: 20px; height: 20px; }
.contact-card h3 { font-size: 18px; margin-top: 6px; }
.contact-card p { color: var(--text-2); font-size: 15px; }
.hours-list { display: grid; gap: 8px; margin: 0; }
.hours-list div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.hours-list dt { color: var(--text-2); }
.hours-list dd { margin: 0; }
.map-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-lg); filter: var(--map-filter); background: var(--surface); }

.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: center; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; transition: transform var(--dur) var(--ease-out), background var(--dur); }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: var(--text); transform: translate(-50%, -50%); }
.faq summary .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); }
.faq .answer { padding: 0 22px 20px; color: var(--text-2); }
.faq details[open] .answer { animation: fade-up 450ms var(--ease-out); }

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

.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: clamp(56px, 8vw, 88px) 0 32px; margin-top: clamp(40px, 6vw, 80px); }
.footer-big { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: clamp(44px, 10vw, 168px); line-height: 0.85; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px var(--line-2); margin-bottom: clamp(40px, 6vw, 64px); user-select: none; white-space: nowrap; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid h3 { font-size: 13px; font-family: var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid li { color: var(--text-2); }
.footer-grid a { color: var(--text-2); transition: color var(--dur); }
.footer-grid a:hover { color: var(--text); }
.footer-about p { color: var(--text-2); margin-top: 16px; max-width: 36ch; font-size: 15px; }
.social { display: flex; gap: 10px; margin-top: 28px; }
.social a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background var(--dur), border-color var(--dur); }
.social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.social svg { width: 18px; height: 18px; }
.open-status { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 14px; }
.open-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.open-status.is-open i { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.open-status .when { color: var(--text-3); font-weight: 500; }
.footer-visit span { display: inline-block; transition: transform var(--dur) var(--ease-out); }
.footer-visit:hover span { transform: translateX(4px); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }

/* ---------- Mobile action bar ---------- */

.mobile-bar {
  display: none; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: var(--z-header);
  grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line-2);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform: translateY(150%); transition: transform 500ms var(--ease-out);
}
.mobile-bar.is-shown { transform: none; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: var(--z-toast);
  transform: translate(-50%, 150%); padding: 14px 20px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
  transition: transform 450ms var(--ease-out);
}
.toast.is-shown { transform: translate(-50%, 0); }

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

@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .header-actions .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 40px); }
  .hero { min-height: 0; }
  .hero-split { grid-template-columns: 1fr; gap: 28px; }
  /* One column: keep the two cards together, centered, instead of pushed to the far edges. */
  .hero-deck { width: min(100%, 470px); margin-inline: auto; }
  /* One column: title and text first, then the cars, then "Browse inventory" and "Special order" under the cars. */
  .hero-split { gap: 0; }
  .hero-copy { display: contents; }
  .hero-copy h1 { order: 1; }
  .hero .lead { order: 2; margin-top: 16px; }
  .hero-deck { order: 3; margin-top: 8px; }
  .hero-actions { order: 4; margin-top: 64px; justify-content: center; }
  .why-grid, .form-layout, .vd-grid { grid-template-columns: 1fr; }
  .vd-summary { position: static; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .process-line { display: none; }
  .cta-band { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }

  .inv-layout { grid-template-columns: 1fr; }
  .filter-open { display: inline-flex; }
  .filters {
    position: fixed; z-index: var(--z-menu); inset: auto 0 0 0; top: auto; max-height: 86dvh; overflow-y: auto;
    border-radius: 24px 24px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform 500ms var(--ease-out); visibility: hidden;
  }
  .filters.is-open { transform: none; visibility: visible; }
  .filters-backdrop { display: block; position: fixed; inset: 0; z-index: calc(var(--z-menu) - 1); background: rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease-out); }
  .filters-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .filters .close-filters { display: inline-flex; }

  .mobile-bar { display: grid; }
  body.has-mobile-bar .site-footer { padding-bottom: 104px; }
}

.close-filters { display: none; }

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .logo-text { font-size: 16px; }
  .form-grid, .spec-table, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  /* Phone: the two cards sit side by side under the text, smaller and less tilted. */
  .hero-deck { height: 420px; margin-inline: 0; }
  .deck-card { width: 60%; }
  .deck-card--back { left: 0; }
  .deck-card--back .ph { height: 170px; }
  .deck-card--back .st b { font-size: 15px; }
  .deck-card--front { right: 4%; height: 390px; border-radius: 30px; }
  .deck-card--front p { display: none; }
  .deck-card h3 { font-size: 17px; }
  .deck-card--front h3 { font-size: 17px; }
  .deck-card--front .top { flex-wrap: wrap; gap: 6px; }
  .deck-card--front .price { font-size: 13px; padding: 5px 10px; }
  .deck-nav { bottom: -40px; }
  .inv-toolbar .select { min-width: 0; flex: 1; }
  .inv-toolbar .right { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band .actions .btn { flex: 1 1 100%; }
  .vd-thumbs { gap: 6px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important;
    transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important;
  }
  .reveal, .reveal-scale { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .car-art .shine { display: none; }
  .hero-deck.is-dealing .deck-card { animation: none; }
}

/* Grids that wait until scrolled into view before staggering their cards in */
[data-stagger] .card-enter { animation-play-state: paused; }
[data-stagger].is-visible .card-enter { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) { [data-stagger] .card-enter { animation-play-state: running; } }
.field .consent { font-weight: 400; color: var(--text-3); }
@media (max-width: 640px) {
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .model-tile { min-height: 0; padding: 16px; gap: 10px; }
  .model-tile h3 { font-size: 20px; }
  .model-tile .car-art { width: 100%; margin-right: -30%; }
}

/* ==========================================================================
   Facebook Marketplace: rating, profile and reviews
   ========================================================================== */

:root { --star: #f5b301; --fb: #1877f2; }

.stars { display: inline-flex; gap: 2px; color: var(--star); vertical-align: middle; }
.stars .star { display: block; }

.sample-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 6px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--warning); background: var(--warning-soft); border: 1px solid rgba(251, 191, 36, 0.3); vertical-align: middle;
}
.sample-banner {
  display: flex; gap: 12px; align-items: start; padding: 14px 16px; margin-bottom: 24px; border-radius: var(--radius);
  background: var(--warning-soft); border: 1px solid rgba(251, 191, 36, 0.28); color: var(--text-2); font-size: 14px;
}
.sample-banner svg { flex: none; width: 18px; height: 18px; color: var(--warning); margin-top: 2px; }
.sample-banner code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--text); }

.seller-avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 14px;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--fb);
}
.seller-avatar--lg { width: 64px; height: 64px; font-size: 17px; }

.mp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(16px, 2.5vw, 28px); align-items: start; }
.mp-profile { padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.mp-head { display: flex; gap: 16px; align-items: center; }
.mp-head h3 { font-size: 24px; margin: 2px 0 4px; }
.mp-head .muted { font-size: 14px; }
.mp-source { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fb-text); }
.mp-source svg { width: 14px; height: 14px; }
.mp-score { display: flex; align-items: center; gap: 18px; padding: 18px 0; border-block: 1px solid var(--line); }
.mp-big { font-family: var(--font-display); font-stretch: 115%; font-weight: 800; font-size: 64px; line-height: 1; letter-spacing: -0.03em; }
.mp-score .muted { font-size: 14px; margin-top: 6px; }
.mp-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mp-badges li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.mp-badges svg { width: 15px; height: 15px; color: var(--success); }
.mp-bars { display: grid; gap: 14px; }
.mp-bar-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.mp-track { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.mp-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ff6b6b); transform: scaleX(0); transform-origin: left; transition: transform 1200ms var(--ease-out) var(--d, 0ms); }
.mp-profile.is-visible .mp-track span { transform: scaleX(var(--w)); }
.mp-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.mp-actions .btn--primary { --btn-bg: #166fe5; }
.mp-actions .btn--primary:hover { --btn-bg: #1360c7; }

.mp-reviews { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review {
  margin: 0; display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out), border-color var(--dur);
  transition-delay: var(--d, 0ms), var(--d, 0ms), 0ms;
}
.review:hover { border-color: var(--line-2); }
.review-top { display: flex; align-items: center; justify-content: space-between; }
.review blockquote { margin: 0; color: var(--text); font-size: 16px; line-height: 1.6; flex: 1; }
.review blockquote::before { content: "\201C"; display: block; font-family: Georgia, serif; font-size: 44px; line-height: 0.6; color: var(--accent); margin-bottom: 8px; }
.review figcaption { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-3); padding-top: 14px; border-top: 1px solid var(--line); }
.review figcaption strong { display: block; color: var(--text); font-size: 14px; font-weight: 600; }
.review-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-weight: 600; }
.review-src { margin-left: auto; color: var(--fb-text); }
.review-src svg { width: 16px; height: 16px; }

/* Vehicle page: seller strip and cash steps */
.seller-mini { display: flex; align-items: center; gap: 14px; transition: border-color var(--dur), transform 500ms var(--ease-out); }
.seller-mini:hover { border-color: rgba(24, 119, 242, 0.5); transform: translateY(-2px); }
.seller-meta { display: grid; gap: 4px; min-width: 0; }
.seller-label { font-size: 13px; color: var(--text-2); }
.seller-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); }
.seller-rating strong { color: var(--text); font-size: 15px; }
.seller-arrow { margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: background var(--dur), transform var(--dur) var(--ease-out); }
.seller-arrow svg { width: 16px; height: 16px; }
.seller-mini:hover .seller-arrow { background: var(--fb); border-color: var(--fb); transform: rotate(-45deg); }

.buy-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 14px; counter-reset: buy; }
.buy-steps li { position: relative; padding-left: 40px; counter-increment: buy; }
.buy-steps li::before {
  content: counter(buy); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
}
.buy-steps strong { display: block; font-size: 15px; }
.buy-steps span { font-size: 14px; color: var(--text-2); }
.buy-steps a, .prose-link { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.tax-note { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.tax-note strong { color: var(--text); font-size: 15px; white-space: nowrap; }

/* Visit us / map */
.visit-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 14px; align-items: stretch; }
.visit-card { display: grid; gap: 22px; align-content: start; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.visit-card address { font-style: normal; font-size: 20px; font-weight: 600; line-height: 1.4; }
.visit-card .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.map-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); min-height: 360px; background: var(--surface); }
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: var(--map-filter); }

/* Title transfer page */
.tt-steps { list-style: none; padding: 0; margin: 0; display: grid; position: relative; }
.tt-steps::before { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 1px; background: var(--line-2); }
.tt-step { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 22px; padding-bottom: 36px; }
.tt-step:last-child { padding-bottom: 0; }
.tt-step .num { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--accent); position: relative; z-index: 1; }
.tt-step .num svg { width: 22px; height: 22px; }
.tt-step h3 { font-size: 22px; margin: 12px 0 8px; }
.tt-step p { color: var(--text-2); }
.tt-step .who { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.who--us { background: var(--accent-soft); color: var(--link); }
.who--you { background: var(--success-soft); color: var(--success); }
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.doc-list li { display: flex; gap: 12px; align-items: start; color: var(--text-2); font-size: 15px; }
.doc-list li strong { display: block; color: var(--text); }
.doc-list .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; margin-top: 1px; }
.doc-list .tick svg { width: 14px; height: 14px; }
.fine-print { font-size: 13px; color: var(--text-3); }
.fine-print a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 960px) {
  .mp-grid, .visit-grid { grid-template-columns: 1fr; }
  .mp-profile { position: static; }
}
@media (max-width: 640px) {
  .mp-reviews { grid-template-columns: 1fr; }
  .mp-actions { grid-template-columns: 1fr; }
  .mp-big { font-size: 52px; }
  .map-wrap { min-height: 280px; }
  .tt-step { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; }
  .tt-step .num { width: 44px; height: 44px; }
  .tt-steps::before { left: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-track span { transform: scaleX(var(--w)); }
}

.verified { display: inline-block; width: 20px; height: 20px; margin-left: 6px; vertical-align: -2px; color: var(--fb); }
.mp-stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mp-stats li { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.mp-stats strong { display: block; font-family: var(--font-display); font-stretch: 110%; font-size: 22px; color: var(--text); }
.mp-sub { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.review-notable { font-size: 13px; color: var(--text-3); }
.review figcaption { padding-top: 0; border-top: 0; }
.review.is-long blockquote { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.review.is-long.is-open blockquote { display: block; }
.review-more { align-self: start; padding: 0; }

.stars-inline .stars { margin-right: 2px; }
.contact-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.contact-icon svg { width: 20px; height: 20px; }

/* Small red labels need a lighter red to reach 4.5:1 on dark cards */
.eyebrow { color: var(--eyebrow); }

.vd-price .monthly strong { white-space: nowrap; }

.seller-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 45% 30%; }
.seller-avatar:has(img) { background: var(--surface-3); }

/* ---------- Shop by model: real photos (assets/img/models) with drawn-car fallback ---------- */

.model-visual { position: relative; height: 112px; display: grid; align-items: end; justify-items: end; }
.model-visual .car-art { width: 78%; margin-right: -18%; }
.model-tile .model-visual .car-art { align-self: end; }
.model-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom;
  opacity: 0; transform: translateX(6%) scale(0.98); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out);
  filter: drop-shadow(0 14px 14px var(--car-shadow));
}
.model-tile.has-photo .model-visual { height: 132px; }
.model-tile.has-photo .model-visual .car-art { display: none; }
.model-tile.has-photo .model-photo { opacity: 1; transform: none; }
.model-tile.has-photo:hover .model-photo { transform: translateX(-3%) scale(1.05); }
.model-tile.has-photo .model-visual::before {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; height: 40%;
  background: radial-gradient(50% 60% at 50% 100%, var(--sheen-strong), transparent 70%);
}

/* White-background photos: light tile so the photo edges disappear */
.model-tile.is-light { background: #f2f2f0; border-color: transparent; color: #141416; }
.model-tile.is-light:hover { background: #fff; border-color: transparent; }
.model-tile.is-light .make { color: #5c5c63; }
.model-tile.is-light .meta { color: #3f3f46; }
.model-tile.is-light .arrow { border-color: rgba(0, 0, 0, 0.18); }
.model-tile.is-light .model-photo { mix-blend-mode: multiply; filter: none; }
.model-tile.is-light .model-visual::before { display: none; }

@media (max-width: 640px) {
  .model-visual { height: 84px; }
  .model-tile.has-photo .model-visual { height: 96px; }
  .model-visual .car-art { width: 100%; margin-right: -30%; }
}


/* ==========================================================================
   Light theme. Set by data-theme="light" on <html> (system setting or the header toggle).
   ========================================================================== */

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f5f2;
  --bg-2: #eeede8;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --surface-3: #e7e6e1;
  --line: rgba(17, 17, 20, 0.09);
  --line-2: rgba(17, 17, 20, 0.15);
  --line-3: rgba(17, 17, 20, 0.3);

  --text: #141416;
  --text-2: #4a4a52;
  --text-3: #66666f;

  --accent: #d3192b;
  --accent-hover: #b81424;
  --accent-soft: rgba(211, 25, 43, 0.09);
  --accent-glow: rgba(211, 25, 43, 0.18);

  --success: #0f7a52;
  --success-soft: rgba(15, 122, 82, 0.1);
  --warning: #a35a00;
  --warning-soft: rgba(217, 119, 6, 0.1);
  --danger: #c0262d;
  --danger-soft: rgba(192, 38, 45, 0.1);

  --hover: rgba(17, 17, 20, 0.05);
  --sheen: rgba(255, 255, 255, 0.7);
  --sheen-strong: rgba(255, 255, 255, 0.6);
  --grid-line: rgba(17, 17, 20, 0.05);
  --glass: rgba(255, 255, 255, 0.78);
  --glass-strong: rgba(246, 245, 242, 0.98);
  --car-shadow: rgba(30, 30, 40, 0.22);
  --card-shadow: rgba(30, 30, 40, 0.18);
  --stage: radial-gradient(120% 90% at 50% 100%, #ffffff 0%, #f1f0ec 55%, #e6e5e0 100%);
  --cta-bg: linear-gradient(135deg, #fff1f1 0%, #fbe9e9 45%, #f4f3ef 100%);
  --map-filter: grayscale(0.85) contrast(0.95);
  --link: #c0141f;
  --eyebrow: #c0141f;
  --fb-text: #1660cc;
  --star: #e8a200;
}

:root[data-theme="light"] .page-hero::before { background: radial-gradient(60% 80% at 80% 0%, rgba(211, 25, 43, 0.1), transparent 70%); }
:root[data-theme="light"] .cta-band { border-color: rgba(211, 25, 43, 0.2); }
:root[data-theme="light"] .chip[aria-pressed="true"],
:root[data-theme="light"] .seg button[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
:root[data-theme="light"] .badge--available { color: #0b6b47; }
:root[data-theme="light"] .badge--pending { color: #8a4b00; }
:root[data-theme="light"] .badge--title { color: var(--text); }
:root[data-theme="light"] .filters-backdrop { background: rgba(20, 20, 24, 0.35); }
:root[data-theme="light"] .model-tile.is-light { background: #fff; border: 1px solid var(--line); }
:root[data-theme="light"] .seller-avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--fb); }
:root[data-theme="light"] .mp-actions .btn--primary { color: #fff; }
:root[data-theme="light"] .map-wrap, :root[data-theme="light"] .map-frame { border: 1px solid var(--line); }

/* Theme toggle in the header */
.theme-toggle {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  display: grid; place-items: center; overflow: hidden;
  transition: border-color var(--dur), background var(--dur);
}
.theme-toggle:hover { border-color: var(--line-3); background: var(--hover); }
.theme-toggle svg { position: absolute; width: 18px; height: 18px; transition: transform 500ms var(--ease-out), opacity 300ms var(--ease-out); }
.theme-toggle .sun { transform: translateY(140%) rotate(-90deg); opacity: 0; }
:root[data-theme="light"] .theme-toggle .sun { transform: none; opacity: 1; }
:root[data-theme="light"] .theme-toggle .moon { transform: translateY(-140%) rotate(90deg); opacity: 0; }

/* Smooth color change when switching themes (only while switching, so page loads don't animate) */
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after {
  transition: background-color 400ms var(--ease-out), border-color 400ms var(--ease-out), color 400ms var(--ease-out), fill 400ms var(--ease-out) !important;
}

/* Logos: white on dark mode, black on light mode */
.logo-img { width: auto; display: block; }
.logo-for-light { display: none; }
:root[data-theme="light"] .logo-for-dark { display: none; }
:root[data-theme="light"] .logo-for-light { display: block; }
.site-header .logo-img { height: 38px; }
.footer-about .logo-img { height: 84px; }

.stats--row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .stats--row { grid-template-columns: 1fr 1fr; }
  .site-header .logo-img { height: 32px; }
}

.hours-note { display: flex; gap: 10px; align-items: start; font-size: 14px; color: var(--text-2); }
.hours-note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--eyebrow); }

.review[hidden] { display: none; }
.review:focus { outline: none; }
.mp-more { grid-column: 1 / -1; justify-self: center; }

/* About page team */
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.team-card { display: flex; align-items: center; gap: 20px; padding: clamp(20px, 3vw, 28px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.team-photo { position: relative; flex: none; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--font-display); font-stretch: 115%; font-weight: 800; font-size: 26px; }
.team-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 45% 30%; }
.team-card h3 { font-size: 22px; line-height: 1.2; }
.team-card p { color: var(--text-2); font-size: 15px; margin-top: 6px; }
@media (max-width: 760px) { .team-grid { grid-template-columns: 1fr; } }

.review { gap: 13px; }

/* Real car photos from the admin panel */
.car-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-card .media .car-photo, .vd-stage > .car-photo { position: absolute; inset: 0; }
.car-card .media .car-photo { transition: transform 800ms var(--ease-out); }
.car-card:hover .media .car-photo { transform: scale(1.05); }
.car-card.is-sold .media .car-photo { filter: grayscale(0.85) brightness(0.7); }
.car-card .tags { z-index: 1; }
.vd-thumbs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.hero-deck[hidden] { display: none; }

/* Language switch */
.lang-toggle { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; transition: border-color var(--dur), background var(--dur); }
.lang-toggle:hover { border-color: var(--line-3); background: var(--hover); }

/* ==========================================================================
   Crafted interactions
   Quiet, deliberate motion below the hero. Each effect answers the scroll or the
   pointer once and then rests; nothing new loops. Turned off with reduced motion.
   ========================================================================== */

:root { --ease-quint: cubic-bezier(0.16, 1, 0.3, 1); --spot: rgba(255, 255, 255, 0.05); --spot-edge: rgba(255, 255, 255, 0.24); }
:root[data-theme="light"] { --spot: rgba(17, 17, 20, 0.03); --spot-edge: rgba(17, 17, 20, 0.22); }

/* Reveals: a short rise that comes into focus, instead of a long fade-up. */
.reveal {
  opacity: 0; transform: translateY(12px); filter: blur(6px);
  transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-quint), filter 900ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* Section titles: the eyebrow rule draws itself, the letters settle, then the title rises out of a mask. */
.reveal:has(> h2), .reveal:has(> .eyebrow) { opacity: 1; transform: none; filter: none; }
.reveal > .eyebrow { opacity: 0; letter-spacing: 0.32em; transition: opacity 700ms var(--ease-out), letter-spacing 1200ms var(--ease-quint); }
.reveal > .eyebrow::before { transform: scaleX(0); transform-origin: left; transition: transform 800ms var(--ease-quint); }
.reveal > h2 {
  clip-path: inset(0 0 100% 0); transform: translateY(0.4em);
  transition: clip-path 1100ms var(--ease-quint) 120ms, transform 1100ms var(--ease-quint) 120ms;
}
.reveal.is-visible > .eyebrow { opacity: 1; letter-spacing: 0.18em; }
.reveal.is-visible > .eyebrow::before { transform: scaleX(1); }
.reveal.is-visible > h2 { clip-path: inset(0 0 -0.25em 0); transform: none; }

/* Panels open like a curtain from their own edges instead of scaling up. */
.reveal-scale {
  opacity: 0; transform: none; clip-path: inset(6% 4% 6% 4% round 22px);
  transition: opacity 700ms var(--ease-out), clip-path 1200ms var(--ease-quint);
  transition-delay: var(--d, 0ms);
}
.reveal-scale.is-visible { opacity: 1; clip-path: inset(0 0 0 0 round 22px); }
.cta-band.reveal-scale.is-visible { clip-path: inset(0 0 0 0 round clamp(20px, 3vw, 32px)); }

/* Why TJK: each point arrives in turn and its check mark is drawn. */
.reveal .check-list li { opacity: 0; transform: translateY(8px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-quint); }
.reveal .check-list .tick path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 700ms var(--ease-quint); }
.reveal.is-visible .check-list li { opacity: 1; transform: none; }
.reveal.is-visible .check-list li:nth-child(1), .reveal.is-visible .check-list li:nth-child(1) .tick path { transition-delay: 450ms; }
.reveal.is-visible .check-list li:nth-child(2), .reveal.is-visible .check-list li:nth-child(2) .tick path { transition-delay: 600ms; }
.reveal.is-visible .check-list li:nth-child(3), .reveal.is-visible .check-list li:nth-child(3) .tick path { transition-delay: 750ms; }
.reveal.is-visible .check-list .tick path { stroke-dashoffset: 0; }

/* Process: each icon settles into its ring as the red line reaches it. */
.process .step .num svg { opacity: 0; transform: scale(0.6) rotate(-12deg); transition: opacity 500ms var(--ease-out), transform 800ms var(--ease-quint); }
.process.is-visible .step .num svg { opacity: 1; transform: none; transition-delay: calc(var(--d, 0ms) * 2.4 + 300ms); }

/* Cards stay put on hover. A soft light follows the pointer and catches the border. */
.car-card:hover { transform: none; box-shadow: 0 28px 56px -36px var(--card-shadow); }
.model-tile:hover { transform: none; }
.review, .stat, .visit-card { position: relative; }
:is(.car-card, .model-tile, .review, .stat, .visit-card, .mp-profile)::after,
:is(.car-card, .model-tile, .review, .stat, .visit-card, .mp-profile)::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  opacity: 0; transition: opacity 600ms var(--ease-out);
}
:is(.car-card, .model-tile, .review, .stat, .visit-card, .mp-profile)::after {
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 45%);
}
:is(.car-card, .model-tile, .review, .stat, .visit-card, .mp-profile)::before {
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--spot-edge), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@media (hover: hover) and (pointer: fine) {
  :is(.car-card, .model-tile, .review, .stat, .visit-card, .mp-profile):hover::after,
  :is(.car-card, .model-tile, .review, .stat, .visit-card, .mp-profile):hover::before { opacity: 1; }
}

/* Car cards: a slower, smaller zoom, and a red rule that draws along the spec line. */
.car-card .media::after { display: none; }
.car-card .media .car-photo, .car-card .media .car-art { transition: transform 1400ms var(--ease-quint); }
.car-card:hover .media .car-photo { transform: scale(1.035); }
.car-card:hover .media .car-art { transform: scale(1.035); }
.car-card .specs { position: relative; }
.car-card .specs::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 800ms var(--ease-quint);
}
.car-card:hover .specs::before { transform: scaleX(1); }

/* Arrows leave to the right and come back from the left. */
[data-icon="arrow"] { display: inline-flex; overflow: hidden; }
.link-arrow:hover svg { transform: none; }
.btn:hover [data-icon="arrow"] svg, .link-arrow:hover [data-icon="arrow"] svg { animation: arrow-swap 560ms var(--ease-quint); }
@keyframes arrow-swap { 0% { transform: none; } 45% { transform: translateX(140%); } 46% { transform: translateX(-140%); } 100% { transform: none; } }

/* Buttons lean slightly toward the pointer (set by main.js) and spring back when it leaves. */
.btn {
  translate: var(--bx, 0px) var(--by, 0px);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), translate 700ms var(--ease-quint);
}
.btn.is-pulled {
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), translate 160ms var(--ease-out);
}

/* Call-to-action panels: the glow drifts toward the pointer instead of looping on its own. */
.cta-band::before {
  animation: none; right: auto; top: var(--gy, -10%); left: var(--gx, 82%); translate: -50% -50%;
  transition: left 1600ms var(--ease-quint), top 1600ms var(--ease-quint);
}

/* Shop by model: one pill slides between brands instead of the colors swapping instantly (home.js). */
.make-tabs { position: relative; isolation: isolate; }
.make-tabs .chip-ink {
  position: absolute; left: 0; top: 0; z-index: -1; border-radius: 999px; background: var(--text); pointer-events: none;
  transition: transform 600ms var(--ease-quint), width 600ms var(--ease-quint), height 600ms var(--ease-quint);
}
.make-tabs.has-ink .chip[aria-pressed="true"] { background: transparent; border-color: transparent; }
.make-tabs.has-ink .chip { transition: color 400ms var(--ease-out), border-color var(--dur); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale, .reveal > h2, .reveal .check-list li, .process .step .num svg {
    opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important;
  }
  .reveal > .eyebrow { opacity: 1; letter-spacing: 0.18em; }
  .reveal > .eyebrow::before { transform: none; }
  .reveal .check-list .tick path { stroke-dashoffset: 0; }
  .btn { translate: none; }
}

/* Compact car cards everywhere: a shorter photo and smaller type, so the inventory shows 3 cars per row
   next to the filters (4 on wide screens) and the home page shows 3. Phones get their own rules below. */
.car-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 16px; }
#featured-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.car-card .media { aspect-ratio: 4 / 3; }
.car-card .tags { top: 10px; left: 10px; right: 10px; }
.car-card .badge { height: 24px; padding: 0 9px; font-size: 11.5px; }
.car-card .body { padding: 13px 15px 14px; gap: 8px; }
.car-card h3 { font-size: 16px; }
.car-card .trim { font-size: 13px; margin-top: 2px; }
.car-card .price { font-size: 18px; }
.car-card .est { font-size: 11px; }
.car-card .specs { padding-top: 10px; font-size: 12.5px; }
/* Inventory cards are narrow: price sits under the name, "New arrival" becomes "New", nothing wraps. */
.car-grid:not(#featured-grid) .car-card .title { flex-direction: column; gap: 4px; }
.car-grid:not(#featured-grid) .car-card h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-grid:not(#featured-grid) .car-card .trim { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-grid:not(#featured-grid) .car-card .badge { white-space: nowrap; }
.car-grid:not(#featured-grid) .car-card .est { text-align: left; }
/* Sold cars stay gray, but show their real colour while the pointer is on the card. */
.car-card.is-sold .media .car-photo,
.car-card.is-sold .media .car-art { transition: filter .45s ease; }
.car-card.is-sold:hover .media .car-photo,
.car-card.is-sold:hover .media .car-art,
.car-card.is-sold:focus-visible .media .car-photo,
.car-card.is-sold:focus-visible .media .car-art { filter: none; }
.car-grid:not(#featured-grid) .car-card .badge--new { font-size: 0; }
.car-grid:not(#featured-grid) .car-card .badge--new::after { content: "New"; font-size: 11.5px; }
html[lang="es"] .car-grid:not(#featured-grid) .car-card .badge--new::after { content: "Nuevo"; }

/* Compact Facebook Marketplace block: smaller seller card and review cards on every screen. Phones get their own rules below. */
.mp-grid { gap: 16px; }
@media (min-width: 961px) { .mp-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); } }
.mp-profile { padding: clamp(18px, 2vw, 24px); gap: 16px; border-radius: 20px; }
.seller-avatar--lg { width: 52px; height: 52px; }
.mp-head { gap: 12px; }
.mp-head h3 { font-size: 19px; }
.mp-head .muted { font-size: 13px; }
.mp-source { font-size: 11px; }
.mp-score { padding: 12px 0; gap: 14px; }
.mp-big { font-size: 46px; }
.mp-score .muted { font-size: 13px; margin-top: 4px; }
.mp-stats { gap: 8px; }
.mp-stats li { padding: 9px 12px; font-size: 12px; }
.mp-stats strong { font-size: 18px; }
.mp-sub { font-size: 11px; margin-bottom: 10px; }
.mp-bars { gap: 10px; }
.mp-bar-label { font-size: 13px; margin-bottom: 4px; }
.mp-track { height: 5px; }
.mp-actions .btn { font-size: 14px; }
.mp-reviews { gap: 12px; }
.review { padding: 18px; gap: 10px; border-radius: 18px; }
.review blockquote { font-size: 14.5px; line-height: 1.55; }
.review blockquote::before { font-size: 32px; margin-bottom: 4px; }
.review figcaption { font-size: 12px; gap: 10px; }
.review figcaption strong { font-size: 13.5px; }
.review-avatar { width: 30px; height: 30px; font-size: 13px; }
.review-notable { font-size: 12px; }
.review-more { font-size: 13px; }

/* Phones: car cards two per row, like the model tiles, so a screen shows four cars instead of one. */
@media (max-width: 640px) {
  .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .car-card { border-radius: 16px; }
  .car-card .media { aspect-ratio: 4 / 3; }
  .car-card .tags { top: 8px; left: 8px; right: 8px; }
  .car-card .badge { height: 22px; padding: 0 7px; gap: 4px; font-size: 10.5px; }
  /* "New arrival" is shortened so it fits next to the status badge. */
  .car-card .badge--new { font-size: 0; }
  .car-card .badge--new::after { content: "New"; font-size: 10.5px; }
  html[lang="es"] .car-card .badge--new::after { content: "Nuevo"; }
  .car-card .body { padding: 10px 11px 12px; gap: 6px; }
  .car-card .title { flex-direction: column; gap: 3px; }
  .car-card h3 { font-size: 14px; }
  .car-card .trim { font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .car-card .price { font-size: 16px; }
  .car-card .est { display: none; }
  .car-card .specs { padding-top: 8px; gap: 4px 10px; font-size: 12px; }
}

/* Phones: reviews two per row too, with smaller type, so the section is about half as long. */
@media (max-width: 640px) {
  .mp-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .review { padding: 13px; gap: 9px; border-radius: 16px; }
  .review blockquote { font-size: 13px; line-height: 1.5; }
  .review blockquote::before { font-size: 30px; margin-bottom: 4px; }
  .review.is-long blockquote { -webkit-line-clamp: 5; }
  .review figcaption { gap: 8px; font-size: 11.5px; }
  .review figcaption strong { font-size: 12.5px; }
  .review-avatar { width: 26px; height: 26px; font-size: 12px; }
  .review-src svg { width: 14px; height: 14px; }
  .review-notable { display: none; }
  .review-more { font-size: 12px; }
}

/* Home page on desktop at normal zoom: the top of the page (hero, Featured, Facebook Marketplace, Shop by model)
   scrolls normally. From "How it works" down, each section is one screen and home.js moves one section per scroll.
   Only at normal zoom: zoomed out, the window gets very tall and full-screen sections would leave big empty gaps. */
@media (min-width: 961px) and (min-height: 600px) and (max-height: 1300px) {
  body[data-page="home"] main > .section.page-snap {
    min-height: calc(100svh - var(--header-h));
    display: flex; flex-direction: column; justify-content: center;
    padding-block: clamp(28px, 4vw, 56px);
  }
  body[data-page="home"] main > .section.page-snap > .container { width: 100%; }
  /* "Visit us" has to fit one screen: a tighter heading, card and map. */
  body[data-page="home"] #visit { padding-block: 28px; }
  body[data-page="home"] #visit .section-head { margin-bottom: 20px; }
  body[data-page="home"] #visit .section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin-top: 10px; }
  body[data-page="home"] #visit .visit-card { gap: 14px; padding: 22px 24px; }
  body[data-page="home"] #visit .visit-card address { font-size: 18px; }
  body[data-page="home"] #visit .contact-icon { width: 40px; height: 40px; }
  body[data-page="home"] #visit .hours-list div { font-size: 14px; padding-bottom: 6px; }
  body[data-page="home"] #visit .map-wrap { min-height: 240px; }
  body[data-page="home"] #visit .visit-grid { grid-template-columns: minmax(340px, 1fr) minmax(0, 1.3fr); }
  body[data-page="home"] #visit .visit-card .actions { flex-wrap: nowrap; }
}
