        /* Shop Layout with Sidebar */
        .shop-container {
            display: flex;
            gap: 2rem;
            margin-top: 2rem;
        }
        
        /* Category Sidebar */
        .category-sidebar {
            flex: 0 0 250px; /* Slightly wider to accommodate initial levels */
            background: #ffffff;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            height: fit-content;
            position: sticky;
            top: 20px;
            width: 250px;
            max-width: 25vw; /* Responsive max width */
        }
        
        .category-sidebar h3 {
            font-size: 1.1rem;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid #f0f0f0;
        }
        
        .category-tree {
            font-size: 0.9rem;
            max-height: 70vh; /* Limit height to viewport */
            overflow-y: auto; /* Vertical scroll when too many categories */
            overflow-x: auto; /* Horizontal scroll for deep nesting */
            padding-right: 0.5rem; /* Space for scrollbar */
            white-space: nowrap !important; /* Force horizontal expansion */
            min-width: 100%; /* Ensure it fills the sidebar */
        }
        
        .subcategories,
            .nested-subcategories {
            white-space: nowrap !important; /* Don't let these wrap! */
            display: block; /* Make sure they're block level */
            min-width: max-content; /* This is the MAGIC - forces horizontal expansion! */
        }
        
        
        /* Custom scrollbar styling */
        .category-tree::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        .category-tree::-webkit-scrollbar-track {
            background: #f0f0f0;
            border-radius: 3px;
        }

        .category-tree::-webkit-scrollbar-thumb {
            background: #14b8a6;
            border-radius: 3px;
        }

        .category-tree::-webkit-scrollbar-thumb:hover {
            background: #0f9d8f;
        }
        
        /* Special styling when scrollbar is active */
        .category-tree:hover::-webkit-scrollbar-thumb {
            background: #0d9488; /* Darker teal on hover */
            box-shadow: 0 0 2px rgba(0,0,0,0.2);
        }
        
        /* Visual indicator for scrollable area */
        .category-tree.has-overflow {
            box-shadow: inset -2px 0 4px rgba(0,0,0,0.1);
        }
        
        /* Add visual hint that it's scrollable horizontally */
        .category-tree.has-overflow::before {
            content: '→';
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: #14b8a6;
            font-size: 20px;
            opacity: 0.5;
            pointer-events: none;
            animation: slide 2s infinite;
        }
        
        .category-item {
            margin: 0.25rem 0;
            white-space: nowrap; /* Prevent wrapping */
        }
        
        .category-item,
            .subcategory-item {
                white-space: normal; /* Let the text inside wrap normally */
                min-width: 200px; /* Minimum width to force scrolling */
                vertical-align: top; /* Align items properly */
                display: inline list-item;
                list-style-type: none;
            }
        
        
        
        
        /* Nested subcategories container */
        .nested-subcategories {
            margin-left: 1rem;
            min-width: fit-content; /* Allow expanding horizontally */
        }

        .category-toggle {
            background: none;
            border: none;
            padding: 0.5rem 0.75rem;
            width: auto; /* Changed from 100% to auto */
            min-width: 200px; /* Force a minimum width */
            text-align: left;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: space-between;
            border-radius: 6px;
            transition: all 0.2s;
            white-space: nowrap;
        }
        
        .category-toggle:hover {
            background: #f7f7f7;
        }
        
        .category-toggle.active {
            background: #14b8a6;
            color: white;
        }
        
        .category-toggle .chevron {
            width: 12px;
            height: 12px;
            transition: transform 0.2s;
        }
        
        .category-toggle.expanded .chevron {
            transform: rotate(90deg);
        }
        
        .category-name {
            flex: 1;
        }
        
        .category-count {
            background: rgba(0,0,0,0.1);
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            margin-left: 0.5rem;
        }
        
        .category-toggle.active .category-count {
            background: rgba(255,255,255,0.3);
        }
        
        .subcategories {
            margin-left: 1rem;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }
        
        .subcategories.expanded {
            max-height: 500px;
        }
        
        .subcategory-item {
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s;
        }
        
        .subcategory-item:hover {
            background: #f0f0f0;
            padding-left: 1rem;
        }
        
        .subcategory-item.active {
            background: #e6fffa;
            color: #0f766e;
            font-weight: 500;
        }
        
        /* Brand Tabs */
        .brand-tabs-container {
            background: white;
            border-radius: 12px;
            padding: 1rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            margin-bottom: 1.5rem;
            position: sticky;
            top: 0;
            z-index: 10;
        }
        
        .brand-tabs {
            display: flex;
            gap: 0.5rem;
            overflow-x: auto;
            padding-bottom: 0.5rem;
        }
        
        .brand-tabs::-webkit-scrollbar {
            height: 6px;
        }
        
        .brand-tabs::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }
        
        .brand-tabs::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 3px;
        }
        
        .brand-tab {
            flex: 0 0 auto;
            padding: 0.75rem 1.5rem;
            background: #f7f7f7;
            border: 2px solid transparent;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 500;
            white-space: nowrap;
            position: relative;
        }
        
        .brand-tab:hover {
            background: #e0e0e0;
            transform: translateY(-2px);
        }
        
        .brand-tab.active {
            background: linear-gradient(135deg, #14b8a6, #0d9488);
            color: white;
            box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
        }
        
        .brand-tab .product-count {
            display: inline-block;
            margin-left: 0.5rem;
            padding: 2px 8px;
            background: rgba(0,0,0,0.1);
            border-radius: 12px;
            font-size: 0.75rem;
        }
        
        .brand-tab.active .product-count {
            background: rgba(255,255,255,0.3);
        }
        
        /* Shop Content Area */
        .shop-content {
            flex: 1;
            min-width: 0; /* Prevent flex item from overflowing */
        }
        
        /* Clear Filters Button */
        .clear-filters {
            margin-top: 1rem;
            width: 100%;
            padding: 0.75rem;
            background: #f44336;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s;
            display: none;
        }
        
        .clear-filters.visible {
            display: block;
        }
        
        .clear-filters:hover {
            background: #d32f2f;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
        }
        
        
        /* Sale Price Styling */
        .product-price-container {
            margin: 0.5rem 0;
        }

        .sale-price-group {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.25rem;
        }

        .original-price {
            color: #dc2626;
            text-decoration: line-through;
            font-size: 0.9rem;
            opacity: 0.8;
        }

        .discount-badge {
            background: #dc2626;
            color: white;
            padding: 0.125rem 0.375rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .product-price.sale-price {
            color: #059669;
            font-weight: 700;
            font-size: 1.25rem;
        }

        /* Stock Status Styling */
        .stock-message {
            font-size: 0.875rem;
            margin: 0.5rem 0;
            font-weight: 500;
        }

        .stock-message.backorder {
            color: #f59e0b;
        }

        .stock-message.out-of-stock,
        .stock-message.sold {
            color: #dc2626;
        }

        /* Product Card States */
        .product-card.sold {
            position: relative;
        }

        .product-card.sold::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.7);
            pointer-events: none;
            z-index: 1;
}

        .product-card.sold .product-badge.sold {
            background: #991b1b;
            color: white;
            font-weight: 700;
            font-size: 1rem;
            padding: 0.5rem 1rem;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-15deg);
            z-index: 2;
            border-radius: 4px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        }

        .product-card.out-of-stock .btn-add-cart:disabled {
            background: #6b7280;
            cursor: not-allowed;
            opacity: 0.6;
        }

        .product-card.backorder .btn-add-cart {
            background: #f59e0b;
        }

        .product-card.backorder .btn-add-cart:hover {
            background: #d97706;
        }

        /* In Cart Indicator Enhancement */
        .in-cart-indicator {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #10b981;
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            z-index: 2;
        }
        
        
        
        
        
        
        
        
        
        /* Mobile Responsiveness */
        @media (max-width: 768px) {
            .shop-container {
                flex-direction: column;
            }
            
            .category-sidebar {
                position: static;
                flex: none;
                width: 100%;
                max-width: 100%;
            }
            .category-tree {
                max-height: 40vh; /* Smaller on mobile */
            }
            
            .brand-tabs-container {
                position: static;
            }
        }
        
        /* Loading states */
        .skeleton-tab {
            height: 48px;
            width: 120px;
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite;
            border-radius: 24px;
        }
        
        .skeleton-category {
            height: 36px;
            margin: 8px 0;
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite;
            border-radius: 6px;
        }
        
        @keyframes loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        
        @keyframes slide {
            0%, 100% { transform: translateY(-50%) translateX(0); }
            50% { transform: translateY(-50%) translateX(5px); }
        }
        
        