/* ============================================================
   CARFRANCO VEHÍCULOS — ESTILOS
   Diseño oscuro premium · azul marino + amarillo
   (No es necesario editar este archivo para actualizar el
    inventario: eso se hace solo en vehiculos.js)
   ============================================================ */

:root {
  --bg: #070B16;
  --bg-2: #0B1122;
  --surface: #101830;
  --surface-2: #16203D;
  --line: rgba(255, 255, 255, 0.08);
  --text: #F4F6FB;
  --muted: #9AA6C0;
  --yellow: #FFD400;
  --yellow-dark: #E6BC00;
  --navy: #1B2C6B;
  --wa: #25D366;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 14px;
}
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 14px; }
.section-sub { color: var(--muted); max-width: 640px; margin-bottom: 40px; font-size: 1.02rem; }
.center { text-align: center; }
.center .section-sub { margin-left: auto; margin-right: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 800; font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-yellow { background: var(--yellow); color: #0B1122; box-shadow: 0 8px 24px rgba(255, 212, 0, 0.25); }
.btn-yellow:hover { background: #FFE14D; }
.btn-outline { border: 1.5px solid rgba(255, 255, 255, 0.25); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-wa { background: var(--wa); color: #06220F; box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25); }
.btn-wa:hover { background: #3BE07C; }
.btn svg { flex: 0 0 auto; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 11, 22, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.brand img { height: 48px; width: auto; }
.brand-name { font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-name span { color: var(--yellow); }
.brand-tag { display: block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.28em; color: var(--muted); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 0.92rem; font-weight: 600; color: var(--muted); transition: color 0.15s; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active { color: var(--yellow); }
.nav .btn { padding: 10px 20px; font-size: 0.85rem; }
.nav a.btn-yellow { color: #0B1122; }
.nav a.btn-yellow:hover { color: #0B1122; }

.menu-btn { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; }

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 10px 6%;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a:last-child { border-bottom: none; }
  .nav .btn { margin: 12px 0; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: saturate(0.9);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(7, 11, 22, 0.96) 25%, rgba(7, 11, 22, 0.72) 55%, rgba(11, 17, 34, 0.35) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 90px 0; max-width: 640px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p { color: #C7CFE2; font-size: 1.08rem; margin-bottom: 34px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; margin-top: 48px; flex-wrap: wrap; }
.hero-badge strong { display: block; font-size: 1.5rem; color: var(--yellow); }
.hero-badge span { font-size: 0.82rem; color: var(--muted); }

/* ---------- Franja marca (guiño a la fachada) ---------- */
.brand-stripe { height: 6px; background: linear-gradient(to bottom, var(--yellow) 50%, var(--navy) 50%); }

/* ---------- Secciones ---------- */
.section { padding: 90px 0; }
.section-dark { background: var(--bg-2); }

/* ---------- Cards de vehículos ---------- */
.grid-vehiculos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}
.card-v {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column;
}
.card-v:hover { transform: translateY(-6px); border-color: rgba(255, 212, 0, 0.45); box-shadow: var(--shadow); }
.card-v-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card-v-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card-v:hover .card-v-img img { transform: scale(1.05); }
.card-v-tag {
  position: absolute; top: 14px; left: 14px;
  background: var(--yellow); color: #0B1122;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.card-v-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-v-body h3 { font-size: 1.25rem; }
.card-v-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.76rem; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px;
}
.card-v-price { font-weight: 800; color: var(--yellow); font-size: 0.95rem; }
.card-v-actions { display: flex; gap: 10px; margin-top: auto; }
.card-v-actions .btn { flex: 1; padding: 11px 10px; font-size: 0.83rem; }

/* ---------- Filtros inventario ---------- */
.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filtro-btn {
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  padding: 9px 20px; border-radius: 999px; font-weight: 700; font-size: 0.86rem;
  cursor: pointer; transition: all 0.15s; font-family: var(--font);
}
.filtro-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.filtro-btn.active { background: var(--yellow); color: #0B1122; border-color: var(--yellow); }

/* ---------- Ficha de vehículo ---------- */
.ficha { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .ficha { grid-template-columns: 1fr; } }
.galeria-main {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 4 / 3; background: var(--surface);
}
.galeria-main img { width: 100%; height: 100%; object-fit: cover; }
.galeria-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.galeria-thumbs button {
  border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer;
  padding: 0; background: none; aspect-ratio: 4 / 3;
}
.galeria-thumbs button.active { border-color: var(--yellow); }
.galeria-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.ficha-info h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 8px; }
.ficha-tipo { color: var(--yellow); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ficha-desc { color: var(--muted); margin: 18px 0 26px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 30px; }
.spec {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px;
}
.spec span { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.spec strong { font-size: 0.98rem; }
.ficha-cta { display: flex; flex-direction: column; gap: 12px; }
.ficha-nota { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }

/* ---------- Beneficios / servicios ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card-s {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.2s, border-color 0.2s;
}
.card-s:hover { transform: translateY(-4px); border-color: rgba(255, 212, 0, 0.4); }
.card-s .icono {
  width: 52px; height: 52px; border-radius: 13px;
  background: rgba(255, 212, 0, 0.12); color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-s h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card-s p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Pasos ---------- */
.pasos { counter-reset: paso; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.paso {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; position: relative;
}
.paso::before {
  counter-increment: paso; content: counter(paso, decimal-leading-zero);
  display: block; font-size: 1.9rem; font-weight: 800; color: var(--yellow);
  margin-bottom: 12px;
}
.paso h3 { font-size: 1.05rem; margin-bottom: 8px; }
.paso p { color: var(--muted); font-size: 0.92rem; }

/* ---------- CTA banda ---------- */
.cta-band {
  background: linear-gradient(120deg, #182B75, #0E1B4D 60%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 54px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.22), transparent 65%);
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 520px; }
.cta-band p { color: #C7CFE2; margin-top: 8px; max-width: 520px; }

/* ---------- Testimonios ---------- */
.card-t { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.estrellas { color: var(--yellow); letter-spacing: 2px; margin-bottom: 14px; }
.card-t p { color: #C7CFE2; font-size: 0.96rem; margin-bottom: 16px; }
.card-t footer { font-weight: 700; font-size: 0.88rem; color: var(--muted); }

/* ---------- Contacto ---------- */
.contacto-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contacto-grid { grid-template-columns: 1fr; } }
.dato { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dato:last-child { border-bottom: none; }
.dato .icono {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px;
  background: rgba(255, 212, 0, 0.12); color: var(--yellow);
  display: flex; align-items: center; justify-content: center;
}
.dato strong { display: block; margin-bottom: 2px; }
.dato span, .dato a { color: var(--muted); font-size: 0.94rem; }
.dato a:hover { color: var(--yellow); }
.mapa { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.mapa iframe { display: block; width: 100%; height: 440px; border: 0; filter: grayscale(0.2) contrast(1.05); }

/* ---------- Footer ---------- */
.footer { background: #05080F; border-top: 1px solid var(--line); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.footer a { color: #C7CFE2; font-size: 0.92rem; display: block; padding: 5px 0; }
.footer a:hover { color: var(--yellow); }
.footer p { color: var(--muted); font-size: 0.92rem; }
.footer .brand img { height: 54px; }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--muted); font-size: 0.8rem;
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  transition: transform 0.15s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Página interna: encabezado ---------- */
.page-head {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  padding: 70px 0 50px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 10px; }
.page-head p { color: var(--muted); max-width: 640px; margin-top: 12px; }

.breadcrumb { font-size: 0.84rem; color: var(--muted); }
.breadcrumb a:hover { color: var(--yellow); }

.empty-msg { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- Utilidades ---------- */
.mt-40 { margin-top: 40px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   MOVIMIENTO E INTERACTIVIDAD
   ============================================================ */

/* Ken Burns en el hero */
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.1); } }
.hero-bg { animation: kenburns 18s ease-in-out infinite alternate; will-change: transform; }

/* Entrada escalonada del contenido del hero */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.hero-content .eyebrow { animation: fadeUp 0.7s 0.05s both; }
.hero-content h1      { animation: fadeUp 0.7s 0.2s both; }
.hero-content p       { animation: fadeUp 0.7s 0.35s both; }
.hero-content .hero-cta    { animation: fadeUp 0.7s 0.5s both; }
.hero-content .hero-badges { animation: fadeUp 0.7s 0.65s both; }

/* Header que se oculta al bajar */
.header { transition: transform 0.32s ease; }
.header.oculto { transform: translateY(-100%); }

/* Cinta en movimiento (marquee) */
.ticker { background: var(--yellow); overflow: hidden; padding: 13px 0; }
.ticker-track { display: flex; width: max-content; animation: ticker 26s linear infinite; }
.ticker-track > div { display: flex; align-items: center; gap: 44px; padding-right: 44px; }
.ticker-track b {
  color: #0B1122; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; font-size: 0.85rem; white-space: nowrap;
}
.ticker-track svg { flex: 0 0 auto; color: #0B1122; opacity: 0.55; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* Pulso del botón de WhatsApp */
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--wa); z-index: -1;
  animation: waPulse 2.2s ease-out infinite;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}

/* Rotación de fotos en tarjetas */
.card-v-img img { transition: transform 0.4s ease, opacity 0.28s ease; }
.card-v-img img.cambiando { opacity: 0; }
.card-v-img .foto-dots {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px; z-index: 2;
  opacity: 0; transition: opacity 0.25s;
}
.card-v:hover .foto-dots { opacity: 1; }
.foto-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.45); transition: background 0.2s, transform 0.2s;
}
.foto-dots i.on { background: var(--yellow); transform: scale(1.25); }

/* Aparición escalonada de tarjetas */
.grid-vehiculos .card-v:nth-child(2), .grid-3 .card-s:nth-child(2), .pasos .paso:nth-child(2) { transition-delay: 0.1s; }
.grid-vehiculos .card-v:nth-child(3), .grid-3 .card-s:nth-child(3), .pasos .paso:nth-child(3) { transition-delay: 0.2s; }
.grid-vehiculos .card-v:nth-child(4), .grid-3 .card-s:nth-child(4), .pasos .paso:nth-child(4) { transition-delay: 0.3s; }
.grid-vehiculos .card-v:nth-child(5), .grid-3 .card-s:nth-child(5) { transition-delay: 0.15s; }
.grid-vehiculos .card-v:nth-child(6), .grid-3 .card-s:nth-child(6) { transition-delay: 0.25s; }

/* Galería: transición suave y zoom */
#foto-main { transition: opacity 0.25s ease; cursor: zoom-in; }
#foto-main.cambiando { opacity: 0; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(4, 7, 14, 0.94); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.lightbox.abierto { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw; max-height: 86vh; border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s ease;
}
.lightbox img.cambiando { opacity: 0; }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lb-btn:hover { background: var(--yellow); color: #0B1122; }
.lb-prev { left: 18px; } .lb-next { right: 18px; }
.lb-cerrar { position: absolute; top: 18px; right: 18px; transform: none; }
.lb-contador {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em;
}
@media (max-width: 600px) { .lb-btn { width: 42px; height: 42px; } .lb-prev { left: 8px; } .lb-next { right: 8px; } }

/* Contadores */
.hero-badge strong { font-variant-numeric: tabular-nums; }

/* Respeto a usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .ticker-track, .wa-float::before,
  .hero-content .eyebrow, .hero-content h1, .hero-content p,
  .hero-content .hero-cta, .hero-content .hero-badges { animation: none; }
  .grid-vehiculos .card-v, .grid-3 .card-s, .pasos .paso { transition-delay: 0s; }
}
