@media (min-width: 769px) {
    .dc-category-product-layout {
        display: grid;
        grid-template-columns: minmax(200px, 231px) minmax(0, 1fr);
        align-items: start;
        gap: 18px;
    }

    .dc-category-sidebar {
        position: sticky;
        top: 84px;
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 104px);
        overflow: hidden;
        padding: 16px 5px 16px 8px;
        border: 2px solid #fff;
        border-radius: 10px;
        background: rgba(248, 248, 248, 0.78);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .dc-category-product-content {
        min-width: 0;
    }
}

.dc-category-sidebar__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: none;
    scrollbar-color: rgba(80, 97, 118, 0.48) transparent;
}

.dc-category-sidebar__scroll::-webkit-scrollbar {
    width: 0;
}

.dc-category-sidebar__scroll::-webkit-scrollbar-track {
    background: transparent;
}

.dc-category-sidebar__scroll::-webkit-scrollbar-thumb,
.dc-category-sidebar__scroll::-webkit-scrollbar-thumb:vertical {
    -webkit-border-radius: 999px;
    border-radius: 999px;
    border: 1px solid transparent;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    background: rgba(80, 97, 118, 0.42);
}

.dc-category-sidebar__scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(80, 97, 118, 0.62);
}

.dc-category-sidebar__scrollbar {
    position: absolute;
    right: 4px;
    width: 4px;
    border-radius: 999px;
}

.dc-category-sidebar__scrollbar-thumb {
    width: 100%;
    min-height: 20px;
    border-radius: 999px;
    background: rgba(80, 97, 118, 0.42);
    cursor: pointer;
}

.dc-category-sidebar__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 6px 12px;
    color: #333;
    font-size: 17px;
    font-weight: 600;
}

.dc-category-sidebar__title i {
    color: var(--theme-primary, #2196F3);
    font-size: 20px;
}

.dc-category-sidebar__all,
.dc-category-sidebar__link,
.dc-category-sidebar__toggle {
    min-height: 36px;
    border-radius: 7px;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.dc-category-sidebar__all,
.dc-category-sidebar__link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.dc-category-sidebar__all {
    padding: 0 10px;
    margin-bottom: 7px;
}

.dc-category-sidebar__all:hover,
.dc-category-sidebar__all[aria-current="page"],
.dc-category-sidebar__link:hover,
.dc-category-sidebar__link[aria-current="page"] {
    color: var(--theme-primary, #2196F3);
    background: rgba(var(--theme-primary-rgb, 33, 150, 243), 0.1);
    text-decoration: none;
}

.dc-category-sidebar__list,
.dc-category-sidebar__children {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dc-category-sidebar__item {
    margin: 2px 0;
}

.dc-category-sidebar__row {
    display: flex;
    align-items: center;
    min-width: 0;
}

.dc-category-sidebar__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 15px;
    width: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.dc-category-sidebar__toggle i {
    transition: transform 0.18s ease;
}

.dc-category-sidebar__item.is-expanded > .dc-category-sidebar__row .dc-category-sidebar__toggle i {
    transform: rotate(90deg);
}

.dc-category-sidebar__link {
    flex: 1;
    min-width: 0;
    padding: 8px 8px;
}

.dc-category-sidebar__image {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    object-fit: cover;
}

.dc-category-sidebar__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dc-category-sidebar__count {
    flex: 0 0 auto;
    margin-left: auto;
    color: #999;
    font-size: 12px;
}

.dc-category-sidebar__children {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .dc-category-sidebar {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(17, 24, 39, 0.9);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .dc-category-sidebar__title,
html[data-theme="dark"] .dc-category-sidebar__all,
html[data-theme="dark"] .dc-category-sidebar__link,
html[data-theme="dark"] .dc-category-sidebar__toggle {
    color: #e5e7eb;
}

html[data-theme="dark"] .dc-category-sidebar__children {
    border-left-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .dc-category-sidebar__scroll {
    scrollbar-color: rgba(229, 231, 235, 0.42) transparent;
}

html[data-theme="dark"] .dc-category-sidebar__scroll::-webkit-scrollbar-thumb {
    background: rgba(229, 231, 235, 0.36);
}

html[data-theme="dark"] .dc-category-sidebar__scrollbar-thumb {
    background: rgba(229, 231, 235, 0.36);
}

@media (max-width: 768px) {
    .dc-category-sidebar {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dc-category-sidebar__toggle i {
        transition: none;
    }
}
