/* ============================================================================
   REPUESTOS NT — Hoja de estilos base
   Complementa a Tailwind (ver js/nt-config.js). Todo lo que no se expresa
   cómodamente con utilidades vive aquí.
   ========================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  min-height: max(884px, 100dvh);
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}
.fill-icon { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero-gradient {
  background: linear-gradient(to right, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 0) 100%);
}

/* Degradado azul de marca (hero de la página Nissan) */
.nt-blue-gradient {
  background: linear-gradient(135deg, #1a4b8c 0%, #123462 55%, #001b3d 100%);
}

/* ── Scroll reveal ─────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.active { opacity: 1; transform: translateY(0); }

.stagger-1 { transition-delay: 100ms; }
.stagger-2 { transition-delay: 200ms; }
.stagger-3 { transition-delay: 300ms; }
.stagger-4 { transition-delay: 400ms; }

/* ── Hover de tarjetas ─────────────────────────────────────────────────── */
.card-hover { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.card-hover:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.card-hover:hover .hover-shift { transform: translateX(4px); transition: transform 0.3s ease; }

/* ── Botón con brillo ──────────────────────────────────────────────────── */
.shimmer-btn { position: relative; overflow: hidden; }
.shimmer-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: rotate(45deg);
  animation: shimmer 4s infinite;
}
@keyframes shimmer {
  0%        { transform: translateX(-150%) rotate(45deg); }
  20%, 100% { transform: translateX(150%) rotate(45deg); }
}

/* ── FAQ (<details>) ───────────────────────────────────────────────────── */
details summary::-webkit-details-marker { display: none; }
details[open] summary ~ * { animation: sweep 0.3s ease-in-out; }
@keyframes sweep {
  0%   { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Grilla masonry de categorías ──────────────────────────────────────── */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
}
@media (min-width: 768px) {
  .masonry-grid { grid-template-columns: repeat(4, 1fr); }
  .masonry-item-large { grid-row: span 2; grid-column: span 1; }
  .masonry-item-wide { grid-column: span 2; }
}

/* ── Navegación de escritorio ──────────────────────────────────────────── */
.nav-link {
  color: #5f5e5e;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: #1a4b8c; }
.nav-link.active { font-weight: 700; border-bottom: 2px solid #1a4b8c; padding-bottom: 2px; }

/* Menú móvil desplegable */
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

/* ── Botón flotante de WhatsApp ────────────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.1); }

/* ── Barra de navegación inferior (solo móvil) ─────────────────────────── */
.mobile-bottom-nav { display: none; box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15); }
@media (max-width: 767px) {
  .mobile-bottom-nav { display: flex; }
  .wa-float { display: none; }
  body { padding-bottom: 64px; }
}
.bn-item { color: #8C8C8C; text-decoration: none; transition: color 0.15s; }
.bn-item.active { color: #1a4b8c; }
.bn-item.active .material-symbols-outlined { font-variation-settings: 'FILL' 1; color: #1a4b8c; }
.bn-wa span:last-child { color: #25D366 !important; }
.bn-wa .material-symbols-outlined { color: #25D366; }

/* ── Placeholder de imagen ─────────────────────────────────────────────────
   Fondo de respaldo mientras las fotos definitivas no existan: si el archivo
   de images/ falta, se ve este degradado en vez de un hueco roto.           */
.img-ph {
  background-color: #dfe6f2;
  background-image: linear-gradient(135deg, #e8edf6 0%, #cdd9ea 100%);
}

/* ── Chips del selector de vehículo ────────────────────────────────────── */
.picker-chip {
  border: 1px solid #b6c8e9;
  background: #ffffff;
  color: #5f5e5e;
  transition: all 0.2s;
  cursor: pointer;
}
.picker-chip:hover { border-color: #1a4b8c; color: #1a4b8c; }
.picker-chip.active { background: #1a4b8c; border-color: #1a4b8c; color: #ffffff; }

/* ── Insignias de disponibilidad ───────────────────────────────────────── */
.badge-stock  { background: #e8f5ee; color: #00873D; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; }
.badge-import { background: #fff3e0; color: #e65100; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9999px; }

/* ── Accesibilidad: movimiento reducido ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .card-hover, .shimmer-btn::after, .hover-shift {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
