/**
 * Performance Optimization CSS
 * Targeted rules only — avoid universal (*) selectors (Lighthouse Style & Layout cost).
 */

/* Prefer reduced motion when user requests it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

html {
    scroll-behavior: auto;
}

/* Kill known expensive decorative animations by selector (not *) */
.hero-bg-orb,
.trust-glow-orb,
.cta-glow-orb,
.search-hero-bg-1,
.search-hero-bg-2,
.search-hero-bg-3,
body::before,
body::after {
    animation: none !important;
}

@media (max-width: 768px) {
    .hero-bg-orb,
    .trust-glow-orb,
    .cta-glow-orb {
        display: none;
    }

    .product-card:hover .product-image img {
        transform: none;
        filter: none;
    }

    .product-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* GPU-friendly cards without blanket will-change */
.product-card,
.trust-card-premium,
.cta-btn-premium,
.how-it-works-item,
.category-card {
    transform: translateZ(0);
    transition-property: transform, opacity;
    transition-duration: 0.15s;
    transition-timing-function: ease;
}

.product-card:hover {
    will-change: transform;
}

.product-card:hover .product-image img {
    transform: scale(1.03);
    transition: transform 0.15s ease;
}

.product-overlay {
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
}

.stats-section-modern,
.cta-section-premium {
    contain: layout style paint;
}

img[loading="lazy"] {
    background: var(--bg-secondary, #1a1a1a);
}

img[src*="favicon"],
.hero-logo-mobile {
    image-rendering: -webkit-optimize-contrast;
}
