/* ========================================
   WANTED ZONE - MODERN ENHANCEMENTS 2026
   Safe additions that won't break existing code
   ======================================== */

/* ===== 1. ANIMATED MESH GRADIENT ===== */
.hero-mesh-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(138,43,226,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(96,165,250,0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(168,85,247,0.10) 0%, transparent 50%);
    animation: meshMove 20s ease-in-out infinite alternate;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
}

@keyframes meshMove {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, -10%) scale(1.1); }
}

/* ===== 2. ENHANCED 3D CARDS ===== */
.product-card-3d-enhanced {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.product-card-3d-enhanced::after {
    content: '';
    position: absolute;
    inset: 12px;
    background: radial-gradient(ellipse at center, rgba(138,43,226,0.18), transparent 70%);
    filter: blur(18px);
    transform: translateZ(-20px);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
    border-radius: inherit;
}

.product-card-3d-enhanced:hover::after {
    opacity: 1;
}

.product-card-3d-enhanced:hover .product-image {
    transform: translateZ(30px) scale(1.05);
}

.product-card-3d-enhanced:hover .product-price {
    transform: translateZ(50px);
}

/* ===== 3. MAGNETIC BUTTON EFFECT ===== */
.magnetic-btn {
    position: relative;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

/* ===== 4. LIQUID BUTTON EFFECT ===== */
.liquid-button {
    position: relative;
    overflow: hidden;
}

.liquid-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.liquid-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ===== 5. ENHANCED GLASSMORPHISM ===== */
.glass-card-enhanced {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

/* ===== 6. HOLOGRAPHIC TEXT ===== */
.holo-text {
    background: linear-gradient(
        45deg,
        #8A2BE2 0%,
        #B085F5 25%,
        #60a5fa 50%,
        #B085F5 75%,
        #8A2BE2 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holoShift 3s ease infinite;
    filter: drop-shadow(0 0 20px rgba(138,43,226,0.6));
}

@keyframes holoShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== 7. MORPHING SHAPES ===== */
.morphing-shape {
    position: fixed;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #8A2BE2, #B085F5);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.morphing-shape-1 { top: 10%; left: 10%; animation-delay: 0s; }
.morphing-shape-2 { top: 60%; right: 10%; animation-delay: 2s; }
.morphing-shape-3 { bottom: 10%; left: 30%; animation-delay: 4s; }

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

/* ===== 8. PARTICLE BURST ===== */
.particle-burst {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #8A2BE2;
    border-radius: 50%;
    pointer-events: none;
    animation: particleBurst 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    box-shadow: 0 0 10px rgba(138,43,226,0.8);
    z-index: 10000;
}

@keyframes particleBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx, 0), var(--ty, 0)) scale(0);
        opacity: 0;
    }
}

/* ===== 9. ENHANCED HOVER STATES ===== */
.enhanced-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.enhanced-hover:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 30px 60px rgba(138,43,226,0.3),
        0 0 0 1px rgba(138,43,226,0.3),
        0 0 40px rgba(138,43,226,0.2);
}

/* ===== 10. SKELETON LOADER ===== */
.skeleton-loader-enhanced {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.02) 0%,
        rgba(138,43,226,0.08) 20%,
        rgba(255,255,255,0.02) 40%,
        rgba(255,255,255,0.02) 100%
    );
    background-size: 200% 100%;
    animation: shimmerEnhanced 1.5s infinite;
    border-radius: 8px;
    min-height: 20px;
}

@keyframes shimmerEnhanced {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== 11. FAB MENU ===== */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9990;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8A2BE2, #B085F5);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(138,43,226,0.4);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-main:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 32px rgba(138,43,226,0.6);
}

.fab-option {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(138,43,226,0.95);
    border: 2px solid rgba(176,133,245,0.3);
    color: white;
    font-size: 18px;
    cursor: pointer;
    transform: translateY(0) scale(0);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.fab-container.active .fab-main {
    transform: rotate(135deg);
}

.fab-container.active .fab-option {
    transform: translateY(calc(-60px * var(--i))) scale(1);
    opacity: 1;
}

.fab-option:hover {
    background: #B085F5;
    transform: translateY(calc(-60px * var(--i))) scale(1.15);
}

/* ===== 12. SMART HEADER IMPROVEMENTS ===== */
.header-smart {
    transition: transform 0.3s ease, background 0.3s ease;
}

.header-smart.hidden {
    transform: translateY(-100%);
}

/* ===== 13. MEGA MENU ===== */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(20,20,28,0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138,43,226,0.3);
    border-radius: 12px;
    padding: 2rem;
    min-width: 300px;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 1000;
}

.nav-item:hover .mega-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.mega-menu-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mega-menu.active .mega-menu-item {
    opacity: 1;
    transform: translateX(0);
}

.mega-menu-item:nth-child(1) { transition-delay: 0.05s; }
.mega-menu-item:nth-child(2) { transition-delay: 0.1s; }
.mega-menu-item:nth-child(3) { transition-delay: 0.15s; }
.mega-menu-item:nth-child(4) { transition-delay: 0.2s; }

/* ===== 14. IMAGE ZOOM CONTAINER ===== */
.zoom-container {
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-container img {
    transition: transform 0.3s ease;
}

.zoom-container:hover img {
    transform: scale(1.3);
}

/* ===== 15. QUICK VIEW MODAL ===== */
.quick-view-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 10000;
}

.quick-view-modal.active {
    opacity: 1;
    pointer-events: all;
}

.quick-view-content {
    background: rgba(20,20,28,0.95);
    border: 1px solid rgba(138,43,226,0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.quick-view-modal.active .quick-view-content {
    transform: scale(1);
}

.quick-view-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.quick-view-close:hover {
    background: #ef4444;
    transform: rotate(90deg);
}

/* ===== 16. COMPARISON SLIDER ===== */
.comparison-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.comparison-before {
    position: absolute;
    inset: 0;
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.3s ease;
}

.comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #8A2BE2;
    cursor: ew-resize;
    z-index: 10;
}

/* ===== 17. ANIMATED CART COUNTER ===== */
.cart-count-animated {
    animation: cartBounceEnhanced 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cartBounceEnhanced {
    0% { transform: scale(1); }
    25% { transform: scale(0.8); }
    50% { transform: scale(1.3) rotate(5deg); }
    75% { transform: scale(0.95) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ===== 18. ENHANCED CART SIDEBAR ===== */
.cart-sidebar-enhanced {
    box-shadow: -10px 0 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(138,43,226,0.2);
}

.cart-item-slide {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInCartEnhanced 0.4s forwards;
}

.cart-item-slide:nth-child(1) { animation-delay: 0.1s; }
.cart-item-slide:nth-child(2) { animation-delay: 0.15s; }
.cart-item-slide:nth-child(3) { animation-delay: 0.2s; }
.cart-item-slide:nth-child(4) { animation-delay: 0.25s; }

@keyframes slideInCartEnhanced {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== 19. PAYMENT METHOD CARDS ===== */
.payment-method-enhanced {
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
    padding: 1.5rem;
}

.payment-method-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138,43,226,0.2), transparent);
    transition: left 0.5s;
}

.payment-method-enhanced.selected {
    border-color: #8A2BE2;
    background: rgba(138,43,226,0.1);
}

.payment-method-enhanced.selected::before {
    left: 100%;
}

.payment-method-enhanced:hover {
    border-color: rgba(138,43,226,0.5);
    transform: translateY(-2px);
}

/* ===== 20. STOCK INDICATOR ===== */
.stock-indicator-enhanced {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.stock-fill-enhanced {
    height: 100%;
    background: linear-gradient(90deg, var(--stock-color, #8A2BE2), var(--stock-color, #B085F5));
    width: var(--stock-width, 50%);
    border-radius: 3px;
    transition: width 0.6s ease;
    box-shadow: 0 0 10px var(--stock-color, rgba(138,43,226,0.5));
}

.stock-text-enhanced {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--stock-color, #8A2BE2);
    margin-top: 0.25rem;
}

/* ===== 21. LIVE SEARCH RESULTS ===== */
.search-results-enhanced {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(20,20,28,0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138,43,226,0.3);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.search-results-enhanced.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: rgba(138,43,226,0.1);
}

/* ===== 22. DARK MODE TRANSITION ===== */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
    transition: background-color 1s ease, border-color 1s ease, color 1s ease !important;
}

/* ===== 23. PAGE TRANSITION ===== */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ===== 24. SCROLL ANIMATIONS ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .morphing-shape {
        width: 200px;
        height: 200px;
    }
    
    .fab-container {
        bottom: 20px;
        right: 20px;
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .fab-option {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .quick-view-content {
        width: 95%;
        padding: 1.5rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
