/* ==========================================================================
   ESTILOS PRINCIPALES · Sitio de concesionario / consignataria
   --------------------------------------------------------------------------
   Arquitectura (mobile-first):
     01. Tokens de diseño (variables CSS)  ← EDITE AQUÍ COLORES Y TIPOGRAFÍA
     02. Reset y base
     03. Utilidades y layout
     04. Componentes base (botones, campos, chips, tarjetas)
     05. Topbar y header / navegación
     06. Hero slider
     07. Buscador rápido
     08. Confianza y carrocerías
     09. Catálogo, filtros y tarjetas de vehículo
     10. Financiación y simulador
     11. Consignación
     12. Nosotros y cifras
     13. Testimonios, blog y FAQ
     14. Contacto, CTA y footer
     15. Modal, flotantes y toast
     16. Ficha de vehículo (vehiculo.html)
     17. Animaciones y movimiento reducido
   Breakpoints: 560px · 768px · 1024px · 1280px · 1800px (2K)
   ========================================================================== */

/* ==========================================================================
   01. TOKENS DE DISEÑO
   ========================================================================== */
:root {
  /* Marca: cambie estos dos valores para re-colorear todo el sitio */
  --accent: #ecae39;
  --accent-2: #eb8819;
  --accent-ink: #ffffff;           /* texto sobre el color de acento */
  --accent-soft: rgb(255 190 31 / 14%);
  --info: #3b82f6;
  --success: #22c55e;
  --danger: #ef4444;

  /* Superficies (tema oscuro por defecto) */
  --bg: #0a0c10;
  --bg-2: #0f1218;
  --surface: #141821;
  --surface-2: #1b202b;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.16);
  --text: #c9d0dc;
  --heading: #f5f7fb;
  --muted: #8b95a7;

  /* Vidrio (glassmorphism) */
  --glass-bg: rgb(20 24 33 / 0.62);
  --glass-line: rgb(255 255 255 / 0.12);
  --glass-blur: 18px;

  /* Tipografía */
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-h4: 1.125rem;
  --fs-h3: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --fs-hero: clamp(1.5rem, 0.9rem + 2.2vw, 3.3rem);

  /* Espaciado, radios y sombras */
  --gutter: 16px;
  --section-y: clamp(64px, 5vw + 40px, 128px);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.2);
  --shadow: 0 12px 32px -12px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 30px 60px -20px rgb(0 0 0 / 0.55);
  --ring: 0 0 0 3px rgb(255 90 31 / 0.45);

  /* Movimiento */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.18s;
  --t: 0.35s;

  --header-h: 68px;
  --container: 1320px;
}

/* Tema claro por sección: agregue class="theme-light" a cualquier <section> */
.theme-light {
  --bg: #f4f6fa;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --line: rgb(15 23 42 / 0.08);
  --line-strong: rgb(15 23 42 / 0.16);
  --text: #475163;
  --heading: #0d1320;
  --muted: #6b7587;
  --shadow: 0 14px 34px -16px rgb(15 23 42 / 0.22);
  --shadow-lg: 0 30px 60px -24px rgb(15 23 42 / 0.3);
  background: var(--bg);
  color: var(--text);
}

/* ==========================================================================
   02. RESET Y BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* "clip" (no "hidden"): hidden convierte al body en contenedor de scroll
     y rompe el position: sticky del header. */
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }
[hidden] { display: none !important; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Sprite e iconos */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 14px; height: 14px; }
.icon--xl { width: 44px; height: 44px; }
.icon--car { width: 34px; height: 18px; stroke-width: 1.6; }
.header__actions .icon { width: 40px; height: 40px;}

/* ==========================================================================
   03. UTILIDADES Y LAYOUT
   ========================================================================== */
.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(40px, 4vw, 72px); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 999; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-sm); font-weight: 600; transition: top var(--t-fast); }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.lead { font-size: var(--fs-lg); color: var(--text); max-width: 60ch; }
.h2 { font-size: var(--fs-h2); font-weight: 800; }
.h3 { font-size: var(--fs-h3); font-weight: 700; }
.h4 { font-size: var(--fs-h4); font-weight: 700; letter-spacing: -0.01em; }
.pt-0 {
  padding-top: 0!important;
}
.pb-0 {
  padding-bottom: 0!important;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.text-gradient { background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
}
.section-head { display: grid; gap: 16px; margin-bottom: clamp(28px, 3vw, 48px); }
.section-head__aside { color: var(--muted); max-width: 52ch; }
.section-head--row { align-items: end; }
.ticks { display: grid; gap: 12px; margin-block: 24px 0; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks .icon { color: var(--success); margin-top: 3px; }
.fineprint { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

@media (min-width: 768px) {
  :root { --gutter: 28px; --header-h: 76px; }
  .section-head--row { grid-template-columns: 1fr auto; gap: 32px; }
}
@media (min-width: 1800px) {
  :root { --container: 1560px; }
  html { font-size: 17px; }
}

/* ==========================================================================
   04. COMPONENTES BASE
   ========================================================================== */
/* Botones */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--heading); --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  border-radius: var(--radius-pill); border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 0.95rem; line-height: 1; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn .icon { width: 18px; height: 18px; transition: transform var(--t) var(--ease); }
.btn:hover > .icon:last-child { transform: translateX(3px); }
.btn--accent { --btn-bg: linear-gradient(135deg, var(--accent), var(--accent-2)); --btn-fg: var(--accent-ink); background: var(--btn-bg); box-shadow: 0 10px 24px -10px var(--accent); }
.btn--accent:hover { box-shadow: 0 16px 34px -12px var(--accent); }
.btn--glass { --btn-fg: #fff; background: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn--glass:hover { background: rgb(255 255 255 / 0.18); }
.btn--outline { --btn-bg: transparent; --btn-bd: var(--line-strong); --btn-fg: var(--heading); }
.btn--outline:hover { --btn-bd: var(--accent); --btn-fg: var(--accent); }
.btn--outline-light { --btn-bg: transparent; --btn-bd: rgb(255 255 255 / 0.25); --btn-fg: #fff; }
.btn--outline-light:hover { --btn-bd: var(--accent); }
.btn--dark { --btn-bg: #0a0c10; --btn-fg: #fff; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: var(--fs-sm); }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn--block { width: 100%; }
.link-btn { color: var(--accent); font-weight: 600; font-size: var(--fs-sm); }
.link-btn:hover { text-decoration: underline; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--heading); transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn--outline { border: 1px solid var(--line-strong); }
.icon-btn--outline:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }

/* Campos de formulario */
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .calc__label, .filter-group legend { font-size: var(--fs-sm); font-weight: 300; color: var(--muted); }
.field input, .field select, .field textarea, .filters select, .toolbar__sort {
  width: 100%; min-height: 40px; padding: 4px 0px;
  background: transparent; color: var(--heading); border: none;
  border-bottom: 1px solid var(--line-strong); border-radius: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 110px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95a7' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.field input:focus, .field select:focus, .field textarea:focus, .filters select:focus, .toolbar__sort:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.8; }

/* Chips (checkbox con estilo de píldora) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  font-size: var(--fs-sm); font-weight: 500; color: var(--heading);
  transition: all var(--t-fast);
}
.chip:hover span { border-color: var(--accent); }
.chip input:checked + span { background: var(--heading); border-color: var(--heading); color: var(--bg-2); }
.chip--hot input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { box-shadow: var(--ring); }

/* Checkboxes */
.checks { display: grid; gap: 4px; }
.check { display: flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; font-size: var(--fs-sm); color: var(--text); }
.check input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: transparent;
  display: grid; place-items: center; transition: all var(--t-fast); cursor: pointer;
}
.check input::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform var(--t-fast) var(--ease); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check .count { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }
.check--legal { align-items: flex-start; font-size: var(--fs-xs); color: var(--muted); }
.check--legal a { color: var(--accent); text-decoration: underline; }

/* Control segmentado (radios) */
.segmented { display: flex; padding: 4px; gap: 4px; border-radius: var(--radius-pill); background: var(--surface-2); }
.segmented label { flex: 1; position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: grid; place-items: center; min-height: 38px; padding: 0 10px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--muted); transition: all var(--t-fast); }
.segmented input:checked + span { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { box-shadow: var(--ring); }

/* Range */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --p: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--line-strong) var(--p)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-strong); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 2px 8px rgb(0 0 0 / 0.3); transition: transform var(--t-fast); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { box-shadow: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--ring); }

/* Tarjeta genérica y formularios */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.form { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px); }
.form__grid { display: grid; gap: 14px; }
.form__status { font-size: var(--fs-sm); min-height: 1.2em; }
.form__status.is-ok { color: var(--success); }
.form__status.is-error { color: var(--danger); }
@media (min-width: 560px) {
  .form__grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}

.stars { display: inline-flex; gap: 2px; color: #fbbf24; }
.stars .icon { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.stars .is-off { color: var(--line-strong); }

/* ==========================================================================
   05. TOPBAR, HEADER Y NAVEGACIÓN
   ========================================================================== */
.topbar { display: none; background: var(--bg); border-bottom: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.topbar__info, .topbar__social { display: flex; align-items: center; gap: 24px; }
ul.topbar__info { margin-left: 170px;}
.topbar__info li { display: flex; align-items: center; gap: 8px; }
.topbar .icon { width: 15px; height: 15px; color: var(--accent); }
.topbar__social { gap: 6px; }
.topbar__social a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; transition: color var(--t-fast), background var(--t-fast); }
.topbar__social a:hover { color: var(--heading); background: var(--surface-2); }
.topbar__social .icon { color: inherit; }

/* El desenfoque va en ::before: un backdrop-filter en .header crearía un
   contenedor para los hijos "fixed" y rompería el menú off-canvas. */
.header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t);
}
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgb(10 12 16 / 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  transition: background-color var(--t);
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px -18px rgb(0 0 0 / 0.8); }
.header.is-scrolled::before { background: rgb(10 12 16 / 0.9); }
body.nav-open .header { z-index: 80; }
.header__inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { flex: none; display: block; }
.brand img { height: 72px; margin-top: -38px; width: auto; transition: height var(--t) var(--ease), margin var(--t) var(--ease); }
/* Header sticky: al hacer scroll el logo se ajusta a la altura del nav */
.header.is-scrolled .brand img { height: calc(var(--header-h) - 16px); margin-top: 0; }
/* Sin topbar (móvil/tablet) el logo no puede subir sobre ella: se ajusta al nav */
@media (max-width: 1023.98px) { .brand img { height: calc(var(--header-h) - 12px); margin-top: 0; } }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header__cta { display: none; margin-left: 8px; }

/* Navegación móvil (off-canvas) */
.nav {
  position: fixed; inset: 0 0 0 auto; z-index: 70;
  width: min(86vw, 380px); height: 100dvh;
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 20px 28px;
  background: var(--bg-2); border-left: 1px solid var(--line);
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.45s var(--ease), visibility 0s linear 0.45s;
  overflow-y: auto;
}
.nav.is-open { transform: none; visibility: visible; transition: transform 0.45s var(--ease); }
.nav__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.nav__head img { height: 32px; width: auto; }
.nav__list { display: grid; gap: 2px; }
.nav__link { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 14px 4px; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; color: var(--heading); border-bottom: 1px solid var(--line); }
.nav__link:hover, .nav__link.is-current { color: var(--accent); }
.nav__sub { display: grid; gap: 2px; padding: 8px 0 8px 4px; }
.nav__sub a { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: var(--radius-sm); font-size: var(--fs-sm); color: var(--text); }
.nav__sub a:hover { background: var(--surface-2); color: var(--heading); }
.nav__sub .icon--car { color: var(--accent); }
.nav__sub-hot { color: var(--accent) !important; font-weight: 600; }
.nav__foot { margin-top: auto; display: grid; gap: 14px; padding-top: 20px; }
.nav__phone { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.overlay { position: fixed; inset: 0; z-index: 60; background: rgb(5 7 10 / 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in var(--t) var(--ease); }

@media (min-width: 560px) {
  .header__cta { display: inline-flex; }
}
@media (min-width: 1024px) {
  .topbar { display: block; }
  .nav-toggle, .nav__head, .nav__foot { display: none; }
  .nav {
    position: static; width: auto; height: auto; padding: 0; margin-left: 28px;
    background: none; border: 0; transform: none; visibility: visible; overflow: visible; transition: none;
  }
  .nav__list { display: flex; gap: 4px; }
  .nav__item { position: relative; }
  .nav__link { padding: 10px 14px; font-size: 0.95rem; border: 0; border-radius: var(--radius-pill); color: var(--text); font-family: var(--font-body); }
  .nav__link:hover, .nav__link.is-current { color: var(--heading); background: var(--surface-2); }
  .nav__link.is-current { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; background: none; }
  .nav__sub {
    position: absolute; top: calc(100% + 10px); left: 0; min-width: 260px;
    padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
  }
  .nav__sub::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
  .nav__item--has-sub:hover .nav__sub,
  .nav__item--has-sub:focus-within .nav__sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}

/* ==========================================================================
   06. HERO SLIDER
   ========================================================================== */
.hero {
  --hero-pad-b: 150px;
  --ctrl-b: 64px;
  position: relative; isolation: isolate; overflow: hidden;
  height: clamp(600px, calc(80svh - var(--header-h)), 940px);
  background: #000; color: #fff;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.hero__track { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  padding-bottom: var(--hero-pad-b);
  opacity: 0; visibility: hidden;
  transition: opacity 1s var(--ease), visibility 0s linear 1s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s var(--ease); z-index: 1; }
.slide__bg {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  transform: scale(1.14);
  transition: transform 8s linear;
  will-change: transform;
}
.slide.is-active .slide__bg { transform: scale(1); }
/* Capa de contraste: degradado inferior + lateral para legibilidad */
.slide::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, rgb(10 12 16 / 0.95) 0%, rgb(10 12 16 / 0.45) 45%, rgb(10 12 16 / 0.15) 100%),
    linear-gradient(90deg, rgb(10 12 16 / 0.7) 0%, transparent 70%);
}
.slide__content { position: relative; }
.slide__title { font-size: var(--fs-hero); font-weight: 800; color: #fff; max-width: 15ch; letter-spacing: -0.035em; line-height: 1.05; }
.slide__text { margin-top: 18px; max-width: 46ch; font-size: clamp(1rem, 0.75rem + 0.4vw, 1rem); color: rgb(255 255 255 / 0.8); }
.slide__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.slide .eyebrow { color: var(--accent-2); }

/* Capas animadas (fade-in-up escalonado con --d) */
.slide__layer { opacity: 0; transform: translateY(32px); }
.slide.is-active .slide__layer {
  opacity: 1; transform: none;
  transition: opacity 0.8s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(0.35s + var(--d, 0) * 0.13s);
}

/* Controles */
.hero__controls {
  position: absolute; left: 0; right: 0; bottom: var(--ctrl-b); z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.hero__tabs { display: flex; gap: 8px; flex: 1; max-width: 640px; }
.hero__tab { flex: 1; display: grid; gap: 10px; padding: 8px 0; text-align: left; color: rgb(255 255 255 / 0.55); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; transition: color var(--t); }
.hero__tab-label { display: none; }
.hero__tab:hover, .hero__tab.is-active { color: #fff; }
.hero__tab-bar { position: relative; display: block; height: 3px; border-radius: 3px; background: rgb(255 255 255 / 0.22); overflow: hidden; }
.hero__tab-bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }
.hero__tab.is-done .hero__tab-bar i { transform: scaleX(1); }
.hero__tab.is-active .hero__tab-bar i { animation: progress var(--slide-dur, 6.5s) linear forwards; }
.hero.is-paused .hero__tab.is-active .hero__tab-bar i { animation-play-state: paused; }
.hero__nav { display: flex; align-items: center; gap: 8px; }
.hero__counter { display: none; margin-right: 8px; font-family: var(--font-head); font-size: var(--fs-sm); color: rgb(255 255 255 / 0.6); font-variant-numeric: tabular-nums; }
.hero__counter b { color: #fff; font-size: 1.25rem; }
.hero__arrow {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  color: #fff; border: 1px solid rgb(255 255 255 / 0.25); background: rgb(255 255 255 / 0.06);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.hero__arrow:hover { background: var(--accent); border-color: var(--accent); }
.hero__arrow:active { transform: scale(0.94); }

@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (min-width: 768px) {
  .hero { --hero-pad-b: 200px; --ctrl-b: 104px; }
  .hero__tab-label { display: block; }
  .hero__counter { display: block; }
  .hero__arrow { width: 54px; height: 54px; }
}

/* ==========================================================================
   07. BUSCADOR RÁPIDO
   ========================================================================== */
.finder-wrap { position: relative; z-index: 10; margin-top: -40px; }
.finder {
  display: grid; gap: 14px; padding: 20px;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  background: rgb(20 24 33 / 0.32);
  backdrop-filter: blur(20px);
  border: solid 1px rgb(20 24 33 / 0.32);
}
.finder__title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.finder__title .icon { color: var(--accent); }
.finder__btn { min-height: 48px; align-self: end; }
.finder__btn span:empty { display: none; }
@media (min-width: 560px) {
  .finder { grid-template-columns: 1fr 1fr; }
  .finder__title { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .finder-wrap { margin-top: -72px; }
  .finder { grid-template-columns: auto repeat(3, 1fr) auto; align-items: end; padding: 22px 24px; gap: 18px; }
  .finder__title { grid-column: auto; align-self: center; flex-direction: column; align-items: flex-start; gap: 4px; padding-right: 12px; border-right: 0px solid var(--line); }
}

/* ==========================================================================
   08. CONFIANZA Y CARROCERÍAS
   ========================================================================== */
.trust__grid { display: grid; gap: 14px; }
.trust__item { display: flex; gap: 16px; align-items: flex-start; padding: 0px; border-radius: none; background: transparent; border: none; transition: border-color var(--t), transform var(--t) var(--ease); }
.trust__item:hover { border-color: rgb(255 90 31 / 0.4); transform: translateY(-3px); }
.trust__item h3 { font-size: 1rem; margin-bottom: 4px; }
.trust__item p { font-size: var(--fs-sm); color: var(--muted); }
.trust__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.trust__icon .icon { width: 24px; height: 24px; }
@media (min-width: 560px) { .trust__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .trust__grid { grid-template-columns: repeat(4, 1fr); } }

.types__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-card {
  position: relative; overflow: hidden; display: grid; gap: 6px; padding: 22px 20px;
  border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
  transition: transform var(--t) var(--ease), border-color var(--t), box-shadow var(--t);
}
.type-card::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgb(255 90 31 / 0.25), transparent 70%); opacity: 0; transition: opacity var(--t); }
.type-card:hover { transform: translateY(-4px); border-color: rgb(255 90 31 / 0.5); box-shadow: var(--shadow); }
.type-card:hover::after { opacity: 1; }
.type-card__icon { width: 84px; height: 42px; fill: none; stroke: var(--heading); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; transition: transform var(--t) var(--ease), stroke var(--t); }
.type-card:hover .type-card__icon { transform: translateX(8px); stroke: var(--accent); }
.type-card__name { font-family: var(--font-head); font-weight: 700; color: var(--heading); font-size: 1.1rem; }
.type-card__count { font-size: var(--fs-sm); color: var(--muted); }
@media (min-width: 1024px) { .types__grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } .type-card { padding: 28px; } }

/* ==========================================================================
   09. CATÁLOGO, FILTROS Y TARJETAS
   ========================================================================== */
.catalog { border-radius: 32px 32px 0 0; }
.catalog__layout { display: grid; gap: 28px; align-items: start; }

/* Filtros: panel deslizable en móvil */
.filters {
  position: fixed; inset: 0 auto 0 0; z-index: 70;
  width: min(92vw, 380px); height: 100dvh; overflow-y: auto;
  background: rgb(255 255 255 / 70%);
  backdrop-filter: blur(20px);
  transform: translateX(-100%); visibility: hidden;
  transition: transform 0.45s var(--ease), visibility 0s linear 0.45s;
}
.filters.is-open { transform: none; visibility: visible; transition: transform 0.45s var(--ease); padding:20px }
.filters__form { display: grid; gap: 4px; padding: 0px; }
.filters__head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.filters__head .h4 { margin-right: auto; }
.filter-group { border: 0; padding: 18px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; min-width: 0; }
.filter-group legend { padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.filter-group legend + * { clear: both; }
.range { display: grid; gap: 6px; }
.range output { font-weight: 700; color: var(--heading); font-size: var(--fs-sm); }
.filters__apply { position: sticky; bottom: 0; margin-top: 12px; }

@media (min-width: 1024px) {
  .catalog__layout { grid-template-columns: 280px 1fr; gap: 36px; }
  .filters {
    position: sticky; top: calc(var(--header-h) + 20px); z-index: 1;
    width: auto; height: auto;
    transform: none; visibility: visible; transition: none;
    border-radius: none; background: transparent; border: 0px solid var(--line); box-shadow: none;
  }
  .filters__close, .filters__apply, .toolbar__filters { display: none !important; }
}

/* Barra de herramientas */
.toolbar { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.toolbar__search { grid-column: 1 / -1; position: relative; }
.toolbar__search .icon { position: absolute; left: 16px; width: 20px; height: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.toolbar__search input {
  width: 100%; min-height: 52px; padding: 0 16px 0 46px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--heading);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.toolbar__search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.toolbar__sort { min-height: 48px; border-radius: none; background-color: transparent; padding-left: 18px !important; border-bottom: solid 2px #FFC107 !important; }
.toolbar__filters { min-height: 48px; }
.toolbar__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 18px 0 22px; }
.results-count { color: var(--muted); font-size: var(--fs-sm); }
.results-count b { color: var(--heading); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.active-filters button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px 0 12px;
  border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-size: var(--fs-xs); font-weight: 600;
}
.active-filters button:hover { background: var(--accent); color: var(--accent-ink); }
.active-filters .icon { width: 13px; height: 13px; stroke-width: 2.4; }
@media (min-width: 768px) {
  .toolbar { grid-template-columns: 1fr auto auto; }
  .toolbar__search { grid-column: auto; }
}

/* Grid de autos */
.cars-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .cars-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .cars-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1800px) { .cars-grid { grid-template-columns: repeat(4, 1fr); } }

/* Tarjeta de vehículo */
.car-card {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t);
  animation: card-in 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.car-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgb(255 90 31 / 0.35); }
.car-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.car-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.car-card:hover .car-card__media img { transform: scale(1.07); }
.car-card__media::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(0deg, rgb(0 0 0 / 0.55), transparent); pointer-events: none; }
.car-card__badges { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: rgb(10 12 16 / 0.7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.badge--nuevo { background: var(--info); }
.badge--usado { background: rgb(10 12 16 / 0.72); }
.badge--oferta { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.badge--hibrido { background: var(--success); }
.car-card__photos { position: absolute; left: 14px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: #fff; }
.car-card__photos .icon { width: 16px; height: 16px; }
.car-card__city { position: absolute; right: 14px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: rgb(255 255 255 / 0.9); }
.car-card__city .icon { width: 14px; height: 14px; }

.car-card__body { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; flex: 1; }
.car-card__brand { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.car-card__title { font-size: 1.15rem; font-weight: 700; margin-top: 2px; }
.car-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* toda la tarjeta clicable */
.car-card__version { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.specs li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: var(--fs-xs); font-weight: 600; color: var(--heading); min-width: 0; }
.specs li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.specs .icon { width: 16px; height: 16px; color: var(--muted); }
.car-card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.price { display: grid; line-height: 1.2; }
.price__old { font-size: var(--fs-xs); color: var(--muted); text-decoration: line-through; }
.price__now { font-family: var(--font-head); font-size: 1.35rem; font-weight: 800; color: var(--heading); letter-spacing: -0.02em; }
.price__fee { font-size: var(--fs-xs); color: var(--muted); }
.price__fee b { color: var(--success); }
.car-card__actions { position: relative; z-index: 2; display: flex; gap: 8px; }
.car-card__wa { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--heading); transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.car-card__wa:hover { background: var(--success); color: #fff; transform: translateY(-2px); }
.car-card__cta { min-height: 42px; padding: 0 16px; }
/* Tarjetas angostas (p. ej. 3 columnas en 1280-1440px): precio arriba, botones abajo */
.car-card { container: card / inline-size; }
@container card (max-width: 350px) {
  .car-card__foot { flex-direction: column; align-items: stretch; }
  .car-card__cta { flex: 1; }
}

/* Estado vacío y "cargar más" */
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 56px 24px; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); }
.empty .icon { color: var(--muted); }
.empty p { max-width: 42ch; color: var(--muted); }
.empty__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.catalog__more { display: flex; justify-content: center; margin-top: 36px; }
.catalog__more[hidden] { display: none; }

/* Skeleton mientras carga el inventario */
.skeleton { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.skeleton > div { background: linear-gradient(90deg, var(--surface-2) 0%, var(--bg) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton__img { aspect-ratio: 16 / 10; }
.skeleton__line { height: 14px; margin: 18px 20px 0; border-radius: 7px; }
.skeleton__line:last-child { width: 50%; margin-bottom: 24px; }

/* ==========================================================================
   10. FINANCIACIÓN Y SIMULADOR
   ========================================================================== */
.finance { background: radial-gradient(80% 60% at 100% 0%, rgb(255 90 31 / 0.16), transparent 60%), var(--bg); }
.finance__grid { display: grid; gap: 40px; align-items: center; }
.calc { display: grid; gap: 22px; padding: clamp(22px, 3vw, 36px); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.calc__row { display: grid; gap: 10px; }
.calc__row > label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; font-size: var(--fs-sm); color: var(--heading); }
.finance__copy .lead { margin-top: 18px; }
.calc__row output { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--heading); }
.segmented--wrap span { min-height: 40px; }
.calc__result { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; padding: 20px; border-radius: var(--radius); background: rgb(255 255 255 / 0.04); border: 1px solid var(--line); }
.calc__result span { display: block; font-size: var(--fs-xs); color: var(--muted); margin-bottom: 4px; }
.calc__result strong { font-family: var(--font-head); font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); color: var(--heading); letter-spacing: -0.03em; line-height: 1.1; }
.calc__result b { font-family: var(--font-head); font-size: 1.05rem; color: var(--heading); }
@media (min-width: 1024px) { .finance__grid { grid-template-columns: 1fr 1fr; gap: 72px; } }

/* ==========================================================================
   11. CONSIGNACIÓN
   ========================================================================== */
.consign { background: var(--bg); padding-top:0; }
.consign__grid { display: grid; gap: 36px; align-items: start; }
.steps { display: grid; gap: 14px; counter-reset: step; }
.step { position: relative; display: flex; gap: 18px; padding: 0; transition: border-color var(--t), transform var(--t) var(--ease); }
.step:hover { border-color: rgb(255 90 31 / 0.4); transform: translateX(4px); }
.step__num { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-family: var(--font-head); font-weight: 800; color: var(--accent); background: var(--accent-soft); }
.step p { margin-top: 6px; color: var(--muted); font-size: var(--fs-sm); }
@media (min-width: 1024px) {
  .consign__grid { grid-template-columns: 1fr 1fr; gap: 56px; }
  .consign__form { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ==========================================================================
   12. NOSOTROS Y CIFRAS
   ========================================================================== */
.about__grid { display: grid; gap: 48px; align-items: center; }
.about__media { position: relative; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; max-height: 640px; object-fit: cover; border-radius: 28px; }
.about__badge { position: absolute; left: 16px; bottom: 16px; display: grid; gap: 2px; padding: 16px 20px; border-radius: var(--radius); }
.about__badge strong { font-family: var(--font-head); font-size: 2rem; color: #fff; line-height: 1; }
.about__badge small { color: var(--muted); }
.about__copy .lead { margin-top: 18px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 32px 0; }
.stat { display: flex; flex-direction: column-reverse; gap: 4px; padding: 20px; border-radius: none; border-bottom: 2px solid var(--accent-2); }
.stat dt { font-size: var(--fs-sm); color: var(--muted); }
.stat dd { font-family: var(--font-head); font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.6rem); font-weight: 800; color: var(--heading); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) {
  .about__grid { grid-template-columns: 5fr 6fr; gap: 80px; }
  .about__badge { left: -24px; bottom: 40px; }
}

/* ==========================================================================
   13. TESTIMONIOS, BLOG Y FAQ
   ========================================================================== */
.testimonials { padding-bottom: calc(var(--section-y) / 2); }
.scroller-nav { display: none; gap: 8px; }
.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 380px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 2px;
  padding: 4px 2px 40px; scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.quote { scroll-snap-align: start; display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: var(--radius-lg); background: transparent; border: 0px solid var(--line); box-shadow: var(--shadow); }
.quote blockquote { flex: 1; color: var(--heading); font-size: 1.02rem; line-height: 1.65; }
.quote__author { display: flex; align-items: center; gap: 12px; }
.quote__author small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.quote__author b { color: var(--heading); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 700; font-size: var(--fs-sm); color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
@media (min-width: 768px) { .scroller-nav { display: flex; } }

.blog { padding-top: calc(var(--section-y) / 2); }
.blog__grid { display: grid; gap: 22px; }
.post { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform var(--t) var(--ease), box-shadow var(--t); }
.post:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.post__media { aspect-ratio: 16 / 10; overflow: hidden; }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.post:hover .post__media img { transform: scale(1.06); }
.post__body { display: grid; gap: 10px; padding: 22px; }
.post__body h3 a:hover { color: var(--accent); }
.post__body > p:last-child { color: var(--muted); font-size: var(--fs-sm); }
.post__meta { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tag { display: inline-flex; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
@media (min-width: 768px) { .blog__grid { grid-template-columns: repeat(3, 1fr); } }

.faq__grid { display: grid; gap: 36px; }
.faq .lead { margin: 16px 0 24px; }
.accordion { display: grid; gap: 12px; }
.acc { border-radius: none; background: transparent; border: 0px solid var(--line); transition: border-color var(--t); }
.acc[open] { border-color: rgb(255 90 31 / 0.4); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; cursor: pointer; list-style: none; font-weight: 600; color: var(--heading); }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .icon { transition: transform var(--t) var(--ease); color: var(--accent); }
.acc[open] summary .icon { transform: rotate(180deg); }
.acc p { padding: 0 22px 22px; color: var(--muted); }
@media (min-width: 1024px) { .faq__grid { grid-template-columns: 5fr 7fr; gap: 72px; } }

/* ==========================================================================
   14. CONTACTO, CTA Y FOOTER
   ========================================================================== */
.contact { background: var(--bg-2); }
.contact__grid { display: grid; gap: 40px; align-items: start; }
.contact__list { display: grid; gap: 18px; margin: 28px 0; }
.contact__list li { display: flex; gap: 16px; }
.contact__list b { color: var(--heading); }
.contact__list p { color: var(--muted); font-size: var(--fs-sm); }
.contact__list a:hover { color: var(--accent); }
.map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; background: var(--surface); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.4) contrast(1.05); }
@media (min-width: 1024px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: 64px; } }

.cta-band { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; }
.cta-band__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-block: 44px; }
.cta-band h2 { color: #fff; max-width: 30ch; }
@media (min-width: 768px) { .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; } }

.footer { background: #07080b; color: var(--muted); padding-top: 64px; font-size: var(--fs-sm); }
.footer__grid { display: grid; gap: 36px; padding-bottom: 48px; }
.footer__brand img { height: 40px; width: auto; margin-bottom: 18px; }
.footer__brand p { max-width: 38ch; }
.footer__social { display: flex; gap: 8px; margin-top: 20px; }
.footer__social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--heading); transition: all var(--t-fast); }
.footer__social a:hover { background: var(--accent); border-color: var(--accent); }
.footer__title { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--heading); margin-bottom: 16px; }
.footer__col ul { display: grid; gap: 10px; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; border-top: 1px solid var(--line); font-size: var(--fs-xs); }
.footer__bottom ul { display: flex; gap: 20px; }
.footer__bottom a:hover { color: var(--heading); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }

/* ==========================================================================
   15. MODAL, BOTONES FLOTANTES Y TOAST
   ========================================================================== */
.modal {
  width: min(100% - 24px, 520px); max-height: calc(100dvh - 24px); padding: 0; margin: auto;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.modal[open] { animation: modal-in 0.45s var(--ease); }
.modal::backdrop { background: rgb(5 7 10 / 0.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal .form { position: relative; }
.modal__close { position: absolute; top: 14px; right: 14px; }
.modal__vehicle { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--surface-2); font-size: var(--fs-sm); color: var(--heading); font-weight: 600; }
.modal__vehicle img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; }

.fab { position: fixed; right: 16px; z-index: 40; display: grid; place-items: center; border-radius: 50%; box-shadow: var(--shadow-lg); transition: transform var(--t) var(--ease), opacity var(--t); }
.fab--wa { bottom: 16px; width: 58px; height: 58px; background: #25d366; color: #fff; }
.fab--wa .icon { width: 30px; height: 30px; }
.fab--wa::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #25d366; z-index: -1; animation: pulse 2.4s var(--ease) infinite; }
.fab--wa:hover { transform: scale(1.08); }
/* WhatsApp aparece tras salir del hero para no tapar sus controles */
.fab--wa { opacity: 0; pointer-events: none; transform: translateY(10px); }
.fab--wa.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.fab--wa.is-visible:hover { transform: scale(1.08); }
.fab--top { bottom: 86px; width: 46px; height: 46px; background: var(--surface-2); color: var(--heading); border: 1px solid var(--line-strong); opacity: 0; pointer-events: none; transform: translateY(10px); }
.fab--top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.fab--top:hover { background: var(--accent); color: #fff; }
@media (min-width: 768px) { .fab { right: 28px; } .fab--wa { bottom: 28px; } .fab--top { bottom: 100px; } }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100% - 32px);
  padding: 14px 20px; border-radius: var(--radius-pill);
  background: var(--heading); color: var(--bg); font-weight: 600; font-size: var(--fs-sm); box-shadow: var(--shadow-lg);
  transform: translate(-50%, 150%); opacity: 0; transition: transform 0.45s var(--ease), opacity 0.3s;
  pointer-events: none;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ==========================================================================
   16. FICHA DE VEHÍCULO (vehiculo.html)
   ========================================================================== */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--fs-sm); color: var(--muted); padding-block: 24px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--heading); }
.vdp { display: grid; gap: 32px; padding-bottom: var(--section-y); }
.gallery { display: grid; gap: 12px; }
.gallery__main { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-2); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; animation: fade-in 0.5s var(--ease); }
.gallery__main .car-card__badges { top: 18px; left: 18px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gallery__thumbs button { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-sm); border: 2px solid transparent; opacity: 0.6; transition: all var(--t-fast); }
.gallery__thumbs button[aria-current="true"], .gallery__thumbs button:hover { opacity: 1; border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.vdp__panel { display: grid; gap: 20px; padding: clamp(22px, 3vw, 32px); align-self: start; }
.vdp__panel .price__now { font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.4rem); }
.vdp__actions { display: grid; gap: 10px; }
.vdp__section { margin-top: 32px; }
.vdp__section h2 { font-size: var(--fs-h3); margin-bottom: 16px; }
.spec-table { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: var(--radius); overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.spec-table div { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); }
.spec-table dt { font-size: var(--fs-xs); color: var(--muted); }
.spec-table dd { font-weight: 600; color: var(--heading); }
.equip { display: grid; gap: 10px; }
@media (min-width: 560px) { .vdp .trust__grid { grid-template-columns: 1fr 1fr !important; } }
.equip li { display: flex; gap: 10px; align-items: center; }
.equip .icon { color: var(--success); }
@media (min-width: 640px) { .spec-table { grid-template-columns: repeat(3, 1fr); } .equip { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) {
  .vdp { grid-template-columns: 1.6fr 1fr; gap: 48px; }
  .vdp__panel { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ==========================================================================
   18. PÁGINAS INTERNAS (blog, artículo, contacto, nosotros, legales)
   ========================================================================== */
/* Encabezado de página interna */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(36px, 4vw, 64px) clamp(48px, 5vw, 88px);
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; z-index: -1;
  width: min(720px, 90vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
}
.page-hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 3px; z-index: -1;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 40%, transparent);
}
.page-hero .breadcrumb { padding-block: 0 24px; }
.page-hero__title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; max-width: 22ch; }
.page-hero__lead { margin-top: 16px; max-width: 60ch; font-size: var(--fs-lg); color: var(--text); }
.page-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 22px; font-size: var(--fs-sm); color: var(--muted); }
.page-hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.page-hero__meta .icon { width: 16px; height: 16px; color: var(--accent); }
.page-hero--image { min-height: clamp(360px, 52vh, 560px); display: flex; align-items: flex-end; color: #fff; }
.page-hero--image .page-hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero--image::before {
  inset: 0; width: auto; aspect-ratio: auto; border-radius: 0;
  background: linear-gradient(180deg, rgb(10 12 16 / 0.35) 0%, rgb(10 12 16 / 0.92) 85%);
}
.page-hero--image .page-hero__title { max-width: 26ch; }
.page-hero--image .breadcrumb, .page-hero--image .page-hero__meta { color: rgb(255 255 255 / 0.75); }
.page-section { padding-block: clamp(44px, 5vw, 88px); }

/* --- Blog (listado) --- */
.blog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.blog-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-filter button {
  min-height: 38px; padding: 0 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); font-size: var(--fs-sm); font-weight: 600; color: var(--heading);
  transition: all var(--t-fast);
}
.blog-filter button:hover { border-color: var(--accent); }
.blog-filter button[aria-pressed="true"] { background: var(--heading); border-color: var(--heading); color: var(--bg-2); }
.blog-search { position: relative; width: min(100%, 300px); }
.blog-search input { width: 100%; min-height: 42px; padding: 4px 0 4px 30px; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); color: var(--heading); }
.blog-search input:focus { outline: none; border-color: var(--accent); }
.blog-search .icon { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.post--featured { margin-bottom: 28px; }
.post__author { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); }
.post__author .avatar { width: 32px; height: 32px; font-size: 11px; }
@media (min-width: 900px) {
  .post--featured { display: grid; grid-template-columns: 1.25fr 1fr; }
  .post--featured .post__media { aspect-ratio: auto; min-height: 380px; }
  .post--featured .post__body { align-content: center; padding: clamp(28px, 3vw, 48px); gap: 14px; }
  .post--featured h2 { font-size: var(--fs-h3); }
}
.blog-empty { padding: 48px 0; text-align: center; color: var(--muted); }
.newsletter { display: grid; gap: 20px; margin-top: clamp(48px, 5vw, 80px); padding: clamp(24px, 4vw, 48px); border-radius: var(--radius-lg); background: #0a0c10; color: #c9d0dc; }
.newsletter h2 { color: #fff; }
.newsletter p { color: #8b95a7; }
.newsletter form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.newsletter .field { flex: 1 1 220px; }
.newsletter .field input { color: #fff; border-bottom-color: rgb(255 255 255 / 0.2); }
.newsletter .field label { color: #8b95a7; }
.newsletter .form__status { flex-basis: 100%; }
@media (min-width: 900px) { .newsletter { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; } }

/* --- Artículo --- */
.article { display: grid; gap: 40px; }
.prose { max-width: 72ch; color: var(--text); font-size: 1.06rem; line-height: 1.8; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: var(--fs-h3); }
.prose h3 { margin-top: 1.6em; font-size: var(--fs-h4); }
.prose a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--heading); }
.prose ul, .prose ol { display: grid; gap: 10px; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose blockquote { padding: 18px 24px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--font-head); font-size: 1.15rem; color: var(--heading); }
.prose figure img { width: 100%; border-radius: var(--radius-lg); }
.prose figcaption { margin-top: 10px; font-size: var(--fs-sm); color: var(--muted); }
.prose .lead { font-size: 1.2rem; color: var(--heading); }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.article__aside { display: grid; gap: 20px; align-content: start; }
.aside-card { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.aside-card h2 { font-size: var(--fs-h4); margin-bottom: 14px; }
.aside-card--accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; color: #fff; }
.aside-card--accent h2 { color: #fff; }
.aside-card--accent p { margin-bottom: 18px; color: rgb(255 255 255 / 0.9); }
.share { display: flex; gap: 8px; }
.share a, .share button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--heading); transition: all var(--t-fast); }
.share a:hover, .share button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.mini-posts { display: grid; gap: 14px; }
.mini-posts a { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; font-size: var(--fs-sm); font-weight: 600; color: var(--heading); line-height: 1.35; }
.mini-posts a:hover { color: var(--accent); }
.mini-posts img { width: 72px; height: 54px; object-fit: cover; border-radius: 10px; }
@media (min-width: 1024px) {
  .article { grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; }
  .article__aside { position: sticky; top: calc(var(--header-h) + 24px); align-self: start;}
}

/* --- Contacto --- */
.channels { display: grid; gap: 16px; margin-bottom: clamp(40px, 4vw, 64px); }
.channel { display: flex; gap: 16px; align-items: flex-start; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color var(--t), transform var(--t) var(--ease); }
.channel:hover { border-color: var(--accent); transform: translateY(-3px); }
.channel h2 { font-size: var(--fs-h4); }
.channel p { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; }
.channel b { display: inline-block; margin-top: 10px; color: var(--accent-2); font-size: var(--fs-sm); }
@media (min-width: 768px) { .channels { grid-template-columns: repeat(3, 1fr); } }

/* --- Nosotros --- */
.values { display: grid; gap: 18px; }
.value { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.value .trust__icon { margin-bottom: 18px; }
.value h3 { font-size: var(--fs-h4); margin-bottom: 8px; }
.value p { color: var(--muted); font-size: var(--fs-sm); }
@media (min-width: 640px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .values { grid-template-columns: repeat(4, 1fr); } }
.mv { display: grid; gap: 18px; }
.mv article { padding: clamp(24px, 3vw, 40px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.mv h2 { font-size: var(--fs-h3); margin-bottom: 12px; }
@media (min-width: 768px) { .mv { grid-template-columns: 1fr 1fr; } }

/* --- Legales (política de privacidad y términos) --- */
.legal { display: grid; gap: 32px; align-items: start; }
.legal__toc { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.legal__toc-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 18px 20px; font-family: var(--font-head); font-weight: 700; color: var(--heading); }
.legal__toc-toggle .icon { transition: transform var(--t) var(--ease); color: var(--accent); }
.legal__toc.is-open .legal__toc-toggle .icon { transform: rotate(180deg); }
.legal__toc ol { display: none; gap: 2px; padding: 0 12px 16px; counter-reset: toc; }
.legal__toc.is-open ol { display: grid; }
.legal__toc a {
  display: flex; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); line-height: 1.35; color: var(--text);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.legal__toc a::before { counter-increment: toc; content: counter(toc) "."; flex: none; min-width: 1.4em; color: var(--muted); font-variant-numeric: tabular-nums; }
.legal__toc a:hover { color: var(--heading); background: var(--surface-2); }
.legal__toc a.is-active { color: var(--accent-2); background: var(--accent-soft); font-weight: 600; }
.legal__toc a.is-active::before { color: var(--accent-2); }
.legal__body { min-width: 0; max-width: 820px; }
.legal__intro { padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.legal__section { padding-block: 32px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.legal__section:last-child { border-bottom: 0; }
.legal__section h2 { display: flex; gap: 10px; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); margin-bottom: 16px; }
.legal__num { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.legal__section p + p, .legal__section p + ul, .legal__section ul + p { margin-top: 14px; }
.legal__section strong { color: var(--heading); }
.legal__section a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.legal__list { display: grid; gap: 10px; margin-top: 12px; }
.legal__list li { position: relative; padding-left: 20px; }
.legal__list li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--heading); }
.legal__checks { display: grid; gap: 10px; margin-top: 12px; }
.legal__checks li { display: flex; gap: 10px; align-items: flex-start; }
.legal__checks .icon { flex: none; width: 20px; height: 20px; padding: 3px; margin-top: 2px; border-radius: 50%; background: var(--success); color: #fff; stroke-width: 3; }
.legal__note { display: flex; gap: 14px; margin-top: 20px; padding: 18px 20px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid rgb(236 174 57 / 0.35); }
.legal__note .icon { flex: none; color: var(--accent-2); margin-top: 3px; }
.legal__contact { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 8px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface-2); }
.legal__contact > .trust__icon { flex: none; }
.legal__contact > div { flex: 1 1 260px; display: grid; gap: 14px; justify-items: start; }
.legal__contact .btn { text-decoration: none; color: var(--btn-fg); }
.legal__contact ul { display: grid; gap: 6px; font-size: var(--fs-sm); }
@media (min-width: 1024px) {
  .legal { grid-template-columns: 280px minmax(0, 1fr); gap: 56px; }
  .legal__toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
  .legal__toc-toggle { pointer-events: none; padding-bottom: 10px; }
  .legal__toc-toggle .icon { display: none; }
  .legal__toc ol { display: grid; }
}

/* ==========================================================================
   17. ANIMACIONES Y MOVIMIENTO REDUCIDO
   ========================================================================== */
/* Aparición al hacer scroll: JS agrega .is-in con IntersectionObserver */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .slide__bg { transform: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
