/**
 * Dunes Parfums - Módulo de Animaciones y Transiciones (CSS3)
 * Proporciona efectos sutiles de entrada, flotación y micro-interacciones.
 */

/* ==========================================================================
   Efecto de Flotación Sutil (Hero Perfume)
   ========================================================================== */
@keyframes floatingPerfume {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-12px) rotate(1deg);
        filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.45));
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* ==========================================================================
   Efecto de Pulso para el Carrito
   ========================================================================== */
@keyframes cartPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        box-shadow: 0 0 10px var(--color-primary);
    }

    100% {
        transform: scale(1);
    }
}

.pulse-anim {
    animation: cartPulse 0.4s ease-out;
}

/* ==========================================================================
   Animación Scroll Reveal (Aparición al desplazar)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Retrasos de animación para efectos de cuadrícula secuencial */
.reveal:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal:nth-child(3) {
    transition-delay: 0.2s;
}

.reveal:nth-child(4) {
    transition-delay: 0.3s;
}

.reveal:nth-child(5) {
    transition-delay: 0.4s;
}

.reveal:nth-child(6) {
    transition-delay: 0.5s;
}

/* ==========================================================================
   Efectos de Transición para Componentes
   ========================================================================== */

/* Hover en Botones */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.08);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

/* Brillo sutil para tarjetas o banners (Gold Hover Glow) */
.product-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 0 15px rgba(212, 175, 55, 0.15);
}

/* Efecto Ken Burns suave para imágenes de fondo o categoría */
.category-img {
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Spinner de carga */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}