/* The catalog drawers follow the home menu's white surface and compact rows. */
body:is(.design-catalog, .shop-catalog) .cat-drawer-chevron {
    display: none;
}

@media (max-width: 1024px) {
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer) {
        width: min(380px, calc(100vw - 20px));
        background: #fff;
        box-shadow: 16px 0 60px rgba(15, 23, 42, .2);
    }
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer)::backdrop {
        background: rgba(15, 23, 42, .48);
        backdrop-filter: blur(3px);
    }
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer) .category-drawer-head {
        min-height: 76px;
        gap: 16px;
        padding: calc(16px + env(safe-area-inset-top, 0px)) 18px 16px;
        border-bottom: 1px solid #dce6f5;
        background: #fff;
    }
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer) .category-drawer-head h2 {
        color: #101c29;
        font-size: 16px;
        line-height: 1.4;
        font-weight: 650;
    }
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer) .category-drawer-head p {
        margin-top: 4px;
        color: #75839b;
        font-size: 11px !important;
        line-height: 1.5;
    }
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer) .category-drawer-close {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        border: 1px solid #dce6f5;
        border-radius: 12px;
        background: #fff;
        color: #101c29;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer) .category-drawer-close svg {
        display: block;
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
    }
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer) .category-drawer-close:hover {
        border-color: #93b4f5;
        background: #eff6ff;
        color: #0051bb;
    }
    body:is(.design-catalog, .shop-catalog) :is(#categoryDrawer, #filterDrawer) :is(button, summary):focus-visible {
        outline: 2px solid #7397f3;
        outline-offset: -2px;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer .category-drawer-body {
        background: #fff;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList {
        gap: 6px;
        padding: 16px 14px calc(20px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        scrollbar-color: #cbd7eb transparent;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList > li > button {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto 16px;
        gap: 10px;
        min-height: 46px;
        margin: 0;
        padding: 11px 12px;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: #334155;
        box-shadow: none;
        text-align: left;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-btn-left {
        min-width: 0;
        color: inherit;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-btn-name {
        color: inherit !important;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.5;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList > li > button:hover {
        background: #f5f9ff;
        color: #0051bb;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList > li > button.active {
        background: #0051bb;
        color: #fff;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-count-badge {
        display: grid;
        place-items: center;
        min-width: 26px;
        height: 26px;
        margin: 0;
        padding: 0 6px;
        border: 0;
        border-radius: 8px;
        background: #f0f4fa;
        color: #687b98;
        font-size: 10px;
        line-height: 1;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .active > .cat-count-badge {
        background: #fff;
        color: #0051bb;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer .cat-drawer-chevron {
        display: block;
        font-size: 15px;
        color: inherit;
        transition: transform .18s ease;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer [aria-expanded="true"] .cat-drawer-chevron {
        transform: rotate(180deg);
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-children-inner {
        display: grid;
        gap: 2px;
        margin: 6px 8px 10px 22px;
        padding: 2px 0 2px 10px;
        border-left: 2px solid #dce6fb;
        background: transparent;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-child-button {
        min-height: 44px;
        padding: 9px 10px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: #566881;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-child-button .cat-btn-name {
        font-size: 12px;
        font-weight: 500;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-child-button .cat-emoji {
        display: none;
    }
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-child-button:hover,
    body:is(.design-catalog, .shop-catalog) #categoryDrawer #catList .cat-child-button.active {
        background: #edf3ff;
        color: #0051bb;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-panel-body {
        display: block;
        padding: 16px 14px 20px;
        background: #fff;
        scrollbar-width: thin;
        scrollbar-color: #cbd7eb transparent;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-dropdown {
        margin: 0;
        padding: 0;
        border: 0;
        border-bottom: 1px solid #e5ebf5;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-dropdown:last-child {
        border-bottom: 0;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-dropdown > summary {
        min-height: 48px;
        gap: 12px;
        padding: 12px 10px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: #334155;
        cursor: pointer;
        pointer-events: auto;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-dropdown[open] > summary {
        background: #f5f9ff;
        color: #0051bb;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .filter-dropdown-value {
        color: inherit;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0 !important;
        text-transform: none;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-dropdown > summary i {
        display: block;
        font-size: 16px;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-menu {
        gap: 4px;
        padding: 8px 4px 14px;
        background: transparent;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-dropdown:not([open]) > .catalog-filter-menu {
        display: none !important;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .filter-chip {
        gap: 10px;
        min-height: 40px;
        padding: 9px 12px;
        border-radius: 9px;
        color: #566881;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .filter-chip.active {
        background: #edf3ff;
        color: #0051bb;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-size .filter-chip {
        min-height: 40px;
        padding: 8px 12px;
        line-height: 1.5;
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-size .filter-chip.active {
        border-color: #0051bb;
        background: #0051bb;
        color: #fff;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-color .catalog-filter-menu {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 12px 8px;
        padding: 12px 8px 18px;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-color .filter-chip {
        justify-self: center;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        padding: 3px;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-color .filter-chip {
        box-shadow: 0 0 0 1px #dbe2ee;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-color .filter-chip.active {
        box-shadow: 0 0 0 2px #0051bb;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-color .filter-chip[data-filter-value="all"] {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: flex-start;
        width: 100%;
        height: 40px;
        padding: 8px 12px;
        border: 0;
        border-radius: 9px;
        background: #f5f9ff;
        color: #526787;
        font-size: 12px;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-color .filter-chip[data-filter-value="all"].active {
        background: #edf3ff;
        color: #0051bb;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-color .filter-chip[data-filter-value="all"].active::after {
        inset: 0 12px 0 auto;
        color: #0051bb;
        text-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-filter-color .color-filter-chip .filter-color-value {
        display: none;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-panel-actions {
        gap: 10px;
        padding: 16px 14px calc(18px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #dce6f5;
        background: #fff;
        box-shadow: none;
    }
    body:is(.design-catalog, .shop-catalog) #filterDrawer .catalog-panel-button {
        min-height: 46px;
        border-radius: 12px;
        font-size: 13px;
        font-weight: 600;
        box-shadow: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    body:is(.design-catalog, .shop-catalog) #categoryDrawer .cat-drawer-chevron {
        transition: none;
    }
}
