/* Sidebar Catalog Menu */
.catalog-sidebar {
    position: fixed;
    top: 0;
    left: -360px;
    width: 360px;
    height: 100vh;
    background: #253d30;
    box-shadow: 5px 0 20px rgba(0,0,0,0.1);
    z-index: 3000;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.catalog-sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(147, 123, 97, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #253d30;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.sidebar-close:hover {
    transform: rotate(90deg);
}

.sidebar-content {
    flex: 1;
    padding: 0;
}

.loading-sidebar {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255,255,255,0.7);
}

/* Sidebar Category Items */
.sidebar-category-item {
    border-bottom: 1px solid rgba(147, 123, 97, 0.3);
}

.sidebar-category-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.sidebar-category-header:hover {
    background: rgba(255,255,255,0.05);
}

.sidebar-category-header i {
    color: white;
    font-size: 1.2rem;
    min-width: 20px;
}

.sidebar-category-name {
    flex: 1;
    font-weight: 500;
    color: white;
    font-size: 1rem;
}

/* Счетчики товаров в сайдбаре больше не используются */
.sidebar-category-count {
    display: none;
}

.sidebar-toggle {
    font-size: 1.5rem;
    color: white;
    font-weight: 300;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    line-height: 1;
}

.sidebar-category-item.active .sidebar-toggle {
    transform: rotate(90deg);
}

/* Subcategories */
.sidebar-subcategories {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0,0,0,0.2);
}

.sidebar-category-item.active .sidebar-subcategories {
    max-height: 2000px;
}

.sidebar-subcategory-item {
    padding: 12px 20px 12px 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-left: 3px solid transparent;
    border-bottom: 1px solid rgba(147, 123, 97, 0.3);
}

.sidebar-subcategory-item:hover {
    background: rgba(255,255,255,0.05);
    border-left-color: #937b61;
}

.sidebar-subcategory-item i {
    color: white;
    font-size: 1rem;
    min-width: 16px;
}

.sidebar-subcategory-item span:first-of-type {
    flex: 1;
    color: white;
    font-size: 0.95rem;
}

.sidebar-subcategory-item .sidebar-category-count {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .catalog-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-category-header,
    .sidebar-subcategory-item {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .sidebar-subcategory-item {
        padding-left: 40px;
    }
}

/* Sidebar Footer Links */
.sidebar-footer-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(147, 123, 97, 0.3);
}

.sidebar-footer-link {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(147, 123, 97, 0.3);
}

.sidebar-footer-link:last-child {
    border-bottom: none;
}

.sidebar-footer-link:hover {
    background: rgba(147, 123, 97, 0.2);
    transform: translateX(5px);
}

.sidebar-footer-link i {
    color: #937b61;
    font-size: 1.2rem;
    min-width: 20px;
}

.sidebar-footer-link span {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

