/* Top Dealership's — capa premium (se carga DESPUÉS de styles.css).
   Referencia: showrooms Porsche / Ferrari: imagen protagonista, líneas finas, mucho aire,
   tipografía serif grande, un solo acento (dorado). */

:root {
  --gold-line: rgba(201, 165, 74, 0.42);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --radius: 2px;
}

/* `hidden` debe ganar siempre (varias reglas display:flex lo pisaban) */
[hidden] { display: none !important; }

html { overflow-x: clip; }
body { overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: #0a0a0a; }

/* ---------- Botones: finos, sobrios ---------- */
.btn {
  border-radius: var(--radius);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn.gold { background: var(--gold); color: #0a0a0a; border-color: var(--gold); }
.btn.gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); transform: translateY(-1px); }
.btn.ghost { border-color: rgba(243, 239, 230, 0.28); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

/* Foto ausente / rota: placeholder elegante en vez de icono roto */
img.td-noimg {
  object-fit: contain !important;
  padding: 18%;
  opacity: 0.35;
  filter: grayscale(1) !important;
  background: none;
}

/* ---------- Ficha de vehículo ---------- */
#vehicle-root h1 { font-family: var(--font-display); letter-spacing: 0.02em; font-weight: 400; }

select, input[type="search"], input[type="text"], input[type="email"], input[type="number"], textarea {
  border-radius: var(--radius);
}
.panel-card, .contract-card, .td-dialog-card { border-radius: var(--radius); }
.panel-shell .panel-bar h1 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; }

/* ---------- Resumen (dashboard) ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-bottom: 2rem; }
.kpi { background: var(--bg-elev); padding: 1.3rem 1.4rem; display: grid; gap: 0.35rem; text-decoration: none; color: inherit; transition: background 0.25s var(--ease); }
button.kpi { text-align: left; font: inherit; border: 0; cursor: pointer; }
.kpi:hover { background: #161616; }
.kpi small { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.kpi strong { font-family: var(--font-display); font-size: 2.6rem; font-weight: 400; line-height: 1; color: var(--ink); }
.kpi.is-alert strong { color: var(--gold-soft); }
.kpi span { font-size: 0.78rem; color: var(--muted); }
.overview-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.overview-cols h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; margin: 0 0 0.9rem; }
.ov-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.ov-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.88rem; }
.ov-list li span { color: var(--muted); }
.ov-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.6rem; }
@media (max-width: 900px) { .overview-cols { grid-template-columns: 1fr; } }

body.page-cuenta .panel-page { max-width: 1180px; }

@media (prefers-reduced-motion: reduce) {
  .vehicle-card .thumb img, .btn, .kpi { transition: none !important; }
}

/* ---------- Contrato (vista del cliente) ---------- */
.inner.narrow { max-width: 860px; }
.deal-steps { display: flex; gap: 0; list-style: none; margin: 1.6rem 0 2rem; padding: 0; counter-reset: s; }
.deal-steps li { flex: 1; display: flex; align-items: center; gap: 0.6rem; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); position: relative; }
.deal-steps li + li::before { content: ""; position: absolute; left: -0.5rem; right: calc(100% - 0.5rem); }
.deal-steps li:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); margin: 0 0.8rem; }
.deal-steps i { font-style: normal; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 1px solid var(--line-soft); border-radius: 50%; font-size: 0.72rem; letter-spacing: 0; flex: none; }
.deal-steps li.is-now { color: var(--gold-soft); }
.deal-steps li.is-now i { border-color: var(--gold); background: rgba(201, 165, 74, 0.12); }
.deal-steps li.is-done { color: var(--ink); }
.deal-steps li.is-done i { background: var(--gold); border-color: var(--gold); color: #0a0a0a; }
.deal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); border: 1px solid var(--line-soft); background: var(--bg-elev); margin-bottom: 1.6rem; }
.deal-photo { background: #0a0a0a; min-height: 220px; }
.deal-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.deal-body { padding: 1.6rem; display: grid; gap: 1rem; align-content: center; }
.deal-body h2 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; margin: 0; letter-spacing: 0.02em; }
.deal-sub { margin: 0; font-size: 0.78rem; color: var(--muted); }
.deal-figs { margin: 0; display: grid; gap: 0; }
.deal-figs > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line-soft); font-size: 0.9rem; }
.deal-figs dt { color: var(--muted); }
.deal-figs dd { margin: 0; font-weight: 600; }
.deal-figs .is-hl dd { color: var(--gold-soft); font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; }
.deal-doc { margin-top: 2.2rem; border-top: 1px solid var(--line-soft); }
.deal-doc > summary { cursor: pointer; padding: 1rem 0; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-soft); }
@media (max-width: 720px) { .deal { grid-template-columns: 1fr; } .deal-steps li { font-size: 0; gap: 0; } .deal-steps li.is-now { font-size: 0.66rem; gap: 0.5rem; } }

main.section h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: 0.01em; margin: 0.3rem 0; }
.top-inner > nav { display: flex; gap: 1.6rem; margin-left: auto; align-items: center; }
.top-inner > nav a { color: var(--ink); text-decoration: none; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; }
.top-inner > nav a:hover { opacity: 1; color: var(--gold-soft); }

/* Móvil: menú de staff/cliente en una sola fila deslizable */
@media (max-width: 999px) {
  #staff-nav, #client-nav { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #staff-nav::-webkit-scrollbar, #client-nav::-webkit-scrollbar { display: none; }
  #staff-nav .panel-nav-btn, #client-nav .panel-nav-btn { flex: none; white-space: nowrap; }
}

/* ---------- Listas del staff: estado como insignia, importe destacado ---------- */
.list-item { transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.list-item:hover { border-color: var(--gold-line); background: rgba(243, 239, 230, 0.02); }
.li-contract { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.6rem 1.4rem; align-items: center; }
.li-title { margin: 0; display: flex; gap: 0.2rem 0.8rem; flex-wrap: wrap; align-items: baseline; }
.li-title strong { font-size: 0.72rem; letter-spacing: 0.1em; color: var(--gold-soft); }
.li-title span { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: 0.02em; }
.li-side { display: grid; justify-items: end; gap: 0.4rem; }
.li-amount { font-family: var(--font-display); font-size: 1.35rem; line-height: 1; }
.st-badge { font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.3rem 0.65rem; border: 1px solid var(--line-soft); color: var(--muted); white-space: nowrap; }
.st-pending { color: #d9d3c4; border-color: rgba(243, 239, 230, 0.3); }
.st-pending_payment { color: var(--gold-soft); border-color: var(--gold-line); }
.st-payment_submitted { color: #0a0a0a; background: var(--gold); border-color: var(--gold); font-weight: 600; }
.st-paid { color: #8fd3a4; border-color: rgba(143, 211, 164, 0.45); }
.st-delivered { color: #0a0a0a; background: #8fd3a4; border-color: #8fd3a4; font-weight: 600; }
.st-cancelled { color: #b98a8a; border-color: rgba(185, 138, 138, 0.35); text-decoration: line-through; }
.li-contract .list-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-start; }
@media (max-width: 700px) { .li-contract { grid-template-columns: 1fr auto; } }

/* =====================================================================
   PORTADA — solo tipografía, espaciado y bloques de texto.
   No se tocan: .vehicle-card/.thumb, .racing-*, .moments-*, .about-visual, menú de autos.
   ===================================================================== */

/* Hero: cabe entera en pantalla (la cabecera va en el flujo, hay que restarla) */
.hero { min-height: calc(100vh - var(--header-h, 166px)); min-height: calc(100dvh - var(--header-h, 166px)); }

/* Hero: sin logo duplicado (ya está en la cabecera y en el banner), texto legible abajo-izquierda */
.hero .hero-logo { display: none; }
.hero .hero-veil {
  background:
    linear-gradient(90deg, rgba(7, 7, 7, 0.94) 0%, rgba(7, 7, 7, 0.72) 45%, rgba(7, 7, 7, 0.1) 82%),
    linear-gradient(0deg, rgba(7, 7, 7, 0.85) 0%, rgba(7, 7, 7, 0) 45%);
}
.hero-inner { align-content: end; padding-bottom: clamp(3rem, 7vh, 5rem); }
.hero-kicker { display: inline-flex; align-items: center; gap: 0.9rem; letter-spacing: 0.26em; }
.hero-kicker::before { content: ""; width: 2.6rem; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); line-height: 1; letter-spacing: -0.01em; max-width: 18ch; font-weight: 400; }
.hero-lead { max-width: 34rem; font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.7; color: rgba(243, 239, 230, 0.82); }
.hero-actions { gap: 0.9rem; margin-top: 2rem; }
.hero-actions .btn { padding: 1rem 1.9rem; }

/* Cifras: franja con divisores */
.stock-bar { border-block: 1px solid var(--line-soft); background: var(--bg-alt); }
.stock-bar-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; padding: 0; }
.stock-bar-inner p { margin: 0; padding: 1.5rem 1.4rem; text-align: center; border-left: 1px solid var(--line-soft); }
.stock-bar-inner p:first-child { border-left: 0; }
.stock-bar-inner strong { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; letter-spacing: 0.02em; }

/* Encabezados de sección coherentes */
.section { padding-block: clamp(4rem, 8vw, 7.5rem); }
.section-head .eyebrow, .find-copy .eyebrow, .about-copy .eyebrow {
  display: inline-flex; align-items: center; gap: 0.8rem; letter-spacing: 0.24em;
}
.section-head .eyebrow::before, .find-copy .eyebrow::before, .about-copy .eyebrow::before {
  content: ""; width: 2rem; height: 1px; background: var(--gold);
}
.section-head h2, .find-copy h2, .about-copy h2 {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 3.8rem); line-height: 1.04; letter-spacing: -0.005em;
}
.section-lead { color: var(--muted); max-width: 40rem; line-height: 1.7; }
.section-more { margin-top: 2.5rem; text-align: center; }

/* Pilares */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border: 1px solid var(--line-soft); margin-top: 2.5rem; }
.pillar { padding: clamp(1.6rem, 3vw, 2.6rem); border-left: 1px solid var(--line-soft); transition: background 0.35s var(--ease); }
.pillar:first-child { border-left: 0; }
.pillar:hover { background: rgba(201, 165, 74, 0.05); }
.pillar-num { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; color: var(--gold); opacity: 0.85; margin: 0 0 1.2rem; }
.pillar h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin: 0 0 0.6rem; }
.pillar p:last-child { color: var(--muted); line-height: 1.7; margin: 0; }
@media (max-width: 720px) { .pillar { border-left: 0; border-top: 1px solid var(--line-soft); } .pillar:first-child { border-top: 0; } }

/* "Te encontramos el coche": formulario como ficha */
.find-form { border: 1px solid var(--line-soft); background: var(--bg-elev); padding: clamp(1.4rem, 3vw, 2.4rem); }
.find-note { border-left: 2px solid var(--gold); padding-left: 1rem; color: var(--muted); }
.find-form label { font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.find-form input:not([type="checkbox"]), .find-form textarea { margin-top: 0.4rem; }
.find-actions .btn { width: 100%; padding: 1.05rem; }

/* Valoraciones */
.review-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-top: 2.5rem; }
.review { background: var(--bg-elev); padding: 1.6rem; margin: 0; border: 0; }
.review-form { max-width: 720px; margin-inline: auto; }

/* Pie */
.foot { border-top: 1px solid var(--line-soft); }
.foot-links a { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; }
.foot-links a:hover { color: var(--gold-soft); }

.pillars .pillar .pillar-num { font-size: 3.2rem; color: var(--gold); opacity: 0.85; line-height: 1; margin: 0 0 1.2rem; }

.hero h1, .section-head h2, .find-copy h2, .about-copy h2, .pillar h3 { text-wrap: balance; }

/* Valoraciones: primero lo que dicen los clientes, el formulario debajo y alineado con el título */
#valoraciones .inner { display: flex; flex-direction: column; }
#valoraciones .section-head { order: 1; }
#valoraciones .review-list { order: 2; }
#valoraciones .review-form { order: 3; max-width: none; margin: 2.5rem 0 0; border: 1px solid var(--line-soft); background: var(--bg-elev); padding: clamp(1.2rem, 3vw, 2rem); }
.ov-list li a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }

/* =====================================================================
   FONDO DE MÁRMOL: los bloques grandes dejan ver el mármol (styles.css → .grain)
   ===================================================================== */
.section.pillars, .section.alt { background-color: rgba(12, 12, 12, 0.62); }
.moments-stage, .section.find, .foot { background-color: rgba(5, 5, 5, 0.55); }
.panel-body { background-color: rgba(7, 7, 7, 0.7); }
.top { background: rgba(7, 7, 7, 0.8); }

/* =====================================================================
   MODO HALLOWEEN (html.td-halloween, se activa desde Staff → Sitio)
   ===================================================================== */
.td-halloween {
  --gold: #e08a2c;
  --gold-soft: #f5b45a;
  --gold-dim: rgba(224, 138, 44, 0.24);
  --line: rgba(224, 138, 44, 0.22);
}
/* cambio inmediato (antes de que cargue el JS): logo y banner */
.td-halloween img[src="/assets/logo.png"]:not(.td-noimg) { content: url("/assets/halloween-logo.webp"); }
.td-halloween img[src="/assets/banner.jpg"]:is([data-hero-parallax], [data-about-parallax]) { content: url("/assets/halloween-banner.webp"); }
/* el logo de Halloween es cuadrado con fondo: bordes difuminados */
.td-halloween img[src="/assets/logo.png"]:not(.td-noimg),
.td-halloween img[src^="/assets/halloween-logo"] {
  -webkit-mask-image: radial-gradient(circle, #000 55%, transparent 72%);
  mask-image: radial-gradient(circle, #000 55%, transparent 72%);
}
.td-halloween .hero .hero-veil {
  background:
    linear-gradient(90deg, rgba(10, 5, 2, 0.92) 0%, rgba(10, 5, 2, 0.55) 40%, rgba(10, 5, 2, 0) 75%),
    linear-gradient(0deg, rgba(10, 5, 2, 0.85) 0%, rgba(10, 5, 2, 0) 40%);
}
.td-halloween .hero h1 { text-shadow: 0 0 28px rgba(224, 110, 30, 0.35); }

.hw-deco { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; contain: strict; }
.hw-web { position: absolute; top: 0; width: clamp(120px, 15vw, 220px); color: rgba(243, 239, 230, 0.22); transform-origin: 0 0; }
.hw-web-l { left: 0; }
.hw-web-r { right: 0; transform: scaleX(-1); transform-origin: 100% 0; }
.hw-spider { position: absolute; top: 0; width: 34px; margin-left: -17px; will-change: transform; }
.hw-thread { position: absolute; left: 50%; bottom: 100%; width: 1px; height: 100vh; margin-bottom: -10px;
  background: linear-gradient(rgba(243, 239, 230, 0.12), rgba(243, 239, 230, 0.45)); }
.hw-spider svg { display: block; width: 100%; overflow: visible; transform-origin: 50% 0; }
.hw-spider .leg { fill: none; stroke: #4a2c12; stroke-width: 1.7; stroke-linecap: round; }
.hw-spider .sp-body { fill: #0a0a0a; stroke: rgba(224, 138, 44, 0.6); stroke-width: 0.6; }
.hw-spider .sp-mark { fill: #d2451e; }
.hw-deco .eye { fill: #ff9a2e; }
.hw-bat { position: absolute; top: 0; left: 0; fill: #0a0a0a; stroke: rgba(224, 138, 44, 0.45); stroke-width: 0.8; overflow: visible; will-change: transform; }
.hw-fog {
  position: absolute; left: 0; right: 0; bottom: 0; height: 18vh;
  background: radial-gradient(ellipse at 30% 100%, rgba(224, 110, 30, 0.12), transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(224, 110, 30, 0.08), transparent 55%);
}

/* ===================== Celular =====================
   Solo reglas dentro de @media: el escritorio no cambia. */
@media (max-width: 980px) {
  /* aspect-ratio + min-height convertían la altura mínima en un ancho mínimo (la foto salía al doble de ancho y recortada) */
  .vehicle-card .thumb, .vehicle-card.is-featured .thumb, .v-gallery-main { width: 100%; min-width: 0; }
  .v-gallery { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  /* cabecera compacta: el logo de 96 px se comía el 14 % de la pantalla */
  .brand-logo { height: 56px; }
  .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(7, 7, 7, 0.97); }
  .top-inner { position: relative; min-height: 4.25rem; }
  /* el menú se despliega encima del contenido, sin empujarlo ni mover los botones */
  .top-inner.is-open #site-nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 31;
    padding: 0.5rem clamp(1rem, 4vw, 1.5rem) 0.85rem;
    background: rgba(7, 7, 7, 0.98); border-bottom: 1px solid rgba(201, 165, 74, 0.18);
  }
  .nav-toggle { min-height: 44px; min-width: 44px; }
  .hero-scroll { display: none; }
  .foot-links { flex-wrap: wrap; gap: 0.6rem 1.25rem; }
  .foot-links a, #btn-logout-client { display: inline-block; padding: 0.75rem 0.25rem; }
  /* nada por debajo de 12 px (eran 10-11 px) */
  .btn { font-size: 0.8rem; }
  .eyebrow, .hero-kicker, .specs-line, .v-badge, .nav-toggle, .stock-count, .price-off, .racing-tag, .moments-kicker { font-size: 0.75rem; }
  /* Halloween: por debajo de la cabecera, telaraña chica y el hilo de la araña corto */
  .hw-deco { z-index: 20; }
  .hw-web { width: 90px; }
  .hw-thread { height: 30vh; }
}

/* ===== Ficha de vehículo (vx): galería + panel de compra fijo ===== */
.vx { padding: 1.5rem 0 3rem; }
.vx-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: clamp(1.5rem, 3vw, 3.5rem); align-items: start; }
.vx-gallery { min-width: 0; }
.vx-stage { position: relative; background: #050505; border: 1px solid var(--line-soft); }
.vx-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 16 / 10; outline: none; }
.vx-track::-webkit-scrollbar { display: none; }
.vx-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; cursor: zoom-in; }
.vx-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vx-gallery.is-sold .vx-slide img { filter: grayscale(0.6) brightness(0.8); }
.vx-count { position: absolute; right: 0.9rem; bottom: 0.9rem; font-size: 0.72rem; letter-spacing: 0.16em; padding: 0.35rem 0.6rem; background: rgba(0,0,0,0.7); color: var(--ink); font-variant-numeric: tabular-nums; pointer-events: none; }
.vx-arrow { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(0,0,0,0.6); border: 1px solid var(--line); color: var(--ink); cursor: pointer; opacity: 0; transition: opacity 0.2s, border-color 0.2s; }
.vx-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.vx-arrow.is-prev { left: 0.75rem; } .vx-arrow.is-next { right: 0.75rem; }
.vx-stage:hover .vx-arrow, .vx-arrow:focus-visible { opacity: 1; }
.vx-arrow:hover { border-color: var(--gold); }
.vx-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 0.5rem; margin-top: 0.6rem; }
.vx-thumbs button { padding: 0; border: 1px solid transparent; background: none; aspect-ratio: 16 / 10; cursor: pointer; opacity: 0.55; transition: opacity 0.2s, border-color 0.2s; }
.vx-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vx-thumbs button:hover { opacity: 0.85; }
.vx-thumbs button.is-on { opacity: 1; border-color: var(--gold); }
.vx-buy { position: sticky; top: calc(var(--header-h) + 1rem); display: flex; flex-direction: column; gap: 1rem; }
.vx-buy .eyebrow { margin: 0; }
.vx-buy h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 3.4vw, 3.4rem); line-height: 1.02; margin: 0; }
.vx-price { margin: 0; font-size: 1.5rem; }
.vx-figs { display: grid; grid-template-columns: 1fr 1fr; margin: 0.25rem 0; border-top: 1px solid var(--line-soft); }
.vx-figs div { padding: 0.8rem 0; border-bottom: 1px solid var(--line-soft); }
.vx-figs div:nth-child(odd) { padding-right: 1rem; }
.vx-figs dt { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.vx-figs dd { margin: 0.2rem 0 0; font-size: 1rem; color: var(--ink); }
.vx-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.vx-actions .btn { width: 100%; justify-content: center; text-align: center; }
.vx-actions .btn.gold { grid-column: 1 / -1; }
.vx-note { margin: 0; font-size: 0.88rem; color: var(--muted); }
.vx-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0; font-size: 0.85rem; }
.vx-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.vx-links a:hover { color: var(--gold-soft); }
.vx-links span { margin-left: auto; color: var(--muted); letter-spacing: 0.1em; font-size: 0.75rem; }
.vx-details { padding-top: 1rem; }
.vx-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); }
.vx-details h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; margin: 0 0 1rem; }
.vx-about h2 + p { margin-bottom: 2.25rem; }
.vx-feats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vx-chip { padding: 0.4rem 0.75rem; border: 1px solid var(--line-soft); font-size: 0.85rem; }
.vx-level { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; }
.vx-level b { display: flex; gap: 4px; }
.vx-level i { width: 22px; height: 4px; background: rgba(243,239,230,0.12); }
.vx-level i.on { background: var(--gold); }
.vx-bar { display: none; }
.vx-lightbox { max-width: none; max-height: none; width: 100vw; height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,0.94); }
.vx-lightbox[open] { display: grid; place-items: center; }
.vx-lightbox::backdrop { background: rgba(0,0,0,0.9); }
.vx-lightbox img { max-width: 94vw; max-height: 90dvh; object-fit: contain; }
.vx-lightbox .vx-arrow { opacity: 1; }
.vx-lb-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.vx-lb-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }

@media (max-width: 960px) {
  .vx { padding-top: 0; }
  .vx-grid, .vx-detail-grid { grid-template-columns: 1fr; }
  .vx-grid.inner { padding-left: 0; padding-right: 0; }
  .vx-stage { border-left: 0; border-right: 0; }
  .vx-track { aspect-ratio: 4 / 3; }
  .vx-thumbs, .vx-arrow { display: none; }
  .vx-lightbox .vx-arrow { display: grid; }
  .vx-buy { position: static; padding: 0 16px; }
  .vx-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 16px calc(0.7rem + env(safe-area-inset-bottom)); background: rgba(7,7,7,0.94); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
  .vx-bar-price { font-size: 1.05rem; min-width: 0; }
  .vx-bar-price .price-off, .vx-bar-price s { display: none; }
  .vx-bar-btn { flex: 0 0 auto; padding-left: 1rem; padding-right: 1rem; white-space: nowrap; }
  body.has-vx-bar { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
}

/* ===== Portada v2: Racing, Sobre nosotros y Valoraciones ===== */
.link-quiet { background: none; border: 0; padding: 0; font: inherit; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(154, 147, 134, 0.4); cursor: pointer; }
.link-quiet:hover { color: var(--gold-soft); text-decoration-color: currentColor; }

/* «Te encontramos el coche» como el resto de títulos */
.find-copy .section-head h2 { text-transform: none; letter-spacing: normal; max-width: 16ch; }

/* —— Racing: tarjetas iguales —— */
.rb-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; align-items: start; }
.rb-board.count-1 { grid-template-columns: minmax(0, 560px); justify-content: center; }
.rb-board.count-2 { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
.rb-card { display: flex; flex-direction: column; min-width: 0; background: rgba(14, 14, 14, 0.88); border: 1px solid var(--line-soft); }
.rb-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #080808; }
.rb-media img, .rb-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.rb-media img.rb-placeholder { object-fit: contain; padding: 22%; opacity: 0.35; }
.rb-body { padding: 1.1rem 1.2rem 1.25rem; display: grid; gap: 0.5rem; }
.rb-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rb-meta .racing-tag { color: var(--gold); padding: 0; background: none; border: 0; }
.rb-body h3 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; line-height: 1.15; }
.rb-text { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rb-card.is-open .rb-text { -webkit-line-clamp: unset; display: block; }
.rb-more { justify-self: start; padding: 0; background: none; border: 0; font: inherit; font-size: 0.8rem; color: var(--gold-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  /* en el celular se deslizan de lado en vez de apilarse (eran 3.000 px de scroll) */
  .rb-board, .rb-board.count-1, .rb-board.count-2 { display: flex; gap: 0.9rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.75rem; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .rb-board::-webkit-scrollbar { display: none; }
  .rb-card { flex: 0 0 82%; scroll-snap-align: start; }
  .rb-board.count-1 .rb-card { flex-basis: 100%; }
  .rb-media { aspect-ratio: 4 / 4.4; }
}

/* —— Sobre nosotros: texto, los tres puntos y los datos (sin repetir la foto de la portada) —— */
.about-new .about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "copy points" "facts points"; gap: 2rem clamp(2rem, 6vw, 5rem); align-items: start; }
.about-new .about-copy { grid-area: copy; padding: 0; background: none; display: block; }
.about-new .about-copy .about { font-size: 1.05rem; line-height: 1.7; color: var(--ink); max-width: 56ch; }
.about-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.about-points { grid-area: points; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.about-points li { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 1rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line-soft); }
.ap-num { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--gold); }
.about-points h3 { margin: 0 0 0.35rem; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.about-points p { margin: 0; font-size: 0.9rem; line-height: 1.55; color: var(--muted); }
.about-facts { grid-area: facts; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem 1.5rem; }
.about-facts dt { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; }
.about-facts dd { margin: 0; font-size: 0.92rem; color: var(--ink); line-height: 1.45; }
@media (max-width: 900px) {
  .about-new .about-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "points" "facts"; }
}

/* —— Valoraciones: primero lo que opinan, el formulario a un clic —— */
.rv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line-soft); }
.rv-summary { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.9rem; color: var(--muted); font-size: 0.95rem; }
.rv-summary strong { font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; line-height: 1; color: var(--ink); }
.rv-summary .review-stars { color: var(--gold); letter-spacing: 0.12em; }
#valoraciones .review-form { margin-bottom: 1.75rem; }
#valoraciones .review-form[hidden] { display: none; }
#valoraciones .row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 1.25rem; }
#valoraciones .review-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
#valoraciones .review-list:empty { display: none; }
#valoraciones .review[hidden] { display: none; }
.rv-more { margin-top: 1.25rem; }
#review-msg { margin: 0 0 1rem; }

/* ===== Modo Halloween: más decoración (calabazas, brasas, fantasma, cementerio, telarañas) ===== */
.td-halloween .hero, .td-halloween #valoraciones, .td-halloween .find-form, .td-halloween .vx-buy { position: relative; }
.hw-pumpkin { display: block; filter: drop-shadow(0 0 18px rgba(255, 120, 20, 0.45)); }
.hw-pumpkin .hw-face { animation: hw-flicker 3.2s infinite steps(1, end); }
@keyframes hw-flicker {
  0%, 100% { opacity: 1; } 8% { opacity: 0.72; } 10% { opacity: 1; } 37% { opacity: 0.85; } 39% { opacity: 1; }
  61% { opacity: 0.66; } 63% { opacity: 0.95; } 82% { opacity: 0.8; } 84% { opacity: 1; }
}
.hw-hero-pumpkins { position: absolute; right: clamp(1rem, 6vw, 6rem); bottom: clamp(5rem, 12vh, 8rem); z-index: 2; display: flex; align-items: flex-end; gap: 0.4rem; pointer-events: none; }
.hw-hero-pumpkins .is-big { width: clamp(70px, 8vw, 120px); }
.hw-hero-pumpkins .is-small { width: clamp(44px, 5vw, 72px); }
.hw-on-form { position: absolute; top: -34px; right: 18px; width: 52px; pointer-events: none; }
.hw-on-buy { position: absolute; top: -10px; right: 0; width: 44px; pointer-events: none; }
/* brasas que suben por la imagen principal */
.hw-embers { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.hw-embers span { position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 8px 2px rgba(255, 120, 20, 0.7); opacity: 0; animation: hw-ember linear infinite; }
@keyframes hw-ember {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  10% { opacity: 0.9; }
  70% { opacity: 0.5; }
  100% { transform: translate(var(--drift, 0), -80vh) scale(0.3); opacity: 0; }
}
/* fantasma flotando en Valoraciones */
.hw-ghost { position: absolute; top: 2.5rem; right: clamp(1rem, 8vw, 8rem); width: 56px; opacity: 0.55; pointer-events: none; filter: drop-shadow(0 0 16px rgba(243, 239, 230, 0.35)); animation: hw-float 6s ease-in-out infinite; }
@keyframes hw-float { 0%, 100% { transform: translate(0, 0) rotate(-3deg); } 50% { transform: translate(-14px, -16px) rotate(3deg); } }
/* cementerio sobre el pie de página */
.hw-graveyard { position: relative; height: clamp(70px, 9vw, 120px); margin-top: 2rem; pointer-events: none; overflow: hidden; }
.hw-graveyard svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hw-graveyard .hw-silhouette { fill: #050505; }
.hw-graveyard .hw-moon { fill: #f5d9a0; filter: drop-shadow(0 0 22px rgba(245, 180, 90, 0.55)); }
/* telaraña en la esquina de cada tarjeta de auto y brillo naranja al pasar */
.td-halloween .vehicle-card { position: relative; }
.td-halloween .vehicle-card::after {
  content: ""; position: absolute; top: 0; right: 0; width: 64px; height: 64px; z-index: 3; pointer-events: none; opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23f3efe6' stroke-width='.7'%3E%3Cpath d='M64 0L0 0M64 0L10 22M64 0L28 40M64 0L48 56M64 0L64 64'/%3E%3Cpath d='M52 0q2 6 9 4 4 6 3 10M38 0q4 12 15 10 6 10 11 19M22 0q6 18 23 18 8 16 19 28'/%3E%3C/svg%3E") no-repeat top right / contain;
}
.td-halloween .vehicle-card:hover { box-shadow: 0 0 0 1px rgba(224, 138, 44, 0.35), 0 18px 50px -20px rgba(255, 110, 20, 0.45); }
@media (max-width: 720px) {
  .hw-hero-pumpkins { bottom: 6.5rem; }
  .hw-ghost { width: 40px; top: 1.5rem; }
  .hw-on-form { width: 40px; top: -26px; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-pumpkin .hw-face, .hw-embers span, .hw-ghost { animation: none; }
  .hw-embers { display: none; }
}
/* orden de Valoraciones (la sección es flex en columna con órdenes heredados) */
#valoraciones .inner > .section-head { order: 1; }
#valoraciones .rv-top, #review-msg { order: 2; }
#valoraciones .review-form { order: 3; }
#valoraciones .review-list { order: 4; }
#valoraciones .rv-more { order: 5; align-self: flex-start; }
/* calabazas junto al título de «Selección del showroom» (antes en la portada, que ya trae las suyas) */
.td-halloween #seleccion .section-head { position: relative; }
.hw-hero-pumpkins { top: auto; bottom: 0; right: 0; }
.hw-hero-pumpkins .is-big { width: clamp(60px, 6vw, 92px); }
.hw-hero-pumpkins .is-small { width: clamp(40px, 4vw, 58px); }
/* cementerio: cielo con resplandor naranja para que se lea la silueta */
.hw-graveyard { background: linear-gradient(to top, rgba(224, 110, 30, 0.22), rgba(224, 110, 30, 0.04) 70%, transparent); }
.hw-graveyard .hw-silhouette { fill: #030303; }
@media (max-width: 720px) { .hw-hero-pumpkins { bottom: auto; top: 0; } .hw-hero-pumpkins .is-big { width: 54px; } .hw-hero-pumpkins .is-small { width: 36px; } }

/* ===== Menú STOCK en el celular: categorías → autos (sin la vista previa grande, que no cabe) ===== */
.nav-m-head, .nav-m-thumb, .nav-m-price { display: none; }
@media (max-width: 720px) {
  .nav-overlay { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .nav-rail { grid-column: 1; grid-row: 1; height: auto; flex-direction: row; justify-content: space-between;
    padding: calc(0.6rem + env(safe-area-inset-top)) 16px 0.6rem; border-right: 0; border-bottom: 1px solid #1a1a1a; }
  .nav-brand img { width: 56px; height: 56px; }
  .nav-close { width: 44px; height: 44px; }
  .nav-primary, .nav-secondary { grid-column: 1; grid-row: 2; max-height: none; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
    border-right: 0; padding: 1rem 16px calc(1.5rem + env(safe-area-inset-bottom)); }
  .nav-secondary { display: none; }
  .nav-preview { display: none; }
  .nav-overlay.is-level2 .nav-primary { display: none; }
  .nav-overlay.is-level2 .nav-secondary { display: block; }
  .nav-primary .nav-item { min-height: 52px; }
  /* lista de autos de la categoría */
  .nav-m-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
  .nav-back { min-height: 44px; padding: 0; background: none; border: 0; color: var(--gold-soft); font: inherit; font-size: 0.95rem; cursor: pointer; }
  .nav-m-title { margin: 0; font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); }
  .nav-m-title span { font-family: var(--font-body); font-size: 0.8rem; color: var(--muted); margin-left: 0.3rem; }
  .nav-secondary .nav-acc { display: none; }
  .nav-secondary .nav-acc-panel[hidden] { display: block; }
  .nav-secondary .nav-model { display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "img t" "img p"; column-gap: 0.9rem; align-items: center;
    padding: 0.6rem 0; border-bottom: 1px solid #1a1a1a; color: var(--ink); font-size: 0.95rem; }
  .nav-secondary .nav-model > span:not(.nav-m-price):not(.nav-m-thumb) { grid-area: t; align-self: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-m-thumb { display: block; grid-area: img; width: 76px; height: 50px; object-fit: cover; background: #121212; }
  .nav-m-price { display: block; grid-area: p; align-self: start; font-size: 0.85rem; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
}
/* Halloween en el celular: la araña que cuelga tapaba el texto de las fichas */
@media (max-width: 720px) { .hw-spider { display: none; } }
