/* AUTOMOTORES OMEGA — Sistema visual */
:root {
  --bg: #0a0a0a;
  --bg-elev: #131311;
  --bg-elev-2: #1c1b18;
  --line: #2a2823;
  --line-soft: #1f1d1a;
  --ink: #f3ede2;
  --ink-dim: #a8a094;
  --ink-mute: #6b6358;
  --accent: #ea5a0c;
  --accent-bright: #ff7a2e;
  --gold: #a08254;
  --gold-soft: #c9a961;

  --serif: "Cairo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "Cairo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Tipografía */
.serif { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
}
.display-xl {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(72px, 11vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.display-lg {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(48px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.display-md {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.italic { font-style: normal; font-weight: 300; text-transform: none; letter-spacing: -0.01em; }

/* Layout */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* Grid líneas decorativas */
.grid-lines {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: 0.5;
}

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.btn-accent:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink-dim); }
.btn-ghost:hover { background: var(--bg-elev); color: var(--ink); }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 18px 32px; font-size: 13px; }
.btn-sm { padding: 8px 14px; font-size: 10px; }

/* Inputs */
.input, .select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 14px 0 10px;
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
  appearance: none;
  border-radius: 0;
  transition: border-color 0.2s;
}
.input:focus, .select:focus { border-color: var(--ink); }
.input::placeholder { color: var(--ink-mute); }
.field { position: relative; }
.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  margin-bottom: 4px;
}

/* Marca / divisor */
.rule { height: 1px; background: var(--line); border: 0; }
.rule-strong { height: 1px; background: var(--ink-dim); border: 0; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s;
}
.site-header-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 14px;
}
.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}
.brand-logo-lg { height: 80px; }
.brand-mark {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}
.brand-mark .accent { color: var(--accent); }
.brand-sub {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding-left: 14px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}
@media (max-width: 1080px) {
  .brand-sub { display: none; }
}
.nav-links {
  display: flex; align-items: center; gap: 32px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.nav-links a { color: var(--ink-dim); transition: color 0.2s, text-shadow 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active { color: var(--accent); text-shadow: 0 0 14px rgba(234,90,12,0.5); }

/* Acciones a la derecha (CTA + hamburguesa) */
.header-actions { display: flex; align-items: center; gap: 12px; }

/* Botón hamburguesa — coherente con el estilo recto/brutalista del sitio */
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nav-toggle:hover { border-color: var(--ink-dim); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-toggle-bars { display: flex; flex-direction: column; gap: 4px; width: 20px; }
.nav-toggle-bars i { display: block; height: 2px; background: var(--ink); border-radius: 1px; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle-bars.open i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle-bars.open i:nth-child(2) { opacity: 0; }
.nav-toggle-bars.open i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Scrim oscuro detrás del menú (solo móvil) */
.nav-scrim {
  display: none;
  position: fixed; inset: 72px 0 0 0; z-index: 90;
  background: rgba(10,10,10,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  /* Menú desplegable a pantalla completa bajo el header */
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0; z-index: 95;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    padding: 6px 0;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a {
    padding: 16px 24px; min-height: 48px;
    display: flex; align-items: center;
    font-size: 14px; letter-spacing: 0.16em;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-links a.active { box-shadow: inset 3px 0 0 var(--accent); }
  .nav-links a:last-child { border-bottom: 0; }
  .site-header.menu-open .nav-scrim { display: block; opacity: 1; pointer-events: auto; }
}
/* En pantallas chicas el CTA del header molesta (ya está el botón flotante) */
@media (max-width: 520px) {
  .header-wa { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bars i, .nav-links, .nav-scrim { transition: none; }
}

/* Vehicle Card */
.vcard {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1), border-color 0.3s;
  cursor: pointer;
  text-align: left;
}
.vcard:hover {
  border-color: var(--ink-dim);
  transform: translateY(-4px);
}
.vcard-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-elev-2);
}
.vcard-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
.vcard:hover .vcard-photo { transform: scale(1.04); }
.vcard-photo-count {
  position: absolute; bottom: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 0.12em;
  padding: 5px 9px;
  background: rgba(10,10,10,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--ink);
}
.vcard-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
}
.vcard-tag.accent { color: var(--accent-bright); border-color: var(--accent); }
.vcard-tag.gold { color: var(--gold-soft); border-color: var(--gold); }
.vcard-body { padding: 20px; }
.vcard-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  white-space: nowrap;
  gap: 8px;
}
.vcard-meta span { flex-shrink: 0; }
.vcard-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.vcard-sub { color: var(--ink-dim); font-size: 13px; margin-bottom: 18px; font-weight: 400; }
.vcard-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.vcard-price {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.vcard-price .currency {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  margin-right: 6px;
  vertical-align: 4px;
}
.vcard-cta {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-bright);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}

/* Placeholder de auto */
.car-ph {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.018) 0 2px,
      transparent 2px 14px),
    linear-gradient(180deg, #1a1916 0%, #0e0d0b 70%, #050504 100%);
  display: flex; align-items: center; justify-content: center;
}
.car-ph-mark {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(243,237,226,0.35);
}
.car-ph svg { width: 70%; max-width: 360px; opacity: 0.45; }

/* WhatsApp floating */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 14px 14px;
  background: #15803d;
  color: white;
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(21,128,61,0.35), 0 2px 8px rgba(0,0,0,0.4);
  border: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.25s, box-shadow 0.25s;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(21,128,61,0.5), 0 4px 12px rgba(0,0,0,0.5); }
.wa-float-ic {
  width: 32px; height: 32px;
  background: white; color: #15803d;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.wa-float:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* En celular: burbuja redonda compacta (≥56px, no tapa contenido) */
@media (max-width: 640px) {
  .wa-float { padding: 0; width: 56px; height: 56px; gap: 0; justify-content: center; bottom: 18px; right: 18px; }
  .wa-float-label { display: none; }
}

/* Animations */
@keyframes drift-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }

/* Tweaks panel — usar variables CSS sobrescribibles */
[data-density="3"] .grid-vehicles { grid-template-columns: repeat(3, 1fr); }
[data-density="4"] .grid-vehicles { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) {
  [data-density="3"] .grid-vehicles,
  [data-density="4"] .grid-vehicles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  [data-density="3"] .grid-vehicles,
  [data-density="4"] .grid-vehicles { grid-template-columns: 1fr; }
}
