/* 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;
    font-size: 13px !important;
    font-weight: 600 !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 30px;
    width: 30px;
    height: 30px;
    min-height: 30px;
    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;
    padding: 14px 12px;
    margin: 0;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList button {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-children-inner {
    margin-right: 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;
    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;
}

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;
    margin-right: 0;
    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 .cat-parent-toggle,
body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-child-button {
    grid-template-columns: minmax(0, 1fr) auto;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-parent-toggle .cat-count-badge,
body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-child-button .cat-count-badge {
    grid-column: 2;
    justify-self: end;
    margin-right: 0;
}

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;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar #catList .cat-child-button.active {
    background: #0051BB !important;
    border-color: #0051BB !important;
    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: #000;
    font-size: 18px;
}

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: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section.filter-section-sizes .filter-chip {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: auto;
    min-width: 38px;
    min-height: 38px !important;
    padding: 8px 10px;
    border-radius: 10px;
    line-height: 20px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    text-align: center;
}

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: 9px 6px;
    padding: 3px 0;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .filter-chip {
    box-sizing: border-box;
    position: relative;
    display: grid;
    place-items: center;
    justify-self: center;
    width: 32px;
    height: 32px;
    min-height: 32px !important;
    min-width: 0;
    padding: 4px;
    border: 1px solid #e0e7f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(20, 35, 62, .025);
    transform: none;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .filter-chip:hover {
    border-color: #a5bde3;
    background: #f4f7fc;
    box-shadow: 0 0 0 2px rgba(0, 81, 187, .06);
}

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

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: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 15px;
    height: 15px;
    border: 1.5px solid #fff;
    border-radius: 50%;
    background: rgba(15, 23, 42, .12);
    color: #fff;
    font: 800 9px/1 sans-serif;
    text-shadow: 0 1px 2px rgba(15, 23, 42, .4);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .color-filter-chip:is([data-filter-value='#ffffff'], [data-filter-value='#f3f4f6'], [data-filter-value='#fde68a'], [data-filter-value='#f5f5dc']).active::after {
    border-color: #0051BB;
    background: #fff;
    color: #0051BB;
    text-shadow: 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;
    border-radius: 7px;
    box-shadow: inset 0 0 0 1px rgba(20, 35, 62, .09);
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .color-filter-all {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    height: 42px;
    min-height: 42px !important;
    margin-bottom: 5px;
    padding: 8px 36px 8px 11px;
    border-radius: 12px;
    background: #f8fafd;
    color: #60708a;
    font-size: 11px !important;
    font-weight: 500;
    text-align: left;
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .color-filter-all.active {
    padding: 8px 36px 8px 11px;
    border: 1px solid #c8d9f4;
    background: #edf3ff;
    color: #0051bb;
    box-shadow: none;
}

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

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-section-colors .color-filter-all.active::after {
    top: 50%;
    right: 11px;
    left: auto;
    width: 17px;
    height: 17px;
    border: 0;
    background: #0051BB;
    font-size: 10px;
    text-shadow: none;
    transform: translateY(-50%);
}

body:is(.shop-catalog, .design-catalog) .sidebar.catalog-refined-sidebar .filter-color-all-dot {
    display: block;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #f43f5e);
    box-shadow: 0 0 0 1px #dae3f0;
}

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;
    }
}
