/* Custom properties for easing */
:root {
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets for animations — JS-gated: visible by default, hidden only when .js confirms observer works */
.hero-split__content h1,
.hero-split__content p,
.hero-split__actions,
.hero-content__badge,
.category-card, 
.trust-item,
.footer-inner,
.brand-image-wrap,
.brand-content {
    visibility: visible;
}

html.js .hero-split__content h1,
html.js .hero-split__content p,
html.js .hero-split__actions,
html.js .hero-content__badge,
html.js .category-card,
html.js .trust-item,
html.js .footer-inner,
html.js .brand-image-wrap,
html.js .brand-content {
    visibility: hidden;
}

html.js .is-visible.hero-split__content h1,
html.js .is-visible.hero-split__content p,
html.js .is-visible.hero-split__actions,
html.js .is-visible.hero-content__badge,
html.js .is-visible.category-card,
html.js .is-visible.trust-item,
html.js .is-visible.footer-inner,
html.js .is-visible.brand-image-wrap,
html.js .is-visible.brand-content {
    visibility: visible;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-premium), height 0.3s var(--ease-premium), background-color 0.3s var(--ease-premium), border-color 0.3s var(--ease-premium);
    mix-blend-mode: difference;
}
.custom-cursor.hovering {
    width: 50px;
    height: 50px;
    background-color: var(--color-accent);
    border-color: transparent;
    opacity: 0.5;
}
.custom-cursor.hidden {
    opacity: 0;
}

@media (max-width: 768px) {
    .custom-cursor { display: none !important; }
}

/* Magnetic Button & Ripple Glow */
.magnetic-btn, .btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium), background-color 0.3s var(--ease-premium);
}
.magnetic-btn::after, .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-premium), height 0.4s var(--ease-premium), opacity 0.4s var(--ease-premium);
    opacity: 0;
    pointer-events: none;
}
.magnetic-btn:hover, .btn:hover {
    transform: scale(1.03);
}
.magnetic-btn:hover::after, .btn:hover::after {
    width: 150%;
    height: 150%;
    padding-bottom: 150%;
    opacity: 1;
}
.ripple-active::after {
    animation: rippleEffect 0.6s var(--ease-premium);
}
@keyframes rippleEffect {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 200%; height: 200%; opacity: 0; }
}

/* Navbar */
.site-header {
    transition: transform 0.4s var(--ease-premium), background-color 0.4s var(--ease-premium), backdrop-filter 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium) !important;
}
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.site-header.nav-hidden {
    transform: translateY(-100%);
}

.header-nav__link {
    position: relative;
}
.header-nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.3s var(--ease-premium), left 0.3s var(--ease-premium);
}
.header-nav__link:hover::after {
    width: 100%;
    left: 0;
}

.header-logo {
    display: inline-block;
    transition: transform 0.3s var(--ease-premium);
}
.header-logo:hover {
    transform: scale(1.05) rotate(-2deg);
}

/* Image zoom in hover */
.brand-image-wrap img, .category-card__image {
    transition: transform 0.6s var(--ease-premium) !important;
}
.brand-image-wrap:hover img, .category-card:hover .category-card__image {
    transform: scale(1.05) !important;
}

/* Hero Elements */
.hero-stage { perspective: 1000px; }
.hero-slide-visual { transform-style: preserve-3d; }
.hero-slide-visual img { animation: none !important; }
.product-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    width: 60%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 70%);
    transform: translateX(-50%);
    opacity: 0.8;
    pointer-events: none;
    z-index: -1;
}
#particles-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
}
.hero-bg-glow {
    position: absolute; top: 50%; left: 20%; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(236,102,51,0.15) 0%, rgba(28,31,74,0) 70%);
    transform: translate(-50%, -50%); border-radius: 50%; filter: blur(60px); z-index: 1; pointer-events: none;
}

/* Newsletter Gradient Shift */
.newsletter-section {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light), var(--color-primary));
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Product Card Enhanced Interactions */
.product-card {
    transition: box-shadow 0.4s var(--ease-premium), transform 0.4s var(--ease-premium), border-color 0.4s var(--ease-premium);
}
.product-card:hover {
    box-shadow: 0 15px 35px rgba(236, 102, 51, 0.15) !important;
    border-color: rgba(236, 102, 51, 0.4) !important;
}
.product-card__image-wrap {
    perspective: 1000px;
}
.product-card__image {
    transition: transform 0.5s var(--ease-premium) !important;
}
.product-card:hover .product-card__image {
    transform: scale(1.1) !important;
}
.product-card__body {
    transition: transform 0.4s var(--ease-premium);
}
.product-card:hover .product-card__body {
    transform: translateY(-4px);
}
.product-card__footer {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s var(--ease-premium);
    position: absolute;
    bottom: 20px;
    left: 24px;
    right: 24px;
}
.product-card:hover .product-card__footer,
.product-card:focus-within .product-card__footer {
    opacity: 1;
    transform: translateY(0);
}
@media (hover: none) {
    .product-card__footer {
        opacity: 1;
        transform: none;
        position: static;
    }
    .product-card__body {
        padding-bottom: var(--space-md) !important;
    }
}
/* Adjust body padding so footer has space */
.product-card__body {
    padding-bottom: 70px !important;
}

/* Pulse Badge */
.product-card__badge {
    animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
    0% { box-shadow: 0 0 0 0 rgba(236, 102, 51, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(236, 102, 51, 0); }
    100% { box-shadow: 0 0 0 0 rgba(236, 102, 51, 0); }
}

/* Footer icons hover */
.footer-social-icon {
    transition: transform 0.4s var(--ease-premium);
}
.footer-social-icon:hover {
    transform: scale(1.2) translateY(-4px);
}

/* Preloader Hide Logic (fallback if JS fails) */
.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

/* Prefer Reduced Motion */
@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;
    }
    .custom-cursor { display: none !important; }
}

/* Image loader spinner (product gallery) */
@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }
