:root {
            --brand-orange: #0B0F14;
            --brand-red: #E60000;
            --brand-dark: #0f172a;
            --price-color: #4338ca;
        }
        body { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f4f4f5; color: #0f172a; }
        /* overflow-x hidden removed to allow edge clicks */
        .font-bungee { font-family: 'Chakra Petch', 'Montserrat', 'Plus Jakarta Sans', sans-serif !important; font-weight: 800; }
        .font-sharp { font-family: 'Chakra Petch', 'Montserrat', 'Plus Jakarta Sans', sans-serif !important; }
        .logo-slash { transform: skewX(-12deg); display: inline-block; }
        
        /* Custom Scrollbar */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: #f1f5f9; }
        ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--brand-orange); }

        /* Hide scrollbars for specific containers */
        #brand-filter-row::-webkit-scrollbar { display: none; }
        #brand-filter-row { -ms-overflow-style: none; scrollbar-width: none; }

        /* Dynamic responsive grid columns: Mobile 3-col default, Tablet (768-1023px) 3-col, PC (1024-1399px) 4-col, Wide PC (>=1400px) 5-col */
        #main-products-grid {
            display: grid;
            grid-template-columns: repeat(var(--p4p-mobile-cols, 3), minmax(0, 1fr));
            gap: var(--p4p-mobile-gap, 8px);
        }
        @media (min-width: 768px) {
            #main-products-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 12px;
            }
        }
        @media (min-width: 1024px) {
            #main-products-grid,
            #main-products-grid.is-cols-auto,
            #main-products-grid.is-cols-4 {
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 14px;
            }
            #main-products-grid.is-cols-3 {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 18px;
            }
        }
        @media (min-width: 1200px) {
            #main-products-grid.is-cols-5 {
                grid-template-columns: repeat(5, minmax(0, 1fr));
                gap: 12px;
            }
        }
        @media (min-width: 1400px) {
            #main-products-grid,
            #main-products-grid.is-cols-auto,
            #main-products-grid.is-cols-5 {
                grid-template-columns: repeat(5, minmax(0, 1fr));
                gap: 14px;
            }
            #main-products-grid.is-cols-4 {
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: 16px;
            }
            #main-products-grid.is-cols-3 {
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 20px;
            }
        }

        /* Hide desktop floating search results dropdown on the catalog page since the page updates in real-time */
        #search-results {
            display: none !important;
        }

        /* Clean color swatch dots on catalog cards (dots only, disambiguated via .vf-sr-only on card link) */
        .vf-sr-only:where(:not(:focus-within, :active)) {
            position: absolute !important;
            clip-path: inset(50%) !important;
            overflow: hidden !important;
            width: 1px !important;
            height: 1px !important;
            margin: -1px !important;
            padding: 0 !important;
            border: 0 !important;
            white-space: nowrap !important;
        }
        .vf-pcard-color-chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin: auto auto 8px;
            padding: 2px 0;
            line-height: 1;
        }
        .vf-pcard-color-chip + .vf-pcard-price-row {
            margin-top: 0;
        }
        .vf-pcard-color-dots {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        .vf-pcard-color-dot {
            width: 12px;
            height: 12px;
            border-radius: 999px;
            border: 1px solid rgba(15, 23, 42, 0.48);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 1px 2px rgba(15, 23, 42, 0.08);
            flex-shrink: 0;
            forced-color-adjust: none;
        }
        @media (max-width: 639px) {
            .vf-pcard-color-chip {
                margin: auto auto 6px;
                padding: 1px 0;
            }
            .vf-pcard-color-dots {
                gap: 4px;
            }
            .vf-pcard-color-dot {
                width: 10px;
                height: 10px;
            }
        }
        @media (forced-colors: active) {
            .vf-pcard-color-dot {
                border: 1px solid CanvasText;
            }
        }

        /* Glassmorphism */
        .glass-header {
            background: rgba(255, 255, 255, 0.92);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }
        .glass-panel {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.25);
        }

        /* Advanced Animations */
        .reveal { opacity: 0; transform: translateY(40px) scale(0.98); transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
        .reveal.active { opacity: 1; transform: translateY(0) scale(1); }

        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-15px); }
        }
        .animate-float { animation: float 6s ease-in-out infinite; }

        @keyframes glow {
            0%, 100% { box-shadow: 0 0 20px rgba(255, 77, 0, 0.2); }
            50% { box-shadow: 0 0 40px rgba(255, 77, 0, 0.6); }
        }
        .neon-glow { animation: glow 3s infinite; }

        /* Animated Hero Background */
        @keyframes gradientBg {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        .animated-hero-bg {
            background: linear-gradient(-45deg, #020617, #0f172a, #1e1b4b, #090d16);
            background-size: 400% 400%;
            animation: gradientBg 18s ease infinite;
        }

        /* Shimmering Metallic Text */
        @keyframes shimmerText {
            0% { background-position: -200% center; }
            100% { background-position: 200% center; }
        }
        .shimmer-text {
            background: linear-gradient(90deg, #ffffff 0%, #ffc09f 25%, #ff4d00 50%, #ffc09f 75%, #ffffff 100%);
            background-size: 200% auto;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: shimmerText 5s linear infinite;
        }

        /* Product Card Elite (Micro-bounce & Neon shadow) */
        .product-card { 
            transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); 
            background: #ffffff; 
            border: 1px solid rgba(0, 0, 0, 0.04);
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
        }
        @media (min-width: 1024px) {
            .product-card:hover { 
                transform: translateY(-10px); 
                box-shadow: 0 20px 35px rgba(255, 77, 0, 0.09), 0 4px 10px rgba(0, 0, 0, 0.02); 
                border-color: rgba(255, 77, 0, 0.25); 
            }
            .product-card:hover .product-img { 
                transform: scale(1.10); 
            }
        }
        .product-img { 
            transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); 
        }

        /* Brand Active Pulse Glow */
        @keyframes activePulse {
            0% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0.4); }
            70% { box-shadow: 0 0 0 10px rgba(255, 77, 0, 0); }
            100% { box-shadow: 0 0 0 0 rgba(255, 77, 0, 0); }
        }
        .brand-active-pulse {
            animation: activePulse 2s infinite;
        }

        /* Smooth Marquee */
        @keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
        .animate-marquee { display: flex; width: max-content; animation: marquee 30s linear infinite; }

        /* Search Dropdown custom scroll */
        .custom-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
        .custom-scroll::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }

        /* Dual Range Slider styling */
        .range-slider { position: relative; width: 100%; height: 4px; border-radius: 9999px; background-color: #f1f5f9; margin: 1.5rem 0; }
        .range-slider .progress { position: absolute; height: 100%; left: 0%; right: 30%; border-radius: 9999px; background: #0B0F14; }
        .range-slider input[type="range"] { position: absolute; width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; outline: none; z-index: 10; top: 0; margin: 0; }
        .range-slider input[type="range"]::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 20px; height: 20px; background: #0B0F14; border: 4px solid #ffffff; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.08); transition: transform 0.2s ease, box-shadow 0.2s ease; margin-top: -8px; }
        .range-slider input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); box-shadow: 0 4px 10px rgba(255, 77, 0, 0.35); }
        .range-slider input[type="range"]::-webkit-slider-runnable-track { -webkit-appearance: none; height: 4px; background: transparent; border: none; }
        .range-slider input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; background: #0B0F14; border: 4px solid #ffffff; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.08); transition: transform 0.2s ease, box-shadow 0.2s ease; box-sizing: border-box; }
        .range-slider input[type="range"]::-moz-range-thumb:hover { transform: scale(1.15); box-shadow: 0 4px 10px rgba(255, 77, 0, 0.35); }
        .range-slider input[type="range"]::-moz-range-track { background: transparent; border: none; height: 4px; }

        /* Zalo Bubble Glow */
        .zalo-bubble { animation: pulse-zalo 2s infinite; }
        @keyframes pulse-zalo { 0% { box-shadow: 0 0 0 0 rgba(37, 117, 252, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 117, 252, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 117, 252, 0); } }

        /* AI Chat Window */
        .ai-chat-window { transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform: scale(0.9) translateY(30px); opacity: 0; pointer-events: none; transform-origin: bottom right;}
        .ai-chat-window.active { transform: scale(1) translateY(0); opacity: 1; pointer-events: all; }

        /* Shimmering Progress Bar */
        @keyframes progressShimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        .progress-shimmer-bar::after {
            content: '';
            position: absolute;
            top: 0; right: 0; bottom: 0; left: 0;
            background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
            animation: progressShimmer 2s infinite;
        }

        /* Glassmorphism Live Purchase Toast */
        .live-purchase-toast-glass {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(15px);
            -webkit-backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.5);
            box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
            transform: translateX(-130%);
            transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
            opacity: 0;
        }
        .live-purchase-toast-glass.active {
            transform: translateX(0);
            opacity: 1;
        }

        /* Sidebar item transitions */
        .sidebar-item-link {
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        .sidebar-item-link:hover {
            transform: translateX(6px);
        }
        .sidebar-item-link:hover i {
            transform: rotate(10deg) scale(1.15);
        }
        .sidebar-item-link i {
            transition: transform 0.3s ease, color 0.3s ease;
        }
        .scale-102 {
            transform: scale(1.02);
        }
        .duration-350 {
            transition-duration: 350ms;
        }
        .w-4\.5 {
            width: 1.125rem;
        }
        .h-4\.5 {
            height: 1.125rem;
        }

        /* ===== TỐI ƯU MOBILE: tắt animation để giảm lag GPU ===== */
        @media (max-width: 1023px) {
            /* Tắt toàn bộ animation tốn kém — GPU mobile yếu hơn desktop ~10x */
            .animated-hero-bg {
                animation: none !important;
                background: linear-gradient(-45deg, #020617, #0f172a) !important;
                background-size: 100% 100% !important;
            }
            .shimmer-text {
                animation: none !important;
                background: linear-gradient(90deg, #ffffff 0%, #ff4d00 50%, #ffffff 100%) !important;
                background-size: 100% auto !important;
            }
            .animate-float { animation: none !important; }
            .neon-glow { animation: none !important; }
            .brand-active-pulse { animation: none !important; }
            .animate-marquee { animation: none !important; }
            .zalo-bubble { animation: none !important; }
            /* Progress shimmer: giữ nhưng tắt ::after để không lãng phí paint */
            .progress-shimmer-bar::after { animation: none !important; }
            /* Skeleton cũng dùng màu cố thay animate-pulse */
            .product-img-skeleton { animation: none !important; background: #f1f5f9 !important; }
            /* Tắt transition của product card — không cần bounce trên mobile */
            .product-card { transition: none !important; }
            .product-img { transition: none !important; }
            .sidebar-item-link { transition: none !important; }
            /* Tắt backdrop-filter: nhứng nhất — tốn paint layer riêng */
            .glass-header {
                background: rgba(255,255,255,0.97) !important;
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
            }
            .glass-panel {
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
                background: rgba(255,255,255,0.95) !important;
            }
            .live-purchase-toast-glass {
                backdrop-filter: none !important;
                -webkit-backdrop-filter: none !important;
                background: rgba(255,255,255,0.96) !important;
            }
        }
        
        /* Premium selection toggle bubble and item list animations */
        @keyframes pulseBounce {
            0% { transform: translateY(-50%) scale(1); }
            50% { transform: translateY(-50%) scale(1.25); box-shadow: 0 10px 25px rgba(255, 77, 0, 0.5), 0 0 20px rgba(255, 77, 0, 0.4); }
            100% { transform: translateY(-50%) scale(1); }
        }
        .animate-pulse-bounce {
            animation: pulseBounce 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
        }

        @keyframes fadeSlideIn {
            from { opacity: 0; transform: translateX(30px); }
            to { opacity: 1; transform: translateX(0); }
        }
        .animate-fade-slide-in {
            animation: fadeSlideIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
        }

        /* Disable scroll anchoring on direct parent of sticky filter bar to prevent stuck-state oscillation */
        #catalog-grid-column {
            overflow-anchor: none;
        }

        /* State-Aware Sticky Active Filters Container (ZERO gap beneath sticky header) */
        #active-filters-bar {
            position: -webkit-sticky !important;
            position: sticky !important;
            top: var(--p4p-header-h, 60px) !important;
            z-index: 40 !important;
            container-type: scroll-state;
            container-name: active-filters;
            margin-top: 0 !important;
            margin-bottom: 14px;
            padding: 0 !important;
            background: transparent !important;
            border: 0 !important;
            box-shadow: none !important;
        }
        @media (min-width: 1024px) {
            #active-filters-bar {
                top: var(--p4p-header-h, 72px) !important;
            }
        }
        #active-filters-bar .vf-active-filters-inner {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
            min-height: 44px;
            padding: 6px 12px;
            border-radius: 14px;
            background: #FFFFFF;
            border: 1px solid #E2E8F0;
            box-shadow: 0 6px 18px -12px rgba(15, 23, 42, 0.14);
            transition: border-radius 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
        }

        .swal2-container {
            z-index: 999999999 !important;
        }

        /* Stuck state: seamlessly docks flush beneath sticky header (native scroll-state + JS .stuck fallback) */
        @container active-filters scroll-state(stuck: top) {
            #active-filters-bar .vf-active-filters-inner {
                border-top-color: transparent;
                border-top-left-radius: 0;
                border-top-right-radius: 0;
                border-bottom-left-radius: 14px;
                border-bottom-right-radius: 14px;
                background: #FFFFFF;
                border-left-color: #DCE3EC;
                border-right-color: #DCE3EC;
                border-bottom-color: #CBD5E1;
                box-shadow: 0 14px 28px -14px rgba(15, 23, 42, 0.22), 0 1px 0 rgba(15, 23, 42, 0.04);
            }
        }
        #active-filters-bar.stuck .vf-active-filters-inner {
            border-top-color: transparent;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
            border-bottom-left-radius: 14px;
            border-bottom-right-radius: 14px;
            background: #FFFFFF;
            border-left-color: #DCE3EC;
            border-right-color: #DCE3EC;
            border-bottom-color: #CBD5E1;
            box-shadow: 0 14px 28px -14px rgba(15, 23, 42, 0.22), 0 1px 0 rgba(15, 23, 42, 0.04);
        }
