/* Shared category drawer, kept separate from homepage product styles. */
body.desktop-categories-open, body.mobile-categories-open { overflow: hidden; }
.desktop-categories-overlay { display: block; position: fixed; inset: 0; background: #0009; opacity: 0; visibility: hidden; z-index: 10040; transition: opacity .22s, visibility .22s; }
body.desktop-categories-open .desktop-categories-overlay { opacity: 1; visibility: visible; }
#desktop_categories_side.desktop-categories-drawer { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; height: 100%; height: 100dvh; width: 470px; max-width: calc(100vw - 24px); background: #fff; z-index: 10041; transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility .22s; overflow: hidden; box-shadow: 8px 0 28px #0f172a17; }
body.desktop-categories-open #desktop_categories_side { transform: translateX(0); visibility: visible; }
.category-drawer-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; padding: 12px 20px; background: #f8fafc; border-bottom: 1px solid #e2e6ec; }
.desktop-categories-drawer-title, .category-mobile-title { display: flex; align-items: center; gap: 12px; margin: 0; color: #182739; font-size: 18px; font-weight: 600; line-height: 26px; }
.category-drawer-bars { font-size: 22px; line-height: 1; }
.category-drawer-close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; padding: 7px; border: 0; border-radius: 8px; background: transparent; color: #919baa; cursor: pointer; }
.category-drawer-close svg, .category-drawer-toggle svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.category-drawer-close:hover { background: #eaf3fa; color: #269dd6; }
.desktop-categories-drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px; scrollbar-width: thin; scrollbar-color: #a1a7ae #fff; }
.category-drawer-tree, .category-drawer-tree ul { list-style: none; margin: 0; padding: 0; }
.desktop-categories-drawer-body, .slide-menu .mobile_side_content { overflow-anchor: none; }
.category-drawer-tree { color: #182739; font-family: Arial, sans-serif; }
.category-drawer-tree > .category-drawer-item { border-bottom: 1px solid #e2e6ec; }
.category-drawer-tree .category-drawer-row { display: flex; align-items: center; min-width: 0; min-height: 65px; gap: 6px; padding: 6px 8px; }
.category-drawer-tree .category-drawer-link { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 13px; color: #182739; text-decoration: none; font-size: 15px; font-weight: 600; line-height: 22px; }
.category-drawer-icon { display: flex; flex: 0 0 42px; width: 42px; height: 42px; align-items: center; justify-content: center; overflow: hidden; border-radius: 9px; background: #f1f3f5; font-size: 28px; line-height: 1; }
.category-drawer-icon img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.category-drawer-label { min-width: 0; overflow-wrap: anywhere; }
.category-drawer-tree .category-drawer-count { display: inline; margin-left: 7px; color: #768294; font-size: 12px; font-weight: 400; white-space: nowrap; }
.category-drawer-tree .category-drawer-toggle { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 9px; border: 0; border-radius: 8px; color: #526071; background: transparent; cursor: pointer; }
.category-drawer-tree .category-drawer-toggle[aria-expanded="true"] { color: #269dd6; background: #e4f3fc; }
.category-drawer-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.category-drawer-tree .category-drawer-children { padding: 2px 0 5px 32px; border-left: 3px solid #e2e6ec; background: #fcfdff; }
.category-drawer-tree .category-drawer-children[hidden] { display: none; }
.category-drawer-children .category-drawer-row { min-height: 44px; padding: 7px 8px; }
.category-drawer-children .category-drawer-link { gap: 12px; font-size: 14px; font-weight: 400; color: #34465d; }
.category-drawer-child-arrow { flex: 0 0 12px; font-size: 22px; color: #788495; }
.category-drawer-tree .category-drawer-link:hover { color: #269dd6; }
.category-drawer-tree .category-drawer-row:hover { background: #f5f9fc; }
.category-drawer-tree button:focus:not(:focus-visible), .category-drawer-close:focus:not(:focus-visible) { outline: none; }
.category-drawer-tree :is(a,button):focus-visible, .category-drawer-close:focus-visible { outline: 2px solid #269dd6; outline-offset: 2px; border-radius: 5px; }
@media (max-width: 991px) {
    .slide-menu .mobile_side_wrap { width: min(440px, calc(100vw - 24px)); left: 0 !important; transform: translateX(-100%); visibility: hidden; transition: transform .22s ease, visibility .22s; z-index: 10041; height: 100%; height: 100dvh; background: #fff; overflow: hidden; }
    .slide-menu .mobile_side_toggle:checked + .mobile_side_wrap { transform: translateX(0); visibility: visible; }
    .slide-menu .mobile_side_overlay { z-index: 10040; background: #0009; margin: 0; }
    .slide-menu .mobile_side_wrap_in { height: 100%; padding: 0; }
    .slide-menu .mobile_side_wrap_in_close.category-drawer-heading { justify-content: space-between; }
    .slide-menu .mobile_side_content { flex: 1 1 auto; min-height: 0; width: 100%; margin: 0; padding: 0 8px 16px; overflow-y: auto; overscroll-behavior: contain; }
    .slide-menu .mobile_side_content > form { padding: 12px 8px 0; }
    .slide-menu .mobile_side_wrap_in_categories_main { overflow: visible; margin: 6px 0 0; }
    .slide-menu .mobile-menu-categories-main { border-top: 0; }
    .slide-menu #categories-parent-main { margin-top: 16px; border-top: 1px solid #e2e6ec; }
    .slide-menu #categories-parent-main ul li a { font-size: 13px; }
}
@media (max-width: 359px) {
    .category-drawer-heading { padding: 10px 14px; }
    .category-drawer-tree .category-drawer-link { gap: 9px; font-size: 13px; line-height: 20px; }
    .category-drawer-tree .category-drawer-count { margin-left: 4px; font-size: 11px; }
    .category-drawer-tree .category-drawer-children { padding-left: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    #desktop_categories_side.desktop-categories-drawer, .desktop-categories-overlay, .slide-menu .mobile_side_wrap { transition: none; }
}
