/* ============================================
   ANIMATIONS — Keyframes & Scroll Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero entrance animation */
@media (prefers-reduced-motion: no-preference) {
    .hero-eyebrow {
        animation: fadeInUp 0.7s ease both;
        animation-delay: 0.2s;
    }

    .hero-title {
        animation: fadeInUp 0.8s ease both;
        animation-delay: 0.4s;
    }

    .hero-subtitle {
        animation: fadeInUp 0.8s ease both;
        animation-delay: 0.6s;
    }

    .hero-cta {
        animation: fadeInUp 0.8s ease both;
        animation-delay: 0.8s;
    }

    .hero-scroll-indicator {
        animation: fadeIn 1s ease both;
        animation-delay: 1.2s;
    }
}

/* Product card scroll animation */
.fade-hidden {
    opacity: 0;
    transform: translateY(30px);
}

.fade-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 0.8s ease;
}

/* Scroll-driven animations (progressive enhancement) */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .anim-fade-up {
            animation: fadeInUp 0.55s ease both;
            animation-timeline: view();
            animation-range: entry 0% entry 28%;
        }

        .anim-fade-in {
            animation: fadeIn 0.7s ease both;
            animation-timeline: view();
            animation-range: entry 0% entry 25%;
        }

        .testimonials-carousel .testimonial-card {
            animation: fadeInUp 0.5s ease both;
            animation-timeline: view();
            animation-range: entry 0% entry 35%;
        }

        .bestsellers-carousel .product-card {
            animation: fadeInUp 0.5s ease both;
            animation-timeline: view();
            animation-range: entry 0% entry 35%;
        }
    }
}

/* ── Skeleton Loader ──────────────────────────── */

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.product-card-skeleton {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    animation: skeleton-pulse 1.6s ease-in-out infinite;
    min-height: 340px;
}

/* Carousel variant — fixed width so it doesn't collapse */
.bestsellers-carousel .product-card-skeleton {
    min-width: 210px;
    min-height: 300px;
    flex-shrink: 0;
}
