/* ===== CATALOG SIDEBAR STYLES ===== */

/* Catalog layout: sidebar + content */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sidebar */
.catalog-sidebar {
    position: sticky;
    top: 110px;
    background: var(--white);
    border: 1px solid var(--mid-grey);
    border-radius: var(--radius);
    overflow: hidden;
}
.sidebar-header {
    padding: 16px 20px;
    background: var(--dark-grey);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-header i { color: var(--red); }
.sidebar-nav {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: var(--light-grey); }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--mid-grey); border-radius: 2px; }

/* Category item */
.sidebar-cat {
    border-bottom: 1px solid #f0f0f0;
}
.sidebar-cat:last-child { border-bottom: none; }
.sidebar-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    cursor: pointer;
    transition: background var(--transition);
}
.sidebar-cat-header:hover { background: var(--light-grey); }
.sidebar-cat-header.active { background: #fef2f2; }
.sidebar-cat-header a {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-grey);
    transition: color var(--transition);
}
.sidebar-cat-header a:hover { color: var(--red); }
.sidebar-cat-header .cat-icon {
    width: 28px;
    height: 28px;
    background: var(--light-grey);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--red);
    flex-shrink: 0;
    transition: all var(--transition);
}
.sidebar-cat-header:hover .cat-icon,
.sidebar-cat-header.active .cat-icon {
    background: var(--red);
    color: var(--white);
}
.sidebar-cat-header .cat-count {
    font-size: 11px;
    color: #aaa;
    margin-left: auto;
    font-weight: 400;
}
.sidebar-cat-toggle {
    padding: 12px 14px;
    font-size: 11px;
    color: #bbb;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    background: none;
    flex-shrink: 0;
}
.sidebar-cat-toggle:hover { color: var(--red); }
.sidebar-cat-toggle i { transition: transform var(--transition); }
.sidebar-cat.open .sidebar-cat-toggle i { transform: rotate(180deg); }

/* Subcategory list */
.sidebar-subcats {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: #fafafa;
}
.sidebar-cat.open .sidebar-subcats {
    max-height: 800px;
}
.sidebar-subcats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px 9px 54px;
    font-size: 13px;
    color: #666;
    transition: all var(--transition);
    border-top: 1px solid #f0f0f0;
}
.sidebar-subcats a:hover {
    color: var(--red);
    background: #f5f5f5;
    padding-left: 58px;
}
.sidebar-subcats a.subcat-active {
    color: var(--red);
    font-weight: 600;
    background: #fef2f2;
}
.sidebar-subcats .subcat-count {
    font-size: 11px;
    color: #bbb;
}

/* Mobile sidebar toggle */
.sidebar-mobile-toggle {
    display: none;
    width: 100%;
    padding: 14px 20px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--dark-grey);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 20px;
    align-items: center;
    justify-content: center;
}
.sidebar-mobile-toggle i { margin-right: 8px; }

@media (max-width: 992px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .catalog-sidebar { position: static; display: none; }
    .catalog-sidebar.mobile-open { display: block; }
    .sidebar-mobile-toggle { display: flex; }
}
