/* ================================================
   PREMIUM UI ENHANCEMENTS - Angry Rooster
   Lowkey Perfect Polish Layer
   ================================================ */

/* ==============================================
   1. GLOBAL TYPOGRAPHY REFINEMENTS
   ============================================== */
html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-feature-settings: 'kern' 1, 'liga' 1;
}

/* ==============================================
   2. PREMIUM BUTTON SHINE EFFECT
   ============================================== */
.primary-btn,
.hero-button.primary-btn,
.shop-button,
.cta-button,
.newsletter-button,
.add-to-cart-clean,
.notify-me-btn,
.view-product-btn {
    position: relative;
    overflow: hidden;
}

.primary-btn::before,
.shop-button::before,
.newsletter-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255,255,255,0.4) 50%,
        transparent 100%
    );
    transform: skewX(-25deg);
    transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.primary-btn:hover::before,
.shop-button:hover::before,
.newsletter-button:hover::before {
    left: 150%;
}

/* Dark button shine variant */
.add-to-cart-clean::after,
.notify-me-btn::after,
.view-product-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255,255,255,0.15) 50%,
        transparent 100%
    );
    transform: skewX(-25deg);
    transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

.add-to-cart-clean:hover::after,
.notify-me-btn:hover::after,
.view-product-btn:hover::after {
    left: 150%;
}

/* ==============================================
   3. LAYERED CARD SHADOW SYSTEM
   ============================================== */
.product-card {
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 16px rgba(0,0,0,0.04),
        0 16px 32px rgba(0,0,0,0.02);
    transition: 
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.4s ease,
        border-color 0.4s ease !important;
}

.product-card:hover {
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.08),
        0 12px 28px rgba(0,0,0,0.12),
        0 32px 64px rgba(0,0,0,0.08) !important;
}

/* Feature cards enhancement */
.feature-card {
    box-shadow: 
        0 1px 3px rgba(0,0,0,0.02),
        0 4px 12px rgba(0,0,0,0.03);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
    box-shadow: 
        0 4px 12px rgba(0,0,0,0.06),
        0 16px 40px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

/* ==============================================
   4. ENHANCED NAVBAR FROSTED GLASS
   ============================================== */
.navbar.scrolled {
    background: rgba(0, 0, 0, 0.72) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    box-shadow: 
        0 1px 0 rgba(255,255,255,0.05),
        0 8px 32px rgba(0,0,0,0.3) !important;
}

/* ==============================================
   5. CINEMATIC SCROLL ANIMATIONS
   ============================================== */
@keyframes revealUp {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.98);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes revealScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.animate-on-scroll.animate-visible,
.animate-on-load.animate-visible {
    animation: revealUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered children */
.animate-on-scroll.animate-visible > *:nth-child(1) { animation-delay: 0ms; }
.animate-on-scroll.animate-visible > *:nth-child(2) { animation-delay: 80ms; }
.animate-on-scroll.animate-visible > *:nth-child(3) { animation-delay: 160ms; }
.animate-on-scroll.animate-visible > *:nth-child(4) { animation-delay: 240ms; }

/* ==============================================
   6. INPUT FIELD PREMIUM FOCUS
   ============================================== */
.newsletter-input,
input[type="email"],
input[type="text"],
input[type="password"],
textarea {
    transition: 
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease !important;
}

.newsletter-input:focus,
input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: rgba(0,0,0,0.2) !important;
    box-shadow: 
        0 0 0 4px rgba(0,0,0,0.04),
        inset 0 2px 6px rgba(0,0,0,0.02) !important;
    outline: none !important;
}

/* Dark theme inputs */
.purchase-panel-clean input:focus,
.hero-purchase-floating input:focus {
    border-color: rgba(255,255,255,0.3) !important;
    box-shadow: 
        0 0 0 4px rgba(255,255,255,0.06),
        inset 0 2px 6px rgba(0,0,0,0.1) !important;
}

/* ==============================================
   7. LOADING SCREEN PULSE GLOW
   ============================================== */
.loading-logo img,
.loading-content img {
    animation: 
        logoFloat 2.2s ease-in-out infinite alternate,
        logoPulseGlow 3s ease-in-out infinite !important;
}

@keyframes logoPulseGlow {
    0%, 100% { 
        filter: invert(1) brightness(2) drop-shadow(0 0 0 rgba(255,255,255,0)); 
    }
    50% { 
        filter: invert(1) brightness(2.2) drop-shadow(0 0 30px rgba(255,255,255,0.25)); 
    }
}

/* Enhanced loading bar */
.loading-bar {
    background: rgba(255,255,255,0.08) !important;
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar::after {
    background: linear-gradient(
        90deg, 
        transparent 0%,
        rgba(255,255,255,0.4) 30%,
        rgba(255,255,255,0.8) 50%,
        rgba(255,255,255,0.4) 70%,
        transparent 100%
    ) !important;
}

/* ==============================================
   8. SIZE SELECTOR RIPPLE EFFECT
   ============================================== */
.size-option-clean {
    position: relative;
    overflow: hidden;
}

.size-option-clean::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.4s ease;
    pointer-events: none;
}

.size-input-clean:checked + .size-option-clean::before {
    animation: sizeRipple 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sizeRipple {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ==============================================
   9. FOOTER LINK UNDERLINE ANIMATION
   ============================================== */
.footer-link {
    position: relative;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-link:hover {
    opacity: 1 !important;
}

/* ==============================================
   10. KEN BURNS IMAGE HOVER
   ============================================== */
.product-image img,
.editorial-image img,
.hero-editorial,
.about-editorial {
    transition: 
        transform 4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.6s ease !important;
}

.product-image:hover img,
.brand-image:hover .hero-editorial,
.about-image:hover .about-editorial {
    transform: scale(1.06) !important;
}

/* Subtle color shift on hover */
.product-image:hover img {
    filter: grayscale(0%) contrast(1.08) brightness(1.02) !important;
}

/* ==============================================
   11. BADGE BREATHE ANIMATION
   ============================================== */
.badge,
.note-pill {
    animation: badgeBreathe 4s ease-in-out infinite;
}

@keyframes badgeBreathe {
    0%, 100% { 
        opacity: 0.85; 
        transform: scale(1); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.015); 
    }
}

/* Scarcity indicator enhanced pulse */
.scarcity-dot {
    animation: scarcityPulse 2s ease-in-out infinite !important;
}

@keyframes scarcityPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
        transform: scale(1.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
        transform: scale(1);
    }
}

/* ==============================================
   12. NAV LINK PREMIUM HOVER
   ============================================== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* ==============================================
   13. SCROLL INDICATOR ENHANCEMENT
   ============================================== */
.scroll-indicator-enhanced {
    opacity: 0;
    animation: fadeInUp 1s ease 2s forwards, 
               floatUpDown 3s ease-in-out 3s infinite !important;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==============================================
   14. HERO TEXT SHADOW ENHANCEMENT
   ============================================== */
.hero-title,
.title-line {
    text-shadow: 
        0 2px 10px rgba(0,0,0,0.3),
        0 8px 30px rgba(0,0,0,0.4),
        0 20px 60px rgba(0,0,0,0.2) !important;
}

/* ==============================================
   15. MARQUEE BANNER SMOOTHNESS
   ============================================== */
.top-announce {
    background: linear-gradient(90deg, #000 0%, #0a0a0a 50%, #000 100%);
}

.marquee-content {
    animation-timing-function: linear !important;
}

.marquee-item {
    transition: opacity 0.3s ease;
}

/* ==============================================
   16. PURCHASE PANEL GLOW
   ============================================== */
.purchase-panel-clean,
.gallery-controls {
    box-shadow: 
        0 4px 24px rgba(0,0,0,0.3),
        0 0 80px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

/* Subtle inner border glow */
.purchase-panel-clean::before,
.gallery-controls::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.1) 0%,
        transparent 50%,
        rgba(255,255,255,0.05) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ==============================================
   17. PRODUCT SHOWCASE POLISH
   ============================================== */
.product-showcase {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-showcase .product-image-container {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-showcase:hover .product-image-container {
    transform: scale(1.01);
}

/* ==============================================
   18. SELECTION & FOCUS STATES
   ============================================== */
::selection {
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
}

::-moz-selection {
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
}

/* Custom focus ring */
:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.4);
    outline-offset: 3px;
}

/* ==============================================
   19. SMOOTH PAGE TRANSITIONS
   ============================================== */
body {
    opacity: 1;
    transition: opacity 0.3s ease;
}

body.page-transitioning {
    opacity: 0;
}

/* ==============================================
   20. MICRO-INTERACTION POLISH
   ============================================== */

/* Button press effect */
.primary-btn:active,
.shop-button:active,
.add-to-cart-clean:active,
.notify-me-btn:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s ease !important;
}

/* Card tilt on hover (subtle) */
.product-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Logo hover */
.logo:hover {
    transform: scale(1.03) !important;
    filter: invert(1) brightness(2.2) !important;
}

/* ==============================================
   REDUCED MOTION SUPPORT
   ============================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==============================================
   MOBILE OPTIMIZATIONS
   ============================================== */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .animate-on-scroll.animate-visible {
        animation: revealUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        filter: none;
    }
    
    @keyframes revealUp {
        0% {
            opacity: 0;
            transform: translateY(30px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Faster transitions on touch */
    .product-card {
        transition-duration: 0.3s !important;
    }
    
    /* Disable Ken Burns on mobile for performance */
    .product-image img {
        transition: filter 0.3s ease !important;
    }
    
    .product-image:hover img {
        transform: none !important;
    }
}
