/* Catalog sidebar only: mobile drawer controls keep their own touch sizing. */

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .sidebar-card {
    border: 1px solid #e4e8ee; border-radius: 22px; background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06); overflow: hidden;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .sidebar-card::before,
body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .sidebar-card::after {
    display: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .sidebar-header {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 18px 16px; border: 0; border-bottom: 1px solid #eef0f4;
    background: #fff;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .sidebar-heading {
    display: flex; align-items: center; gap: 9px; color: #233552;
    font-size: 13px !important; font-weight: 700 !important;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .sidebar-reset {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; padding: 0;
    border: 1px solid #e4e8ee; border-radius: 9px;
    background: #fff; color: #0051BB; font: 500 11px Montserrat, sans-serif; cursor: pointer;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .sidebar-reset svg {
    display: block; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 0;
    background: transparent; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .sidebar-reset:hover {
    border-color: #0051BB; background: #fff; color: #0051BB;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList {
    display: grid; gap: 6px; padding: 14px 12px; margin: 0;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList > li > button {
    box-sizing: border-box; width: 100%; min-width: 0;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; text-align: left;
    min-height: 48px !important; height: auto; max-height: none; padding: 10px 12px !important; gap: 12px;
    border: 1px solid transparent; border-radius: 12px; background: transparent; color: #344256;
    box-shadow: none; transform: none; transition: background .18s ease, color .18s ease;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList > li > button:hover {
    border-color: #e4e8ee; background: #f7f8fa; color: #0051BB;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList > li > button.active {
    border-color: #0051BB; background: #0051BB;
    color: #fff; box-shadow: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-btn-name {
    color: inherit !important; font-size: 12px !important; font-weight: 500 !important;
    line-height: 1.5 !important; white-space: normal; overflow-wrap: anywhere;
}

/* The legacy label wrapper has its own black color; inherit the selected row instead. */
body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-btn-left {
    min-width: 0; color: inherit;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .active .cat-btn-name {
    color: #fff !important; font-weight: 600 !important;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-count-badge {
    box-sizing: border-box; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; border: 1px solid #e9edf3;
    border-radius: 9px; background: #f5f7fa; color: #64748b; font-size: 11px !important; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .active > .cat-count-badge {
    background: #fff; border-color: #fff; color: #0051BB;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .active .cat-expand-icon {
    color: #fff;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-child-button {
    min-height: 36px !important; padding: 8px 10px !important;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-child-button.active {
    background: #0051BB; border-color: #0051BB; color: #fff;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section {
    margin: 0 16px; padding: 16px 0; border-top: 1px solid #eef0f4;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-title {
    display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: #344256;
    font-size: 12px !important; font-weight: 600 !important; line-height: 1.5; text-transform: none; letter-spacing: 0;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-title i {
    display: grid; place-items: center; width: 18px; height: 20px;
    background: transparent; color: #0051BB; font-size: 16px;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section:not(.filter-section-colors) .filter-chip {
    width: auto; max-width: 100%; min-height: 36px !important; padding: 7px 11px;
    justify-content: center; border: 1px solid #e1e5eb; border-radius: 8px; background: #fff; color: #5b687b;
    font-size: 11px !important; font-weight: 500; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; box-shadow: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section:not(.filter-section-colors) .filter-chip:hover {
    border-color: #0051BB; background: #fff; color: #0051BB;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section:not(.filter-section-colors) .filter-chip.active {
    border-color: #0051BB; background: #0051BB; color: #fff;
    font-weight: 600; box-shadow: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section:not(.filter-section-colors) .filter-chip::before {
    content: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar [data-sidebar-filter="material"] .filter-chip:not([data-filter-value="all"]) {
    width: 100%; justify-content: flex-start; text-align: left;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-sizes .filter-chips {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section.filter-section-sizes .filter-chip {
    width: 100%; min-width: 0; padding: 7px 3px;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors {
    padding-bottom: 22px;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .filter-chips {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 6px; padding: 3px 0;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .filter-chip {
    position: relative; justify-self: center; width: 30px; height: 30px; min-height: 30px !important;
    min-width: 0; padding: 3px; border: 1px solid #dfe5ee; border-radius: 50%; box-shadow: none; transform: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .filter-chip:hover {
    border-color: #0051BB;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .filter-chip.active {
    border-color: #0051BB; box-shadow: 0 0 0 2px rgba(0, 81, 187, .12);
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .filter-chip.active::after {
    content: '\2713'; position: absolute; z-index: 2; top: -4px; right: -4px; bottom: auto; left: auto;
    display: grid; place-items: center; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%;
    background: #0051BB; color: #fff; font: 700 9px/1 sans-serif; transform: none; pointer-events: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .color-filter-chip .filter-color-dot {
    width: 22px; height: 22px; flex: 0 0 22px; margin: auto; box-shadow: inset 0 0 0 1px rgba(20, 35, 62, .06);
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar button:focus-visible {
    outline: 2px solid #0051BB; outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar * { transition: none !important; }
}
