/* ==========================================================================
   ESTILOS BASE, ANCLAJES Y PREVENCIÓN DE DESBORDAMIENTO
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

section[id],
div[id] {
  scroll-margin-top: 5.5rem;
}

img,
svg {
  max-width: 100%;
}

/* ==========================================================================
   NAVEGACIÓN ACTIVA (SCROLL SPY)
   ========================================================================== */
.nav-pill.is-active-aura {
  background-color: #E0F7FA;
  color: #0B2545;
}

.nav-pill.is-active-fiscal {
  background-color: #FEF3C7;
  color: #B45309;
}

.nav-pill.is-active-contact {
  background-color: #F1F5F9;
  color: #0F172A;
}

/* ==========================================================================
   BANNER DINÁMICO DE COTIZACIÓN (DESPACHO FISCAL)
   ========================================================================== */
@keyframes quoteBannerPop {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quote-banner-highlight {
  animation: quoteBannerPop 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ==========================================================================
   APARTADO DE PRODUCTOS: ANIMACIONES DE TARJETAS Y ESPACIO DE IMAGEN
   ========================================================================== */
@keyframes productCardFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: productCardFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease;
}

/* Cascada escalonada en las 10 tarjetas */
.product-card:nth-child(1) { animation-delay: 0.04s; }
.product-card:nth-child(2) { animation-delay: 0.08s; }
.product-card:nth-child(3) { animation-delay: 0.12s; }
.product-card:nth-child(4) { animation-delay: 0.16s; }
.product-card:nth-child(5) { animation-delay: 0.20s; }
.product-card:nth-child(6) { animation-delay: 0.24s; }
.product-card:nth-child(7) { animation-delay: 0.28s; }
.product-card:nth-child(8) { animation-delay: 0.32s; }
.product-card:nth-child(9) { animation-delay: 0.36s; }
.product-card:nth-child(10) { animation-delay: 0.40s; }

/* Hover únicamente en dispositivos con puntero fino (evita estados pegados en móvil) */
@media (hover: hover) and (pointer: fine) {
  .product-card:hover {
    transform: translateY(-6px);
  }

  .product-card:hover .product-img-slot img {
    transform: scale(1.07);
  }
}

/* Contenedor predeterminado para la imagen del producto */
.product-img-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #F8FAFC;
}

/* Indicador visual sutil si algún contenedor queda vacío */
.product-img-slot:empty::before {
  content: "Espacio para imagen";
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 1.5rem);
  height: calc(100% - 1.5rem);
  border: 2px dashed #CBD5E1;
  border-radius: 0.85rem;
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.product-card:hover .product-img-slot:empty::before {
  border-color: #00A8E8;
  color: #0B2545;
}

/* Ajuste automático de imagen dentro de .product-img-slot */
.product-img-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   ACCESIBILIDAD: REDUCCIÓN DE MOVIMIENTO
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .product-card,
  .quote-banner-highlight {
    animation: none;
    opacity: 1;
    transform: none;
  }
}