/* ============ VARIABLES ============ */
:root {
  --bg: #0a0d12;
  --bg-soft: #10141b;
  --panel: #151a22;
  --panel-border: rgba(255,255,255,0.08);
  --text: #eef1f6;
  --text-muted: #9aa4b2;
  --amarillo: #ffc32b;
  --amarillo-2: #ffdc73;
  --rojo: #e2352f;
  --chevrolet: #c9a227;
  --renault: #ffcc00;
  --wsp: #25d366;
  --wsp-2: #128c7e;
  --radius: 18px;
  --ff-display: "Rajdhani", sans-serif;
  --ff-body: "Manrope", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  overflow-x: hidden;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 700; letter-spacing: 0.01em; }
.container { width: min(1180px, 92%); margin: 0 auto; }
::selection { background: var(--amarillo); color: #101010; }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(circle at 50% 40%, #171d27 0%, #0a0d12 75%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
  overflow: hidden;
}
.preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; z-index: 2; }
.preloader-logo {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: var(--ff-display); letter-spacing: 0.18em;
  margin-bottom: 28px;
}
.preloader-logo span { color: var(--text-muted); font-size: 0.85rem; }
.preloader-logo strong {
  font-size: clamp(2rem, 6vw, 3rem);
  background: linear-gradient(90deg, var(--amarillo), var(--amarillo-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.preloader-bar {
  width: min(280px, 60vw); height: 3px; background: rgba(255,255,255,0.08);
  border-radius: 3px; overflow: hidden; margin: 0 auto;
}
.preloader-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--amarillo), var(--rojo));
  transition: width 0.15s ease-out;
}
.preloader-pct { margin-top: 12px; font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.1em; }
.preloader-gear {
  position: absolute; border: 3px dashed rgba(255,195,43,0.15); border-radius: 50%;
  animation: spin 12s linear infinite;
}
.preloader-gear.g1 { width: 340px; height: 340px; top: -80px; left: -100px; }
.preloader-gear.g2 { width: 220px; height: 220px; bottom: -60px; right: -60px; animation-direction: reverse; animation-duration: 9s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ FONDO ANIMADO GLOBAL ============ */
.fx-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fx-blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.35;
  animation: float 18s ease-in-out infinite;
}
.fx-blob.b1 { width: 520px; height: 520px; background: #b8842b; top: -10%; left: -10%; animation-delay: 0s; }
.fx-blob.b2 { width: 460px; height: 460px; background: #7c1f1a; bottom: -15%; right: -8%; animation-delay: -6s; }
.fx-blob.b3 { width: 380px; height: 380px; background: #d4a017; top: 45%; left: 60%; animation-delay: -12s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}
.fx-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 75%);
}

/* ============ HEADER ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 18px 0;
  transition: padding 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}
.header.scrolled {
  padding: 10px 0;
  background: rgba(10,13,18,0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  border-bottom: 1px solid var(--panel-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--amarillo), var(--rojo));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 700; color: #10141b;
  box-shadow: 0 6px 18px rgba(255,195,43,0.25);
}
.logo-text { font-family: var(--ff-display); font-size: 1.05rem; letter-spacing: 0.02em; }
.logo-text strong { color: var(--amarillo); }

.nav { display: flex; gap: 30px; }
.nav a {
  font-size: 0.92rem; color: var(--text-muted); font-weight: 600;
  position: relative; padding: 4px 0; transition: color 0.25s ease;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--amarillo); transition: width 0.3s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.btn-header-wsp {
  display: flex; align-items: center; gap: 8px;
  background: var(--wsp); color: #fff; font-weight: 700; font-size: 0.88rem;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 8px 20px rgba(37,211,102,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn-header-wsp:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37,211,102,0.35); }
.btn-header-wsp svg { width: 18px; height: 18px; fill: #fff; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  overflow: hidden; z-index: 1;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-video {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,10,14,0.55) 0%, rgba(8,10,14,0.75) 55%, var(--bg) 100%),
    linear-gradient(100deg, rgba(8,10,14,0.85) 10%, rgba(8,10,14,0.25) 55%, rgba(8,10,14,0.7) 100%);
}
.hero-overlay-grid {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: repeating-linear-gradient(115deg, rgba(255,195,43,0.05) 0px, rgba(255,195,43,0.05) 1px, transparent 1px, transparent 90px);
}

.hero-content { position: relative; padding: 160px 0 120px; z-index: 2; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--amarillo); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.8rem; margin-bottom: 18px;
}
.hero-eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--amarillo); }

.hero-title { font-size: clamp(2.4rem, 6.2vw, 4.6rem); line-height: 1.03; margin-bottom: 22px; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title-brand {
  background: linear-gradient(95deg, var(--amarillo), var(--amarillo-2) 45%, var(--rojo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 560px; color: var(--text-muted); font-size: 1.08rem; margin-bottom: 34px; }
.hero-sub strong { color: var(--text); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 56px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-primary {
  background: linear-gradient(95deg, var(--amarillo), var(--rojo));
  color: #10141b; box-shadow: 0 10px 30px rgba(255,195,43,0.25);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(255,195,43,0.35); }
.btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.25); color: var(--text);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-3px); }

.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.stat strong { display: block; font-family: var(--ff-display); font-size: 2.1rem; color: var(--amarillo); }
.stat span { font-size: 0.82rem; color: var(--text-muted); }

.scroll-cue {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted);
  animation: bob 2.4s ease-in-out infinite;
}
.scroll-cue span {
  width: 22px; height: 36px; border: 2px solid rgba(255,255,255,0.35); border-radius: 20px; position: relative;
}
.scroll-cue span::before {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; background: var(--amarillo); border-radius: 2px;
  animation: scrolldot 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }
@keyframes scrolldot { 0% { opacity: 1; top: 6px; } 80% { opacity: 0; top: 20px; } 100% { opacity: 0; top: 6px; } }

/* ============ MARCAS ============ */
.marcas { position: relative; padding: 90px 0 100px; z-index: 1; }
.marquee { overflow: hidden; border-top: 1px solid var(--panel-border); border-bottom: 1px solid var(--panel-border); padding: 18px 0; margin-bottom: 70px; }
.marquee-track {
  display: flex; gap: 26px; white-space: nowrap; width: max-content;
  animation: marquee 22s linear infinite;
  font-family: var(--ff-display); font-size: 1.4rem; font-weight: 700; color: var(--text-muted);
}
.marquee-track span:nth-child(4n-2) { color: var(--amarillo); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.marcas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.marca-card {
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 38px; position: relative; overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease;
}
.marca-card:hover { transform: translateY(-6px); border-color: rgba(255,195,43,0.35); }
.marca-badge {
  display: inline-block; padding: 8px 18px; border-radius: 999px; font-weight: 700;
  font-family: var(--ff-display); letter-spacing: 0.04em; margin-bottom: 18px; font-size: 0.95rem;
}
.marca-badge.chevrolet { background: rgba(201,162,39,0.16); color: var(--chevrolet); border: 1px solid rgba(201,162,39,0.4); }
.marca-badge.renault { background: rgba(255,204,0,0.16); color: var(--renault); border: 1px solid rgba(255,204,0,0.4); }
.marca-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.marca-card p { color: var(--text-muted); }

/* ============ SECTION HEAD ============ */
.section-eyebrow {
  color: var(--amarillo); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 0.8rem; margin-bottom: 12px;
}
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head h2, .nosotros-text h2, .contacto-text h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 14px; }
.section-desc { color: var(--text-muted); }

/* ============ CATALOGO ============ */
.catalogo { position: relative; padding: 60px 0 110px; z-index: 1; }
.filters { display: flex; flex-direction: column; gap: 18px; margin-bottom: 40px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-btn, .filter-chip {
  background: var(--panel); border: 1px solid var(--panel-border); color: var(--text-muted);
  padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 0.88rem; cursor: pointer;
  transition: all 0.25s ease;
}
.filter-chip { padding: 8px 16px; font-size: 0.82rem; text-transform: capitalize; }
.filter-btn:hover, .filter-chip:hover { border-color: rgba(255,195,43,0.4); color: var(--text); }
.filter-btn.active {
  background: linear-gradient(95deg, var(--amarillo), var(--rojo)); color: #10141b; border-color: transparent;
}
.filter-chip.active { background: rgba(255,195,43,0.16); color: var(--amarillo); border-color: rgba(255,195,43,0.5); }

.catalogo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px;
}
.prod-card {
  background: linear-gradient(165deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--panel-border); border-radius: 16px; overflow: hidden;
  opacity: 0; transform: translateY(24px);
  animation: cardIn 0.55s ease forwards; animation-delay: var(--d, 0s);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
.prod-card:hover { transform: translateY(-8px); border-color: rgba(255,195,43,0.4); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }

.prod-thumb {
  height: 150px; position: relative; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 60%), var(--bg-soft);
  overflow: hidden;
}
.prod-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 10px, transparent 10px 20px);
}
.prod-thumb-icon { font-size: 2.6rem; opacity: 0.5; filter: grayscale(0.2); transition: transform 0.35s ease; }
.prod-card:hover .prod-thumb-icon { transform: scale(1.15) rotate(-8deg); }
.prod-thumb-tag {
  position: absolute; top: 10px; left: 10px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 4px 9px; border-radius: 6px; z-index: 2;
}
.prod-thumb-chevrolet .prod-thumb-tag { background: rgba(201,162,39,0.2); color: var(--chevrolet); }
.prod-thumb-renault .prod-thumb-tag { background: rgba(255,204,0,0.2); color: var(--renault); }

.prod-body { padding: 18px 20px 20px; }
.prod-cat { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.prod-body h3 { font-size: 1.05rem; margin: 6px 0 4px; font-family: var(--ff-body); font-weight: 700; }
.prod-modelo { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.prod-footer { display: flex; align-items: center; justify-content: space-between; }
.prod-precio { font-family: var(--ff-display); font-weight: 700; color: var(--amarillo); font-size: 1.05rem; }
.prod-wsp {
  background: var(--wsp); color: #fff; font-size: 0.78rem; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; transition: transform 0.25s ease, background 0.25s ease;
}
.prod-wsp:hover { background: var(--wsp-2); transform: translateY(-2px); }
.prod-empty { color: var(--text-muted); padding: 40px 0; }

/* ============ NOSOTROS ============ */
.nosotros { position: relative; padding: 110px 0; z-index: 1; }
.nosotros-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; align-items: center; }
.media-frame {
  position: relative; aspect-ratio: 1/1; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--panel-border);
  display: flex; align-items: center; justify-content: center;
}
.media-glow {
  position: absolute; width: 70%; height: 70%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,195,43,0.35), transparent 70%);
  filter: blur(40px); animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.2); opacity: 1; } }
.media-icon { font-size: 6rem; z-index: 2; animation: spin 14s linear infinite; }

.nosotros-text p { color: var(--text-muted); margin-bottom: 26px; max-width: 520px; }
.nosotros-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.nosotros-item { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.nosotros-item span {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(255,195,43,0.15); color: var(--amarillo);
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0;
}

/* ============ CONTACTO ============ */
.contacto { position: relative; padding: 40px 0 120px; z-index: 1; }
.contacto-card {
  background: linear-gradient(120deg, rgba(255,195,43,0.12), rgba(226,53,47,0.12)), var(--panel);
  border: 1px solid var(--panel-border); border-radius: 24px; padding: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.contacto-text { max-width: 520px; }
.contacto-text p { color: var(--text-muted); }
.btn-wsp-lg {
  display: flex; align-items: center; gap: 12px; background: var(--wsp); color: #fff;
  font-weight: 700; padding: 18px 32px; border-radius: 999px; font-size: 1rem;
  box-shadow: 0 12px 30px rgba(37,211,102,0.3); transition: transform 0.25s ease;
  flex-shrink: 0;
}
.btn-wsp-lg svg { width: 22px; height: 22px; fill: #fff; }
.btn-wsp-lg:hover { transform: translateY(-3px) scale(1.03); }

/* ============ FOOTER ============ */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--panel-border); padding: 60px 0 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 320px; }
.footer-brand p { width: 100%; color: var(--text-muted); font-size: 0.88rem; margin-top: 8px; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-cols h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 14px; }
.footer-cols a, .footer-cols span { display: block; margin-bottom: 10px; color: var(--text); font-size: 0.92rem; }
.footer-cols a:hover { color: var(--amarillo); }
.footer-bottom {
  border-top: 1px solid var(--panel-border); padding: 22px 0; text-align: center;
  font-size: 0.82rem; color: var(--text-muted);
}

/* ============ WHATSAPP FLOTANTE ============ */
.wsp-float {
  position: fixed; bottom: 26px; right: 26px; z-index: 400;
  width: 62px; height: 62px; border-radius: 50%; background: var(--wsp);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37,211,102,0.4);
  transition: transform 0.3s ease;
}
.wsp-float:hover { transform: scale(1.1) rotate(6deg); }
.wsp-float svg { width: 32px; height: 32px; fill: #fff; z-index: 2; }
.wsp-float-ping {
  position: absolute; inset: 0; border-radius: 50%; background: var(--wsp);
  animation: ping 2.2s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(1.9); opacity: 0; } }

/* ============ SCROLL REVEAL HELPERS (JS toggles .in) ============ */
[data-anim="fade-up"] { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
[data-anim="fade-up"].in { opacity: 1; transform: translateY(0); }
[data-anim-x="left"] { opacity: 0; transform: translateX(-60px); transition: opacity 0.9s ease, transform 0.9s ease; }
[data-anim-x="right"] { opacity: 0; transform: translateX(60px); transition: opacity 0.9s ease, transform 0.9s ease; }
[data-anim-x].in { opacity: 1; transform: translateX(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .nosotros-grid { grid-template-columns: 1fr; }
  .media-frame { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 860px) {
  .nav { position: fixed; top: 0; right: 0; height: 100vh; width: min(300px, 80vw);
    background: rgba(10,13,18,0.98); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 26px;
    padding: 40px; transform: translateX(100%); transition: transform 0.4s ease; }
  .nav.open { transform: translateX(0); }
  .burger { display: flex; }
  .btn-header-wsp span { display: none; }
  .marcas-grid { grid-template-columns: 1fr; }
  .contacto-card { flex-direction: column; text-align: center; padding: 40px 26px; }
  .contacto-text { max-width: 100%; }
}
@media (max-width: 560px) {
  .hero-content { padding: 130px 0 90px; }
  .hero-stats { gap: 26px; }
  .stat strong { font-size: 1.6rem; }
  .filters { gap: 12px; }
  .wsp-float { width: 54px; height: 54px; right: 18px; bottom: 18px; }
  .wsp-float svg { width: 26px; height: 26px; }
}
