/* ACTA Cocoa - Revolutionary Custom Styles */

/* Enhanced Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f6f3 0%, #ffffff 50%, #f8f6f3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease;
}

.loading.fade-out {
    opacity: 0;
}

.loader {
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    border-top: 4px solid #42352a;
    border-right: 4px solid #42352a80;
    border-radius: 50%;
    animation: spin-enhanced 1.2s ease-in-out infinite;
    position: relative;
}

.loader::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid #42352a20;
    border-radius: 50%;
    animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes spin-enhanced {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes pulse-ring {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

/* Revolutionary Animation System */

/* Advanced Fade Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fade-in-stagger {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-stagger-2 {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Enhanced Floating System */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(1deg); }
    50% { transform: translateY(-20px) rotate(0deg); }
    75% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float-delay-2 {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-25px) scale(1.05); }
}

/* Particle Animation System */
@keyframes float-particle {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.7; }
    25% { transform: translateY(-10px) translateX(5px) scale(1.1); opacity: 1; }
    50% { transform: translateY(-20px) translateX(-3px) scale(0.9); opacity: 0.8; }
    75% { transform: translateY(-15px) translateX(8px) scale(1.2); opacity: 0.9; }
}

@keyframes float-particle-delay {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.6; }
    33% { transform: translateY(-15px) translateX(-10px) rotate(120deg); opacity: 1; }
    66% { transform: translateY(-8px) translateX(15px) rotate(240deg); opacity: 0.8; }
}

@keyframes float-particle-2 {
    0%, 100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: translateY(-18px) scale(1.3) rotate(180deg); opacity: 1; }
}

@keyframes float-particle-3 {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.4; }
    25% { transform: translateY(-5px) translateX(-8px); opacity: 0.8; }
    50% { transform: translateY(-12px) translateX(10px); opacity: 1; }
    75% { transform: translateY(-8px) translateX(-5px); opacity: 0.6; }
}

/* 3D Transform Animations */
@keyframes rotateY-hover {
    0% { transform: perspective(1000px) rotateY(0deg) rotateX(0deg); }
    100% { transform: perspective(1000px) rotateY(12deg) rotateX(6deg); }
}

/* Hero Section Animations */
@keyframes slide-up {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes expand-width {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes gradient-x {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Slow Rotation for Hero */
@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.4s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.8s both;
}

.animate-fade-in-stagger {
    animation: fade-in-stagger 0.8s ease-out 0.6s both;
}

.animate-fade-in-stagger-2 {
    animation: fade-in-stagger-2 0.8s ease-out 1.2s both;
}

.animate-slide-up {
    animation: slide-up 1.2s ease-out 0.5s both;
}

.animate-expand-width {
    animation: expand-width 1.5s ease-out 1s both;
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite 2s;
}

.animate-float-delay-2 {
    animation: float-delay-2 7s ease-in-out infinite 4s;
}

.animate-float-particle {
    animation: float-particle 8s ease-in-out infinite;
}

.animate-float-particle-delay {
    animation: float-particle-delay 10s ease-in-out infinite 1s;
}

.animate-float-particle-2 {
    animation: float-particle-2 6s ease-in-out infinite 2s;
}

.animate-float-particle-3 {
    animation: float-particle-3 9s ease-in-out infinite 3s;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* 3D Perspective and Transform Classes */
.perspective-1000 {
    perspective: 1000px;
}

.transform-gpu {
    transform: translateZ(0);
    will-change: transform;
}

.rotateY-12 {
    transform: perspective(1000px) rotateY(12deg);
}

.rotateX-6 {
    transform: perspective(1000px) rotateX(6deg);
}

/* Header Scrolled State */
.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu */
#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation Active State */
.nav-link.active {
    color: #42352a !important;
    font-weight: 600;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #42352a;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    opacity: 0;
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background: rgba(66, 53, 42, 0.1);
    opacity: 1;
}

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

/* Focus Styles */
.focus-visible {
    outline: 2px solid #42352a;
    outline-offset: 2px;
}

/* Body Loaded State */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

/* Hover Effects */
.flavour-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button Hover Effects */
button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .animate-fade-in,
    .animate-fade-in-delay,
    .animate-fade-in-delay-2,
    .animate-fade-in-stagger,
    .animate-fade-in-stagger-2 {
        animation-duration: 0.6s;
    }
    
    /* Hero Section Mobile Optimizations */
    .hero-title {
        font-size: 3.5rem !important;
        line-height: 1.1 !important;
    }
    
    .hero-subtitle {
        font-size: 1.75rem !important;
    }
    
    /* Mobile Navigation Enhancements */
    .perspective-1000 {
        perspective: 800px;
    }
    
    /* Reduce animation intensity on mobile */
    .animate-float,
    .animate-float-delay,
    .animate-float-delay-2 {
        animation-duration: 8s;
    }
    
    .animate-float-particle,
    .animate-float-particle-delay,
    .animate-float-particle-2,
    .animate-float-particle-3 {
        animation-duration: 12s;
    }
    
    /* Mobile-specific 3D effects */
    .rotateY-12,
    .rotateX-6 {
        transform: perspective(800px) rotateY(6deg) rotateX(3deg);
    }
}

@media (max-width: 640px) {
    /* Extra small devices */
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.25rem !important;
    }
    
    /* Optimize card layouts for very small screens */
    .perspective-1000 {
        perspective: 600px;
    }
}

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Filter Button States */
.filter-btn.active {
    background-color: #42352a !important;
    color: white !important;
}

.filter-btn:not(.active):hover {
    background-color: #42352a !important;
    color: white !important;
}

/* FAQ Rotate Animation */
.rotate-180 {
    transform: rotate(180deg);
}

/* Enhanced Product Grid Animations */
.product-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.03) rotateX(5deg);
    box-shadow: 0 35px 60px rgba(66, 53, 42, 0.15);
}

/* Modern Utility Classes */
.backdrop-blur-xl {
    backdrop-filter: blur(24px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(8px);
}

/* Glass Morphism Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-effect-dark {
    background: rgba(66, 53, 42, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(66, 53, 42, 0.2);
}

/* Advanced Shadow System */
.shadow-glow {
    box-shadow: 0 0 20px rgba(66, 53, 42, 0.3);
}

.shadow-glow-lg {
    box-shadow: 0 0 40px rgba(66, 53, 42, 0.2);
}

.shadow-inner-glow {
    box-shadow: inset 0 0 20px rgba(66, 53, 42, 0.1);
}

/* Gradient Text Utilities */
.text-gradient-primary {
    background: linear-gradient(135deg, #42352a 0%, #42352a80 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
    background: linear-gradient(135deg, #f8f6f3 0%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.will-change-scroll {
    will-change: scroll-position;
}

/* Interactive Hover States */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(3deg);
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, 
        rgba(248, 246, 243, 0.1) 25%, 
        rgba(248, 246, 243, 0.3) 50%, 
        rgba(248, 246, 243, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Accessibility Improvements */
.focus-ring {
    outline: 2px solid #42352a;
    outline-offset: 2px;
    border-radius: 8px;
}

.focus-ring-inset {
    box-shadow: inset 0 0 0 2px #42352a;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .text-primary\/80 {
        color: #42352a !important;
    }
    
    .border-primary\/10 {
        border-color: #42352a !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;
    }
    
    .animate-float,
    .animate-float-delay,
    .animate-float-delay-2,
    .animate-float-particle,
    .animate-float-particle-delay,
    .animate-float-particle-2,
    .animate-float-particle-3,
    .animate-spin-slow {
        animation: none !important;
    }
}
