/* ═══════════════════════════════════════════════════════════
   style.css — Repuestos Derbi
   Paleta: #fefefe · #fef111 · #373437 · #1f5daa
   Fuente: Inter (Google Fonts)
   Mobile-first. Sin dependencias.
═══════════════════════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
  --blanco:     #fefefe;
  --amarillo:   #fef111;
  --amarillo-d: #d4c900;   /* hover del amarillo */
  --gris:       #373437;
  --gris-l:     #5a575a;
  --azul:       #1f5daa;
  --azul-l:     #2a72d4;
  --fondo:      #f5f5f5;
  --borde:      #e0e0e0;

  --fuente:     'Inter', system-ui, Arial, sans-serif;

  --radio:      10px;
  --radio-lg:   16px;
  --sombra:     0 2px 12px rgba(0,0,0,.08);
  --sombra-lg:  0 4px 24px rgba(0,0,0,.12);
  --transicion: .2s ease;

  --container:  1100px;
}

/* ─── Reset mínimo ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gris);
  background: var(--blanco);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }

/* ─── Utilidades ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Scroll-reveal: las clases las agrega main.js */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─── Íconos SVG ─── */
.icon    { width: 20px; height: 20px; flex-shrink: 0; }
.icon-xl { width: 40px; height: 40px; flex-shrink: 0; }
.icon-pin { width: 24px; height: 24px; color: var(--azul); flex-shrink: 0; margin-top: 2px; }

/* ─── Botones ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: var(--radio);
  font-family: var(--fuente);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transicion), color var(--transicion),
              border-color var(--transicion), transform var(--transicion),
              box-shadow var(--transicion);
  white-space: nowrap;
  text-decoration: none;
}
.btn:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 3px;
}
.btn:active { transform: scale(.97); }

.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* Amarillo — CTA principal */
.btn-primary {
  background: var(--amarillo);
  color: var(--gris);
  border-color: var(--amarillo);
}
.btn-primary:hover {
  background: var(--amarillo-d);
  border-color: var(--amarillo-d);
  box-shadow: 0 4px 16px rgba(254,241,17,.4);
}

/* Outline — CTA secundario */
.btn-outline {
  background: transparent;
  color: var(--gris);
  border-color: var(--gris);
}
.btn-outline:hover {
  background: var(--gris);
  color: var(--blanco);
}

/* Header WhatsApp */
.btn-whatsapp {
  background: #25d366;
  color: var(--blanco);
  border-color: #25d366;
}
.btn-whatsapp:hover {
  background: #1ebe5d;
  border-color: #1ebe5d;
  box-shadow: 0 4px 14px rgba(37,211,102,.35);
}

/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blanco);
  border-bottom: 2px solid var(--amarillo);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .75rem;
}
.logo-link { display: flex; align-items: center; }
.logo { height: 52px; width: auto; object-fit: contain; }

.header-nav {
  display: none; /* oculto en mobile */
  align-items: center;
  gap: 1.75rem;
}
.header-nav a {
  font-weight: 600;
  font-size: .9rem;
  color: var(--gris);
  transition: color var(--transicion);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.header-nav a:hover { color: var(--azul); }

@media (min-width: 640px) {
  .header-nav { display: flex; }
}

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  padding-block: 3.5rem 3rem;
  background: var(--gris);
  color: var(--blanco);
  overflow: hidden;
}

/* Acento geométrico decorativo (amarillo, CSS puro) */
.hero-bg-accent {
  position: absolute;
  top: -60px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: var(--amarillo);
  opacity: .08;
  border-radius: 50%;
  pointer-events: none;
}
.hero-bg-accent::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 200px;
  height: 200px;
  background: var(--azul);
  opacity: .5;
  border-radius: 50%;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--amarillo);
  margin-bottom: .75rem;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--blanco);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: 1.05rem;
  color: #ccc;
  max-width: 560px;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.hero-sub strong { color: var(--amarillo); }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.btn-outline { /* en fondo oscuro, ajuste */
  color: var(--blanco);
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--blanco);
  color: var(--blanco);
}

/* Stats / badges */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.stat-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radio);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  backdrop-filter: blur(4px);
}
.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--amarillo);
  line-height: 1;
}
.stat-icon { font-size: 1.6rem; line-height: 1; }
.stat-label { font-size: .82rem; color: #ccc; font-weight: 500; }

@media (min-width: 768px) {
  .hero { padding-block: 5rem 4.5rem; }
  .hero-inner { flex-direction: row; align-items: center; gap: 3rem; }
  .hero-text { flex: 1; }
  .hero-stats {
    flex: 0 0 240px;
    grid-template-columns: 1fr;
    gap: .75rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   TIPOGRAFÍA SECCIONES
═══════════════════════════════════════════════════════════ */
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--gris);
  text-align: center;
  margin-bottom: .5rem;
}
.section-sub {
  text-align: center;
  color: var(--gris-l);
  font-size: .97rem;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

/* ═══════════════════════════════════════════════════════════
   MARCAS
═══════════════════════════════════════════════════════════ */
.section-marcas {
  background: var(--fondo);
  padding-block: 4rem;
}

.marcas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.marca-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: var(--sombra);
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
}
.marca-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-lg);
  border-color: var(--amarillo);
}

.marca-logo-area {
  height: 64px;
  display: flex;
  align-items: center;
}
.marca-logo {
  max-height: 56px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.marca-logo-placeholder {
  display: flex;
  align-items: center;
}

.marca-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gris);
}
.marca-card p {
  font-size: .9rem;
  color: var(--gris-l);
  line-height: 1.55;
}
.marca-tag {
  display: inline-block;
  background: var(--amarillo);
  color: var(--gris);
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .65rem;
  border-radius: 20px;
  align-self: flex-start;
  margin-top: auto;
}

.marcas-nota {
  text-align: center;
  font-size: .92rem;
  color: var(--gris-l);
}
.marcas-nota a {
  color: var(--azul);
  font-weight: 700;
  text-decoration: underline;
  transition: color var(--transicion);
}
.marcas-nota a:hover { color: var(--azul-l); }

@media (min-width: 640px) {
  .marcas-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   UBICACIÓN
═══════════════════════════════════════════════════════════ */
.section-ubicacion {
  background: var(--blanco);
  padding-block: 4rem;
}

.ubicacion-inner {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.ubicacion-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ubicacion-address {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: 1rem;
}
.ubicacion-address div {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.ubicacion-address strong { font-size: 1.05rem; font-weight: 700; color: var(--gris); }
.ubicacion-address span { color: var(--gris-l); font-size: .9rem; }

.horarios h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gris);
  margin-bottom: .75rem;
}
.horarios-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.horarios-tabla td {
  padding: .45rem .5rem;
  border-bottom: 1px solid var(--borde);
}
.horarios-tabla td:first-child {
  font-weight: 600;
  color: var(--gris);
  white-space: nowrap;
  padding-right: 1.5rem;
}
.horarios-tabla td:last-child { color: var(--gris-l); }
.cerrado { color: #b0b0b0 !important; font-style: italic; }
.sep { margin-inline: .25rem; color: var(--gris-l); }

/* Iframe mapa */
.mapa-wrapper {
  width: 100%;
  border-radius: var(--radio-lg);
  overflow: hidden;
  box-shadow: var(--sombra-lg);
  aspect-ratio: 4/3;
  background: var(--fondo);
}
.mapa-wrapper iframe {
  width: 100%;
  height: 100%;
  display: block;
}

@media (min-width: 768px) {
  .ubicacion-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 3rem;
  }
  .ubicacion-info { flex: 0 0 320px; }
  .mapa-wrapper { flex: 1; aspect-ratio: unset; height: 420px; }
}

/* ═══════════════════════════════════════════════════════════
   CONTACTO
═══════════════════════════════════════════════════════════ */
.section-contacto {
  background: var(--gris);
  padding-block: 4rem;
}
.section-contacto .section-title { color: var(--blanco); }
.section-contacto .section-sub   { color: #bbb; }

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.contacto-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radio-lg);
  border: 1px solid rgba(255,255,255,.1);
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.contacto-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  border-color: var(--amarillo);
}
.contacto-card strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blanco);
}
.contacto-card span {
  font-size: .95rem;
  color: #ccc;
}
.contacto-card em {
  font-size: .82rem;
  font-style: normal;
  color: var(--amarillo);
  font-weight: 600;
  margin-top: .25rem;
}

.card-whatsapp       { color: #25d366; }
.card-whatsapp:hover { border-color: #25d366; }

.card-instagram       { color: #e1306c; }
.card-instagram:hover { border-color: #e1306c; }

.card-info { cursor: default; color: var(--azul-l); }
.card-info:hover { border-color: var(--azul-l); }

@media (min-width: 640px) {
  .contacto-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.site-footer {
  background: #1e1c1e;
  color: #888;
  padding-block: 2.5rem;
  font-size: .85rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}
.footer-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  opacity: .85;
  filter: brightness(1.1);
}
.footer-text { display: flex; flex-direction: column; gap: .3rem; }
.footer-copy { color: #555; font-size: .8rem; }

/* ═══════════════════════════════════════════════════════════
   BOTÓN FLOTANTE WHATSAPP
═══════════════════════════════════════════════════════════ */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #25d366;
  color: var(--blanco);
  font-weight: 700;
  font-size: .9rem;
  padding: .8rem 1.2rem;
  border-radius: 50px;
  box-shadow: 0 4px 18px rgba(37,211,102,.45);
  transition: transform var(--transicion), box-shadow var(--transicion), background var(--transicion);
}
.wa-float svg { width: 22px; height: 22px; }
.wa-float:hover {
  background: #1ebe5d;
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(37,211,102,.55);
}
.wa-float:focus-visible { outline: 3px solid #25d366; outline-offset: 4px; }

/* En desktop, solo el ícono (sin texto) */
@media (min-width: 768px) {
  .wa-float {
    padding: .9rem;
    border-radius: 50%;
  }
  .wa-float span { display: none; }
}

/* ─── Accesibilidad: sin animaciones si el usuario lo prefiere ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
