/**
 * WOZYBOOST Premium Stylesheet overrides
 * Enhances Tailwind CSS styling with Glassmorphism, animations, and neon glows.
 */

:root {
    --neon-purple: #a855f7;
    --neon-pink: #ec4899;
    --primary: #a855f7;
    --primary-rgb: 168, 85, 247;
    --background: #0a0a0f;
    --glass-bg: rgba(15, 10, 25, 0.7);
    --glass-border: rgba(168, 85, 247, 0.3);
    --sidebar-bg: #0a0a0f;
}

body {
    background-color: var(--background);
    color: #f3f4f6;
    overflow-x: hidden;
}

/* Mobile drawer closed: never leak social buttons into the viewport */
#mobile-menu.hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Navbar: solid top edge (prevents purple glow / phantom button in top-left corner) */
.nav-top-fade {
    background: linear-gradient(
        to bottom,
        var(--background) 0%,
        rgba(10, 10, 15, 0.92) 55%,
        transparent 100%
    );
}

/* Page hero sections: centered ambient glow (no harsh top-left purple band) */
.page-hero-glow {
    background-image: radial-gradient(
        ellipse 100% 70% at 50% 0%,
        rgba(88, 28, 135, 0.1),
        transparent 72%
    );
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--background);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c084fc;
}

/* Neon Glow Utilities */
.neon-glow {
    box-shadow: 
        0 0 5px var(--neon-purple),
        0 0 10px var(--neon-purple),
        0 0 20px var(--neon-purple),
        0 0 40px var(--neon-purple);
}

.neon-glow-sm {
    box-shadow: 
        0 0 5px var(--neon-purple),
        0 0 10px var(--neon-purple);
}

.neon-text {
    text-shadow: 
        0 0 5px var(--neon-purple),
        0 0 10px var(--neon-purple),
        0 0 20px var(--neon-purple);
}

.neon-border {
    border: 1px solid var(--glass-border);
    box-shadow: 
        inset 0 0 20px rgba(138, 43, 226, 0.1),
        0 0 10px rgba(138, 43, 226, 0.2);
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-hover {
    transition: all 0.3s ease;
}

.glass-hover:hover {
    background: rgba(var(--primary-rgb), 0.15) !important;
    border-color: rgba(var(--primary-rgb), 0.5) !important;
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.3) !important;
}

/* Gradient Animations */
.gradient-animate {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

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

/* Pulse Animation */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
    }
    50% { 
        box-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary), 0 0 30px var(--primary);
    }
}

/* Floating Animation */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Text Gradient Effect */
.text-gradient {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-pink) 50%, var(--neon-purple) 100%);
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Page / Section Slide and Fade Animations */
:not(.js-enabled) .animation-fade,
.js-enabled .in-view.animation-fade {
    animation: fadeIn 0.5s ease-in-out both;
}

:not(.js-enabled) .animation-slide,
.js-enabled .in-view.animation-slide {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

:not(.js-enabled) .animation-slide-right,
.js-enabled .in-view.animation-slide-right {
    animation: slideRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

:not(.js-enabled) .animation-slide-left,
.js-enabled .in-view.animation-slide-left {
    animation: slideLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

:not(.js-enabled) .animation-scale,
.js-enabled .in-view.animation-scale {
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* TikTok Floating Button Wave */
.animate-wave {
    animation: wave 2.5s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70% { transform: rotate(14deg); }
    20%, 40%, 60% { transform: rotate(-8deg); }
    80% { transform: rotate(-4deg); }
    90% { transform: rotate(10deg); }
}

/* Custom Particle Canvas overlay */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

@media (max-width: 767px) {
    #particle-canvas {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #particle-canvas {
        display: none !important;
    }
}

/* Theme Configuration Anim Styles */
.js-enabled .animation-fade,
.js-enabled .animation-slide,
.js-enabled .animation-slide-right,
.js-enabled .animation-slide-left,
.js-enabled .animation-scale {
    opacity: 1;
}

/* Staggered Letter Reveal Animation */
.letter-reveal {
    opacity: 0;
    transform: translateY(50px) rotateX(-90deg);
    animation: letterReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

/* Scrollbar None */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Marquee Reviews Scroll */
.marquee-container {
    overflow: hidden;
    width: 100%;
    display: flex;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 24px;
    animation: marquee-forward 40s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}

.marquee-content-reverse {
    display: flex;
    gap: 24px;
    animation: marquee-backward 45s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes marquee-forward {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes marquee-backward {
    0% {
        transform: translate3d(-50%, 0, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

.marquee-container:hover .marquee-content,
.marquee-container:hover .marquee-content-reverse {
    animation-play-state: paused;
}

/* TikTok Floating Button Animations */
.animation-tiktok-entry {
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 1s;
}
.animation-tiktok-tooltip {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 1.5s;
}
.animation-none {
    animation: none !important;
    transition: none !important;
}

/* Mobile Performance Tweaks */
@media (max-width: 767px) {
    .glass {
        background: rgba(10, 5, 20, 0.94) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .glass-hover:hover {
        background: var(--glass-bg) !important;
        border-color: var(--glass-border) !important;
        box-shadow: none !important;
    }
    
    .pulse-glow {
        animation: none !important;
        box-shadow: 0 0 5px var(--neon-purple) !important;
    }
    
    .float {
        animation: none !important;
        transform: none !important;
    }
    
    .gradient-animate {
        animation: none !important;
        background-size: auto !important;
    }
    
    .animate-wave {
        animation: none !important;
    }

    /* iOS/Safari fix: prevent hero brand letters from disappearing */
    .letter-reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        backface-visibility: visible !important;
        -webkit-backface-visibility: visible !important;
    }
}

/* ===== Homepage category showcase (self-contained — no Tailwind arbitrary classes) ===== */
.category-showcase {
    position: relative;
    z-index: 5;
    padding: 6rem 0;
    overflow: hidden;
}

/* Safety guard: keep homepage catalog section visible
   even if Swiper/animation JS fails to initialize. */
#category-showcase,
#category-showcase .category-showcase-inner,
#home-category-swiper {
    opacity: 1 !important;
    visibility: visible !important;
    display: block;
}

#home-category-swiper .swiper-wrapper {
    display: flex !important;
}

/* Home categories grid mode (swiper disabled) */
#category-showcase .grid .category-card {
    width: 100%;
    min-height: 380px;
    height: 100%;
}

.category-showcase-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(88, 28, 135, 0.1), transparent);
    pointer-events: none;
}

.category-showcase-inner {
    position: relative;
    z-index: 1;
}

.category-showcase-header {
    margin-bottom: 4rem;
}

.category-showcase-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-radius: 9999px;
    color: #c084fc;
    font-size: 0.875rem;
    font-weight: 500;
}

.category-showcase-title {
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.category-showcase-desc {
    color: #9ca3af;
    font-size: 1rem;
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* Card */
.category-card {
    position: relative;
    display: block;
    width: 100%;
    height: 420px;
    min-height: 420px;
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow:
        inset 0 0 20px rgba(138, 43, 226, 0.1),
        0 0 10px rgba(138, 43, 226, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 0 5px var(--neon-purple),
        0 0 10px var(--neon-purple),
        0 0 20px var(--neon-purple);
}

.category-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.category-card:hover .category-card-img {
    transform: scale(1.1);
}

.category-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0a0a0f 0%, rgba(10, 10, 15, 0.6) 45%, transparent 100%);
    pointer-events: none;
}

.category-card-glow {
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    border: 2px solid rgba(168, 85, 247, 0.5);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.category-card:hover .category-card-glow {
    opacity: 1;
}

.category-card-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem;
    text-align: left;
    z-index: 2;
}

.category-card-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 9999px;
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    transition: color 0.3s ease;
}

.category-card:hover .category-card-title {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-pink) 50%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-card-text {
    margin: 0 0 1rem;
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #c084fc;
    font-weight: 600;
    font-size: 0.9375rem;
}

.category-card-cta svg {
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-cta svg {
    transform: translateX(0.5rem);
}

/* Swiper carousel */
.category-swiper {
    position: relative;
    width: 100%;
    min-height: 460px;
    padding-bottom: 3.5rem;
    overflow: hidden;
}

.category-swiper .swiper-wrapper {
    align-items: stretch;
}

.category-swiper .swiper-slide {
    width: 280px !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.category-swiper.swiper-initialized .swiper-slide {
    width: 280px !important;
}

@media (min-width: 640px) {
    .category-swiper .swiper-slide,
    .category-swiper.swiper-initialized .swiper-slide {
        width: 320px !important;
    }
}

@media (min-width: 768px) {
    .category-swiper .swiper-slide,
    .category-swiper.swiper-initialized .swiper-slide {
        width: 380px !important;
    }
}

/* Before Swiper JS: horizontal scroll fallback */
.category-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0 1rem 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.category-swiper:not(.swiper-initialized) .swiper-slide {
    flex: 0 0 280px;
    scroll-snap-align: center;
}

.category-swiper .swiper-pagination {
    bottom: 0 !important;
}

.category-swiper .swiper-pagination-bullet {
    background: rgba(168, 85, 247, 0.5);
    opacity: 1;
}

.category-swiper .swiper-pagination-bullet-active {
    background: rgb(168, 85, 247);
    box-shadow: 0 0 10px rgb(168, 85, 247);
}

/* New add-to-cart flight animation */
.cart-fly-chip {
    position: fixed;
    z-index: 101;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    overflow: hidden;
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.55);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(236, 72, 153, 0.2));
    backdrop-filter: blur(4px);
}

.cart-fly-chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-fly-chip__dot {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: radial-gradient(circle at 30% 30%, #fff 0%, #ec4899 45%, #9333ea 100%);
}

.cart-fly-trail {
    position: fixed;
    z-index: 100;
    height: 3px;
    pointer-events: none;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0), rgba(236, 72, 153, 0.9), rgba(168, 85, 247, 0.95));
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.65);
    border-radius: 999px;
}

/* Cart icon feedback when product is added */
@keyframes cartIconBounce {
    0% { transform: scale(1); }
    35% { transform: scale(1.4); }
    60% { transform: scale(0.88); }
    100% { transform: scale(1); }
}

#cart-icon.cart-icon-bounce {
    animation: cartIconBounce 620ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cart-icon svg {
    transform-origin: center;
    will-change: transform, filter;
}

#cart-icon.cart-icon-bounce svg {
    animation: cartIconBounce 620ms cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.9));
}

#cart-icon.cart-icon-bounce .cart-count-badge {
    animation: cartIconBounce 620ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes addToCartBounce {
    0% { transform: scale(1); }
    35% { transform: scale(1.08); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.add-to-cart-btn.add-to-cart-bounce {
    animation: addToCartBounce 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.35);
}

