/* Shop alignment: one mobile gutter, light controls, unclipped keyboard focus. */
#nm-shop #waf-selected-filters > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
#nm-shop #waf-selected-filters > ul > li { margin: 0; padding: 0; }
#nm-shop #waf-selected-filters:not(:has(li)) { display: none; }
@media (max-width: 992px) {
    #nm-shop .tb-archive-intro .tb-archive-intro__inner,
    #nm-shop .tb-archive-intro .tb-archive-intro__more {
        padding-inline: 16px;
        box-sizing: border-box;
        align-items: center;
    }
    #nm-shop .nm-shop-products-col { padding-inline: 16px; }
    #nm-shop .waf-container {
        box-sizing: border-box;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 4px 0;
        margin: 0 0 16px;
        overflow-x: auto;
        scroll-padding-inline: 0;
    }
    #nm-shop .waf-container .waf-filter {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        margin: 0;
        padding: 8px 12px;
        gap: 6px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: #fff;
        color: #666;
        box-shadow: none;
        outline: none;
        line-height: 1.3;
        touch-action: manipulation;
    }
    #nm-shop .waf-container .waf-filter:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #fff;
        color: #666;
    }
    #nm-shop .waf-container .waf-filter:hover,
    #nm-shop .waf-container .waf-filter.is-target {
        color: #9a5700;
        border-color: #cf8b32;
        background: #fff7eb;
    }
    #nm-shop .waf-container .waf-filter:focus-visible {
        outline: 2px solid #a85e00;
        outline-offset: -3px;
    }
    #nm-shop .waf-sorting-bar {
        /* Override archive intro's legacy inline !important spacing. */
        padding: 0 0 16px !important;
        margin: 0 0 8px !important;
        gap: 12px;
        flex-wrap: wrap;
        flex-direction: row;
        align-items: center;
    }
    #nm-shop .waf-sorting-left {
        min-width: 0;
        flex: 1 1 210px;
        gap: 8px;
    }
    #nm-shop #waf-sorting-select {
        flex: 1;
        min-width: 0;
        min-height: 44px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background-color: #fff;
    }
    #nm-shop .waf-sorting-right {
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }
    #nm-shop .tb-archive-intro__toggle {
        min-width: 1.5rem;
        width: 1.5rem;
        height: 1.5rem;
        margin-left: auto;
        white-space: nowrap;
        border-radius: 0;
        background: none;
        color: #666;
        touch-action: manipulation;
    }
    #nm-shop .nm-products .nm-shop-loop-actions {
        display: flex;
        justify-content: flex-end;
        text-align: right;
    }
    #nm-shop .nm-products .nm-quickview-btn {
        width: 1.5rem;
        height: 1.5rem;
        margin-left: auto;
        padding: 0;
        font-size: 0;
        line-height: 0;
        color: #666;
        background: none;
        border: none;
    }
    #nm-shop-sidebar .waf-panel-close {
        min-height: 44px;
        background: #fff7eb;
        color: #9a5700;
        border: 1px solid #cf8b32;
        border-radius: 6px;
    }
}
@media (min-width: 993px) {
    #nm-shop .tb-archive-intro .tb-archive-intro__inner,
    #nm-shop .tb-archive-intro .tb-archive-intro__more {
        max-width: 1280px;
        margin-inline: auto;
        padding-inline: 15px;
        box-sizing: border-box;
    }
}
/* Compact mobile filter panel — selection semantics remain native checkboxes. */
@media (max-width: 992px) {
    #nm-shop-sidebar { height: 100dvh; }
    #nm-shop-sidebar > ul {
        width: calc(100% - 24px);
        max-width: 420px;
        overscroll-behavior: contain;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transition: left .2s;
    }
    #nm-shop-sidebar.active > ul { transition: left .2s; }
    #nm-shop-sidebar .waf-panel-toolbar {
        position: sticky;
        top: 0;
        z-index: 30;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        margin: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
    }
    #nm-shop-sidebar .waf-panel-toolbar strong { font-size: 18px; color: #444; }
    #nm-shop-sidebar .waf-panel-close { padding: 8px 14px; min-height: 44px; background: #fff7eb; color: #9a5700; border: 1px solid #cf8b32; border-radius: 6px; }
    #nm-shop-sidebar > ul > .widget { padding: 0 16px; margin: 0; }
}
/* Shared option tiles and range fields: desktop and mobile use one design. */
    #nm-shop-sidebar .waf-filter-wrap {
        padding: 20px 0;
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    #nm-shop-sidebar .waf-filter-wrap h5 { margin: 0 0 12px; padding: 0; font-size: 16px; }
    #nm-shop-sidebar .waf-replace-count > ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0;
        padding: 0;
    }
    #nm-shop-sidebar .waf-replace-count > ul > li {
        min-width: 0;
        margin: 0;
        padding: 0;
    }
    #nm-shop-sidebar .waf-replace-count > ul > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
    #nm-shop-sidebar .waf-filter-wrap li label {
        position: relative;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        width: 100%;
        height: 100%;
        min-height: 48px;
        box-sizing: border-box;
        margin: 0;
        padding: 10px;
        border: 1px solid #e1e1e1;
        border-radius: 8px;
        background: #fff;
        color: #555;
        cursor: pointer;
        line-height: 1.35;
        touch-action: manipulation;
    }
    #nm-shop-sidebar .waf-option-name { min-width: 0; font-size: 14px; white-space: normal; overflow-wrap: normal; word-break: normal; }
    #nm-shop-sidebar .waf-option-count { flex: 0 0 auto; margin-left: auto; font-size: 12px; color: #777; font-variant-numeric: tabular-nums; white-space: nowrap; }
    #nm-shop-sidebar input.waf-filter-checkbox {
        position: absolute;
        /* Visually hidden, but still focusable and exposed to screen readers. */
        clip-path: inset(50%);
        overflow: hidden;
        margin: 0;
        padding: 0;
        border: 0;
        width: 1px;
        height: 1px;
    }
    #nm-shop-sidebar label:has(input:checked) { background: #fff; border-color: #b96b0b; box-shadow: inset 0 0 0 1px #b96b0b; color: #555; }
    #nm-shop-sidebar label:has(input:focus-visible) { outline: 2px solid #a85e00; outline-offset: -3px; }
    #nm-shop-sidebar label:has(input:disabled) { background: #f8f8f8; color: #999; cursor: default; }
    #nm-shop-sidebar .color-filter { display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto; min-width: 0; max-width: 100%; }
    #nm-shop-sidebar .color-filter > span { display: inline; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; position: static; opacity: 1; visibility: visible; transform: none; padding: 0; background: transparent; color: inherit; white-space: nowrap; }
    #nm-shop-sidebar .color-filter > span::after { display: none; }
    #nm-shop-sidebar .color-filter > i { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; border: 1px solid #ddd; border-radius: 50%; }
    #nm-shop-sidebar .waf-show-more-btn,
    #nm-shop-sidebar .waf-show-less-btn { padding: 12px 0 0; min-height: 44px; box-sizing: border-box; }
    #nm-shop-sidebar .tl-input-fields { gap: 12px; }
    #nm-shop-sidebar .tl-input-fields > div { flex: 1; min-width: 0; }
    #nm-shop-sidebar .tl-input-fields input { width: 100%; min-height: 44px; border-radius: 6px; }
    #nm-shop-sidebar .tl-track { background: #cf8b32 !important; }
    #nm-shop-sidebar .tl-thumb { background: #fff !important; border-color: #b96b0b; box-shadow: none; }
@media (min-width: 993px) {
    #nm-shop-sidebar .waf-panel-toolbar { display: none; }
    #nm-shop-sidebar .waf-filter-wrap:first-child { padding-top: 24px; }
    #nm-shop .nm-shop-sidebar-col { width: 360px; }
    #nm-shop .nm-shop-products-col { width: calc(100% - 360px); }
    #nm-shop-sidebar { padding-right: 0; }
    #nm-shop-sidebar .waf-option-name { overflow: visible; white-space: normal; overflow-wrap: normal; }
    #nm-shop-sidebar .color-filter > span { overflow: visible; white-space: normal; }
}
/* Keep endpoint handles and their touch targets inside the clipping container. */
#nm-shop-sidebar .waf-range-slider .tl-slider {
    width: calc(100% - 44px);
    margin: 24px 22px;
    overflow: visible;
}
#nm-shop-sidebar .waf-range-slider .tl-thumb {
    width: 22px !important;
    height: 22px !important;
    box-sizing: border-box;
    background: #fff !important;
    border: 2px solid #b96b0b;
    border-radius: 50%;
    box-shadow: none;
    touch-action: none;
}
#nm-shop-sidebar .waf-range-slider .tl-thumb::before {
    content: "";
    position: absolute;
    width: 44px;
    height: 44px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: reduce) {
    #nm-shop-sidebar > ul, #nm-shop-sidebar.active > ul,
    #nm-shop .tb-archive-intro__chevron { transition: none; }
}
