/* Liesegang Automóviles
   Marca: rojo #F40A07, negro #000, blanco #FFF (medidos del logo).
   Tipografía web: Archivo variable. Condensada (62%) para titulares y modelos, expandida (118%) para etiquetas chicas,
   normal para texto. */

:root {
  --rojo: #F40A07;
  --rojo-hover: #FF2A27;
  --negro: #000000;
  --blanco: #FFFFFF;
  --g-900: #141414;
  --g-800: #1F1F1F;
  --g-400: #8A8A8A;
  --g-200: #D9D9D9;
  --g-100: #EBEBEB;
  --g-50:  #F3F3F3;
  --texto-2: #5C5C5C;

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); }
body {
  margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.5;
  color: var(--negro); background: var(--negro);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
ul[role="list"], ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--rojo); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--blanco); color: var(--negro); text-decoration: none; }
.skip:focus { top: 12px; }

.h-display {
  font-stretch: 62%; font-weight: 850; text-transform: uppercase;
  font-size: clamp(3rem, 8vw, 7.5rem); line-height: .86; letter-spacing: -.005em;
}
.h-display--sm { font-size: clamp(2.6rem, 5vw, 4.25rem); }

/* Botones */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  font-size: 1rem; font-weight: 650; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 140ms ease-out, background-color 180ms ease, color 180ms ease, box-shadow 220ms ease;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn--red { background: var(--rojo); color: var(--blanco); box-shadow: 0 10px 30px -10px rgba(244, 10, 7, .7); }
.btn--red:hover { background: var(--rojo-hover); box-shadow: 0 14px 36px -10px rgba(244, 10, 7, .85); }
.btn--glass { background: rgba(255, 255, 255, .1); color: var(--blanco); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.btn--glass:hover { background: rgba(255, 255, 255, .18); }
.btn--dark { background: var(--negro); color: var(--blanco); }
.btn--dark:hover { background: var(--g-800); }
.btn--block { width: 100%; }

/* Nav: vidrio oscuro */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background-color 300ms ease, box-shadow 300ms ease; }
.nav.is-scrolled { background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: saturate(160%) blur(22px); backdrop-filter: saturate(160%) blur(22px); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.nav__inner { max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 32px; }
.nav__logo img { width: 124px; }
.nav__links { display: flex; gap: 30px; margin-left: auto; }
.nav__links a { color: rgba(255, 255, 255, .7); text-decoration: none; font-size: .9375rem; font-weight: 500; transition: color 160ms; }
.nav__links a:hover { color: var(--blanco); }
.nav__wa {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 13px; border-radius: 999px;
  background: var(--blanco); color: var(--negro); text-decoration: none; font-weight: 650; font-size: .9375rem;
  font-variant-numeric: tabular-nums; transition: transform 140ms ease-out;
}
.nav__wa:active { transform: scale(.96); }
.nav__wa svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .nav__links { display: none; } .nav__inner { justify-content: space-between; } }
@media (max-width: 400px) { .nav__wa span { display: none; } .nav__wa { padding: 0 11px; } }

/* ===== HERO / SHOWROOM ===== */
.show {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100svh; min-height: 700px; max-height: 1100px;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding: calc(var(--nav-h) + clamp(20px, 4vh, 48px)) var(--gutter) 0;
  color: var(--blanco); background: var(--negro);
}
.show > * { max-width: var(--max); width: 100%; margin-inline: auto; }
.show > .show__light { position: absolute; inset: 0; z-index: -2; max-width: none; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 40%, rgba(255, 255, 255, .14), transparent 70%),
    radial-gradient(90% 40% at 50% 100%, rgba(255, 255, 255, .06), transparent 70%),
    linear-gradient(180deg, #000 0%, #0b0b0b 55%, #161616 78%, #050505 100%);
}
.show__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; position: relative; z-index: 3; }
.show__h1 { margin: 0; font: inherit; }
.show__title, .show__sub { display: block; }
.show__title { font-stretch: 62%; font-weight: 850; text-transform: uppercase; font-size: clamp(2.4rem, 4.6vw, 4.5rem); line-height: .9; max-width: 13ch; text-wrap: balance; }
.show__sub { margin-top: 14px; max-width: 34ch; color: rgba(255, 255, 255, .62); font-size: clamp(.95rem, 1.2vw, 1.0625rem); }

.pill-status {
  display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; width: fit-content;
  height: 36px; padding: 0 14px; border-radius: 999px; font-size: .875rem; font-weight: 600;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.pill-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--g-400); }
.pill-status.is-open .dot { background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); animation: pulse 2.4s ease-in-out infinite; }
.pill-status--light { background: var(--g-50); box-shadow: none; color: var(--negro); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
@media (max-width: 640px) { .show .pill-status { display: none; } }

.show__stage { position: relative; display: grid; min-height: 0; touch-action: pan-y; }
.show__word {
  position: absolute; left: 50%; top: 44%; z-index: 0;
  transform: translate(-50%, -50%);
  font-stretch: 62%; font-weight: 900; text-transform: uppercase; white-space: nowrap; line-height: .8;
  font-size: clamp(7rem, 26vw, 25rem); letter-spacing: -.01em;
  user-select: none; pointer-events: none;
}
/* El degradé va en cada letra: si va en el contenedor, se rompe cuando las letras se animan */
.show__word span {
  display: inline-block;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .06) 70%, rgba(255, 255, 255, 0) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.show__glow {
  position: absolute; left: 50%; bottom: 6%; z-index: 0; width: min(70vw, 900px); height: 42%;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 50% at 50% 62%, rgba(244, 10, 7, .3), transparent 70%);
  filter: blur(34px);
}
.show__car { position: absolute; inset: 0; z-index: 1; will-change: transform; }
.show__car img {
  position: absolute; left: 0; right: 0; bottom: 2%; margin-inline: auto;
  /* Altura fija y object-fit: todos los autos ocupan lo mismo aunque la imagen original sea chica */
  width: min(72vw, 1000px); height: 86%; object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 28px 26px rgba(0, 0, 0, .6));
}
.show__floor {
  position: absolute; left: 50%; bottom: 2%; z-index: 0; width: min(80vw, 1100px); height: 70px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, .95), transparent 72%);
}
.show__bottom {
  position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  padding: clamp(10px, 2vh, 24px) 0 clamp(20px, 3vh, 32px);
}
.show__name { font-size: 1.0625rem; font-weight: 650; }
.show__name small { display: block; font-stretch: 118%; font-size: .75rem; font-weight: 500; color: rgba(255, 255, 255, .5); margin-bottom: 2px; letter-spacing: .02em; }
.show__specs { display: flex; gap: clamp(22px, 3vw, 44px); margin-top: 14px; }
.show__specs dt { font-stretch: 118%; font-size: .75rem; color: rgba(255, 255, 255, .5); letter-spacing: .02em; }
.show__specs dd { font-stretch: 62%; font-weight: 800; font-size: clamp(1.75rem, 2.6vw, 2.5rem); line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.show__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.show__picker {
  position: relative; z-index: 3; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  padding-bottom: calc(clamp(20px, 3vh, 32px) + env(safe-area-inset-bottom));
}
.pick {
  all: unset; cursor: pointer; display: grid; gap: 2px; padding-top: 14px; position: relative;
  color: rgba(255, 255, 255, .42); transition: color 200ms;
}
.pick::before, .pick::after { content: ''; position: absolute; left: 0; top: 0; height: 2px; border-radius: 2px; }
.pick::before { right: 0; background: rgba(255, 255, 255, .16); }
.pick::after { width: 0; background: var(--rojo); }
.pick[aria-selected="true"] { color: var(--blanco); }
.pick[aria-selected="true"]::after { animation: progress var(--dur, 6s) linear forwards; }
.show.is-paused .pick[aria-selected="true"]::after { animation-play-state: paused; }
.show.is-static .pick[aria-selected="true"]::after { animation: none; width: 100%; }
.pick:hover { color: rgba(255, 255, 255, .85); }
.pick:focus-visible { outline: 2px solid var(--rojo); outline-offset: 4px; }
.pick__b { font-stretch: 118%; font-size: .6875rem; letter-spacing: .02em; opacity: .8; }
.pick__m { font-stretch: 62%; font-weight: 800; text-transform: uppercase; font-size: 1.375rem; line-height: 1.05; }
@keyframes progress { from { width: 0; } to { width: 100%; } }
@media (max-width: 760px) {
  .show__picker { display: flex; overflow-x: auto; scrollbar-width: none; gap: 18px; width: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-snap-type: x proximity; }
  .show__picker::-webkit-scrollbar { display: none; }
  .pick { flex: 0 0 auto; min-width: 92px; scroll-snap-align: start; }
  .show__actions { width: 100%; }
  .show__actions .btn { flex: 1 1 auto; padding: 0 18px; }
  .show__car img { width: 100%; height: 80%; }
  .show__word { top: 42%; font-size: 30vw; }
}

/* Entrada inicial del hero (un solo momento orquestado) */
@media (prefers-reduced-motion: no-preference) {
  .js .show__top, .js .show__bottom, .js .show__picker { opacity: 0; transform: translateY(16px); }
  .js .show > .show__light { opacity: 0; }
  .js.is-ready .show > .show__light { opacity: 1; transition: opacity 1600ms ease; }
  .js.is-ready .show__top { opacity: 1; transform: none; transition: opacity 800ms ease 100ms, transform 900ms var(--ease) 100ms; }
  .js.is-ready .show__bottom { opacity: 1; transform: none; transition: opacity 800ms ease 650ms, transform 900ms var(--ease) 650ms; }
  .js.is-ready .show__picker { opacity: 1; transform: none; transition: opacity 800ms ease 800ms, transform 900ms var(--ease) 800ms; }
}

/* ===== MARCAS ===== */
.brands { background: var(--rojo); color: var(--blanco); overflow: hidden; padding: 18px 0; }
.brands__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.brands__track p {
  font-stretch: 62%; font-weight: 850; text-transform: uppercase; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1;
  padding: 0 .45em; white-space: nowrap;
}
.brands__track p:nth-child(even) { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .9); }
.brands:hover .brands__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== STOCK ===== */
.stock { background: var(--g-50); padding: clamp(88px, 11vw, 160px) 0; }
.stock__head { display: grid; gap: 28px; margin-bottom: clamp(40px, 5vw, 72px); }
.stock__aside { display: grid; gap: 22px; align-content: end; }
.stock__aside p { max-width: 40ch; color: var(--texto-2); text-wrap: pretty; }
@media (min-width: 960px) { .stock__head { grid-template-columns: 1fr auto; align-items: end; } .stock__aside { justify-items: end; text-align: right; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  all: unset; cursor: pointer; height: 40px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
  font-size: .9375rem; font-weight: 600; background: var(--blanco); color: var(--negro); box-shadow: inset 0 0 0 1px var(--g-200);
  transition: background-color 180ms, color 180ms, box-shadow 180ms, transform 140ms;
}
.chip:active { transform: scale(.96); }
.chip span { font-variant-numeric: tabular-nums; color: var(--g-400); font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--negro); color: var(--blanco); box-shadow: none; }
.chip[aria-pressed="true"] span { color: rgba(255, 255, 255, .55); }
.chip:focus-visible { outline: 2px solid var(--rojo); outline-offset: 3px; }

.cards { display: grid; gap: 20px; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.cards > li[hidden] { display: none; }

.card {
  position: relative; isolation: isolate; overflow: hidden; height: 100%;
  display: grid; grid-template-rows: auto auto 1fr; border-radius: 28px;
  background: var(--blanco); box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
  transition: box-shadow 400ms var(--ease), transform 400ms var(--ease);
}
.card__top { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 0; position: relative; z-index: 1; }
.card__brand { font-weight: 600; font-size: .9375rem; }
.card__year { font-stretch: 118%; font-size: .75rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--g-50); font-variant-numeric: tabular-nums; }
.card__stage { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.card__word {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; z-index: 0;
  font-stretch: 62%; font-weight: 900; text-transform: uppercase; white-space: nowrap; line-height: .8;
  font-size: clamp(5rem, 10vw, 8.5rem); color: #EDEDED;
  transition: color 500ms ease, letter-spacing 700ms var(--ease);
}
.card__stage::after {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: 7%; height: 22px; z-index: 0;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, .3), transparent 70%);
}
.card__stage img {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 11%; margin-inline: auto;
  width: 80%; height: 72%; object-fit: contain; object-position: 50% 100%;
  transition: transform 700ms var(--ease); transform-origin: 50% 100%;
}
.card__body { padding: 0 24px 24px; display: grid; gap: 14px; align-content: start; position: relative; z-index: 1; }
.card__name { font-stretch: 62%; font-weight: 850; text-transform: uppercase; font-size: clamp(2.2rem, 3.2vw, 2.75rem); line-height: .9; }
.card__name small { display: block; font-size: .5em; margin-top: .12em; color: var(--texto-2); }
.card__specs { display: flex; gap: 22px; padding-top: 14px; border-top: 1px solid var(--g-100); }
.card__specs dt { font-stretch: 118%; font-size: .6875rem; color: var(--texto-2); letter-spacing: .02em; }
.card__specs dd { font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.card__note { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 650; color: var(--rojo); }
.card__note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; align-self: end; }
.card__wa { position: relative; z-index: 3; font-weight: 650; font-size: .9375rem; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.card__wa svg { width: 18px; height: 18px; }
.card__wa:hover { color: var(--rojo); }
.card__go {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--negro); color: var(--blanco); transition: background-color 250ms ease, transform 400ms var(--ease);
}
.card__go svg { width: 18px; height: 18px; }
.card__open { all: unset; position: absolute; inset: 0; z-index: 2; cursor: pointer; border-radius: 28px; }
.card__open:focus-visible { outline: 2px solid var(--rojo); outline-offset: 3px; }
@media (hover: hover) {
  .card:hover { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35); transform: translateY(-4px); }
  .card:hover .card__stage img { transform: scale(1.06); }
  .card:hover .card__word { color: #E2E2E2; letter-spacing: .02em; }
  .card:hover .card__go { background: var(--rojo); transform: rotate(-45deg); }
}

/* ===== PERMUTA Y FINANCIACIÓN ===== */
.trade { background: var(--negro); color: var(--blanco); padding: clamp(96px, 12vw, 176px) 0; position: relative; overflow: hidden; }
.trade::before {
  content: ''; position: absolute; right: -10%; top: -20%; width: 60vw; height: 60vw; pointer-events: none;
  background: radial-gradient(closest-side, rgba(244, 10, 7, .16), transparent);
}
.trade__grid { position: relative; display: grid; gap: 64px; }
@media (min-width: 1000px) { .trade__grid { grid-template-columns: 1fr minmax(0, 560px); gap: 96px; align-items: start; } }
.steps { margin-top: clamp(40px, 5vw, 64px); display: grid; }
.steps li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 26px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.steps li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.steps__n { font-stretch: 62%; font-weight: 850; font-size: 2.5rem; line-height: .9; color: var(--rojo); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 1.25rem; font-weight: 650; }
.steps p { margin-top: 4px; color: rgba(255, 255, 255, .6); max-width: 40ch; }

.trade__panel {
  border-radius: 32px; padding: clamp(22px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
@media (min-width: 1000px) { .trade__panel { position: sticky; top: calc(var(--nav-h) + 24px); } }
.form { display: grid; gap: 16px; }
.form__title { font-stretch: 62%; font-weight: 850; text-transform: uppercase; font-size: 2rem; line-height: 1; margin-bottom: 6px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: .8125rem; font-weight: 500; color: rgba(255, 255, 255, .6); }
.field input, .field select {
  width: 100%; min-height: 54px; padding: 0 16px; font-size: 1rem; color: var(--blanco);
  background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px;
  outline: none; appearance: none; -webkit-appearance: none; transition: border-color 160ms, background-color 160ms;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px; padding-right: 40px;
}
.field select option { color: var(--negro); }
.field input::placeholder { color: rgba(255, 255, 255, .28); }
.field input:focus, .field select:focus { border-color: rgba(255, 255, 255, .7); background-color: rgba(0, 0, 0, .65); }
.field input[aria-invalid="true"] { border-color: var(--rojo); }
.toggle { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; color: rgba(255, 255, 255, .85); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__ui { flex: 0 0 auto; width: 46px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, .18); position: relative; transition: background-color 220ms ease; }
.toggle__ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--blanco); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform 320ms var(--ease); }
.toggle input:checked + .toggle__ui { background: var(--rojo); }
.toggle input:checked + .toggle__ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle__ui { outline: 2px solid var(--blanco); outline-offset: 3px; }

.chat { margin-top: 4px; padding: 16px; border-radius: 18px; background: rgba(0, 0, 0, .4); }
.chat__label { font-stretch: 118%; font-size: .6875rem; letter-spacing: .02em; color: rgba(255, 255, 255, .45); }
.chat__bubble {
  margin-top: 10px; margin-left: auto; width: fit-content; max-width: 92%;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px;
  background: #1F5C4A; color: #EAF6F1; font-size: .9375rem; line-height: 1.4;
  transition: opacity 200ms;
}
.chat__bubble.is-empty { opacity: .45; }
.form__error { color: #FF6B66; font-size: .9375rem; }
.form .btn { min-height: 56px; margin-top: 4px; }

/* ===== ENTREGADOS ===== */
.sold { background: var(--blanco); padding: clamp(96px, 12vw, 176px) 0; }
.sold__head { display: grid; gap: 20px; margin-bottom: clamp(40px, 5vw, 72px); }
.sold__head p { color: var(--texto-2); max-width: 36ch; text-wrap: balance; }
@media (min-width: 960px) { .sold__head { grid-template-columns: 1fr auto; align-items: end; } .sold__head p { text-align: right; } }
.sold__list { display: grid; gap: 20px; }
@media (min-width: 800px) { .sold__list { grid-template-columns: 1.25fr 1fr; align-items: end; } }
.sold__item { position: relative; overflow: hidden; border-radius: 28px; background: var(--g-50); }
.sold__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 900ms var(--ease); }
.sold__item:nth-child(2) img { aspect-ratio: 1; }
@media (hover: hover) { .sold__item:hover img { transform: scale(1.03); } }
.sold__cap {
  position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px 14px 18px; border-radius: 18px; color: var(--blanco);
  background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}
.sold__cap h3 { font-size: 1.0625rem; font-weight: 650; }
.sold__cap p { font-size: .875rem; color: rgba(255, 255, 255, .7); }
.sold__tag { flex: 0 0 auto; font-stretch: 118%; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; padding: 6px 10px; border-radius: 999px; background: var(--rojo); }

/* ===== VISITANOS ===== */
.visit { position: relative; isolation: isolate; overflow: hidden; color: var(--blanco); padding: clamp(120px, 14vw, 200px) 0 clamp(64px, 8vw, 120px); min-height: 92svh; display: grid; align-items: end; }
.visit__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.visit::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .25) 35%, rgba(0, 0, 0, .85) 100%); }
.visit__grid { width: 100%; display: grid; gap: 40px; align-items: end; }
@media (min-width: 960px) { .visit__grid { grid-template-columns: 1fr minmax(0, 460px); } }
.visit__num { font-stretch: 62%; font-weight: 900; font-size: clamp(9rem, 22vw, 20rem); line-height: .78; letter-spacing: -.02em; }
.visit__plus { color: var(--rojo); }
.visit__cap { margin-top: 18px; font-size: clamp(1.125rem, 1.8vw, 1.5rem); font-weight: 600; line-height: 1.25; }
.visit__card { border-radius: 28px; padding: clamp(24px, 3vw, 36px); background: var(--blanco); color: var(--negro); display: grid; gap: 20px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.info > div { display: grid; grid-template-columns: clamp(84px, 24%, 110px) 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--g-100); }
.info dt { color: var(--texto-2); font-size: .9375rem; }
.info dd { font-weight: 550; }
.info a { font-weight: 650; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ===== FOOTER ===== */
.footer { background: var(--negro); color: rgba(255, 255, 255, .6); padding: clamp(64px, 8vw, 112px) 0 calc(40px + env(safe-area-inset-bottom)); }
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; }
.footer__top img { width: clamp(200px, 26vw, 320px); }
/* La línea roja del logo, estirada a todo el ancho */
.footer__rule { height: 4px; margin: clamp(40px, 5vw, 64px) 0 28px; background: var(--rojo); border-radius: 2px; }
.footer__cols { display: grid; gap: 8px; font-size: .9375rem; }
@media (min-width: 900px) { .footer__cols { grid-template-columns: repeat(4, auto); justify-content: space-between; } }
.footer a { color: var(--blanco); text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* WhatsApp flotante (celular) */
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  display: none; align-items: center; gap: 8px; height: 54px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--rojo); color: var(--blanco); text-decoration: none; font-weight: 650;
  box-shadow: 0 12px 30px -8px rgba(244, 10, 7, .6);
  transform: translateY(160%); transition: transform 460ms var(--ease);
}
.fab svg { width: 22px; height: 22px; }
.fab.is-visible { transform: none; }
@media (max-width: 760px) { .fab { display: inline-flex; } }

/* ===== FICHA ===== */
.sheet { padding: 0; border: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%; background: transparent; overflow: hidden; }
.sheet::backdrop { background: rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100dvh - 20px); background: var(--blanco); border-radius: 24px 24px 0 0; overflow: hidden; display: flex; flex-direction: column; }
.sheet__panel:focus { outline: none; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; }
.sheet__close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.sheet__close svg { width: 18px; height: 18px; }
.sheet__close:active { transform: scale(.94); }
@media (min-width: 900px) {
  .sheet__panel { left: 50%; top: 50%; right: auto; bottom: auto; width: min(1200px, calc(100vw - 64px)); height: min(820px, calc(100dvh - 64px)); max-height: none; border-radius: 28px; transform: translate(-50%, -50%); }
  .sheet__body { display: grid; grid-template-columns: 1.1fr 1fr; height: 100%; overflow: hidden; }
  .sheet__body > .gallery { height: 100%; }
  .sheet__body > .sheet__info { overflow-y: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] .sheet__panel { animation: sheet-up 560ms var(--ease); }
  .sheet[open]::backdrop { animation: fade 300ms ease; }
  .sheet.is-closing .sheet__panel { animation: sheet-down 300ms cubic-bezier(.4, 0, 1, 1) forwards; }
  .sheet.is-closing::backdrop { animation: fade 300ms ease reverse forwards; }
  @media (min-width: 900px) {
    .sheet[open] .sheet__panel { animation: pop 460ms var(--ease); }
    .sheet.is-closing .sheet__panel { animation: pop 240ms ease-in reverse forwards; }
  }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.97); } }
@keyframes fade { from { opacity: 0; } }

.gallery { position: relative; background: var(--g-50); }
.gallery__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; scroll-snap-align: center; scroll-snap-stop: always; }
@media (min-width: 900px) { .gallery__track img { aspect-ratio: auto; height: 100%; } }
.gallery__count { position: absolute; left: 14px; bottom: 14px; padding: 5px 11px; border-radius: 999px; font-size: .8125rem; font-weight: 650; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, .55); color: var(--blanco); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.gallery__nav { position: absolute; right: 14px; bottom: 14px; display: none; gap: 8px; }
.gallery__nav button { width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.gallery__nav button:disabled { opacity: .4; cursor: default; }
.gallery__nav svg { width: 16px; height: 16px; }
@media (hover: hover) and (min-width: 900px) { .gallery__nav { display: flex; } }

.sheet__info { padding: 28px var(--gutter) 0; }
@media (min-width: 900px) { .sheet__info { padding: 56px 48px 0; } }
.sheet__brand { font-weight: 600; color: var(--texto-2); }
.sheet__model { margin-top: 6px; font-stretch: 62%; font-weight: 850; text-transform: uppercase; font-size: clamp(3rem, 7vw, 4.75rem); line-height: .86; }
.sheet__model small { display: block; font-size: .46em; margin-top: .14em; color: var(--texto-2); }
.sheet__specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 20px; margin-top: 28px; padding: 22px 0; border-top: 1px solid var(--g-100); border-bottom: 1px solid var(--g-100); }
.sheet__specs dt { font-stretch: 118%; font-size: .6875rem; color: var(--texto-2); letter-spacing: .02em; }
.sheet__specs dd { font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.sheet__price { margin-top: 22px; color: var(--texto-2); }
.sheet__price strong { color: var(--negro); }
.sheet__note { margin-top: 16px; }
.equip { margin-top: 32px; display: grid; gap: 26px; }
.equip h3 { font-size: 1.0625rem; font-weight: 700; }
.equip ul { list-style: none; margin: 10px 0 0; padding: 0; columns: 2; column-gap: 24px; }
.equip li { break-inside: avoid; padding: 6px 0 6px 18px; position: relative; font-size: .9375rem; color: #2A2A2A; line-height: 1.4; }
.equip li::before { content: ''; position: absolute; left: 0; top: .85em; width: 8px; height: 2px; background: var(--rojo); }
@media (max-width: 420px) { .equip ul { columns: 1; } }
.sheet__ig { display: inline-block; margin: 30px 0 8px; color: var(--texto-2); font-size: .9375rem; font-weight: 600; text-underline-offset: 4px; }
.sheet__cta { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 28px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.sheet__cta .btn { min-height: 54px; }
.sheet__cta .btn--ghost { background: var(--g-50); color: var(--negro); }

@media (prefers-reduced-transparency: reduce) {
  .nav.is-scrolled { background: var(--negro); backdrop-filter: none; }
  .sheet__cta, .sheet__close { background: var(--blanco); backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brands__track { animation: none; flex-wrap: wrap; width: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* ===== Contenido que viene del panel ===== */
.card__tags { display: inline-flex; gap: 6px; align-items: center; }
.card__badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-stretch: 118%; font-size: .6875rem; font-weight: 700; letter-spacing: .02em; background: var(--negro); color: var(--blanco); vertical-align: middle; }
.card.is-reserved .card__stage img { opacity: .55; }
.card__price { font-stretch: 62%; font-weight: 850; font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.card--photo .card__stage { margin: 14px 14px 0; border-radius: 18px; aspect-ratio: 16 / 11; }
.card--photo .card__stage::after { display: none; }
.card--photo .card__stage img { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; bottom: 0; }
.card--photo + .card__open { border-radius: 28px; }
.cards__empty { grid-column: 1 / -1; padding: 64px 24px; border-radius: 28px; background: var(--blanco); text-align: center; color: var(--texto-2); }
.sheet__amount { display: block; font-stretch: 62%; font-weight: 850; font-size: 2.75rem; line-height: 1; color: var(--negro); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.show__car img.is-photo { border-radius: 24px; max-height: 86%; object-fit: cover; filter: none; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.show.is-empty .show__stage, .show.is-empty .show__bottom, .show.is-empty .show__picker { visibility: hidden; }
.footer__social { display: flex; gap: 18px; }
@media (min-width: 900px) { .footer__social { justify-content: flex-end; } }

/* Modo edición (solo lo ve el dueño con sesión abierta) */
.adminbar {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px;
  background: rgba(20, 20, 20, .82); color: var(--blanco); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .1); font-size: .875rem; font-weight: 600; white-space: nowrap;
}
.adminbar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rojo); box-shadow: 0 0 0 4px rgba(244, 10, 7, .25); }
.adminbar__btn { height: 36px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; background: rgba(255, 255, 255, .12); }
.adminbar__btn:hover { background: rgba(255, 255, 255, .2); }
.adminbar__btn--red { background: var(--rojo); }
.adminbar__btn--red:hover { background: var(--rojo-hover); }
.is-admin .fab { display: none; }
@media (max-width: 420px) { .adminbar__txt { display: none; } }
.card__edit {
  position: absolute; top: 64px; right: 18px; z-index: 4;
  height: 32px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 999px;
  background: var(--negro); color: var(--blanco); font-size: .8125rem; font-weight: 650; text-decoration: none;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5);
}
.card__edit:hover { background: var(--rojo); }

/* Leyenda de imagen oficial del modelo */
.show__ilus { position: absolute; right: 0; bottom: 4%; z-index: 2; font-stretch: 118%; font-size: .6875rem; letter-spacing: .02em; color: rgba(255, 255, 255, .42); }
.card__ilus { position: absolute; right: 16px; bottom: 6px; z-index: 1; font-stretch: 118%; font-size: .625rem; letter-spacing: .02em; color: var(--g-400); }
@media (max-width: 760px) { .show__ilus { bottom: auto; top: 6%; right: 0; } }

.footer a.footer__panel { color: rgba(255, 255, 255, .38); }
.footer a.footer__panel:hover { color: var(--blanco); }
