        /* --- STATS CARDS --- */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 24px;
            margin-bottom: 32px;
        }
        
        @media (max-width: 767px) {
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
                margin-bottom: 24px;
            }
        }
        
        @media (max-width: 479px) {
            .stats-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }
        }

        .stat-card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            padding: 24px;
            border: none;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            transition: all var(--transition-normal);
            position: relative;
            overflow: hidden;
        }

        .stat-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        }

        .stat-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 16px;
        }

        .stat-card-title {
            font-size: 0.875rem;
            color: var(--text-tertiary);
            font-weight: 500;
        }

        .stat-card-icon {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
        }

        .stat-card-value {
            font-size: 2rem;
            font-weight: 800;
            color: var(--text-main);
            line-height: 1;
            margin-bottom: 8px;
        }

        .stat-card-change {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 0.875rem;
            font-weight: 500;
        }

        .change-positive {
            color: var(--success);
        }

        .change-negative {
            color: var(--danger);
        }

        /* --- CARDS --- */
        .card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            border: none;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
            padding: 24px;
            margin-bottom: 24px;
            transition: all var(--transition-normal);
        }

        .card:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        }
        
        @media (max-width: 767px) {
            .card {
                padding: 16px;
                margin-bottom: 16px;
                border-radius: var(--radius-md);
            }
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .card-title {
            font-size: 1.125rem;
            font-weight: 700;
            color: var(--text-main);
        }

        .card-actions {
            display: flex;
            gap: 8px;
        }

        /* --- CATEGORIES GRID --- */
        .categories-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 24px;
        }
        
        /* Mobile: horizontal scroll for categories */
        @media (max-width: 767px) {
            .categories-grid {
                display: flex;
                overflow-x: auto;
                gap: 16px;
                padding: 16px;
                scroll-snap-type: x mandatory;
                -webkit-overflow-scrolling: touch;
            }
            
            .categories-grid::-webkit-scrollbar {
                display: none;
            }
            
            .category-card {
                flex: 0 0 280px;
                scroll-snap-align: start;
            }
        }
        
        @media (max-width: 479px) {
            .categories-grid {
                padding: 12px;
                gap: 12px;
            }
            
            .category-card {
                flex: 0 0 240px;
            }
        }

        .category-card {
            background: var(--bg-card);
            border-radius: var(--radius-xl);
            border: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            padding: 32px 24px;
            display: flex;
            align-items: center;
            gap: 24px;
            transition: all var(--transition-normal);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .category-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
            opacity: 0;
            transition: opacity var(--transition-normal);
        }

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

        .category-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
            background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-light) 100%);
        }

        .category-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
            border-radius: var(--radius-lg);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 2rem;
            flex-shrink: 0;
            box-shadow: var(--shadow-md);
            transition: all var(--transition-normal);
        }

        .category-card:hover .category-icon {
            transform: scale(1.1) rotate(5deg);
            box-shadow: var(--shadow-lg);
        }

        .category-info {
            flex: 1;
        }

        .category-name {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 12px;
            line-height: 1.3;
            transition: color var(--transition-normal);
        }

        .category-card:hover .category-name {
            color: var(--primary);
        }

        .category-product-count {
            font-size: 0.9rem;
            color: var(--text-secondary);
            background: var(--bg-secondary);
            padding: 4px 10px;
            border-radius: var(--radius-full);
            display: inline-block;
            transition: all var(--transition-fast);
            font-weight: 500;
        }

        .category-card:hover .category-product-count {
            background: var(--primary);
            color: white;
            transform: translateX(3px);
        }

        .category-action {
            color: var(--text-secondary);
            transition: all var(--transition-normal);
            font-size: 1.2rem;
        }

        .category-card:hover .category-action {
            color: var(--primary);
            transform: translateX(5px);
        }

        /* Category card animations */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .category-card {
            animation: fadeInUp 0.6s ease-out backwards;
        }

        .category-card:nth-child(1) {
            animation-delay: 0.1s;
        }

        .category-card:nth-child(2) {
            animation-delay: 0.2s;
        }

        .category-card:nth-child(3) {
            animation-delay: 0.3s;
        }

        .category-card:nth-child(4) {
            animation-delay: 0.4s;
        }

        .category-card:nth-child(5) {
            animation-delay: 0.5s;
        }

        .category-card:nth-child(6) {
            animation-delay: 0.6s;
        }

        /* --- PRODUCT GRID --- */
        .products-grid {
            display: grid;
            grid-template-columns: repeat(4, 220px);
            gap: 16px;
            padding: 12px;
            overflow-x: auto;
            overflow-y: visible;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            scroll-snap-type: x mandatory;
        }
        
        .products-grid > * {
            scroll-snap-align: start;
        }
        
        /* Hide scrollbar but keep functionality */
        .products-grid::-webkit-scrollbar {
            height: 8px;
        }
        
        .products-grid::-webkit-scrollbar-track {
            background: var(--bg-page);
            border-radius: 4px;
        }
        
        .products-grid::-webkit-scrollbar-thumb {
            background: var(--border);
            border-radius: 4px;
        }
        
        .products-grid::-webkit-scrollbar-thumb:hover {
            background: var(--text-tertiary);
        }

        .product-card {
            background: var(--bg-card);
            border-radius: 16px;
            border: none;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
            overflow: hidden;
            transition: all 0.3s ease;
            position: relative;
            display: flex;
            flex-direction: column;
            max-height: 320px;
        }

        .product-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
        }

        .product-badge {
            position: absolute;
            top: 12px;
            left: 12px;
            background: #e32619;
            color: white;
            padding: 5px 14px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 700;
            z-index: 10;
            box-shadow: 0 4px 8px rgba(227, 38, 25, 0.3);
            text-transform: none;
            letter-spacing: normal;
        }

        .product-image {
            height: 140px;
            background: #FFFFFF;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
            padding: 8px;
        }

        .product-image img {
            max-width: 90%;
            max-height: 90%;
            object-fit: contain;
            transition: transform 0.3s ease;
        }

        .product-card:hover .product-image img {
            transform: scale(1.08);
        }

        /* Кнопки действий под изображением - теперь внутри карточки */
        .product-card-actions {
            display: flex;
            gap: 6px;
            padding: 6px 8px;
            background: var(--bg-page);
            border-top: none;
        }

        /* Mobile responsive for sidebar */
        @media (max-width: 768px) {
            .categories-sidebar {
                display: none;
            }
        }

        .product-card-actions .btn {
            flex: 1;
            padding: 6px 8px;
            border-radius: 6px;
            font-size: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
        }

        .product-card-actions .btn:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow-sm);
        }

        .product-body {
            padding: 20px;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .product-category {
            font-size: 0.65rem;
            margin-bottom: 2px;
        }

        .product-title {
            font-size: 0.75rem;
            margin-bottom: 4px;
            line-height: 1.3;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .product-sku {
            font-size: 0.65rem;
            margin-bottom: 4px;
            color: var(--text-tertiary);
        }

        .product-price {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--primary);
        }

        /* Количество у кнопки «в корзину» в каталоге */
        .catalog-qty-wrapper {
            display: flex;
            align-items: center;
            background: #f1f3f5;
            border-radius: 20px;
            padding: 2px;
            height: 32px;
            border: 1px solid #e9ecef;
        }

        .catalog-qty-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            border: none;
            background: white;
            color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 0.75rem;
            transition: all 0.2s;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            padding: 0;
        }

        .catalog-qty-btn:hover {
            background: #f8f9fa;
            transform: scale(1.05);
        }

        .catalog-qty-btn:active {
            transform: scale(0.95);
        }

        .catalog-qty-input {
            width: 32px;
            border: none !important;
            background: transparent !important;
            text-align: center;
            font-size: 0.9rem;
            font-weight: 700;
            color: #1a1a1a;
            padding: 0 !important;
            margin: 0 4px;
            -webkit-appearance: none;
            -moz-appearance: textfield;
            appearance: none;
            box-shadow: none !important;
        }

        .catalog-qty-input::-webkit-outer-spin-button,
        .catalog-qty-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            appearance: none;
            margin: 0;
        }

        .catalog-qty-input:focus {
            outline: none !important;
        }

        /* --- LOADING --- */
        .loading {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 200px;
        }

        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 4px solid rgba(0, 118, 86, 0.1);
            border-radius: 50%;
            border-top-color: var(--primary);
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* --- EMPTY STATE --- */
        .empty-state {
            padding: 60px 24px;
            text-align: center;
            color: var(--text-tertiary);
        }

        .empty-state-icon {
            width: 64px;
            height: 64px;
            background: var(--bg-page);
            border-radius: var(--radius-full);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
            color: var(--text-light);
        }

        .empty-state-title {
            font-size: 1.125rem;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--text-secondary);
        }

        .empty-state-description {
            max-width: 400px;
            margin: 0 auto 24px;
        }

        /* --- CATEGORIES HOME (main page) --- */
        .categories-home {
            padding: 16px 16px 40px;
            max-width: 1280px;
            margin: 0 auto;
        }

        .categories-home-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 16px;
            flex-wrap: wrap;
        }

        .categories-home-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--text-main);
            margin: 0;
        }

        .categories-home-topbar__actions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-left: auto;
        }

        .categories-home-search {
            position: relative;
            width: 180px;
        }

        .categories-home-search i {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-tertiary);
            font-size: 0.75rem;
        }

        .categories-home-search input {
            width: 100%;
            padding: 8px 10px 8px 30px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: var(--bg-card);
            font-size: 0.8rem;
        }

        .category-home-all-btn-compact {
            flex-shrink: 0;
            padding: 8px 14px;
            border: 1px solid var(--primary);
            border-radius: 10px;
            background: var(--primary);
            color: #fff;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
        }

        .category-home-all-btn-compact:hover {
            filter: brightness(1.05);
        }

        .categories-home-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 14px;
        }

        .category-home-tile {
            min-height: 88px;
            padding: 18px 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            border-radius: var(--radius-lg);
            background: var(--bg-card);
            border: 1px solid rgba(15, 23, 42, 0.08);
            box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
            cursor: pointer;
            transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
        }

        .category-home-tile:hover,
        .category-home-tile:focus-visible {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(15, 118, 110, 0.12);
            transform: translateY(-1px);
            outline: none;
        }

        .category-home-tile--all {
            background: linear-gradient(135deg, rgba(15, 118, 110, 0.08) 0%, rgba(15, 118, 110, 0.04) 100%);
            border-color: rgba(15, 118, 110, 0.2);
        }

        .category-home-tile__name {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-main);
            line-height: 1.25;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            word-break: break-word;
        }

        .categories-home-empty {
            grid-column: 1 / -1;
            padding: 24px;
        }

        @media (max-width: 767px) {
            .categories-home {
                padding: 12px 12px 28px;
            }

            .categories-home-topbar {
                flex-direction: column;
                align-items: stretch;
            }

            .categories-home-topbar__actions {
                margin-left: 0;
                width: 100%;
            }

            .categories-home-search {
                flex: 1;
                width: auto;
            }

            .categories-home-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 12px;
            }

            .category-home-tile {
                min-height: 72px;
                padding: 14px 12px;
            }

            .category-home-tile__name {
                font-size: 0.92rem;
            }
        }
