/* =============================================================
   MARKAUTOS — Consignación de vehículos de alta gama
   Sistema visual: minimalismo arquitectónico, inspirado en sitios
   de marcas de lujo automotriz (Mercedes-Benz, BMW, Audi).
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0a0a0a;
  --bg-2:      #121212;
  --bg-3:      #1a1a1a;
  --bg-4:      #242424;
  --cream:     #f5f5f5;
  --cream-2:   #d6d6d6;
  --cream-3:   #8c8c8c;
  --accent:    #ffffff;
  --accent-2:  #cfcfcf;
  --accent-soft: rgba(255,255,255,0.12);
  --on-accent: #0a0a0a;
  --line:      rgba(245,245,245,0.14);
  --line-2:    rgba(245,245,245,0.30);
  --danger:    #c25b4a;
  --ok:        #6f9e79;

  --display: "Archivo", "Inter", -apple-system, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --container: 1320px;
  --radius: 2px;
  --radius-sm: 1px;
}

/* Light zones — alternates with the dark zones (nav/hero/footer) so the
   page reads as a genuine black+white combination, not a dark theme. Reuses
   every existing component (cards, buttons, badges) via the same tokens. */
.theme-light {
  --bg:        #ffffff;
  --bg-2:      #f6f6f6;
  --bg-3:      #f1f1f1;
  --bg-4:      #e7e7e7;
  --cream:     #101010;
  --cream-2:   #333333;
  --cream-3:   #6b6b6b;
  --accent:    #101010;
  --accent-2:  #333333;
  --accent-soft: rgba(16,16,16,0.06);
  --on-accent: #ffffff;
  --line:      rgba(16,16,16,0.13);
  --line-2:    rgba(16,16,16,0.28);
  --danger:    #a3392a;
  --ok:        #3f7a52;
  background: var(--bg);
  color: var(--cream);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  text-wrap: balance; line-height: .98; letter-spacing: -0.02em;
  font-family: var(--display); font-weight: 800;
}
ul { list-style: none; padding: 0; }
::selection { background: var(--cream); color: var(--bg); }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 960px) { .container { padding-inline: 3rem; } }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--cream); color: var(--bg);
  z-index: 9999; font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream-3);
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 1.6rem;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--cream-3);
}
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cream); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

.hr { border: 0; border-top: 1px solid var(--line); }

/* =============================================================
   4. Typography
   ============================================================= */
em { font-style: normal; }
.hero-title, .section-title { text-wrap: balance; }

.section-title {
  font-size: clamp(2rem, 3.6vw, 3.1rem);
  margin-bottom: .5rem;
  text-transform: uppercase;
}
.section-sub {
  color: var(--cream-3);
  max-width: 56ch;
  font-size: 1.02rem;
  font-family: var(--sans);
  font-weight: 400;
}
.section-head { margin-bottom: 3rem; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .kicker { border-bottom: none; }

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons — rectangular, tracked, invert on hover */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  padding: 1.05rem 2.1rem;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-weight: 500;
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: background .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn-whatsapp {
  background: #25D366;
  color: #06210f;
  border: 1px solid #25D366;
}
.btn-whatsapp:hover { background: transparent; color: #25D366; }
.btn-sm { padding: .68rem 1.2rem; font-size: .68rem; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(194,91,74,.4); }
.btn-danger:hover { background: rgba(194,91,74,.12); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Nav — barra blanca completa (el logo oficial es negro sobre blanco, tal
   cual el arte original, sin invertir colores). */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding-block: .8rem;
  background: #fff;
  border-bottom: 1px solid rgba(16,16,16,.1);
  transition: padding .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.nav.is-scrolled { padding-block: .55rem; box-shadow: 0 4px 18px rgba(16,16,16,.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav-logo { display: flex; align-items: center; }
.nav-logo .logo-full, .mobile-menu-top .logo-full { height: 64px; width: auto; display: block; }
.nav-links { display: none; align-items: center; gap: 2.2rem; }
.nav-links a {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: #4a4a4a; transition: color .25s var(--ease-out); position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -8px; height: 1px; width: 0;
  background: #101010; transition: width .3s var(--ease-out);
}
.nav-links a:hover { color: #101010; }
.nav-links a:hover::after { width: 100%; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-actions { display: flex; align-items: center; gap: .9rem; }
.nav-burger { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid rgba(16,16,16,.25); color: #101010; }
@media (min-width: 960px) { .nav-burger { display: none; } }

.mobile-menu {
  position: fixed; inset: 0; z-index: 350;
  background: var(--bg);
  display: flex; flex-direction: column; padding: 1.5rem;
  transform: translateY(-100%); transition: transform .5s var(--ease-out);
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3.5rem; }
.mobile-menu a {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 2rem; padding-block: .7rem; border-bottom: 1px solid var(--line);
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .75rem; border-radius: var(--radius);
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  font-family: var(--mono);
}
.badge-disponible { background: rgba(111,158,121,.16); color: var(--ok); }
.badge-reservado { background: var(--accent-soft); color: var(--accent); }
.badge-vendido { background: rgba(194,91,74,.16); color: var(--danger); }

/* Vehicle card */
.vehicle-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 720px) { .vehicle-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .vehicle-grid { grid-template-columns: repeat(3, 1fr); } }

.vehicle-card {
  position: relative;
  background: var(--bg);
  overflow: hidden;
  transition: background .4s var(--ease-out);
  display: flex; flex-direction: column;
}
.vehicle-card:hover { background: var(--bg-3); }
.vehicle-card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-4); }
.vehicle-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out), filter .6s var(--ease-out); filter: none; }
.vehicle-card[data-status="reservado"] .vehicle-card-media img,
.vehicle-card[data-status="vendido"] .vehicle-card-media img { filter: grayscale(1) contrast(1.05); }
.vehicle-card:hover .vehicle-card-media img { transform: scale(1.06); filter: grayscale(0) contrast(1.02); }
.vehicle-card-badge { position: absolute; top: 1rem; left: 1rem; z-index: 2; }
.vehicle-card-badge {
  background: rgba(8,8,8,.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.14);
}
.vehicle-card-badge.badge-disponible { color: #8fd4a3; }
.vehicle-card-badge.badge-reservado { color: #f2ede2; }
.vehicle-card-badge.badge-vendido { color: #e6a89c; }
.vehicle-card-photos {
  position: absolute; bottom: 1rem; right: 1rem; z-index: 2;
  background: rgba(8,8,8,.78); backdrop-filter: blur(8px);
  padding: .35rem .65rem; font-family: var(--mono); font-size: .68rem; color: #f2ede2;
  border: 1px solid rgba(255,255,255,.14);
}
.vehicle-card-body { padding: 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.vehicle-card-brand { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-3); }
.vehicle-card-title { font-size: 1.3rem; text-transform: uppercase; }
.vehicle-card-meta {
  display: flex; flex-wrap: wrap; font-family: var(--mono); font-size: .76rem; color: var(--cream-3);
  border-top: 1px solid var(--line); margin-top: .3rem; padding-top: .7rem;
}
.vehicle-card-meta span { padding-right: .8rem; margin-right: .8rem; border-right: 1px solid var(--line); }
.vehicle-card-meta span:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.vehicle-card-price { margin-top: auto; padding-top: 1rem; font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.vehicle-card-link { position: absolute; inset: 0; z-index: 3; }

/* Empty state */
.empty-state { text-align: center; padding: 5rem 1rem; color: var(--cream-3); }
.empty-state h3 { color: var(--cream); margin-bottom: .6rem; text-transform: uppercase; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.2rem; }
.field label { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; color: var(--cream-2); }
.field .hint { font-size: .76rem; color: var(--cream-3); font-family: var(--sans); text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea {
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  color: var(--cream);
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.field input::placeholder, .field textarea::placeholder { color: var(--cream-3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .field-row.two { grid-template-columns: 1fr 1fr; } .field-row.three { grid-template-columns: repeat(3,1fr); } }

.form-card {
  background: var(--bg);
  border: 1px solid var(--line-2);
  padding: 2.2rem;
}
@media (min-width: 720px) { .form-card { padding: 3rem; } }

.form-success {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}
.form-success.is-visible { display: block; }
.form-success svg { margin-inline: auto; margin-bottom: 1rem; }
.form-success h3 { text-transform: uppercase; margin-bottom: .6rem; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(4,4,4,.97);
  display: none; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; object-fit: contain; transition: opacity .18s var(--ease-out); }
.lightbox img.is-swapping { opacity: .3; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; width: 46px; height: 46px;
  background: rgba(245,245,245,.06); border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  transition: background .25s var(--ease-out);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(245,245,245,.16); }
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: .78rem; color: var(--cream-3); }

/* =============================================================
   6. Sections
   ============================================================= */

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-block: 7rem 5rem;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.15) contrast(1.08); }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,10,10,.3) 0%, rgba(10,10,10,.5) 45%, rgba(10,10,10,.97) 100%),
    linear-gradient(90deg, rgba(10,10,10,.8) 0%, rgba(10,10,10,.1) 55%);
}
.hero-mesh {
  position: absolute; inset: -20% -10% auto -10%; height: 70%; z-index: -1;
  background: radial-gradient(45% 60% at 30% 20%, rgba(255,255,255,.10), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  animation: meshBreathe 14s ease-in-out infinite;
}
@keyframes meshBreathe {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: .85; }
  50% { transform: translate(3%, -4%) scale(1.12); opacity: 1; }
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }
.hero-eyebrow {
  margin-bottom: 1.6rem;
  color: #f2ede2;
  text-shadow: 0 2px 10px rgba(0,0,0,.8), 0 1px 3px rgba(0,0,0,.9);
}
.hero-eyebrow .dot { background: #f2ede2; }
.hero-title {
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  font-weight: 500;
  text-transform: none;
  margin-bottom: 1.8rem;
  max-width: 32ch;
  color: var(--cream-2);
  text-shadow: 0 2px 12px rgba(0,0,0,.7);
}
.hero-title .thin { font-weight: 300; display: block; }
.hero-slogan {
  font-family: var(--display); font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6.8vw, 6rem);
  line-height: .98;
  color: #fff; margin-bottom: 1rem; max-width: 16ch;
  text-shadow: 0 2px 30px rgba(0,0,0,.7), 0 1px 4px rgba(0,0,0,.85);
}
.hero-sub {
  color: var(--cream-2); max-width: 46ch; font-size: 1.08rem; margin-bottom: 2.4rem;
  font-family: var(--sans); border-left: 2px solid var(--cream); padding-left: 1.2rem;
  text-shadow: 0 2px 16px rgba(0,0,0,.7);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-scroll {
  position: absolute; right: 2.5rem; bottom: 2.2rem; display: none;
  writing-mode: vertical-rl; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cream-3); align-items: center; gap: .8rem;
}
.hero-scroll::after { content: ""; width: 1px; height: 46px; background: var(--line-2); }
@media (min-width: 960px) { .hero-scroll { display: flex; } }

/* Generic section spacing */
.section { padding-block: 6.5rem; }
.section-alt { background: var(--bg-2); }

/* Numbered index used across storytelling sections */
.n-index {
  font-family: var(--display); font-weight: 800; font-size: 1.05rem;
  color: var(--cream-3); display: block; margin-bottom: 1.2rem;
}

/* How it works */
.steps-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 720px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .steps-grid { grid-template-columns: repeat(4, 1fr); } }
.step-card { border-top: 1px solid var(--line-2); padding: 1.6rem 1.6rem 0 0; }
.step-card h3 { font-size: 1.05rem; margin-block: 0 .6rem; text-transform: uppercase; }
.step-card p { color: var(--cream-3); font-size: .92rem; font-family: var(--sans); font-weight: 400; }

/* Two-column editorial features (sellers vs buyers) */
.feature-columns { display: grid; grid-template-columns: 1fr; gap: 3.5rem; }
@media (min-width: 900px) { .feature-columns { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.feature-col-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line-2); padding-bottom: 1rem; margin-bottom: .5rem; }
.feature-col-head h3 { font-size: 1.4rem; text-transform: uppercase; }
.feature-col-head span { font-family: var(--mono); font-size: .72rem; color: var(--cream-3); }
.feature-list-item {
  display: flex; gap: 1.2rem; align-items: flex-start;
  padding-block: 1.4rem; border-bottom: 1px solid var(--line);
}
.feature-list-item .fli-n { font-family: var(--mono); font-size: .78rem; color: var(--cream-3); padding-top: .2rem; flex-shrink: 0; width: 2ch; }
.feature-list-item h4 { font-family: var(--sans); font-weight: 700; font-size: .98rem; text-transform: none; margin-bottom: .3rem; letter-spacing: 0; }
.feature-list-item p { color: var(--cream-3); font-size: .88rem; }

/* Section head with link */
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

/* Consign CTA */
.consign-section { position: relative; overflow: hidden; }
.consign-halo { position: absolute; inset: -60% -10% -30% -10%; background: radial-gradient(45% 45% at 50% 50%, rgba(255,255,255,.08), transparent 75%); filter: blur(90px); pointer-events: none; }
.consign-grid { display: grid; grid-template-columns: 1fr; gap: 3.5rem; position: relative; }
@media (min-width: 960px) { .consign-grid { grid-template-columns: 1fr 1.1fr; align-items: center; } }
.consign-copy h2 { margin-bottom: 1.2rem; text-transform: uppercase; }
.consign-copy p { color: var(--cream-3); margin-bottom: 1.8rem; max-width: 46ch; font-family: var(--sans); }
.consign-points { display: flex; flex-direction: column; margin-bottom: 1.8rem; }
.consign-point {
  display: flex; gap: .9rem; align-items: center; font-size: .9rem; color: var(--cream-2);
  padding-block: 1rem; border-bottom: 1px solid var(--line);
}
.consign-point svg { flex-shrink: 0; color: var(--cream); }

/* Footer */
/* Footer — blanco de lado a lado, igual que el nav (mismo criterio: nada
   de parches blancos aislados sobre fondo oscuro). */
.footer { border-top: 1px solid rgba(16,16,16,.1); padding-block: 4rem 2rem; background: #fff; color: #101010; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; margin-bottom: 1rem; }
.footer-brand .logo-full { height: 56px; width: auto; }
.footer p { color: #5a5a5a; font-size: .9rem; max-width: 34ch; font-family: var(--sans); }
.footer h4 { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: #8a8a8a; margin-bottom: 1.2rem; font-weight: 500; }
.footer-links { display: flex; flex-direction: column; gap: .75rem; }
.footer-links a { font-size: .92rem; color: #333; transition: color .25s var(--ease-out); }
.footer-links a:hover { color: #101010; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 2rem; border-top: 1px solid rgba(16,16,16,.1); font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: #8a8a8a; text-transform: uppercase; }

/* WhatsApp floating button */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 300;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #06210f;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px -8px rgba(37,211,102,.6);
  transition: transform .35s var(--ease-out);
}
.wa-float:hover { transform: scale(1.08); }

/* Page header (catalogo / vehiculo) */
.page-header { padding-block: 8rem 3rem; border-bottom: 1px solid var(--line); }
.page-header h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); text-transform: uppercase; }
.breadcrumb { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--cream-3); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--cream-3); }
.breadcrumb a:hover { color: var(--cream); }

/* Catalog toolbar / filters */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end;
  padding-block: 1.9rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 68px; z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
}
.toolbar .field { margin-bottom: 0; min-width: 160px; flex: 1 1 160px; }
.toolbar-count { font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--cream-3); margin-left: auto; align-self: center; }

/* Vehicle detail */
.vd-layout { display: grid; grid-template-columns: 1fr; gap: 3.5rem; padding-block: 3.5rem; }
@media (min-width: 1024px) { .vd-layout { grid-template-columns: 1.5fr 1fr; align-items: start; } }

.vd-gallery-main { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-3); cursor: zoom-in; margin-bottom: .8rem; border: 1px solid var(--line); }
.vd-gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .18s var(--ease-out); }
.vd-gallery-main img.is-swapping { opacity: .3; }
.vd-gallery-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; }
.vd-gallery-thumbs button { aspect-ratio: 1; overflow: hidden; opacity: .5; transition: opacity .25s var(--ease-out); border: 1px solid transparent; }
.vd-gallery-thumbs button.is-active { opacity: 1; border-color: var(--accent); }
.vd-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.vd-gallery-more { display: flex; align-items: center; justify-content: center; background: var(--bg-4); font-family: var(--mono); font-size: .76rem; color: var(--cream-2); }

.vd-sidebar { position: sticky; top: 100px; }
.vd-brand { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; color: var(--cream-3); }
.vd-title { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-block: .6rem 1rem; text-transform: uppercase; }
.vd-price { font-family: var(--display); font-weight: 800; font-size: 2.1rem; margin-bottom: 1.6rem; }
.vd-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); margin-bottom: 1.6rem; }
.vd-spec { padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.vd-spec:nth-child(2n) { border-right: 0; }
.vd-spec:nth-last-child(-n+2) { border-bottom: 0; }
.vd-spec dt { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cream-3); margin-bottom: .3rem; }
.vd-spec dd { font-family: var(--mono); font-size: .95rem; }
.vd-cta { display: flex; flex-direction: column; gap: .9rem; }
.vd-desc { margin-top: 3rem; }
.vd-desc h2 { font-size: 1.5rem; margin-bottom: 1.2rem; text-transform: uppercase; }
.vd-desc p { color: var(--cream-2); max-width: 68ch; font-family: var(--sans); }
.vd-features { margin-top: 2.5rem; }
.vd-features h2 { text-transform: uppercase; font-size: 1.5rem; }
.vd-features ul { display: grid; grid-template-columns: 1fr; margin-top: 1.2rem; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .vd-features ul { grid-template-columns: 1fr 1fr; } }
.vd-features li { display: flex; gap: .7rem; align-items: center; font-size: .92rem; color: var(--cream-2); padding: .9rem 0; border-bottom: 1px solid var(--line); }
.vd-features li svg { color: var(--cream); flex-shrink: 0; }

/* =============================================================
   7. Admin
   ============================================================= */
.admin-shell { min-height: 100svh; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
/* El logo es negro sobre fondo transparente — sobre el topbar/login oscuros
   necesita su propia placa blanca detrás para verse (igual que en el sitio
   público). */
.admin-logo-chip { display: inline-flex; align-items: center; background: #fff; padding: .4rem .7rem; }
.admin-main { flex: 1; padding: 2.5rem 1.5rem 4rem; max-width: 1100px; margin-inline: auto; width: 100%; }
.admin-login-wrap { min-height: 100svh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.admin-login-card { width: 100%; max-width: 400px; }

.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2.5rem; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--cream-3); padding: .9rem; border-bottom: 1px solid var(--line-2); }
.admin-table td { padding: .9rem; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.admin-table-thumb { width: 64px; height: 48px; overflow: hidden; background: var(--bg-4); filter: grayscale(1); }
.admin-table-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-table-actions { display: flex; gap: .5rem; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); }

.seller-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem; border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: .78rem;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
}
.seller-chip:hover, .seller-chip.is-active { border-color: var(--accent); background: var(--accent-soft); }
.seller-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cream-3); }

.stat-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; margin-bottom: 2.5rem; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 720px) { .stat-row { grid-template-columns: repeat(4,1fr); } }
.stat-card { background: var(--bg); padding: 1.4rem 1.5rem; }
.stat-card .n { font-family: var(--display); font-weight: 800; font-size: 2rem; }
.stat-card .l { font-family: var(--mono); font-size: .68rem; color: var(--cream-3); text-transform: uppercase; letter-spacing: .08em; }

/* Photo uploader */
.dropzone {
  border: 1px dashed var(--line-2);
  padding: 2.8rem 1.5rem; text-align: center; cursor: pointer;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { margin-inline: auto; margin-bottom: .9rem; color: var(--cream); }
.dropzone .hint { color: var(--cream-3); font-size: .82rem; margin-top: .5rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 2px; margin-top: 1.3rem; background: var(--line); border: 1px solid var(--line); }
.photo-item { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--bg-4); cursor: grab; transition: opacity .2s var(--ease-out), outline-color .15s var(--ease-out); outline: 2px solid transparent; outline-offset: -2px; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-item.is-dragging { opacity: .35; cursor: grabbing; }
.photo-item.is-drag-over { outline-color: var(--accent); }
.photo-item.is-cover::after {
  content: "Portada"; position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: .62rem; text-align: center;
  font-weight: 600; padding: .25rem 0; text-transform: uppercase; letter-spacing: .05em;
}
.photo-item-remove {
  position: absolute; top: .3rem; right: .3rem; width: 24px; height: 24px;
  background: rgba(8,8,8,.75); display: flex; align-items: center; justify-content: center;
  color: #f5f5f5; transition: background .2s;
}
.photo-item-remove:hover { background: var(--danger); }
.photo-item-cover-btn {
  position: absolute; top: .3rem; left: .3rem; font-size: .6rem; padding: .22rem .5rem;
  background: rgba(8,8,8,.75); color: #f5f5f5; text-transform: uppercase; letter-spacing: .04em;
  font-family: var(--mono);
}
.photo-item-cover-btn:hover { background: var(--accent); color: var(--on-accent); }
.upload-progress { font-family: var(--mono); font-size: .78rem; color: var(--cream); margin-top: .9rem; }

.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-4); border: 1px solid var(--line-2); padding: .9rem 1.4rem;
  font-family: var(--mono); font-size: .8rem; opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); z-index: 999;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { border-color: rgba(194,91,74,.5); color: var(--danger); }

/* =============================================================
   8. Splash / loading state for auth-gated pages
   ============================================================= */
.gate-loading { min-height: 100svh; display: flex; align-items: center; justify-content: center; color: var(--cream-3); font-family: var(--mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }

/* =============================================================
   9. Reduced motion — only truly intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation: none; }
}

/* =============================================================
   10. Contratos — formulario, OCR y hoja imprimible
   ============================================================= */
.tpl-warning {
  border: 1px solid rgba(194,91,74,.4); background: rgba(194,91,74,.1); color: var(--cream);
  font-size: .84rem; line-height: 1.5; padding: .9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.5rem;
}
.tpl-warning code { font-family: var(--mono); font-size: .82em; }

.contract-type-toggle { display: flex; gap: .75rem; }
.ctt-btn {
  flex: 1; padding: .9rem; border: 1px solid var(--line-2); background: transparent; color: var(--cream-2);
  font-family: var(--mono); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out), color .2s var(--ease-out);
}
.ctt-btn:hover { border-color: var(--accent); }
.ctt-btn.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.ocr-banner {
  margin-top: 1.3rem; padding: 1.1rem; border: 1px solid var(--line-2); background: var(--bg-3);
}
.ocr-banner > p { font-size: .84rem; color: var(--cream-2); margin-bottom: .9rem; }
.ocr-banner p strong { color: var(--cream); }
.ocr-field {
  display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line);
  font-size: .84rem;
}
.ocr-field span { color: var(--cream-3); font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.ocr-banner [data-ocr-apply] { margin-top: .9rem; }

/* Hoja del contrato: se ve como un documento de papel dentro del panel, y se
   imprime tal cual (sin la interfaz de admin) al usar "Imprimir / Guardar PDF". */
.contract-sheet {
  max-width: 840px; margin: 0 auto 4rem; background: #ffffff; color: #1a1a1a;
  padding: 4rem 4.5rem; font-family: "Lora", Georgia, serif; font-size: .98rem; line-height: 1.75;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.contract-sheet-body p {
  margin-bottom: 1.1rem;
  break-inside: avoid; page-break-inside: avoid; /* una cláusula no se corta a la mitad entre páginas */
  orphans: 3; widows: 3;
}
.contract-sheet-body strong { font-weight: 600; }
.contract-vehicle-table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: .92rem; }
.contract-vehicle-table th, .contract-vehicle-table td { border: 1px solid #ccc; padding: .45rem .7rem; text-align: left; }
.contract-vehicle-table th { width: 40%; background: #f5f5f0; font-weight: 600; font-size: .78rem; letter-spacing: .03em; }
/* La tabla completa sí puede partirse entre páginas (si no, deja un hueco
   en blanco al final de la página anterior) — lo que no se parte es cada
   fila individual, para no cortar una etiqueta de su valor. */
.contract-vehicle-table tr { break-inside: avoid; page-break-inside: avoid; }

.contract-expenses-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1.4rem; }
@media (max-width: 640px) { .contract-expenses-grid { grid-template-columns: 1fr; } }
.contract-expenses-table th { width: auto; text-align: center; }
.contract-expenses-table .total-row td { font-weight: 700; background: #f5f5f0; }

/* Lista de documentos PDF subidos (tarjeta de propiedad) — reemplaza la
   grilla de miniaturas de fotos, ya que un PDF no tiene thumbnail. */
.doc-list { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.2rem; }
.doc-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1rem; border: 1px solid var(--line-2); background: var(--bg-3);
}
.doc-item a { display: flex; align-items: center; gap: .6rem; color: var(--cream); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-item a:hover { color: var(--accent); }
.doc-item a svg { flex-shrink: 0; color: var(--cream-3); }
.doc-item .photo-item-remove { position: static; }

.contract-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 5rem; break-inside: avoid; page-break-inside: avoid; }
.sig-block .sig-line { border-top: 1px solid #1a1a1a; margin-bottom: .6rem; }
.sig-block p { font-family: var(--mono, monospace); font-size: .8rem; text-align: center; }

.contract-annex { margin-top: 4rem; page-break-before: always; }
.contract-annex h3 { font-family: "Lora", Georgia, serif; font-size: 1.1rem; margin-bottom: 1.2rem; }
.contract-annex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contract-annex-grid img { width: 100%; border: 1px solid #ddd; }

@media print {
  /* Margen de página en 0: sin esto Chrome reserva esa franja para dibujar
     su encabezado/pie automático (fecha, título de la pestaña, URL, "Página
     X de Y") aunque la casilla "Encabezados y pies de página" esté marcada.
     El margen visual real del documento lo da el padding de .contract-sheet
     de abajo, no el margen de página. */
  @page { margin: 0; }
  .no-print-shell, .toast { display: none !important; }
  body { background: #fff; }
  .contract-sheet {
    box-shadow: none; margin: 0; padding: 1.6cm 1.8cm; max-width: none;
    /* Sin esto, ese padding solo se ve al inicio y al final del documento
       completo — con esto, se repite arriba y abajo en CADA página impresa,
       para que el texto no empiece pegado al borde tras un salto de página. */
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
  }
}
.vehicle-card-sold { font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; opacity: .55; }
