/* ==========================================================================
   YES MOTOR — Vehicle Inventory
   Source of truth: NEW WEBSITE.txt; historical visual archive:
   90 - Historical Audits and Handoff Records/Archived Design Exports (Read Only)/stitch_yes_motor_vehicle_inventory,
   sidebar redesigned as a horizontal filter toolbar (2026-07-08).
   Strict 8px spacing scale via --s-* tokens. Do not use off-scale values.
   ========================================================================== */

:root{
  --primary: #0f172a;
  --accent: #d90429;
  --success: #16a34a;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --radius-card: 12px;
  --radius-ui: 8px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  /* Strict Scale Integration */
  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px;
  --s-20: 20px; --s-24: 24px; --s-32: 32px; --s-40: 40px;
  --s-48: 48px; --s-64: 64px; --s-80: 80px; --s-96: 96px;
  --s-120: 120px; --s-160: 160px;
  --header-height: 64px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --surface-soft: #f8fafc;
  --toolbar-focus: #647fa8;
  /* Motion tokens (Stitch filter toolbar) */
  --motion-fast: 100ms;
  --motion-base: 160ms;
  --motion-slow: 220ms;
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --z-toast: 1350;
}

body{
  font-family: "Inter", sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
}

/* The native `hidden` attribute loses to any element that also carries a
   Tailwind display utility (`flex`, `grid`, etc.) — same cascade specificity,
   utility class wins. Force it so `el.hidden = true` always actually hides. */
[hidden]{
  display: none !important;
}

:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.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;
}

.container-custom{
  max-width: 80rem;
  margin: 0 auto;
  padding-left: var(--s-24);
  padding-right: var(--s-24);
}

header.site-header{
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

@media (max-width: 768px){
  /* On mobile the sticky search bar takes over the "always visible at top"
     role — the header scrolls away with the page instead. */
  header.site-header{
    position: static;
  }
}

/* Three-slot header: leading | logo | trailing.
   Equal 1fr side columns keep the wordmark optically centered on mobile
   even when actions are wider than the hamburger. */
.site-header-inner{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--s-12);
  width: 100%;
}

.header-leading{
  justify-self: start;
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-trailing{
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--s-16);
  min-width: 0;
}

.brand-logo{
  display: inline-flex;
  align-items: center;
  justify-self: center;
  grid-column: 2;
  text-decoration: none;
  color: var(--accent);
  flex-shrink: 0;
  line-height: 0;
  border-radius: var(--radius-ui);
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) var(--ease-premium);
}

.brand-logo:hover{
  opacity: 0.88;
}

.brand-logo:active{
  transform: scale(0.98);
}

.brand-logo:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

/* Inline text SVG wordmark — solid red YESMOTORS lockup */
.brand-logo-svg{
  display: block;
  height: 26px;
  width: auto;
  overflow: visible;
  text-rendering: geometricPrecision;
}

.brand-logo-svg-text{
  fill: currentColor;
  font-family: "Inter", Arial Black, Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.brand-logo-svg--drawer{
  height: 22px;
}

/* Language switch — same control height as header CTAs */
.lang-switch{
  display: none;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  height: 40px;
  box-sizing: border-box;
}

.lang-btn{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0 var(--s-12);
  height: 100%;
  border-radius: 6px;
  cursor: pointer;
  transition:
    color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.lang-btn:hover{
  color: var(--text-sub);
}

.lang-btn.is-active{
  background: var(--surface);
  color: var(--primary);
  font-weight: 900;
  box-shadow: var(--shadow-sm);
}

.lang-btn:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* First-load language choice shared with the finance flow. */
.language-toast{
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22), 0 3px 10px rgba(15, 23, 42, 0.08);
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity 160ms var(--ease-premium), transform 160ms var(--ease-premium);
}

.language-toast[hidden]{ display: none; }

.language-toast.is-closing{
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 7px);
}

.language-toast-icon{
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--blue, #0b67f3);
  background: #eef5ff;
  border-radius: 50%;
}

.language-toast-icon .material-symbols-outlined{ font-size: 21px; }
.language-toast-copy strong,
.language-toast-copy small{ display: block; }
.language-toast-copy strong{ font-size: 13px; line-height: 1.2; }
.language-toast-copy small{ margin-top: 3px; color: var(--text-muted); font-size: 10.5px; }
.language-options{ display: flex; gap: 5px; }

.language-options button{
  width: 56px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-sub);
  background: var(--surface);
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 140ms var(--ease-premium), color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.language-flag{
  width: 22px;
  height: 16px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.13);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.language-options button[aria-pressed="true"]{
  color: #fff;
  background: var(--blue, #0b67f3);
  border-color: var(--blue, #0b67f3);
}

.language-options button[aria-pressed="true"] .language-flag{ border-color: rgba(255, 255, 255, 0.55); }
.language-options button:active{ transform: scale(0.96); }
.language-options button:focus-visible{ outline: 3px solid rgba(11, 103, 243, 0.28); outline-offset: 2px; }

@media (max-width: 640px){
  .language-toast{
    bottom: max(78px, calc(env(safe-area-inset-bottom) + 70px));
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px 10px;
    padding: 10px;
  }

  .language-toast-icon{ width: 34px; height: 34px; }
  .language-options{ grid-column: 1 / -1; }
  .language-options button{ flex: 1 1 0; width: auto; }
}

@media (prefers-reduced-motion: reduce){
  .language-toast,
  .language-options button{ transition: none; }
}

/* Header CTA row — matched heights, token padding, clear hierarchy */
.header-actions{
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.header-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  height: 40px;
  padding: 0 var(--s-16);
  border-radius: var(--radius-ui);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition:
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-premium),
    box-shadow var(--motion-fast) ease;
}

.header-btn-icon{
  font-size: 18px !important;
  line-height: 1;
  flex-shrink: 0;
}

.header-btn:active{
  transform: scale(0.97);
}

.header-btn:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.header-btn--ghost{
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
}

.header-btn--ghost:hover{
  background: var(--surface-soft);
  color: var(--primary);
  border-color: #cbd5e1;
}

.header-btn--whatsapp{
  color: #fff;
  background: #25d366;
  border: 1px solid transparent;
}

.header-btn--whatsapp:hover{
  opacity: 0.92;
}

.header-btn--primary{
  display: none;
  color: #fff;
  background: var(--primary);
  border: 1px solid transparent;
}

.header-btn--primary:hover{
  background: #1e293b;
}

@media (min-width: 768px){
  .site-header-inner{
    grid-template-columns: auto 1fr;
  }

  .header-leading{
    display: none;
  }

  .brand-logo{
    grid-column: 1;
    justify-self: start;
  }

  .header-trailing{
    grid-column: 2;
    gap: var(--s-24);
  }

  .brand-logo-svg{
    height: 30px;
  }

  .lang-switch{
    display: inline-flex;
  }
}

.mobile-nav-open{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-ui);
  color: var(--primary);
  flex-shrink: 0;
  transition: background-color var(--motion-fast), transform var(--motion-fast) var(--ease-premium);
}

/* WhatsApp CTA — soft “new message” bubble nudge (transform only; no layout growth) */
@keyframes wa-message-nudge{
  0%,
  68%,
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  72% {
    transform: translateY(-2px) rotate(-8deg) scale(1.12);
  }
  78% {
    transform: translateY(0) rotate(5deg) scale(1.04);
  }
  84% {
    transform: translateY(-1px) rotate(-3deg) scale(1.08);
  }
  90% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

@media (prefers-reduced-motion: no-preference){
  #header-whatsapp .header-whatsapp-icon{
    display: inline-block;
    transform-origin: 50% 70%;
    animation: wa-message-nudge 3.6s var(--ease-premium) infinite;
    will-change: transform;
  }

  #header-whatsapp:hover .header-whatsapp-icon,
  #header-whatsapp:focus-visible .header-whatsapp-icon{
    animation-play-state: paused;
    transform: scale(1.08);
  }

  #header-whatsapp:active .header-whatsapp-icon{
    animation: none;
    transform: scale(0.94);
  }
}

/* Narrow phones — trim spacing; icon-only CTAs keep 40px targets */
@media (max-width: 420px){
  .site-header .container-custom{
    padding-left: var(--s-12);
    padding-right: var(--s-12);
  }

  .site-header-inner{
    column-gap: var(--s-8);
  }

  .header-actions{
    gap: var(--s-8);
  }

  .brand-logo-svg{
    height: 22px;
  }
}

/* Icon-only header CTAs below sm — matched square hit targets */
.header-btn-label{
  display: none;
}

.header-btn{
  width: 40px;
  padding: 0;
}

@media (min-width: 640px){
  .header-btn{
    width: auto;
    padding: 0 var(--s-16);
  }

  .header-btn-label{
    display: inline;
  }

  .header-btn--primary{
    display: inline-flex;
  }
}

/* Very narrow phones */
@media (max-width: 340px){
  .mobile-nav-open{
    width: 32px;
    height: 32px;
  }

  .header-actions{
    gap: var(--s-4);
  }

  .header-btn{
    width: 36px;
    height: 36px;
  }

  .brand-logo-svg{
    height: 18px;
  }
}

.mobile-nav-open:hover{
  background: var(--bg);
}

.mobile-nav-open:active{
  transform: scale(0.94);
}

.mobile-nav-open:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Main content column */
.main-content{
  padding-top: var(--s-24);
  padding-bottom: var(--s-80);
}

.page-heading{
  margin-bottom: var(--s-12);
}

.page-heading h1{
  margin: 0;
  line-height: 1.15;
}

/* ==========================================================================
   Filter Toolbar — Stitch layout (2026-07-09). Horizontal, normal document
   flow on desktop; scrolls away so vehicle cards dominate the viewport.
   ========================================================================== */

@media (prefers-reduced-motion: reduce){
  .empty-state{
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
  }
}

.search-box-wrap{
  position: relative;
  width: 100%;
  max-width: 256px;
  flex: 1 1 200px;
}

.search-box-icon{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}

.search-input{
  height: 36px;
  padding: 0 var(--s-12);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: border-color var(--motion-base) var(--ease-premium),
              box-shadow var(--motion-base) var(--ease-premium),
              width var(--motion-base) var(--ease-premium);
}

.search-input{
  width: 100%;
  padding-left: 36px;
  padding-right: 38px;
}

.search-input::-webkit-search-cancel-button{
  -webkit-appearance: none;
  appearance: none;
}

.search-input:focus{
  border-color: var(--toolbar-focus);
  box-shadow: 0 0 0 3px rgba(100, 127, 168, 0.15);
  max-width: 280px;
}

.search-clear-btn{
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-ui);
  background: transparent;
  color: var(--text-muted);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background-color var(--motion-fast), color var(--motion-fast);
}

.search-clear-btn:hover,
.search-clear-btn:focus-visible{
  background: #eef2f7;
  color: var(--primary);
}

.search-clear-btn .material-symbols-outlined{ font-size: 18px; }

/* Finance banner — injected inline in the vehicle grid every 2 rows */
.finance-banner{
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.09);
}

.showroom-grid .finance-banner-inline{
  grid-column: 1 / -1;
}

.finance-banner-cta{
  width: 100%;
  min-height: 38px;
  padding: 8px 16px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.finance-banner-cta:hover{
  background: #1e293b;
}

.finance-banner-cta:active{
  transform: translateY(1px);
}

.finance-banner-cta:focus-visible{
  outline: 3px solid rgba(37, 99, 235, 0.3);
  outline-offset: 3px;
}

.finance-banner-actions{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.finance-banner-body{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.finance-banner-body > .material-symbols-outlined{
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #2563eb;
  background: #dbeafe;
}

.finance-banner-copy{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.finance-banner-copy > [data-i18n="safeFinance"]{
  color: #0f172a;
  font-weight: 500;
}

.finance-banner-copy > [data-i18n="safeFinanceCopy"]{
  color: #475569;
}

/* Mobile keeps the approved Light Assurance stack full-width. */
@media (max-width: 640px){
  .finance-banner{
    align-items: stretch;
    text-align: left;
    gap: 10px;
    padding: 13px 14px;
  }

  .finance-banner-body{
    justify-content: flex-start;
    max-width: 100%;
  }

  .finance-banner-copy{
    text-align: left;
  }

  .finance-banner-actions{
    align-items: stretch;
    width: 100%;
  }

  .finance-banner-cta{
    width: 100%;
    max-width: none;
    text-align: center;
  }
}

/* Vehicle Cards */
.showroom-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  align-items: start;
  gap: var(--s-32);
  margin-top: var(--s-16);
  padding-top: 0;
  transition: grid-template-columns 0.2s ease-out;
}

.showroom-grid.grid-1col{
  grid-template-columns: 1fr;
}

.showroom-grid.grid-3col{
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* View Toggle */
.view-toggle{
  display: flex;
  background: #f1f5f9;
  padding: 2px;
  border-radius: var(--radius-ui);
  border: 1px solid var(--border);
  gap: 0;
}

.view-toggle-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  transition: all var(--motion-fast) var(--ease-premium);
}

.view-toggle-btn:hover:not(.active){
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.view-toggle-btn.active{
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn .material-symbols-outlined{
  font-size: 18px;
}

.vehicle-card--featured{
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgb(245 158 11 / 0.35);
}

.card-badge.badge-featured{
  background: rgba(245, 158, 11, 0.95);
}

.v-custom-description{
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-sub);
  margin: 0 0 var(--s-12);
}

.card-badge.badge-navy{
  background: rgba(30, 58, 138, 0.95);
}

.payment-assumptions{
  margin-top: var(--s-8);
  font-size: 11px;
  color: var(--text-muted);
}

.payment-assumptions summary{
  cursor: pointer;
  color: var(--text-sub);
  font-weight: 600;
  list-style: none;
}

.payment-assumptions summary::-webkit-details-marker{
  display: none;
}

.payment-assumptions p{
  margin: var(--s-8) 0 0;
  line-height: 1.45;
}

.btn-view-details,
.btn-check-avail{
  opacity: 0.78;
  font-weight: 600 !important;
  color: var(--text-muted);
}

.btn-view-details:hover,
.btn-check-avail:hover{
  opacity: 1;
}

.secondary-actions{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: var(--s-8);
}

.primary-cta{
  background: var(--primary);
  color: white;
  text-align: center;
  padding: var(--s-16);
  border-radius: var(--radius-ui);
  font-weight: 700;
  font-size: 14px;
  transition: background-color 0.15s;
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  min-height: 48px;
}

/* Availability modal — sits above detail overlay */
.availability-overlay{
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-24);
}

.availability-overlay[hidden]{
  display: none !important;
  contain: layout style paint;
}

.availability-scrim{
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.55);
  backdrop-filter: blur(4px);
}

.availability-panel{
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.35);
  padding: 20px;
}

.availability-close{
  position: absolute;
  top: var(--s-12);
  right: var(--s-12);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-sub);
}

.avail-heading{
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 40px;
  margin-bottom: 12px;
}

.avail-heading-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 21px;
}

.avail-sheet h2{
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  line-height: 1.25;
  text-wrap: balance;
}

.avail-vehicle-card{
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  background: var(--surface-soft);
}

.avail-vehicle{
  font-weight: 700;
  font-size: 13px;
  color: var(--ink, var(--primary));
  margin: 0 0 var(--s-4);
}

.avail-meta{
  font-size: 10px;
  color: var(--text-muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.avail-copy{
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-sub);
  text-wrap: pretty;
}

.avail-pickup-fields{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0 0;
}

.avail-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-sub);
}

.avail-field input[type="text"]{
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  padding: var(--s-12) var(--s-16);
  min-height: 44px;
  font-size: 14px;
  background: var(--surface);
}

.avail-field input[type="text"]:focus-visible{
  outline: 2px solid var(--blue, #3b82f6);
  outline-offset: 2px;
}

.avail-choice-field{
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.avail-choice-field legend{
  margin: 0 0 6px;
  padding: 0;
  color: var(--text-sub);
  font-size: 12px;
}

.avail-choice-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.avail-choice{
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.avail-choice > input{
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.avail-choice-card{
  position: relative;
  display: flex;
  min-height: 78px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-sub);
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.avail-choice-icon{
  font-size: 21px;
}

.avail-choice-label{
  max-width: 100%;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.avail-choice-check{
  position: absolute;
  top: 6px;
  left: 6px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #94a3b8;
  border-radius: 999px;
}

.avail-choice > input:checked + .avail-choice-card{
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
  box-shadow: inset 0 0 0 1px #2563eb;
}

.avail-choice > input:checked + .avail-choice-card .avail-choice-check{
  border: 4px solid #2563eb;
  background: #ffffff;
}

.avail-choice > input:focus-visible + .avail-choice-card{
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.avail-choice:hover .avail-choice-card{
  border-color: #94a3b8;
}

.avail-actions{
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  margin-top: 14px;
}

.avail-actions .primary-cta:disabled{
  opacity: 0.65;
  cursor: wait;
}

.avail-actions .primary-cta{
  background: #0b64f4;
}

.avail-actions .primary-cta:hover{
  background: #0956d8;
}

/* Availability confirm as footer of View Details (not a separate overlay) */
.avail-sheet--footer{
  padding: var(--s-24);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg, #f8fafc);
}

.avail-sheet--footer h2{
  margin-right: 0;
  text-wrap: balance;
}

.vds-sheet .avail-sheet--footer{
  scroll-margin-top: var(--s-24);
}

.btn-scroll-avail{
  width: 100%;
  gap: var(--s-8);
  font-weight: 700 !important;
  color: var(--text-sub);
  opacity: 1;
}

.btn-scroll-avail:hover{
  color: var(--primary);
}

@media (max-width: 768px){
  .availability-overlay{
    padding: var(--s-12);
    align-items: center;
  }

  .availability-panel{
    width: 100%;
    max-height: 92vh;
    border-radius: 16px;
  }

  .primary-cta,
  .btn-ghost,
  .btn-view-details,
  .btn-check-avail,
  .btn-scroll-avail{
    min-height: 48px;
  }

  .avail-sheet--footer{
    padding: var(--s-16);
    border-radius: var(--radius-ui);
  }
}

/* SecureOne Warranty modal — same overlay language as availability */
.warranty-overlay{
  position: fixed;
  inset: 0;
  z-index: 1350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-24);
}

.warranty-overlay[hidden]{
  display: none !important;
  contain: layout style paint;
}

.warranty-scrim{
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 0.55);
  backdrop-filter: blur(4px);
}

.warranty-panel{
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(90vh, 780px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.35);
  padding: var(--s-24);
}

.warranty-close{
  position: absolute;
  top: var(--s-12);
  right: var(--s-12);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-sub);
  cursor: pointer;
  transition: transform 160ms ease-out, color 160ms ease-out, border-color 160ms ease-out;
}

.warranty-close:hover{
  color: var(--primary);
  border-color: var(--primary);
}

.warranty-close:active{
  transform: scale(0.97);
}

.warranty-sheet{
  padding-right: var(--s-24);
}

.warranty-kicker{
  margin: 0 0 var(--s-8);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue, #3b82f6);
}

.warranty-sheet h2{
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 2rem var(--s-12) 0;
  line-height: 1.25;
  text-wrap: balance;
}

.warranty-sheet h3{
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin: var(--s-20) 0 var(--s-8);
}

.warranty-lead,
.warranty-copy{
  margin: 0 0 var(--s-12);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-sub);
  text-wrap: pretty;
}

.warranty-list{
  margin: 0 0 var(--s-8);
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-sub);
}

.warranty-list strong{
  color: var(--primary);
  font-weight: 700;
}

.warranty-note{
  margin: var(--s-16) 0 0;
  padding-top: var(--s-12);
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  text-wrap: pretty;
}

@media (max-width: 768px){
  .warranty-overlay{
    padding: var(--s-12);
    align-items: flex-end;
  }

  .warranty-panel{
    width: 100%;
    max-height: 88vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}

.vehicle-card{
  background: var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  /* content-visibility: auto + contain-intrinsic-size: 480px 1px removed —
     that 1px placeholder height was collapsing every off-screen card to a
     sliver until the browser decided it was "relevant", which also stalled
     its image fetch and let the "IMAGE PREVIEW" ::after backdrop show
     through. contain: layout style paint keeps the safe containment hint
     without the visibility-based collapse. */
  contain: layout style paint;
}

.vehicle-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgb(0 0 0 / 0.12);
  border-color: var(--text-muted);
}

.card-badge{
  position: absolute;
  top: var(--s-16);
  left: var(--s-16);
  z-index: 10;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  padding: var(--s-4) var(--s-12);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.card-badge.badge-blue{
  background: rgba(37, 99, 235, 0.95);
}

.card-badge.badge-sold{
  background: rgba(100, 116, 139, 0.95);
}

.vehicle-card--sold{
  opacity: 0.92;
}

.vehicle-card--sold .vehicle-image-box::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(15 23 42 / 0.08), rgb(15 23 42 / 0.18));
  pointer-events: none;
}

.v-price--ask{
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.v-payment--contact{
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.01em;
}

.vehicle-image-box{
  aspect-ratio: 16/10;
  background: #f1f5f9;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.vehicle-image-box img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.vehicle-image-box img.is-placeholder{
  object-fit: contain;
  padding: var(--s-24);
  background: #f8fafc;
}

.vehicle-image-box::after{
  content: "IMAGE PREVIEW";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.vehicle-details{
  padding: var(--s-20);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.v-year-make{
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: var(--s-4);
}

.v-model{
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: var(--s-12);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.v-model .v-title-text{
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.v-brand-logo{
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
  opacity: 0.92;
  margin-left: auto;
  align-self: flex-start;
}

.v-model--detail{
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

.v-model--detail .v-brand-logo{
  width: 36px;
  height: 36px;
}

.price-block{
  margin-bottom: var(--s-16);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.price-row{
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0;
}

.v-price{
  font-size: 1.25rem; /* 20px — dominant but not shouting */
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.price-meta{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

.v-payment{
  font-size: 0.8125rem; /* 13px */
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0;
  line-height: 1.3;
}

.price-meta-sep{
  display: none;
}

/* Executive Showroom mileage + payment-hero box — mirrors the detail modal's
   .vds-quick-row visual language (uppercase muted label, bold value). Applies
   at every breakpoint since VehicleCard() is shared between mobile/desktop. */
.showroom-specs{
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--s-16);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  padding: var(--s-12) var(--s-16);
}

.showroom-mileage-cell,
.showroom-payment-hero{
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.showroom-payment-hero{
  text-align: right;
  border-left: 1px solid var(--border);
  padding-left: var(--s-16);
}

.showroom-specs span{
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.showroom-mileage-cell strong{
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.showroom-payment-hero strong{
  font-size: 1.25rem;
  font-weight: 800;
  color: #2563eb;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.showroom-payment-hero small{
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
}

.cash-price-contact a{
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* The cash price stays deliberately secondary to the monthly payment: same
   small size and muted color as its own "Cash price" label, with only a
   firmer weight so the number is still findable. The explicit resets are
   load-bearing — .showroom-payment-hero strong and .vds-price-card span
   would otherwise render this at hero scale, blue and uppercased. */
.cash-price-contact .cash-price-value{
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* The detail price card uses a navy background, so keep its cash CTA light
   and readable while inventory-card links retain the standard dark text. */
.vds-price-card .cash-price-contact,
.vds-price-card .cash-price-contact a{
  color: #ffffff;
}

.spec-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  margin-bottom: var(--s-16);
}

.spec-item{
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
  padding: var(--s-8) var(--s-12);
  background: #f8fafc;
  border-radius: var(--radius-ui);
  border: 1px solid #f1f5f9;
}

.trust-line{
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: var(--s-16);
}

.trust-line.trust-green{
  color: #15803d;
}

.trust-line.trust-blue{
  color: #1d4ed8;
}

.primary-cta:hover{
  background: #1e293b;
}

.cta-block{
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding-top: var(--s-16);
  border-top: 1px solid #f8fafc;
}

.secondary-actions .btn-ghost{
  min-width: 0;
  white-space: nowrap;
}

/* Card row holds the single View Details CTA + Favorite + Share. The shared
   .secondary-actions base rule is reused by unrelated contexts, so this
   three-column treatment remains scoped to inventory cards only. */
.vehicle-card .secondary-actions{
  grid-template-columns: minmax(0, 1fr) 52px 52px;
}

.vehicle-card .btn-view-details{
  opacity: 1;
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.vehicle-card .btn-view-details:hover{
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

.secondary-actions .btn-check-avail{
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  padding-left: var(--s-8);
  padding-right: var(--s-8);
}

.btn-ghost{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-12);
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  color: var(--text-sub);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn-ghost:hover{
  background: var(--bg);
  border-color: var(--text-muted);
  color: var(--primary);
}

.btn-fav.active{
  color: var(--accent);
  border-color: var(--accent);
}

.btn-fav.active .material-symbols-outlined{
  font-variation-settings: "opsz" 20, "wght" 400, "FILL" 1, "GRAD" 0;
}

.btn-share.is-copied{
  color: var(--success);
  border-color: var(--success);
  transition: color var(--motion-fast), border-color var(--motion-fast);
}

.v-down-payment{
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
}

/* New mobile-card-only elements (see the Figma-reference redesign below) —
   hidden by default so desktop's existing card is untouched. */
.card-photo-count,
.card-stock-number{
  display: none;
}

/* Mobile card — refined per the approved Figma reference: image overlays
   (photo count / stock #), a boxed price block with a cash-price/payment
   divider, and one primary details CTA beside the utility icons. Title+brand-logo
   layout (.v-model / vehicleTitleWithBrandHtml) is intentionally untouched.
   .secondary-actions is unwrapped via display:contents so its three buttons
   become direct grid items — no duplicate mobile markup. */
@media (max-width: 768px){
  /* Compact the mobile inventory digest and inset it from the page edges.
     Preserve 48px touch targets; the narrower centered card, tighter image
     crop, type scale, spacing, and two-line description do the density work
     without changing desktop cards or the detail sheet. */
  .showroom-grid{
    gap: var(--s-12);
  }

  .vehicle-card{
    width: calc(100% - var(--s-32));
    max-width: 100%;
    justify-self: center;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  }

  .vehicle-image-box{
    aspect-ratio: 2 / 1;
  }

  .vehicle-details{
    padding: 14px;
  }

  .v-model{
    gap: var(--s-8);
    margin-bottom: var(--s-8);
    font-size: 0.875rem;
    line-height: 1.25;
  }

  .v-brand-logo{
    width: 22px;
    height: 22px;
  }

  .price-block{
    margin-bottom: var(--s-12);
  }

  .showroom-specs{
    gap: 10px;
    padding: var(--s-8) 10px;
  }

  .showroom-payment-hero{
    padding-left: 10px;
  }

  .showroom-specs span{
    font-size: 9px;
  }

  .showroom-mileage-cell strong{
    font-size: 0.875rem;
  }

  .showroom-payment-hero strong{
    font-size: 1.0625rem;
  }

  .showroom-payment-hero small{
    font-size: 9.5px;
  }

  .trust-line{
    margin-bottom: var(--s-8);
  }

  .v-custom-description{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;
    margin-bottom: var(--s-8);
  }

  .card-badge{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 4px 10px 4px 8px;
    letter-spacing: 0.04em;
  }

  .card-badge::before{
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
    flex-shrink: 0;
  }

  .card-photo-count,
  .card-stock-number{
    position: absolute;
    bottom: var(--s-8);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }

  .card-photo-count{
    right: var(--s-12);
  }

  .card-photo-count .material-symbols-outlined{
    font-size: 14px;
  }

  .card-stock-number{
    left: var(--s-12);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
  }

  .vehicle-image-box::before{
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 64px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.38), transparent);
    pointer-events: none;
    z-index: 2;
  }

  /* Mobile card digest: drop secondary density so title + price + CTAs dominate. */
  #showroom-grid .vehicle-details > .spec-grid,
  #showroom-grid .payment-assumptions{
    display: none;
  }

  .primary-cta{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #2563eb;
  }

  .primary-cta:hover{
    background: #1d4ed8;
  }

  .primary-cta-icon{
    font-size: 16px;
  }

  .cta-block{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    align-items: stretch;
    gap: var(--s-8);
    padding-top: var(--s-8);
  }

  .cta-block .secondary-actions{
    display: contents;
  }

  .cta-block .primary-cta{
    order: 2;
    width: auto;
    white-space: nowrap;
    padding: var(--s-8);
    font-size: 12px;
  }

  .cta-block .btn-view-details{
    order: 1;
    white-space: nowrap;
    padding: var(--s-8);
    font-size: 12px;
    text-align: center;
  }

  .cta-block .btn-fav{
    order: 3;
    padding: 0;
  }

  .cta-block .btn-share{
    order: 4;
    padding: 0;
  }
}

@media (max-width: 400px){
  .vehicle-card .cta-block .primary-cta{
    white-space: normal;
    font-size: 12px;
    line-height: 1.1;
  }

  .vehicle-card .primary-cta-icon{
    display: none;
  }
}

/* Vehicle detail modal */
.vehicle-detail-overlay{
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-24);
}

.vehicle-detail-overlay[hidden]{
  display: none !important;
  contain: layout style paint;
}

.vehicle-detail-scrim{
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.vehicle-detail-panel{
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: min(90vh, 1040px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  outline: none;
  touch-action: pan-y;
}

@media (prefers-reduced-motion: no-preference){
  .vehicle-detail-overlay:not([hidden]) .vehicle-detail-panel{
    animation: vds-panel-in var(--motion-slow) var(--ease-premium);
  }

  .vehicle-detail-overlay:not([hidden]) .vehicle-detail-scrim{
    animation: vds-scrim-in var(--motion-slow) ease-out;
  }
}

@keyframes vds-panel-in{
  from {
    opacity: 0;
    transform: scale(0.97);
  }
}

@keyframes vds-scrim-in{
  from {
    opacity: 0;
  }
}

.vehicle-detail-close{
  position: absolute;
  top: var(--s-12);
  right: var(--s-12);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-sub);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.vehicle-detail-close:hover{
  background: var(--bg);
  color: var(--primary);
  border-color: var(--text-muted);
}

.vehicle-detail-nav{
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition:
    background-color var(--motion-fast),
    transform var(--motion-fast) var(--ease-premium),
    opacity var(--motion-base) var(--ease-premium),
    border-color var(--motion-fast);
}

.vehicle-detail-overlay.is-detail-dragging .vehicle-detail-nav--prev.is-drag-hint,
.vehicle-detail-overlay.is-detail-dragging .vehicle-detail-nav--next.is-drag-hint,
.vehicle-detail-nav:focus-visible{
  opacity: 0.55;
  pointer-events: auto;
}

.vehicle-detail-overlay.is-detail-dragging .vehicle-detail-nav.is-drag-hint{
  background: rgba(15, 23, 42, 0.38);
  border-color: rgba(255, 255, 255, 0.22);
}

.vehicle-detail-nav:hover{
  background: rgba(15, 23, 42, 0.48);
  opacity: 0.7;
}

.vehicle-detail-nav:active{
  transform: translateY(-50%) scale(0.96);
}

.vehicle-detail-nav:focus-visible{
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
  pointer-events: auto;
}

.vehicle-detail-nav:disabled{
  opacity: 0 !important;
  pointer-events: none;
}

.vehicle-detail-nav[hidden]{
  display: none !important;
}

.vehicle-detail-nav--prev{
  left: max(var(--s-8), env(safe-area-inset-left, 0px));
}

.vehicle-detail-nav--next{
  right: max(var(--s-8), env(safe-area-inset-right, 0px));
}

.vehicle-detail-nav .material-symbols-outlined{
  font-size: 24px;
  opacity: 0.9;
}

.vehicle-detail-browse-meta{
  position: absolute;
  z-index: 3;
  top: max(var(--s-12), env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  pointer-events: none;
  max-width: min(280px, calc(100% - 120px));
  text-align: center;
}

.vehicle-detail-browse-meta[hidden]{
  display: none !important;
}

.vehicle-detail-browse-counter{
  padding: var(--s-4) var(--s-12);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.vehicle-detail-swipe-hint{
  padding: var(--s-4) var(--s-8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-sub);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.16);
  max-width: 100%;
  line-height: 1.35;
  text-wrap: balance;
}

.vehicle-detail-swipe-hint[hidden]{
  display: none !important;
}

.vehicle-detail-swipe-hint.is-coach{
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.vehicle-detail-panel.is-swiping,
.vehicle-detail-panel.is-swipe-fly,
.vehicle-detail-panel.is-swipe-coach{
  animation: none !important;
  user-select: none;
  cursor: grabbing;
}

.vehicle-detail-swipe-stamp{
  position: absolute;
  top: var(--s-64);
  z-index: 2;
  padding: var(--s-8) var(--s-12);
  border: 3px solid currentColor;
  border-radius: var(--radius-ui);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.vehicle-detail-swipe-stamp--next{
  right: var(--s-48);
  color: var(--success);
  transform: rotate(14deg);
}

.vehicle-detail-swipe-stamp--prev{
  left: var(--s-20);
  color: #3b82f6;
  transform: rotate(-14deg);
}

/* Fullscreen photo lightbox — sits above the detail modal (z-index 1200). */
.vds-lightbox{
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-24);
}

.vds-lightbox[hidden]{
  display: none !important;
}

.vds-lightbox-scrim{
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
}

.vds-lightbox-frame{
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-12);
}

.vds-lightbox-img{
  max-width: 92vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.vds-lightbox-counter{
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

.vds-lightbox-close,
.vds-lightbox-nav{
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: background-color var(--motion-base) ease, transform var(--motion-fast) ease-out;
}

.vds-lightbox-close:hover,
.vds-lightbox-nav:hover{
  background: rgba(255, 255, 255, 0.2);
}

.vds-lightbox-close:active,
.vds-lightbox-nav:active{
  transform: scale(0.94);
}

.vds-lightbox-close{
  top: var(--s-24);
  right: var(--s-24);
  width: 44px;
  height: 44px;
}

.vds-lightbox-nav{
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
}

.vds-lightbox-nav:active{
  transform: translateY(-50%) scale(0.94);
}

.vds-lightbox-prev{
  left: var(--s-24);
}

.vds-lightbox-next{
  right: var(--s-24);
}

.vds-lightbox-nav[hidden]{
  display: none !important;
}

.vds-lightbox-close .material-symbols-outlined{
  font-size: 22px;
}

.vds-lightbox-nav .material-symbols-outlined{
  font-size: 28px;
}

@media (prefers-reduced-motion: no-preference){
  .vds-lightbox:not([hidden]) .vds-lightbox-frame{
    animation: vds-panel-in var(--motion-slow) var(--ease-premium);
  }

  .vds-lightbox:not([hidden]) .vds-lightbox-scrim{
    animation: vds-scrim-in var(--motion-slow) ease-out;
  }
}

@media (max-width: 640px){
  .vds-lightbox{
    padding: var(--s-12);
  }

  .vds-lightbox-close{
    top: var(--s-12);
    right: var(--s-12);
    width: 40px;
    height: 40px;
  }

  .vds-lightbox-nav{
    width: 40px;
    height: 40px;
  }

  .vds-lightbox-prev{
    left: var(--s-8);
  }

  .vds-lightbox-next{
    right: var(--s-8);
  }
}

/* --- Executive Showroom spec-sheet document (mirrors folder 7 PDF) --- */
.vds-sheet{
  display: flex;
  flex-direction: column;
  gap: var(--s-24);
  padding: var(--s-32);
}

.vds-header{
  display: flex;
  align-items: center;
  padding-bottom: var(--s-12);
  padding-right: var(--s-40);
  border-bottom: 1px solid var(--border);
}

.vds-title{
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--primary);
}

.vds-hero-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: var(--s-24);
}

.vds-hero{
  position: relative;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

/* Minimalistic fullscreen CTA overlaid on hero + gallery photos. */
.vds-zoom-btn{
  position: absolute;
  top: var(--s-8);
  right: var(--s-8);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  opacity: 0;
  transition: opacity var(--motion-base) ease, background-color var(--motion-base) ease, transform var(--motion-fast) ease-out;
}

.vds-zoom-btn .material-symbols-outlined{
  font-size: 16px;
}

.vds-hero:hover .vds-zoom-btn,
.vds-gallery-card:hover .vds-zoom-btn,
.vds-zoom-btn:focus-visible{
  opacity: 1;
}

.vds-zoom-btn:hover{
  background: rgba(15, 23, 42, 0.8);
}

.vds-zoom-btn:active{
  transform: scale(0.94);
}

@media (hover: none) and (pointer: coarse){
  .vds-zoom-btn{
    opacity: 1;
  }
}

.vds-hero-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vds-hero-img.is-placeholder{
  object-fit: contain;
  padding: var(--s-24);
  opacity: 0.7;
}

.vds-side{
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
  min-width: 0;
}

.vds-side-heading{
  margin: 0;
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
}

.vds-rim-set{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f7f9fb;
}

.vds-rim-set img{
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.vds-side-label{
  margin: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.vds-kpf{
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

.vds-kpf-row{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s-8);
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}

.vds-kpf-row span{
  color: var(--text-sub);
  white-space: nowrap;
}

.vds-kpf-row strong{
  color: var(--primary);
  font-weight: 700;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vds-price-card{
  margin-top: auto;
  padding: var(--s-16);
  border-radius: 4px;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vds-price-card--editorial{
  gap: var(--s-8);
}

.vds-price-payment{
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vds-price-accent{
  display: none;
}

/* The mobile reading order puts the payment immediately below the vehicle
   title. Desktop continues to use the price card in the side rail. */
.vds-mobile-price{
  display: none;
}

.vds-price-card span{
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94a3b8;
}

.vds-price-card strong{
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.vds-price-card strong small{
  font-size: 13px;
  font-weight: 400;
}

.vds-price-card .vds-price-custom{
  font-size: 18px;
}

.vds-price-card .vds-price-ask{
  font-size: 20px;
  letter-spacing: 0;
}

.vds-price-card em{
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
}

.vds-price-card .vds-price-note,
.vds-finance-terms .vds-price-note{
  font-size: 9px;
  color: #94a3b8;
}

.vds-finance-terms{
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  padding-top: var(--s-16);
  border-top: 1px solid var(--border);
}

.vds-finance-terms .vds-price-note{
  color: var(--text-muted);
  line-height: 1.4;
}

.vds-finance-terms .payment-assumptions{
  margin-top: 0;
}

.vds-title-block{
  padding-bottom: var(--s-16);
  border-bottom: 1px solid var(--border);
}

.vds-title-heading-row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-12);
}

.vds-title-heading-row h2{
  flex: 1 1 auto;
  min-width: 0;
}

.vds-title-actions{
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--s-8);
}

.vds-title-action{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-ui);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  transition: background-color var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}

.vds-title-action .material-symbols-outlined{
  font-size: 20px;
}

.vds-title-action:hover{
  background: #f7faff;
  border-color: #94a3b8;
  color: #155bd7;
}

.vds-title-action:active{
  transform: scale(0.97);
}

.vds-title-action:focus-visible{
  outline: 2px solid var(--blue, #3b82f6);
  outline-offset: 2px;
}

.vds-title-action.btn-fav.active{
  background: #fff7ed;
  border-color: var(--accent);
  color: var(--accent);
}

.vds-title-block h2{
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--primary);
}

.vds-title-color{
  margin: var(--s-4) 0 0;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: #3b82f6;
}

.vds-title-sub{
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vds-quick-row{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: var(--s-16);
  border-bottom: 1px solid var(--border);
}

.vds-quick-cell{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  padding: 0 var(--s-8);
  text-align: center;
  min-width: 0;
}

.vds-quick-cell + .vds-quick-cell{
  border-left: 1px solid var(--border);
}

.vds-quick-cell .material-symbols-outlined{
  font-size: 24px;
  color: var(--text-muted);
}

.vds-quick-cell small{
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vds-quick-cell strong{
  font-size: 16px;
  font-weight: 900;
  color: var(--primary);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vds-cell-vin strong{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.vds-location{
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

.vds-location-title{
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vds-location-card{
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.vds-location-map-wrap{
  height: clamp(180px, 28vw, 260px);
  background: #e8edf4;
  border-bottom: 1px solid var(--border);
}

.vds-location-map{
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.vds-location-details{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, 0.72fr);
  align-items: center;
  gap: var(--s-12) var(--s-16);
  padding: var(--s-16);
}

.vds-location-address{
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  min-width: 0;
}

.vds-location-dealer{
  display: contents;
}

.vds-location-dealer > .material-symbols-outlined{
  grid-column: 1;
  grid-row: 1 / span 2;
  flex: 0 0 auto;
  margin-top: 1px;
  font-size: 22px;
  color: #3b82f6;
}

.vds-location-address strong{
  grid-column: 2;
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--primary);
}

.vds-location-address address{
  grid-column: 2;
  margin: 0;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  color: var(--text-sub);
}

.vds-location-address address span{
  display: block;
}

.vds-location-directions{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  min-height: 46px;
  padding: var(--s-12) var(--s-16);
  border-radius: 6px;
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  transition: background-color var(--motion-fast), transform var(--motion-fast) var(--ease-premium);
}

.vds-location-directions:hover{
  background: #1e293b;
}

.vds-location-directions:active{
  transform: scale(0.985);
}

.vds-location-directions:focus-visible{
  outline: 2px solid #3b82f6;
  outline-offset: 3px;
}

.vds-location-directions .material-symbols-outlined{
  font-size: 17px;
}

.vds-cta-bar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-16);
  padding: var(--s-16) var(--s-20);
  border-radius: 4px;
  background: var(--primary);
  color: #ffffff;
}

.vds-cta-bar > div{
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-width: 0;
}

.vds-cta-bar span{
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #94a3b8;
}

.vds-cta-bar strong{
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.vds-cta-btn{
  flex-shrink: 0;
  padding: var(--s-12) var(--s-24);
  border-radius: 4px;
  background: #ffffff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color var(--motion-base) ease, transform var(--motion-fast) ease-out;
}

.vds-cta-btn:hover{
  background: #f1f5f9;
}

.vds-cta-btn:active{
  transform: scale(0.97);
}

.vds-cta-bar .vds-cta-btn:focus-visible{
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.vds-infographic{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: var(--s-16);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f7f9fb;
  overflow: hidden;
}

.vds-connector-lines{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  pointer-events: none;
}

.vds-connector-lines line{
  stroke: var(--primary);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.vds-iso-media{
  position: relative;
  /* Desktop: cutout sits above connector lines. Mobile stacks callouts below
     the media — keep overflow clipped so any leftover scale cannot paint over chips. */
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.vds-iso-media img{
  max-height: 210px;
  max-width: 60%;
  width: auto;
  height: auto;
  object-fit: contain;
  /* Default size only on the public site — do not grow via transform scale. */
  transform-origin: center center;
  filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.25));
}

.vds-callout-layer{
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s-12);
  pointer-events: none;
}

.vds-callout-row{
  display: flex;
  justify-content: space-between;
  gap: var(--s-8);
}

.vds-callout-row:nth-child(2){
  padding: 0 var(--s-16);
}

.vds-callout-row:nth-child(4){
  padding: 0 var(--s-48);
}

.vds-callout-row i{
  width: 150px;
}

.vds-callout-card{
  display: flex;
  align-items: center;
  gap: var(--s-8);
  width: 150px;
  max-width: 44%;
  padding: 6px var(--s-8);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.vds-callout-card .material-symbols-outlined{
  font-size: 14px;
  color: var(--vds-icon-color, var(--primary));
  flex-shrink: 0;
}

.vds-brand-feature-icon{
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex: 0 0 18px;
}

.vds-callout-card strong{
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vds-section-head{
  display: flex;
  align-items: center;
  gap: var(--s-12);
}

.vds-section-head h3{
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
}

.vds-rule{
  flex: 1;
  height: 1px;
  background: var(--border);
}

.vds-gallery,
.vds-equipment{
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}

.vds-gallery-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-12);
}

.vds-gallery-card{
  position: relative;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e2e8f0;
}

.vds-gallery-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vds-gallery-card figcaption{
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 3px var(--s-8);
  background: var(--primary);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.vds-equipment-list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-8) var(--s-24);
}

.vds-equipment-list li{
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  line-height: 1.35;
}

.vds-equipment-list .material-symbols-outlined{
  font-size: 16px;
  color: var(--vds-icon-color, var(--primary));
  flex-shrink: 0;
}

.vds-powertrain{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--s-16);
  padding: var(--s-16);
}

.vds-powertrain-copy{
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
  min-width: 0;
}

.vds-powertrain-eyebrow{
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.vds-powertrain-accent{
  width: 18px;
  height: 3px;
  background: var(--primary);
}

.vds-powertrain-eyebrow h3{
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-sub);
}

.vds-powertrain-engine{
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--primary);
}

.vds-powertrain-metrics{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s-8);
}

.vds-powertrain-metric{
  display: flex;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-8) 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  min-width: 0;
}

.vds-powertrain-metric > .material-symbols-outlined{
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--vds-icon-color, var(--primary));
  color: #ffffff;
  font-size: 14px;
  flex-shrink: 0;
}

.vds-powertrain-metric small{
  display: block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vds-powertrain-metric strong{
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vds-powertrain-metric div{
  min-width: 0;
}

.vds-footer{
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  color: var(--primary);
}

.vds-footer-brand{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: var(--s-12) var(--s-16);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.vds-footer-brand b{
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.vds-footer-links{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.vds-footer-links a,
.vds-footer-links button{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  min-width: 0;
  min-height: 88px;
  padding: var(--s-12) var(--s-8);
  border: 0;
  border-radius: 0;
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  color: var(--primary);
  cursor: pointer;
  transition: background-color var(--motion-base) ease, color var(--motion-base) ease, transform var(--motion-fast) ease;
}

.vds-footer-links > * + *{
  border-left: 1px solid var(--border);
}

.vds-footer-icon{
  width: 30px;
  height: 30px;
  overflow: visible;
  fill: none;
  stroke: #155bd7;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.vds-footer-icon circle[r="1"]{
  fill: #155bd7;
  stroke: none;
}

.vds-footer-links a:hover,
.vds-footer-links button:hover{
  background: #f7faff;
  color: #0b3f9c;
}

.vds-footer-links a:active,
.vds-footer-links button:active{
  background: #eef4ff;
  transform: translateY(1px);
}

.vds-footer-links a:focus-visible,
.vds-footer-links button:focus-visible{
  outline: 2px solid var(--blue, #3b82f6);
  outline-offset: -2px;
}

.vehicle-detail-section-title{
  margin: 0 0 var(--s-8);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vehicle-detail-features{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s-8);
}

.vehicle-detail-features li{
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  line-height: 1.35;
}

.vehicle-detail-features .material-symbols-outlined{
  font-size: 16px;
  color: var(--good);
  flex-shrink: 0;
  margin-top: 1px;
}

.vehicle-detail-description{
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-sub);
}

@media (max-width: 760px){
  .vds-hero-grid{
    grid-template-columns: minmax(0, 1fr);
  }

  .vds-powertrain{
    grid-template-columns: minmax(0, 1fr);
  }

}

@media (max-width: 640px){
  .vehicle-detail-overlay{
    padding: 0;
    align-items: flex-end;
  }

  .vehicle-detail-panel{
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
  }

  .vehicle-detail-nav{
    top: 58%;
    bottom: auto;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
  }

  .vehicle-detail-nav:active{
    transform: translateY(-50%) scale(0.96);
  }

  .vehicle-detail-browse-meta{
    top: max(var(--s-8), env(safe-area-inset-top, 0px));
    bottom: auto;
    transform: translateX(-50%);
    max-width: min(220px, calc(100% - 112px));
  }

  .vehicle-detail-swipe-stamp{
    top: var(--s-48);
    font-size: 15px;
    padding: var(--s-4) var(--s-8);
  }

  .vehicle-detail-swipe-stamp--next{
    right: var(--s-48);
  }

  .secondary-actions{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px;
  }

  .secondary-actions .btn-ghost{
    padding: var(--s-8);
    font-size: 10px;
  }

  .vds-sheet{
    padding: var(--s-20) var(--s-16);
    gap: var(--s-16);
  }

  /* Flatten the desktop hero/side grid into the sheet's mobile reading
     order: hero -> title -> price -> quick specs -> remaining content. */
  .vds-sheet > *{
    order: 7;
  }

  .vds-header{
    order: 1;
  }

  .vds-hero-grid,
  .vds-side{
    display: contents;
  }

  .vds-hero{
    order: 2;
  }

  .vds-title-block{
    display: grid;
    gap: var(--s-4);
    order: 3;
    padding-bottom: var(--s-12);
  }

  /* Phone detail identity card: vehicle title on the left half, monthly
     payment on the right half, inside one bordered box. Fav/share, the hero
     side rail and the CTA bar are dropped here so the card stays scannable. */
  .vds-id-card{
    order: 3;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--radius-ui);
    background: var(--surface);
    overflow: hidden;
  }

  .vds-id-card > .vds-title-block{
    align-content: center;
    gap: 2px;
    padding: var(--s-12);
    border-bottom: 0;
  }

  /* Half the width means the title has to come down a size or long trims
     turn the card into a tower. */
  .vds-id-card .vds-title-block h2{
    font-size: 15px;
    line-height: 1.15;
  }

  .vds-id-card .vds-title-block .v-model--detail .v-brand-logo{
    width: 22px;
    height: 22px;
  }

  .vds-id-card .vds-title-color{
    font-size: 11px;
  }

  .vds-id-card .vds-title-sub{
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .vds-title-actions{
    display: none;
  }

  .vds-hero-grid > .vds-side,
  .vds-cta-bar{
    display: none;
  }

  .vds-title-block .v-model--detail{
    gap: var(--s-8);
    line-height: 1.08;
  }

  .vds-title-block .v-model--detail .v-title-text{
    display: block;
    overflow: visible;
    text-wrap: balance;
  }

  .vds-title-block .v-model--detail .v-brand-logo{
    width: 30px;
    height: 30px;
  }

  .vds-title-color,
  .vds-title-sub{
    margin: 0;
  }

  .vds-mobile-price{
    display: flex;
    order: 4;
  }

  .vds-price-card.vds-mobile-price{
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(96px, 0.85fr);
    align-items: center;
    column-gap: var(--s-12);
    margin-top: 0;
    min-height: 104px;
    padding: 14px var(--s-16) 15px;
    gap: 0;
    text-align: left;
  }

  .vds-id-card > .vds-price-card.vds-mobile-price{
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    column-gap: 0;
    min-height: 0;
    padding: var(--s-12);
    border-radius: 0;
  }

  .vds-id-card .vds-price-card.vds-mobile-price .vds-price-payment > strong{
    font-size: 26px;
  }

  .vds-id-card .vds-price-card .cash-price-contact{
    font-size: 10px;
    line-height: 1.3;
  }

  .vds-price-card.vds-mobile-price .vds-price-payment{
    align-items: flex-start;
    gap: 0;
    min-width: 0;
  }

  .vds-price-card.vds-mobile-price .vds-price-payment > span{
    margin: 0;
    line-height: 1;
  }

  .vds-price-card.vds-mobile-price .vds-price-accent{
    display: block;
    width: 30px;
    height: 2px;
    margin: 7px 0 6px;
    background: #8fbaf0;
  }

  .vds-price-card.vds-mobile-price .vds-price-payment > strong{
    font-size: 32px;
    line-height: 0.95;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .vds-price-card.vds-mobile-price .vds-price-payment > strong small{
    margin-left: 2px;
    font-size: 13px;
  }

  .vds-side > .vds-price-card{
    display: none;
  }

  .vds-quick-row{
    order: 5;
  }

  .vds-location{
    order: 6;
  }

  .vds-side > .vds-side-heading,
  .vds-side > .vds-rim-set,
  .vds-side > .vds-side-label,
  .vds-side > .vds-kpf{
    order: 7;
  }

  .vds-title{
    font-size: 20px;
  }

  .vds-title-block h2{
    font-size: 20px;
  }

  .vds-quick-row{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-12) 0;
  }

  .vds-quick-cell:nth-child(odd){
    border-left: none;
  }

  .vds-location-map-wrap{
    height: 180px;
  }

  .vds-location-details{
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .vds-location-address{
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    justify-self: stretch;
    column-gap: 0;
    width: 100%;
    padding: 2px 0;
    text-align: left;
  }

  .vds-location-dealer{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-8);
    min-width: 0;
    padding-right: 10px;
  }

  .vds-location-dealer > .material-symbols-outlined{
    grid-column: auto;
    grid-row: auto;
    flex: 0 0 auto;
    margin-top: 0;
    font-size: 20px;
  }

  .vds-location-address strong{
    grid-column: auto;
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
  }

  .vds-location-address address{
    grid-column: auto;
    align-self: stretch;
    justify-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 10px 0 12px;
    border-left: 1px solid var(--border);
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
  }

  .vds-location-address address span{
    display: block;
  }

  .vds-location-address address span + span::before{
    content: none;
  }

  .vds-location-directions{
    width: 100%;
    min-height: 44px;
    padding-block: 10px;
  }

  .vds-cta-bar{
    flex-direction: column;
    align-items: flex-start;
  }

  .vds-cta-btn{
    align-self: stretch;
    text-align: center;
  }

  .vehicle-detail-description{
    display: none;
  }

  /* Callout diagram degrades to a static grid under the cutout on phones. */
  .vds-infographic{
    flex-direction: column;
    gap: var(--s-12);
    min-height: 0;
    overflow: hidden;
  }

  .vds-connector-lines{
    display: none;
  }

  .vds-iso-media{
    /* Callouts are in normal flow below — do not stack the cutout over them. */
    z-index: 1;
    width: 100%;
    max-height: 160px;
  }

  .vds-iso-media img{
    max-width: 100%;
    max-height: 160px;
    /* Force default visual size on phones even if an inline scale sneaks in. */
    transform: none !important;
  }

  .vds-iso-media img[style*="scaleX(-1)"]{
    transform: scaleX(-1) !important;
  }

  .vds-callout-layer{
    position: static;
    z-index: 2;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-8);
  }

  .vds-callout-row{
    display: contents;
  }

  .vds-callout-row i{
    display: none;
  }

  .vds-callout-card{
    width: auto;
    max-width: none;
  }

  .vds-equipment-list{
    grid-template-columns: minmax(0, 1fr);
  }

  .vds-footer-links a,
  .vds-footer-links button{
    min-height: 84px;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .vds-footer-icon{
    width: 28px;
    height: 28px;
  }
}

/* Empty results — recovery first, then nearby inventory. */
.empty-state{
  display: flex;
  flex-direction: column;
  gap: var(--s-32);
  padding: var(--s-64) var(--s-24);
  text-align: center;
  background: #f6f3f5;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  animation: empty-state-in var(--motion-slow) var(--ease-premium);
}

.empty-state-main{
  width: min(100%, 720px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-16);
}

.empty-state-icon{
  font-size: 48px;
  color: var(--text-muted);
}

.empty-state.is-discrepancy .empty-state-icon{
  color: #b45309;
}

.search-discrepancy{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-12);
}

.search-discrepancy[hidden]{
  display: none !important;
}

.search-discrepancy-banner{
  margin: 0 0 var(--s-16);
  padding: var(--s-16);
  border: 1px solid #fdba74;
  border-radius: var(--radius-card);
  background: #fff7ed;
  animation: empty-state-in var(--motion-slow) var(--ease-premium);
}

.search-discrepancy-banner[hidden]{
  display: none !important;
}

.search-discrepancy-banner-inner{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-12);
  max-width: 920px;
}

.search-discrepancy-banner-body{
  margin: 0;
  color: #9a3412;
  font-size: 14px;
  line-height: 1.45;
  text-wrap: pretty;
}

.search-discrepancy-badge{
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-4) var(--s-12);
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-discrepancy-banner .search-discrepancy-badge{
  background: #ffedd5;
}

.search-discrepancy-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-8);
  width: 100%;
}

.search-discrepancy-banner .search-discrepancy-actions{
  justify-content: flex-start;
}

.search-discrepancy-action{
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  border-radius: var(--radius-ui);
  padding: var(--s-8) var(--s-16);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.search-discrepancy-action:hover{
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.search-discrepancy-action--primary{
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.search-discrepancy-action--primary:hover{
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

@media (max-width: 720px){
  .search-discrepancy-banner-inner{
    align-items: stretch;
  }
  .search-discrepancy-banner .search-discrepancy-actions{
    flex-direction: column;
  }
  .search-discrepancy-action{
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce){
  .search-discrepancy-action,
  .search-discrepancy-banner{
    transition: none;
    animation: none;
  }
}

.empty-state h2{
  margin: 0;
  color: #1b1b1c;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.empty-state p{
  max-width: 65ch;
  margin: 0;
  color: #494648;
  font-size: 15px;
  line-height: 1.6;
  text-wrap: pretty;
}

.empty-state-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-16);
}

.empty-action-primary,
.empty-action-secondary{
  padding: var(--s-12) var(--s-24);
  border-radius: var(--radius-ui);
  font-size: 12px;
  font-weight: 700;
  transition: background-color var(--motion-base), color var(--motion-base), border-color var(--motion-base);
}

.empty-action-primary{
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.empty-action-primary:hover{ background: #1e293b; }

.empty-action-secondary{
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
}

.empty-action-secondary:hover{ background: #e9edf3; }

.empty-similar-link{
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-4);
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty-similar-link .material-symbols-outlined{ font-size: 18px; }

.operator-assist{
  width: min(100%, 640px);
  padding: var(--s-32);
  border: 1px dashed var(--border);
  border-radius: var(--radius-ui);
}

.operator-assist-label,
.nearest-matches-label{
  display: block;
  margin: 0 0 var(--s-12);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.operator-assist a{
  display: inline-block;
  margin-top: var(--s-16);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nearest-matches{
  border-top: 1px solid var(--border);
}

.nearest-matches-label{
  margin: var(--s-48) 0 var(--s-24);
}

.nearest-matches-grid{ text-align: left; }

.nearest-matches-skeleton{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-16);
}

.nearest-card-skeleton{
  display: block;
  min-height: 320px;
  border-radius: var(--radius-card);
}

.empty-state--skeleton{ min-height: 410px; justify-content: center; }
.empty-skeleton-icon{ width: 48px; height: 48px; border-radius: 50%; }
.empty-skeleton-heading{ width: min(100%, 480px); height: 30px; border-radius: var(--radius-ui); }
.empty-skeleton-body{ width: min(100%, 600px); height: 48px; border-radius: var(--radius-ui); }
.empty-skeleton-actions{ width: 264px; height: 42px; border-radius: var(--radius-ui); }

@keyframes empty-state-in{
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px){
  .empty-state{ padding: var(--s-48) var(--s-16); }
  .empty-state h2{ font-size: 21px; }
  .empty-state-actions{ width: 100%; }
  .empty-action-primary, .empty-action-secondary{ width: 100%; }
  .operator-assist{ padding: var(--s-24); }
  .nearest-matches-skeleton{ grid-template-columns: 1fr; }
  .nearest-card-skeleton{ min-height: 240px; }
}

.empty-clear:hover{
  background: #1e293b;
}

.pulse-highlight{
  animation: pulse-highlight 1.2s ease-out;
}

@keyframes pulse-highlight{
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6); }
  100% { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); }
}

/* Skeleton States */
.skeleton{
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading{
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Optical Alignment for Icons */
.material-symbols-outlined{
  font-size: 1.25rem;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px){
  .main-content{
    padding-bottom: calc(var(--s-80) + 56px);
  }

  /* Mobile nav drawer — slides from the left, distinct from the bottom-sheet
     filter drawer above so the two affordances stay visually distinct. */
  .mobile-nav-drawer{
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1200;
    pointer-events: none;
    visibility: hidden;
  }

  .mobile-nav-drawer.is-open{
    pointer-events: auto;
    visibility: visible;
  }

  .mobile-nav-drawer-scrim{
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity var(--motion-slow) var(--ease-premium);
  }

  .mobile-nav-drawer.is-open .mobile-nav-drawer-scrim{
    opacity: 1;
  }

  .mobile-nav-drawer-panel{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 82vw);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18);
    transform: translateX(-100%);
    transition: transform var(--motion-slow) var(--ease-premium);
    padding-top: env(safe-area-inset-top);
  }

  .mobile-nav-drawer.is-open .mobile-nav-drawer-panel{
    transform: translateX(0);
  }

  .mobile-nav-drawer-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-20) var(--s-20) var(--s-16);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }

  .mobile-nav-drawer-header .brand-logo-svg--drawer{
    height: 22px;
  }

  .mobile-nav-drawer-close{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-ui);
    color: var(--text-sub);
    transition: background-color var(--motion-fast);
  }

  .mobile-nav-drawer-close:hover{
    background: var(--bg);
  }

  .mobile-nav-links{
    display: flex;
    flex-direction: column;
    padding: var(--s-12);
    gap: 2px;
    overflow-y: auto;
  }

  .mobile-nav-link{
    display: flex;
    align-items: center;
    gap: var(--s-12);
    padding: var(--s-12) var(--s-12);
    border-radius: var(--radius-ui);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    min-height: 48px;
    transition: background-color var(--motion-fast), transform var(--motion-fast) var(--ease-premium);
  }

  .mobile-nav-link .material-symbols-outlined{
    color: var(--text-muted);
    font-size: 20px;
  }

  .mobile-nav-link:hover{
    background: var(--bg);
  }

  .mobile-nav-link:active{
    transform: scale(0.98);
  }

  .mobile-nav-link--active{
    background: var(--primary);
    color: #ffffff;
  }

  .mobile-nav-link--active .material-symbols-outlined{
    color: #ffffff;
  }
}

@media (prefers-reduced-motion: reduce){
  .mobile-nav-drawer-panel,
  .mobile-nav-drawer-scrim{
    transition: none;
  }
}

@media (max-width: 768px){
  .container-custom{
    padding-left: var(--s-16);
    padding-right: var(--s-16);
  }

  .showroom-grid{
    grid-template-columns: 1fr;
    margin-top: var(--s-8);
  }

  .search-box-wrap{
    flex: 1 1 100%;
    max-width: none;
    order: 1;
  }

  [data-desktop-only]{
    display: none;
  }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce){
  .vehicle-card,
  .vehicle-card:hover{
    transform: none;
  }

  .vehicle-detail-scrim,
.vehicle-detail-panel{
    transition: none;
  }

  .skeleton,
  .animate-pulse,
  .pulse-highlight{
    animation: none;
  }
}

/* ==========================================================================
   Legal pages (privacy.html, terms.html) — plain, readable article typography.
   Reuses the existing token scale; no new colors/fonts introduced.
   ========================================================================== */
.legal-doc{
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-40) 0 var(--s-96);
}

.legal-doc h2{
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: var(--s-40);
  margin-bottom: var(--s-12);
}

/* Sub-heading inside a policy section (added for the credit application's
   sub-sections). Tailwind's preflight strips heading sizes, so without this
   an h3 renders at body size and the hierarchy silently disappears. */
.legal-doc h3{
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: var(--s-24);
  margin-bottom: var(--s-8);
}

.legal-doc p,
.legal-doc li{
  color: var(--text-sub);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.legal-doc p{
  margin-top: 0;
  margin-bottom: var(--s-16);
}

.legal-doc ul{
  margin: 0 0 var(--s-16);
  padding-left: var(--s-20);
  display: flex;
  flex-direction: column;
  gap: var(--s-8);
}

.legal-doc a{
  color: var(--blue, #3b82f6);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-doc a:hover{
  color: var(--primary);
}

.legal-doc strong{
  color: var(--text-main);
  font-weight: 700;
}

/* ==========================================================================
   Inventory bar + Vehicle Finder (2026-08-18)

   Replaced the Stitch-era "Inventory Filters" toolbar, its mobile drawer,
   the desktop sticky summary and the mobile entry-guide sheet. The finder
   is a loyal build of the approved standalone
   YESMOTOR_vehicle_finder_loyal_mockup.html.

   SCALE SYSTEM — the approved artifact is authored on a 1122x1402 canvas
   with the modal at 915x1149 and everything positioned in that unit space.
   Instead of copying fixed pixels (which would be unreadable on a phone) or
   redesigning the component, `--u` is the rendered size of ONE design unit,
   derived from the viewport the same way the standalone scales its stage:

       --u = min(width budget / 915, height budget / 1402, 1px)

   Every value below is `calc(<the mockup's px> * var(--u))`, so proportions,
   spacing and vertical rhythm stay exactly as approved at every width, and
   the modal fits the viewport without a scrollbar. Phones get the smallest
   adaptation the handoff allows: a 2-column vehicle grid, stacked sort
   tiles, and a readability floor on --u.
   ========================================================================== */

.inventory-bar{
  display: flex;
  align-items: center;
  gap: var(--s-8);
  margin-bottom: var(--s-16);
}

.inventory-bar .search-box-wrap{
  max-width: none;
  flex: 1 1 auto;
}

.finder-open-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-ui);
  background: linear-gradient(90deg, #2868ee 0%, #1764f4 48%, #2d5ce8 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.1px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(30, 93, 228, 0.18);
  transition: filter var(--motion-base) var(--ease-premium),
              transform var(--motion-base) var(--ease-premium);
}

.finder-open-btn:hover{ filter: brightness(0.97); transform: translateY(-1px); }
.finder-open-btn:active{ transform: translateY(1px); }
.finder-open-btn:focus-visible{ outline: 2px solid #1768f2; outline-offset: 2px; }
.finder-open-btn .material-symbols-outlined{ font-size: 18px; }

@media (max-width: 520px){
  .finder-open-btn-label{
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .finder-open-btn{ padding: 0 12px; }
}

/* -------------------------------------------------------------------- */
/* Modal                                                                 */
/* -------------------------------------------------------------------- */

.vehicle-finder-overlay{
  position: fixed;
  inset: 0;
  /* Topmost surface on the page — above the sticky site header (1000), the
     nav drawer (1200), the vehicle detail modal (1200) and the photo
     lightbox (1400). The swipe-browse flow opens it over an open detail
     sheet, and nothing behind it may stay interactive. */
  z-index: 1500;
  display: grid;
  place-items: center;
}

.vehicle-finder-overlay[hidden]{ display: none; }

.vehicle-finder-scrim{
  position: absolute;
  inset: 0;
  background: rgba(40, 49, 61, 0.54);
  backdrop-filter: blur(1.8px);
}

.vehicle-finder{
  /* Size container for the @container rules further down — the internal
     layout reacts to the modal's own width, which --u decouples from the
     viewport's. */
  container-type: inline-size;

  /* One design unit. 188px = the standalone's 94px left/right stage margin
     doubled; 1402 = its full canvas height. Capped at 1px so the modal is
     never drawn larger than the approved artwork. */
  --u: min(
    calc((100vw - 188px) / 915),
    calc(100svh / 1402),
    1px
  );

  position: relative;
  width: calc(915 * var(--u));
  max-height: calc(100svh - 24px);
  overflow-y: auto;
  scrollbar-width: none;
  background: #fff;
  border-radius: calc(43 * var(--u));
  box-shadow: 0 calc(19 * var(--u)) calc(58 * var(--u)) rgba(20, 31, 51, 0.17);
  padding: 0;
  color: #111c33;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
}

.vehicle-finder::-webkit-scrollbar{ width: 0; height: 0; }
.vehicle-finder:focus{ outline: none; }

.vehicle-finder svg{
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vf-close{
  position: absolute;
  top: calc(34 * var(--u));
  right: calc(39 * var(--u));
  width: calc(75 * var(--u));
  height: calc(75 * var(--u));
  min-width: 34px;
  min-height: 34px;
  border-radius: 50%;
  border: max(1px, calc(1.5 * var(--u))) solid #cbd3df;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #111c33;
  transition: background 0.15s ease, transform 0.15s ease;
}

.vf-close:hover{ background: #f6f8fb; transform: scale(1.02); }
.vf-close:focus-visible{ outline: 2px solid #1768f2; outline-offset: 2px; }
.vf-close svg{ width: calc(31 * var(--u)); height: calc(31 * var(--u)); stroke-width: 2.2; }

.vf-hero{
  width: calc(107 * var(--u));
  height: calc(107 * var(--u));
  margin: calc(55 * var(--u)) auto 0;
  border-radius: 50%;
  background: #eef3ff;
  display: grid;
  place-items: center;
  color: #1768f2;
}

.vf-hero svg{ width: calc(62 * var(--u)); height: calc(62 * var(--u)); }

.vf-heading{
  margin: calc(19 * var(--u)) 0 0;
  padding: 0 calc(20 * var(--u));
  font-size: calc(45 * var(--u));
  line-height: 1.12;
  letter-spacing: calc(-1.5 * var(--u));
  font-weight: 800;
  color: #101a31;
}

.vf-subtitle{
  width: calc(675 * var(--u));
  /* The approved 675-unit measure is wider than the modal once phone widths
     stop being unit-driven — never let it break the panel's own box. */
  max-width: calc(100% - 2 * (42 * var(--u)));
  margin: calc(29 * var(--u)) auto 0;
  font-size: calc(27 * var(--u));
  line-height: 1.48;
  color: #657187;
  font-weight: 400;
}

.vf-section{
  width: calc(831 * var(--u));
  margin: 0 auto;
  text-align: left;
}

.vf-section--vehicle{ margin-top: calc(34 * var(--u)); }
.vf-section--sort{ margin-top: calc(23 * var(--u)); }

.vf-section-title{
  margin: 0 0 calc(20 * var(--u));
  font-size: calc(28 * var(--u));
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: calc(-0.25 * var(--u));
  color: #111b32;
}

.vf-divider{
  width: calc(831 * var(--u));
  height: 1px;
  margin: calc(29 * var(--u)) auto 0;
  background: #e3e7ed;
}

/* -------------------------------------------------------------------- */
/* Vehicle type grid — 3 x 2 at the approved proportions                 */
/* -------------------------------------------------------------------- */

.vf-vehicle-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(18 * var(--u)) calc(14 * var(--u));
}

.vf-option,
.vf-sort,
.vf-band{
  position: relative;
  border: max(1px, calc(1.6 * var(--u))) solid #dbe2ec;
  border-radius: calc(17 * var(--u));
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #121c32;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.vf-option{
  height: calc(114 * var(--u));
  gap: calc(20 * var(--u));
  padding: 0 calc(15 * var(--u));
}

.vf-option:hover,
.vf-sort:hover,
.vf-band:hover{ border-color: #bfc9d8; background: #fbfcfe; }

.vf-option:focus-visible,
.vf-sort:focus-visible,
.vf-band:focus-visible,
.vf-cta:focus-visible,
.vf-more:focus-visible{ outline: 2px solid #1768f2; outline-offset: 2px; }

.vf-icon{
  width: calc(52 * var(--u));
  height: calc(52 * var(--u));
  display: grid;
  place-items: center;
  flex: none;
}

.vf-icon svg{ width: calc(46 * var(--u)); height: calc(46 * var(--u)); }

.vf-option-label{
  font-size: calc(26 * var(--u));
  font-weight: 600;
  white-space: nowrap;
}

.vf-option--long .vf-option-label{ font-size: calc(22 * var(--u)); }

.vf-option.is-selected,
.vf-sort.is-selected,
.vf-band.is-selected{
  background: linear-gradient(135deg, #f4f7ff, #eaf1ff);
  border: max(2px, calc(2.5 * var(--u))) solid #1768f2;
  color: #1768f2;
}

.vf-option.is-selected{ box-shadow: inset 0 0 0 1px rgba(23, 104, 242, 0.04); }

.vf-check{
  position: absolute;
  top: calc(12 * var(--u));
  right: calc(13 * var(--u));
  width: calc(29 * var(--u));
  height: calc(29 * var(--u));
  border-radius: 50%;
  background: #1768f2;
  color: #fff;
  display: none;
  place-items: center;
}

.is-selected > .vf-check{ display: grid; }
.vf-check svg{ width: calc(17 * var(--u)); height: calc(17 * var(--u)); stroke-width: 2.5; }

/* -------------------------------------------------------------------- */
/* Sort                                                                  */
/* -------------------------------------------------------------------- */

.vf-sort-row{
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1.22fr) minmax(0, 0.92fr);
  gap: calc(15 * var(--u));
}

.vf-sort{
  height: calc(101 * var(--u));
  gap: calc(16 * var(--u));
  color: #101a31;
}

.vf-sort > svg{ width: calc(39 * var(--u)); height: calc(39 * var(--u)); flex: none; }

.vf-sort-label{
  font-size: calc(24 * var(--u));
  font-weight: 600;
  white-space: nowrap;
}

.vf-sort .vf-check{
  top: calc(11 * var(--u));
  right: calc(12 * var(--u));
  width: calc(27 * var(--u));
  height: calc(27 * var(--u));
}

/* -------------------------------------------------------------------- */
/* "More filters" panel — monthly budget + price                         */
/* -------------------------------------------------------------------- */

.vf-more-panel[hidden]{ display: none; }
.vf-more-panel .vf-section{ margin-top: calc(28 * var(--u)); }

.vf-band-row{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: calc(12 * var(--u));
}

.vf-band-row > .vf-band:first-child{ grid-column: 1 / -1; }

.vf-band{
  min-height: calc(74 * var(--u));
  padding: calc(10 * var(--u)) calc(30 * var(--u)) calc(10 * var(--u)) calc(14 * var(--u));
}

.vf-band-label{
  font-size: calc(22 * var(--u));
  font-weight: 600;
  text-align: center;
}

.vf-band .vf-check{
  top: calc(9 * var(--u));
  right: calc(10 * var(--u));
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.vf-band .vf-check svg{ width: calc(14 * var(--u)); height: calc(14 * var(--u)); }

/* -------------------------------------------------------------------- */
/* CTA + More filters                                                    */
/* -------------------------------------------------------------------- */

.vf-footer{
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-bottom: calc(51 * var(--u));
}

/* Only once the content actually overflows does the footer need to read as a
   separate surface — in the approved collapsed state it is invisible. */
.vehicle-finder.is-scrollable .vf-footer{
  box-shadow: 0 calc(-10 * var(--u)) calc(16 * var(--u)) calc(-10 * var(--u)) rgba(20, 31, 51, 0.16);
}

.vf-cta{
  display: block;
  width: calc(831 * var(--u));
  height: calc(108 * var(--u));
  margin: calc(45 * var(--u)) auto 0;
  border: 0;
  border-radius: calc(14 * var(--u));
  background: linear-gradient(90deg, #2868ee 0%, #1764f4 48%, #2d5ce8 100%);
  color: #fff;
  font-size: calc(31 * var(--u));
  font-weight: 800;
  letter-spacing: calc(-0.4 * var(--u));
  cursor: pointer;
  box-shadow: 0 calc(8 * var(--u)) calc(15 * var(--u)) rgba(30, 93, 228, 0.17);
  transition: filter 0.14s ease, transform 0.14s ease;
}

.vf-cta:hover{ filter: brightness(0.97); transform: translateY(-1px); }
.vf-cta:active{ transform: translateY(1px); }

.vf-more{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: calc(13 * var(--u));
  width: 100%;
  margin-top: calc(30 * var(--u));
  padding: 0;
  background: none;
  border: 0;
  color: #1768f2;
  font-size: calc(27 * var(--u));
  line-height: 1.2;
  font-weight: 600;
  cursor: pointer;
}

.vf-more svg{ width: calc(33 * var(--u)); height: calc(33 * var(--u)); }

/* -------------------------------------------------------------------- */
/* Responsive — keyed on the MODAL's own width, not the viewport's        */
/*                                                                       */
/* --u decouples the modal from the viewport (a short desktop window      */
/* renders a narrower modal than a tall phone), so the internal layout    */
/* has to react to the panel itself. Container queries do exactly that;   */
/* the viewport media query below only sets what genuinely depends on the */
/* viewport: the scale unit and the phone's edge-to-edge width.           */
/* -------------------------------------------------------------------- */

@media (max-width: 640px){
  .vehicle-finder{
    /* Phone width is viewport-driven, so --u only has to keep type
       readable and tap targets big rather than reproduce the artwork's
       width ratio. */
    --u: min(calc(100svh / 1450), calc((100vw - 28px) / 520), 0.8px);
    width: calc(100vw - 28px);
  }

  .vf-section,
  .vf-divider,
  .vf-cta{ width: calc(100% - 2 * (42 * var(--u))); }
}

/* Narrow panel — the 3-up vehicle grid and the side-by-side sort tiles stop
   holding their labels. Smallest adaptation the handoff allows: 2-up tiles,
   stacked sort icon/label, and floors so type and hit areas stop shrinking
   with the artwork. */
@container (max-width: 470px){
  .vf-vehicle-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vf-band-row{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .vf-sort{
    flex-direction: column;
    gap: calc(8 * var(--u));
    height: auto;
    padding: calc(12 * var(--u)) calc(6 * var(--u));
  }

  .vf-sort-label{
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

  .vf-option--long .vf-option-label{
    font-size: calc(20 * var(--u));
    white-space: normal;
    line-height: 1.15;
  }

  .vf-heading{ font-size: max(20px, calc(45 * var(--u))); }
  .vf-subtitle{ font-size: max(13px, calc(27 * var(--u))); }
  .vf-section-title{ font-size: max(14px, calc(28 * var(--u))); }
  .vf-option-label{ font-size: max(13px, calc(26 * var(--u))); }
  .vf-option--long .vf-option-label{ font-size: max(12px, calc(20 * var(--u))); }
  .vf-sort-label{ font-size: max(12px, calc(24 * var(--u))); }
  .vf-band-label{ font-size: max(12px, calc(22 * var(--u))); }
  .vf-cta{ font-size: max(15px, calc(31 * var(--u))); min-height: 46px; }
  .vf-more{ font-size: max(13px, calc(27 * var(--u))); }

  .vf-option{ height: auto; min-height: max(46px, calc(114 * var(--u))); }
  .vf-sort{ min-height: max(46px, calc(101 * var(--u))); }
  .vf-band{ min-height: max(40px, calc(74 * var(--u))); }
  .vf-close{ width: max(38px, calc(75 * var(--u))); height: max(38px, calc(75 * var(--u))); }
  .vf-close svg{ width: max(14px, calc(31 * var(--u))); height: max(14px, calc(31 * var(--u))); }

}

/* Narrowest panels — a horizontal icon + label cannot hold "Commercial Vans"
   in half of a 300px modal. Stack them; same tile, same selected state. */
@container (max-width: 340px){
  .vf-option{
    flex-direction: column;
    gap: calc(6 * var(--u));
    padding: calc(10 * var(--u)) calc(6 * var(--u));
  }

  .vf-option-label,
  .vf-option--long .vf-option-label{
    white-space: normal;
    text-align: center;
    line-height: 1.15;
  }

}

@media (prefers-reduced-motion: reduce){
  .vf-option,
  .vf-sort,
  .vf-band,
  .vf-cta,
  .vf-close,
  .finder-open-btn{ transition-duration: 0s !important; }
  .vf-cta:hover,
  .finder-open-btn:hover{ transform: none; }
}
