/* ==========================================================================
   Sitio público · móvil primero · Tema oscuro premium
   ========================================================================== */
/* Tipografía alojada en el propio sitio (más rápido y sin depender de Google) */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations'), url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url('../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations'), url('../fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;

  /* Superficies */
  --bg: #0A0A0C;
  --surface: #131316;
  --surface-2: #1A1A1E;
  --soft: #1E1E23;
  --glass: rgba(14,14,17,.78);

  /* Texto */
  --ink: #F3F0EA;
  --ink-2: #C8C3BA;
  --muted: #8D8A84;

  /* Líneas */
  --line: #232328;
  --line-2: #34343B;

  /* Acento champán */
  --gold: #C9A96E;
  --gold-2: #E6CC94;
  --gold-3: #A88647;
  --gold-bg: rgba(201,169,110,.12);
  --gold-line: rgba(201,169,110,.35);
  --on-gold: #0B0B0D;
  --grad-gold: linear-gradient(135deg, #E9D3A0 0%, #C9A96E 45%, #A88647 100%);

  /* Condición: Nuevo = Esmeralda · Importado = Dorado · Usado = Bronce */
  --nuevo: #3E9C7A;     --nuevo-fg: #8ED4B8;     --nuevo-bg: rgba(62,156,122,.17);  --nuevo-tint: #0F1A16;
  --importado: #D4B26A; --importado-fg: #F0D8A2; --importado-bg: rgba(212,178,106,.17); --importado-tint: #1E1A12;
  --usado: #B0764A;     --usado-fg: #DCA67C;     --usado-bg: rgba(176,118,74,.17);  --usado-tint: #1E1510;

  --ok: #3DBE8B; --ok-fg: #7ADDB4; --ok-bg: rgba(61,190,139,.14); --ok-line: rgba(61,190,139,.3);
  --red: #E5484D; --red-bg: rgba(229,72,77,.14); --red-fg: #FF8F92;
  --violet: #8C70E3;
  --wa: #1E9E5E;

  --r-pill: 999px; --r-sm: 12px; --r-md: 14px; --r-lg: 22px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px rgba(0,0,0,.45);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; color: var(--ink);
  background:
    radial-gradient(1200px 520px at 50% -180px, rgba(201,169,110,.10), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
::selection { background: var(--gold); color: var(--on-gold); }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
option { background: var(--surface); color: var(--ink); }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.15; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.ic { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--gold); color: var(--on-gold); padding: 10px 14px; border-radius: 12px; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.center { display: flex; justify-content: center; margin: 22px 0 8px; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h-small { font-size: 11px; font-weight: 700; margin-bottom: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.h-section { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.h-mid { font-size: 24px; font-weight: 700; }

/* Condición: cada clase define su color */
.c-nuevo { --c: var(--nuevo); --c-fg: var(--nuevo-fg); --c-bg: var(--nuevo-bg); --c-tint: var(--nuevo-tint); }
.c-importado { --c: var(--importado); --c-fg: var(--importado-fg); --c-bg: var(--importado-bg); --c-tint: var(--importado-tint); }
.c-usado { --c: var(--usado); --c-fg: var(--usado-fg); --c-bg: var(--usado-bg); --c-tint: var(--usado-tint); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: var(--c, var(--gold)); flex: none; box-shadow: 0 0 10px var(--c, var(--gold)); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-md); border: 1px solid transparent;
  font-weight: 700; font-size: 14px; letter-spacing: .04em;
  transition: transform .15s ease, background .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--grad-gold); color: var(--on-gold); box-shadow: 0 8px 24px rgba(201,169,110,.22), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-dark:hover { box-shadow: 0 10px 30px rgba(201,169,110,.35), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #22B36A; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold-line); }
.btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--gold-line); }
.btn-outline[aria-pressed="true"] { background: var(--gold-bg); color: var(--gold-2); border-color: var(--gold-line); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 13px; border-radius: var(--r-sm); }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--r-pill); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink); flex: none; transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--gold-line); color: var(--gold-2); }
.icon-btn-dark { background: var(--grad-gold); color: var(--on-gold); border-color: transparent; }
.icon-btn-dark:hover { color: var(--on-gold); }
.icon-btn-soft { background: var(--soft); }
.icon-btn-sm { width: 32px; height: 32px; }
.icon-btn.floating { background: var(--glass); border-color: rgba(255,255,255,.08); box-shadow: 0 4px 14px rgba(0,0,0,.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.fav-btn[aria-pressed="true"] { color: var(--red); }
.fav-btn[aria-pressed="true"] .ic { fill: var(--red); }
.fav-btn.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.18); } }
.link-strong { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; min-height: 44px; color: var(--gold-2); letter-spacing: .02em; }
.link-strong:hover { color: var(--gold); }
.link-under { text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 4px; font-weight: 600; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Encabezado ---------- */
.site-header { padding: 14px 0 4px; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--grad-gold); color: var(--on-gold); display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 6px 18px rgba(201,169,110,.25); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 15px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 10px; color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.wa-btn { color: #3DD68C; }
.top-links { display: none; }
.count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; align-items: center; justify-content: center; }
.count-blue { background: var(--gold); color: var(--on-gold); }

.flashes { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 14px 16px; border-radius: var(--r-md); font-weight: 600; font-size: 14px; background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-line); }
.flash-error { background: var(--red-bg); color: var(--red-fg); border-color: rgba(229,72,77,.3); }

/* ---------- Hero y búsqueda ---------- */
.hero { padding-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.hero h1 {
  font-size: 32px; font-weight: 600; letter-spacing: -.035em; line-height: 1.06;
  background: linear-gradient(180deg, #FFFFFF 0%, #D9D2C4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.search-form { display: flex; flex-direction: column; gap: 12px; }
.search-row { display: flex; gap: 10px; }
.search-box {
  flex: 1; min-width: 0; height: 56px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--r-md); padding: 0 16px; color: var(--muted);
  border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: border-color .25s, box-shadow .25s;
}
.search-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-bg), 0 10px 30px rgba(0,0,0,.35); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; }
.search-box input::placeholder { color: var(--muted); }
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.filter-btn { width: 56px; height: 56px; border-radius: var(--r-md); position: relative; }
.filter-count { position: absolute; top: -5px; right: -5px; min-width: 21px; height: 21px; border-radius: 99px; background: var(--gold); color: var(--on-gold); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.suggest { margin: 0 -18px; padding: 0 18px; }

.pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2);
  font-weight: 600; font-size: 13px; letter-spacing: .02em; white-space: nowrap; transition: border-color .2s, color .2s;
}
.pill:hover { border-color: var(--gold-line); color: var(--ink); }
.pill small { font-size: 11px; font-weight: 600; opacity: .65; }
.pill[aria-current="true"] { background: var(--grad-gold); color: var(--on-gold); border-color: transparent; }
.pill[aria-current="true"] .dot { background: var(--on-gold); box-shadow: none; }
.pill-dashed { border-style: dashed; border-color: var(--line-2); background: transparent; color: var(--muted); font-weight: 600; min-height: 38px; font-size: 13px; }

.understood { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.chip-static { font-size: 12px; font-weight: 600; color: var(--gold-2); background: var(--gold-bg); border: 1px solid var(--gold-line); padding: 5px 11px; border-radius: 99px; }

.recent { margin-top: 18px; }
.recent-list { margin: 0 -18px; padding: 0 18px 2px; }

/* ---------- Resultados ---------- */
.results { margin-top: 18px; transition: opacity .2s; }
.results.loading { opacity: .45; }
.cond-tabs { margin: 0 -18px; padding: 2px 18px 4px; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 14px; }
.sort select { border: 0; background: transparent; font-weight: 600; font-size: 13px; color: var(--ink-2); padding: 10px 4px; cursor: pointer; letter-spacing: .02em; }
.grid-cards { display: grid; grid-template-columns: 1fr; gap: 18px; }

/* ---------- Tarjeta ---------- */
.card {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.card:hover { border-color: var(--gold-line); transform: translateY(-3px); box-shadow: 0 24px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(201,169,110,.08); }
.card-media { position: relative; }
.card-photo { display: flex; align-items: flex-end; justify-content: center; aspect-ratio: 16 / 10; background: radial-gradient(120% 90% at 50% 100%, var(--c-tint, var(--soft)) 0%, #0E0E11 100%); overflow: hidden; position: relative; }
.card-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(10,10,12,.55)); pointer-events: none; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.card:hover .card-photo img { transform: scale(1.04); }
.car-svg { width: 80%; height: auto; margin-bottom: 7%; opacity: .85; }
.card-badges { position: absolute; top: 12px; left: 12px; right: 64px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; z-index: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.badge-cond { background: var(--c-bg); color: var(--c-fg); border: 1px solid rgba(255,255,255,.06); }
.badge-status { background: var(--ink); color: var(--bg); }
.badge-reservado { background: var(--violet); color: #fff; }
.badge-drop { background: rgba(10,10,12,.72); color: var(--ok-fg); box-shadow: inset 0 0 0 1px var(--ok-line); }
.badge-soft { background: var(--soft); color: var(--ink-2); }
.card-media .fav-btn.floating { position: absolute; top: 10px; right: 10px; z-index: 1; }
.photo-count { position: absolute; bottom: 10px; right: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; background: rgba(10,10,12,.7); color: #fff; padding: 4px 9px; border-radius: 99px; backdrop-filter: blur(6px); }
.card-body { padding: 18px 18px 12px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-title strong { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card-title span { font-size: 13px; color: var(--muted); }
.price { font-size: 18px; font-weight: 700; white-space: nowrap; letter-spacing: -.01em; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.price-sold { color: #6C6A66; text-decoration: line-through; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 12px; font-weight: 500; color: var(--ink-2); background: transparent; border: 1px solid var(--line-2); padding: 5px 10px; border-radius: 99px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 4px; }
.cmp-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; border: 0; background: none; padding: 0; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.cmp-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .15s; }
.cmp-toggle[aria-pressed="true"] .cmp-box { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* Banda VENDIDO sobre la foto */
.is-sold .card-photo img, .is-sold .card-photo .car-svg, .is-sold .gallery img, .is-sold .gallery .car-svg,
.is-sold .row-photo img, .is-sold .row-photo .car-svg, .is-sold .mini-photo img, .is-sold .mini-photo .car-svg,
.is-sold .cmp-photo img, .is-sold .cmp-photo .car-svg { filter: grayscale(1) brightness(.7); opacity: .5; }
.is-sold .card-photo, .is-sold .row-photo, .is-sold .mini-photo { background: #141416; }
.sold-band {
  position: absolute; left: -20%; right: -20%; top: 42%; transform: rotate(-9deg);
  background: var(--red); color: #fff; font-weight: 800; font-size: 20px; letter-spacing: .35em;
  padding: 10px 0; text-align: center; box-shadow: 0 10px 30px rgba(229,72,77,.35); pointer-events: none; z-index: 2;
}
.sold-band-sm { font-size: 10px; padding: 4px 0; letter-spacing: .2em; top: 38%; transform: rotate(-12deg); left: -30%; right: -30%; }
.sold-band-lg { font-size: 26px; padding: 12px 0; }

/* Tarjeta en fila (favoritos) */
.row-list { display: flex; flex-direction: column; gap: 12px; }
.row-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px; display: flex; gap: 14px; align-items: center; transition: border-color .25s; }
.row-card:hover { border-color: var(--gold-line); }
.row-photo { position: relative; width: 108px; height: 84px; flex: none; border-radius: 14px; overflow: hidden; background: var(--c-tint, var(--soft)); display: flex; align-items: flex-end; justify-content: center; }
.row-photo img { width: 100%; height: 100%; object-fit: cover; }
.row-photo .car-svg { width: 92%; margin-bottom: 6px; }
.row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cond-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-fg); }
.row-name { font-size: 15px; font-weight: 700; }
.row-price { font-size: 15px; }
.skeleton-row { height: 104px; border-radius: 20px; background: linear-gradient(90deg, #16161A, #222227, #16161A); background-size: 200% 100%; animation: shimmer 1.4s infinite; margin-bottom: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.fav-share { margin-top: 16px; }

/* Mini tarjeta (recientes / relacionados) */
.mini-card { flex: none; width: 172px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .25s; }
.mini-card:hover { border-color: var(--gold-line); }
.mini-photo { position: relative; height: 106px; background: var(--c-tint, var(--soft)); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.mini-photo .car-svg { width: 88%; margin-bottom: 8px; }
.mini-name { padding: 11px 12px 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-price { padding: 2px 12px 12px; font-size: 14px; font-weight: 700; color: var(--gold-2); }
.is-sold .mini-price { color: #6C6A66; text-decoration: line-through; }

/* ---------- Paneles y formularios ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 18px; }
.empty, .alert-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-top: 18px; }
.empty h2, .alert-box h2 { font-size: 20px; font-weight: 700; }
.empty p, .alert-box p { color: var(--muted); max-width: 420px; }
.alert-box form { width: 100%; max-width: 420px; text-align: left; }
.round-icon { width: 60px; height: 60px; border-radius: 99px; display: flex; align-items: center; justify-content: center; background: var(--gold-bg); color: var(--gold-2); border: 1px solid var(--gold-line); }
.round-blue { background: var(--importado-bg); color: var(--importado-fg); border-color: rgba(212,178,106,.3); }
.round-red { background: var(--red-bg); color: var(--red-fg); border-color: rgba(229,72,77,.3); }
.round-green { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
.notice { border-radius: var(--r-md); padding: 14px 16px; font-size: 14px; font-weight: 600; line-height: 1.45; }
.notice-red { background: var(--red-bg); color: var(--red-fg); border: 1px solid rgba(229,72,77,.3); }

.field { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.field em { font-style: normal; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.field input, .field textarea, .select {
  min-height: 52px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px 14px;
  font-size: 16px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink);
  background: var(--soft); outline: none; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus, .select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-bg); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 100px var(--soft) inset; }
.err { color: var(--red-fg); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }

.chip-group { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-group legend { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; padding: 0; }
.chip-group .two, .chip-group .three, .chip-group .scroll-x { width: 100%; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--soft); color: var(--ink-2);
  font-size: 14px; font-weight: 600; width: 100%; text-align: center; transition: all .2s;
}
.chip-block span { min-height: 50px; border-radius: var(--r-sm); }
.chip input:checked + span { background: var(--gold-bg); color: var(--gold-2); border-color: var(--gold); }
.chip input:checked + span .dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.chip-block { display: flex; }

.day-list { margin: 0 -18px; padding: 0 18px; }
.day-chip { position: relative; flex: none; }
.day-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day-chip span { width: 64px; height: 80px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: all .2s; }
.day-chip small { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.day-chip strong { font-size: 21px; font-weight: 700; }
.day-chip input:checked + span { background: var(--grad-gold); color: var(--on-gold); border-color: transparent; }
.day-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.page-head { padding-top: 20px; padding-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.035em; }
.form-page { max-width: 640px; padding-bottom: 20px; }
.sticky-submit { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; }

/* ---------- Hoja de filtros (dialog) ---------- */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 640px; max-height: 88vh; background: transparent; color: var(--ink); }
.sheet::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.sheet[open] { animation: up .3s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-inner { background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 26px 26px 0 0; display: flex; flex-direction: column; max-height: 88vh; padding-bottom: env(safe-area-inset-bottom); }
.sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 10px auto 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 4px; }
.sheet-head strong { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.sheet-body { overflow-y: auto; padding: 8px 18px 16px; display: flex; flex-direction: column; gap: 22px; }
.sheet-foot { padding: 12px 18px 18px; border-top: 1px solid var(--line); }

/* ---------- Ficha ---------- */
.page-vehicle { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.page-vehicle .site-header { display: none; }
.detail-top { position: relative; }
.gallery { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, var(--c-tint, var(--soft)) 0%, #0B0B0E 100%); }
.gallery-track { gap: 0; scroll-snap-type: x mandatory; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; max-height: 72vh; border: 0; padding: 0; background: transparent; display: flex; align-items: flex-end; justify-content: center; cursor: zoom-in; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty { cursor: default; }
.gallery-empty .car-svg { width: 86%; margin-bottom: 10%; }
.gallery-count { position: absolute; bottom: 34px; right: 14px; background: rgba(10,10,12,.7); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .04em; padding: 5px 11px; border-radius: 99px; backdrop-filter: blur(6px); }
.back-btn { position: absolute; top: 14px; left: 14px; }
.detail-actions { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; }
.detail-body { position: relative; margin-top: -22px; background: var(--bg); border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; padding-top: 24px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 24px; }
.detail-main { display: flex; flex-direction: column; gap: 10px; }
.badges-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.detail-title { font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.detail-title span { color: var(--muted); font-weight: 500; }
.detail-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.detail-price .price { font-size: 32px; font-weight: 700; letter-spacing: -.02em; background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.detail-price .price-sold { background: none; color: #6C6A66; }
.section { margin-top: 20px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.specs div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; }
.specs dt { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.specs dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.features li { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.features .ic { color: var(--gold); }
.prose { color: var(--ink-2); line-height: 1.75; }
.detail-side { display: flex; flex-direction: column; gap: 14px; }
.calc {
  background: linear-gradient(160deg, #1D1B17 0%, var(--surface) 60%);
  border: 1px solid var(--gold-line); color: var(--ink);
  border-radius: 22px; padding: 22px 18px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.calc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.calc h2 { font-size: 18px; font-weight: 700; }
.calc small, .calc-note { color: var(--muted); font-size: 12px; }
.calc fieldset { border: 0; padding: 0; margin: 0; }
.calc legend { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; padding: 0; }
.calc-opts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.calc-opts label { position: relative; }
.calc-opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.calc-opts span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line-2); font-weight: 600; font-size: 13px; transition: all .2s; }
.calc-opts input:checked + span { background: var(--grad-gold); color: var(--on-gold); border-color: transparent; }
.calc-opts input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.calc-result { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line-2); padding-top: 16px; }
.calc-result > span { color: var(--muted); font-weight: 600; font-size: 13px; }
.calc-result strong { font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.calc-result strong small { font-size: 14px; color: var(--muted); }
.visit-box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 18px; display: flex; flex-direction: column; gap: 8px; }
.related-list { margin: 0 -18px; padding: 0 18px 4px; }
.desk-only { display: none; }
.side-actions { gap: 10px; }
.side-actions .btn { flex: 1; }
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--glass); border-top: 1px solid var(--line); padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.action-row { display: flex; gap: 10px; }
.action-row .btn { flex: 1; min-height: 54px; }

.lightbox { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #050506; }
.lightbox::backdrop { background: #050506; }
.lightbox-track { height: 100%; gap: 0; scroll-snap-type: x mandatory; align-items: center; }
.lightbox-track img { flex: 0 0 100%; max-height: 100%; object-fit: contain; scroll-snap-align: center; }
.lightbox-close { position: fixed; top: 14px; right: 14px; z-index: 2; }

/* ---------- Comparador ---------- */
.cmp { display: flex; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.cmp-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; }
.cmp-head { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.cmp-photo { position: relative; height: 84px; background: var(--c-tint, var(--soft)); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.cmp-photo img { width: 100%; height: 100%; object-fit: cover; }
.cmp-photo .car-svg { width: 90%; margin-bottom: 6px; }
.cmp-remove { position: absolute; top: 4px; right: 4px; background: var(--glass); backdrop-filter: blur(6px); }
.cmp-name { padding: 10px 10px 12px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.cmp-row { display: flex; flex-direction: column; gap: 6px; }
.cmp-label { font-size: 10px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .16em; }
.cmp-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 10px; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink-2); }
.cmp-cell.is-best { background: var(--gold-bg); border-color: var(--gold-line); color: var(--gold-2); font-weight: 700; }
.cmp-cell.is-diff { border-color: var(--line-2); color: var(--ink); }
.cmp-single { margin-top: 12px; }

/* ---------- Navegación inferior ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--glass); border-top: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 6px 8px calc(10px + env(safe-area-inset-bottom));
}
.bottom-nav a { position: relative; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bottom-nav a[aria-current="page"] { color: var(--gold-2); font-weight: 700; }
.bn-pill { width: 54px; height: 30px; border-radius: 99px; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.bottom-nav a[aria-current="page"] .bn-pill { background: var(--gold-bg); }
.bn-badge { position: absolute; top: 3px; left: calc(50% + 10px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.bn-blue { background: var(--gold); color: var(--on-gold); }

.compare-bar {
  position: fixed; left: 18px; right: 18px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom)); z-index: 29;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--grad-gold); color: var(--on-gold); border-radius: var(--r-md); padding: 0 16px; min-height: 52px;
  box-shadow: 0 14px 34px rgba(201,169,110,.3), 0 4px 12px rgba(0,0,0,.4); font-size: 14px; font-weight: 600; animation: up .25s ease;
}
.compare-bar span, .compare-bar strong { display: inline-flex; align-items: center; gap: 8px; }
.compare-bar strong { font-weight: 800; }
.page-vehicle .compare-bar, .page-compare .compare-bar { display: none; }

.toast {
  position: fixed; left: 18px; right: 18px; top: 16px; z-index: 60; margin: 0 auto; max-width: 420px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--gold-line); border-radius: 14px; padding: 14px 16px; font-size: 14px; font-weight: 600;
  text-align: center; box-shadow: 0 16px 40px rgba(0,0,0,.6); animation: down .25s ease;
}
@keyframes down { from { transform: translateY(-14px); opacity: 0; } }

/* ---------- Pie ---------- */
.site-footer { margin-top: 48px; padding: 32px 0 26px; border-top: 1px solid var(--line); background: #08080A; }
.footer-grid { display: grid; gap: 22px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 14px; }
.footer-name { font-size: 16px; color: var(--ink); letter-spacing: .02em; }
.footer-line { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); font-size: 14px; }
.footer-line .ic { color: var(--gold); }
.footer-line a { text-decoration: underline; text-decoration-color: var(--gold-line); text-underline-offset: 4px; }
.footer-social a { font-weight: 600; color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; }
.footer-social a:hover { color: var(--gold-2); }
.footer-social small { color: var(--muted); }
.page-vehicle .site-footer { margin-top: 24px; }

@media (max-width: 380px) {
  .hide-xs { display: none; }
  .calc-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Tableta y escritorio ---------- */
@media (min-width: 720px) {
  .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 46px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.2fr 1.4fr 1fr; }
  .suggest, .cond-tabs, .recent-list, .related-list, .day-list { margin: 0; padding-left: 0; padding-right: 0; }
}
@media (min-width: 980px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .top-links { display: flex; gap: 4px; margin-left: auto; }
  .top-links a { display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; min-height: 44px; border-radius: 99px; font-weight: 600; font-size: 13px; letter-spacing: .04em; color: var(--ink-2); border: 1px solid transparent; transition: all .2s; }
  .top-links a:hover { color: var(--ink); border-color: var(--line-2); }
  .top-links a[aria-current="page"] { background: var(--gold-bg); color: var(--gold-2); border-color: var(--gold-line); }
  .site-header { padding: 20px 0 10px; }
  .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .hero { padding-top: 34px; }
  .hero h1 { font-size: 56px; }
  .hero h1 br { display: none; }
  .search-form { max-width: 760px; }
  .compare-bar { left: auto; right: 24px; bottom: 24px; width: 340px; }
  .sticky-submit { bottom: 16px; }
  .sheet { margin: auto; border-radius: 26px; }
  .sheet-inner { border-radius: 26px; border-bottom: 1px solid var(--line-2); }

  .page-vehicle .site-header { display: block; }
  .page-vehicle { padding-bottom: 0; }
  .detail-top { max-width: 1180px; margin: 12px auto 0; padding: 0 18px; }
  .gallery { border-radius: 26px; border: 1px solid var(--line); }
  .gallery-slide { aspect-ratio: 16 / 8; }
  .back-btn { left: 32px; }
  .detail-actions { right: 32px; }
  .gallery-count { bottom: 16px; }
  .detail-body { margin-top: 0; background: transparent; border-top: 0; flex-direction: row; align-items: flex-start; gap: 36px; }
  .detail-main { flex: 1; min-width: 0; }
  .detail-side { width: 380px; flex: none; position: sticky; top: 16px; }
  .action-bar { display: none; }
  .desk-only { display: flex; }
  .detail-title { font-size: 40px; }
  .cmp-photo { height: 150px; }
  .cmp-name { font-size: 15px; }
  .cmp-cell { font-size: 15px; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}
