.categories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    display: flex;
    gap: 25px;
    min-height: calc(100vh - 200px);
}

.sidebar {
    width: 220px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    flex-shrink: 0;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 20px;
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 1px;
}

.category-list {
    padding: 10px 0;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.category-list::-webkit-scrollbar {
    width: 6px;
}

.category-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.cat-item {
    padding: 11px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.25s;
    border-left: 3px solid transparent;
    font-size: 14px;
    color: #555;
}

.cat-item:hover {
    background: #f5f7fa;
    color: #2c3e50;
}

.cat-item.active {
    background: linear-gradient(90deg, #fff5f5, #fff);
    border-left-color: #e74c3c;
    color: #e74c3c;
    font-weight: 600;
}

.cat-item .cat-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cat-item .arrow {
    font-size: 14px;
    color: #aaa;
    margin-left: 8px;
    transition: transform 0.25s;
}

.cat-item.active .arrow {
    color: #e74c3c;
}

.products-main {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    min-width: 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.products-header h2 {
    font-size: 22px;
    color: #2c3e50;
    font-weight: 700;
}

.search-box input {
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 25px;
    width: 260px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.products-grid .product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s;
    cursor: pointer;
}

.products-grid .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    border-color: #e74c3c;
}

.products-grid .product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f5f5;
}

.products-grid .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}

.products-grid .product-card:hover .product-image img {
    transform: scale(1.06);
}

.products-grid .product-info {
    padding: 10px 10px 12px;
}

.products-grid .product-name {
    font-size: 12px;
    margin-bottom: 6px;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    font-weight: 500;
    word-break: break-all;
}

.products-grid .product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.products-grid .color-badge {
    font-size: 10px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1.4;
}

.products-grid .sizes-badge {
    font-size: 10px;
    color: #e74c3c;
    background: #fff5f5;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1.4;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    color: #555;
    min-width: 36px;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: #e74c3c;
    color: #e74c3c;
}

.page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    font-weight: 600;
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 8px;
    color: #999;
}

@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 180px;
    }
    
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .category-list {
        max-height: 250px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .products-main {
        padding: 15px;
    }
}