/* PRODUCTION STOREFRONT ONLY: deliberately different from DEV cards.
   Preserve native typography/colors and six aligned slots per row when porting search changes.
   Empty variant slots reserve space; counts/details remain hidden in search_results.tpl. */
.kwsearch-product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
    width: 100%;
}
.kwsearch-product-card {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 6;
    row-gap: 0;
    min-width: 0;
    padding: 4px 6px 8px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #212121;
    text-align: center;
}
.kwsearch-product-card:hover,
.kwsearch-product-card:focus-within { box-shadow: 0 5px 13px rgba(0, 0, 0, .17); }
.kwsearch-product-card__image { display: block; aspect-ratio: 1; overflow: hidden; }
.kwsearch-product-card__image img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Production listing's original configurable-product marker, independent of indexed photos. */
.kwsearch-product-card__configurable { position: absolute; right: 3px; bottom: 3px; }
.kwsearch-product-card__configurable img { width: 25px; height: 25px; }
.kwsearch-product-card__configurable > span { display: none; position: absolute; right: 27px; bottom: 5px; padding: 3px 4px; background: #f4a700; color: #fff; font-size: 12px; line-height: 14px; white-space: nowrap; }
.kwsearch-product-card__configurable:hover > span,
.kwsearch-product-card__image:focus-visible .kwsearch-product-card__configurable > span { display: block; }
.kwsearch-product-card__promotion {
    display: none;
    position: absolute;
    top: 5px;
    left: 6px;
    padding: 5px 3px;
    border-radius: 3px;
    background: #ce142b;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 10px;
    pointer-events: none;
}
.kwsearch-product-card:has([data-card-discount]:not(:empty)) .kwsearch-product-card__promotion { display: block; }
.kwsearch-product-card__name { min-height: 34px; margin: 4px 0 0; font-size: 14px; font-weight: 200; line-height: 16px; text-transform: none; }
.kwsearch-product-card__name a,
.kwsearch-product-card__manufacturer { color: inherit; text-decoration: none; }
.kwsearch-product-card__manufacturer { margin: 4px 0; font-size: 14px; line-height: 20px; }
.kwsearch-product-card__selection { margin: 0; }
.kwsearch-product-card__price { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px 8px; min-height: 42px; }
.kwsearch-product-card__price strong { flex-basis: 100%; color: #f4a700; font-size: 18px; font-weight: 600; line-height: 20px; }
.kwsearch-product-card__price del { color: #212121; font-size: 13px; font-weight: 600; line-height: 19px; }
.kwsearch-product-card__price [data-card-discount] { padding: 1px 5px; border-radius: 3px; background: #38a238; color: #fff; font-size: 13px; font-weight: 600; line-height: 17px; }
.kwsearch-product-card__price del:empty,
.kwsearch-product-card__price [data-card-discount]:empty { display: none; }
.kwsearch-product-card__choices { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px; min-width: 0; border: 0; padding: 0; margin: 8px 0 4px; }
.kwsearch-product-card__choices legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.kwsearch-product-card__choice,
.kwsearch-product-card__more { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; min-height: 26px; max-width: 100%; padding: 1px; border: 1px solid #d6d4d4; border-radius: 0; background: #fff; color: #212121; font-size: 11px; line-height: 20px; cursor: pointer; overflow-wrap: anywhere; }
.kwsearch-product-card__choice img,
.kwsearch-product-card__swatch { display: block; width: 22px; height: 22px; object-fit: cover; border-radius: 0; }
.kwsearch-product-card__swatch { background: var(--kwsearch-swatch); }
.kwsearch-product-card__choice[aria-pressed="true"],
.kwsearch-product-card__choice:hover,
.kwsearch-product-card__more:hover { border-color: #f4a700; box-shadow: inset 0 0 0 1px #f4a700; }
.kwsearch-product-card a:focus-visible,
.kwsearch-product-card button:focus-visible,
.kwsearch-product-card summary:focus-visible { outline: 2px solid #f4a700; outline-offset: 2px; }
.kwsearch-product-card__variants { min-height: 40px; }
.kwsearch-product-card__actions { align-self: end; display: flex; align-items: center; justify-content: center; min-height: 44px; }
.kwsearch-product-card__count { margin: 2px 0 4px; color: #666; font-size: 11px; line-height: 16px; }
.kwsearch-product-card__details { margin: 4px 0; color: #555; font-size: 12px; line-height: 18px; }
.kwsearch-product-card__details summary { cursor: pointer; }
.kwsearch-product-card__details p { margin: 6px 0; overflow-wrap: anywhere; }
.kwsearch-product-card__details p:empty { display: none; }
.kwsearch-product-card__details[open] { padding: 6px; background: #fafafa; }
.kwsearch-product-card__range { font-size: 12px; }
.kwsearch-product-card .kwsearch-product-card__action { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 4px; border: 0; border-radius: 0; background: #fff; color: #f4a700; font-size: 18px; font-weight: 600; line-height: 22px; text-decoration: none; box-shadow: none; }
.kwsearch-product-card .kwsearch-product-card__action:hover { color: #c98900; text-decoration: underline; }
@media (min-width: 769px) and (max-width: 1199px) {
    .kwsearch-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 768px) {
    .kwsearch-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .kwsearch-product-card__name { font-size: 15px; line-height: 19px; min-height: 38px; }
    .kwsearch-product-card__choice, .kwsearch-product-card__more { min-width: 34px; min-height: 34px; }
    .kwsearch-product-card__choice img, .kwsearch-product-card__swatch { width: 30px; height: 30px; }
    .kwsearch-product-card__details summary, .kwsearch-product-card .kwsearch-product-card__action { padding: 10px 4px; min-height: 44px; }
}
@media (max-width: 480px) {
    .kwsearch-product-grid { grid-template-columns: minmax(0, 1fr); }
    .kwsearch-product-card { padding: 8px 13px; }
}

.kwsearch-product-card__image { position:relative; }
.kwsearch-product-card [data-card-image-missing] { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--ui-text-muted); }
.kwsearch-product-card [data-card-swatch-fallback] { font-size:11px; line-height:1.3; overflow-wrap:anywhere; }

.kwsearch-results-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 10px 0 14px; min-width: 0; }
.kwsearch-results-count { grid-column: 1; grid-row: 1; flex-shrink: 0; font-size: 13px; color: var(--ui-text-muted, #666); }
[data-kwsearch-results-root] .sortpag { clear:both; width:100%; margin:20px 0; }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination { display:flex; justify-content:center; flex-wrap:nowrap; gap:6px; padding:0; margin:0; list-style:none; font-variant-numeric:tabular-nums; }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination>li { display:block; flex:0 0 44px; width:44px!important; height:44px; margin:0; }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination>li>a, [data-kwsearch-results-root] .sortpag .pagc ul.pagination>li>span { display:flex; align-items:center; justify-content:center; box-sizing:border-box; width:44px!important; min-width:0; height:44px; min-height:44px; padding:4px; border:1px solid var(--ui-border,#e1e5ea); border-radius:var(--ui-radius-control,6px); color:inherit; }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination>.current>span { border-color:var(--ui-action-primary); font-weight:700; }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination>.disabled { opacity:.45; visibility:visible; }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination a:focus-visible { outline:2px solid var(--ui-action-primary); outline-offset:2px; }
[data-kwsearch-results-root] .product-count { text-align:center; margin-top:8px; color:var(--ui-text-muted,#555); }

/* Override legacy body.computer .button_to_ajax display: inline-block !important. */
[data-kwsearch-results-root] .kwsearch-product-card [hidden] { display:none !important; }

@media(max-width:599px) {
    [data-kwsearch-results-root] .sortpag .pagc ul.pagination { gap:2px; }
    [data-kwsearch-results-root] .sortpag .pagc ul.pagination>li { flex:0 1 36px; width:36px!important; min-width:0; }
    [data-kwsearch-results-root] .sortpag .pagc ul.pagination>li>a,
    [data-kwsearch-results-root] .sortpag .pagc ul.pagination>li>span { width:100%!important; padding:2px; font-size:12px; }
}

[data-kwsearch-results-root] .sortpag .pagc ul.pagination>li>a>span,
[data-kwsearch-results-root] .sortpag .pagc ul.pagination>li>span>span { width:auto; height:auto; line-height:normal; padding:0; background:transparent; }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination>li i { display:block; width:8px; height:8px; margin:0; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(135deg); }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination>li.pagn i { transform:rotate(-45deg); }
[data-kwsearch-results-root] .sortpag .pagc ul.pagination>li i:before { content:none; }

[data-kwsearch-results-root] .sortpag .pagc ul.pagination>li.disabled>span { display:flex; visibility:visible; }

[data-kwsearch-results-root] .sortpag .pagb,
[data-kwsearch-results-root] .sortpag .pagc,
[data-kwsearch-results-root] .sortpag .pagd { width:100%; min-width:0; }

/* A shared grid row keeps dimensions visible and neighboring names aligned. */
.kwsearch-product-card__dimensions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px 10px; min-height: 28px; padding: 4px 0; color: #666; font-size: 12px; line-height: 18px; }
.kwsearch-product-card__dimension { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.kwsearch-product-card__dimension-icon { display: block; flex: 0 0 14px; width: 14px; height: 14px; color: #ed9b32; }
.kwsearch-product-card__dimension-icon--height { transform: rotate(90deg); }
.kwsearch-product-card__dimension-icon--depth,
.kwsearch-product-card__dimension-icon--length,
.kwsearch-product-card__dimension-icon--diameter { transform: rotate(-45deg); }

/* Hovering a swatch previews media only; selecting an offer remains a click. */
.kwsearch-product-card__image { position: relative; isolation: isolate; }
.kwsearch-product-card__variant-preview { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; background: var(--ui-surface, #fff); pointer-events: none; }
.kwsearch-product-card__variant-preview--material { inset: auto 8px 34px auto; width: min(52%, 160px); padding: 5px; flex-direction: column; border: 1px solid var(--ui-border, #ddd); border-radius: 6px; box-shadow: 0 2px 8px #0002; }
.kwsearch-product-card__variant-preview--material img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.kwsearch-product-card__preview-color { display: block; width: 100%; aspect-ratio: 1; }
.kwsearch-product-card__preview-caption { padding: 4px 2px 0; color: var(--ui-text, #333); font-size: 11px; line-height: 1.3; text-align: center; }

.kwsearch-product-card__configurable { z-index: 3; }
.kwsearch-product-card__promotion { z-index: 3; }

[data-kwsearch-results-root] .kwsearch-results-summary .sortpag { grid-column: 2; grid-row: 1; flex: 1; width: auto; min-width: 0; margin: 0; padding: 0; clear: none; }
@media (min-width: 769px) {
    [data-kwsearch-results-root] .kwsearch-results-summary .sortpag .pagc ul.pagination > li { flex-basis: 36px; width: 36px !important; height: 36px; }
    [data-kwsearch-results-root] .kwsearch-results-summary .sortpag .pagc ul.pagination > li > a,
    [data-kwsearch-results-root] .kwsearch-results-summary .sortpag .pagc ul.pagination > li > span { width: 36px !important; height: 36px; min-height: 36px; font-size: 13px; }
}
@media (max-width: 1000px) {
    .kwsearch-results-summary { display: flex; flex-wrap: wrap; gap: 8px 12px; }
    [data-kwsearch-results-root] .kwsearch-results-summary .sortpag { order: 3; flex-basis: 100%; }
}
body#KWSearch #breadcrumb { display: none; }

/* Filter layout shared with DEV; cards and pagination retain production styling. */
.kwsearch-results-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    margin: 5px 0 12px;
}
.new_categories_page[data-kwsearch-results-root] .kwsearch-results-heading .page-heading {
    margin: 0;
    padding-bottom: 0;
    text-transform: none;
}
.kwsearch-results-heading .page-heading::first-letter { text-transform: uppercase; }
.kwsearch-results-toolbar {
    --kwsearch-filter-accent: var(--ui-action-primary, #f4a700);
    --kwsearch-filter-border: var(--ui-border, #dfd8ca);
    --kwsearch-filter-muted: var(--ui-text-muted, #666);
    margin: 14px 0 8px;
    min-width: 0;
}
.kwsearch-results-toolbar__actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; min-width: 0; }
.kwsearch-results-controls { position: relative; grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 7px; min-height: 36px; margin: 0 0 0 auto; }
.kwsearch-results-controls label { margin: 0; font-size: 13px; font-weight: 400; color: var(--ui-text-muted, #666); }
.kwsearch-results-controls select { box-sizing: border-box; width: auto; min-height: 36px; max-width: 210px; margin: 0; padding: 5px 26px 5px 9px; border: 1px solid var(--ui-border, #dfd8ca); border-radius: var(--ui-radius-control, 4px); background-color: var(--ui-surface, #fff); color: var(--ui-text, #333); font: inherit; font-size: 13px; cursor: pointer; }
.kwsearch-results-controls select:hover,
.kwsearch-results-controls select:focus-visible { border-color: var(--ui-action-primary, #f4a700); }

.kwsearch-filter-ui {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}
.kwsearch-filter-ui [hidden] { display: none !important; }
.kwsearch-filter-bar { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; }
.kwsearch-filter-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 36px;
    padding: 6px 13px;
    border: 1px solid var(--kwsearch-filter-border);
    border-radius: var(--ui-radius-control, 6px);
    background: var(--ui-surface, #fff);
    color: var(--ui-text, #2b2b2b);
    font: inherit;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}
.kwsearch-filter-trigger:hover,
.kwsearch-filter-trigger:focus-visible,
.kwsearch-filter-trigger[aria-expanded="true"],
.kwsearch-filter-trigger--active { border-color: var(--kwsearch-filter-accent); }
.kwsearch-filter-trigger:focus-visible,
.kwsearch-filter-icon-button:focus-visible,
.kwsearch-filter-action:focus-visible,
.kwsearch-filter-chip__edit:focus-visible,
.kwsearch-filter-chip__remove:focus-visible { outline: 2px solid var(--kwsearch-filter-accent); outline-offset: 2px; }
.kwsearch-filter-trigger--all { background: var(--ui-surface, #fff); font-weight: 600; }
.kwsearch-filter-trigger__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px; width: 18px; height: 18px; font-family: FontAwesome; font-size: 18px; font-style: normal; font-weight: 400; line-height: 1; }
.kwsearch-filter-trigger__count,
.kwsearch-filter-section__summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 1px solid var(--kwsearch-filter-border);
    border-radius: 999px;
    background: var(--ui-surface-muted, #f2f3f4);
    color: var(--ui-text, #2b2b2b);
    font-size: 11px;
    font-weight: 600;
}
.kwsearch-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-height: 0;
    margin-top: 0;
    max-width: 100%;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-3px);
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: normal;
    transition: margin-top .2s ease, opacity .15s ease, transform .2s ease;
}
.kwsearch-filter-chips::-webkit-scrollbar { display: none; }
.kwsearch-filter-chips--visible { max-height: none; margin-top: 8px; overflow: visible; opacity: 1; transform: translateY(0); }
.kwsearch-filter-chips > [hidden] { display: none !important; }
.kwsearch-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    max-width: 100%;
    padding: 0;
    border: 1px solid var(--kwsearch-filter-border);
    border-radius: var(--ui-radius-control, 4px);
    background: var(--ui-surface, #fff);
    color: var(--ui-text, #333);
    font: inherit;
    font-size: 12px;
    flex: 0 1 auto;
    scroll-snap-align: start;
}
.kwsearch-filter-chips__more {
    appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    max-width: 100%;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--kwsearch-filter-border);
    border-radius: var(--ui-radius-control, 4px);
    background: var(--ui-surface, #fff);
    color: var(--ui-text, #333);
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}
.kwsearch-filter-chips__more:hover { border-color: var(--kwsearch-filter-accent); }
.kwsearch-filter-chips__more:focus-visible { outline: 2px solid var(--kwsearch-filter-accent); outline-offset: 2px; }
.kwsearch-filter-chip__edit,
.kwsearch-filter-chip__remove {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
}
.kwsearch-filter-chip__edit { min-width: 0; min-height: 30px; overflow: hidden; padding: 5px 4px 5px 9px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.kwsearch-filter-chip__remove { position: relative; display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 30px; padding: 0; color: var(--kwsearch-filter-muted); }
.kwsearch-filter-chip__remove svg { display: block; }
.kwsearch-filter-popover {
    position: absolute;
    z-index: 19; /* Below the site header (20), above product-card stacking contexts. */
    box-sizing: border-box;
    width: min(356px, calc(100vw - 24px));
    padding: 13px;
    border: 1px solid var(--kwsearch-filter-border);
    border-radius: var(--ui-radius-card, 8px);
    background: var(--ui-surface, #fff);
    box-shadow: 0 14px 34px rgba(31, 38, 45, .15);
    visibility: hidden;
    pointer-events: none;
}
.kwsearch-filter-popover.kwsearch-filter-layer--visible { visibility: visible; pointer-events: auto; }
.kwsearch-filter-popover--size { width: min(382px, calc(100vw - 24px)); }
.kwsearch-filter-panel__note { margin: -4px 0 10px; color: var(--kwsearch-filter-muted); font-size: 11px; }
.kwsearch-filter-range-list { display: grid; gap: 14px; }
.kwsearch-filter-range { --range-start: 0%; --range-end: 100%; min-width: 0; }
.kwsearch-filter-range__heading { margin-bottom: 5px; font-size: 12px; font-weight: 700; }
.kwsearch-filter-range__track { position: relative; height: 30px; margin: 0 10px 1px; cursor: pointer; touch-action: pan-y; user-select: none; }
.kwsearch-filter-range__track::before,
.kwsearch-filter-range__track::after { content: ""; position: absolute; top: 12px; height: 6px; border-radius: 999px; }
.kwsearch-filter-range__track::before { left: 0; right: 0; background: var(--ui-border, #e1e5ea); }
.kwsearch-filter-range__track::after { left: var(--range-start); right: calc(100% - var(--range-end)); background: var(--kwsearch-filter-accent); }
.kwsearch-filter-range input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
}
.kwsearch-filter-range input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: transparent; }
.kwsearch-filter-range input[type="range"]::-moz-range-track { height: 6px; background: transparent; }
.kwsearch-filter-range input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    margin-top: -7px;
    border: 0;
    border-radius: 6px;
    background: var(--kwsearch-filter-accent);
    box-shadow: 0 1px 2px #0002;
    pointer-events: none;
    cursor: grab;
}
.kwsearch-filter-range input[type="range"]::-moz-range-thumb {
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 6px;
    background: var(--kwsearch-filter-accent);
    box-shadow: 0 1px 2px #0002;
    pointer-events: none;
    cursor: grab;
}
.kwsearch-filter-range__labels,
.kwsearch-filter-range__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kwsearch-filter-range__labels { margin-bottom: 6px; color: var(--kwsearch-filter-muted); font-size: 11px; font-weight: 600; }
.kwsearch-filter-number { position: relative; display: block; }
.kwsearch-filter-number input {
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    margin: 0;
    padding: 5px 9px;
    border: 1px solid var(--kwsearch-filter-border);
    border-radius: var(--ui-radius-control, 4px);
    background: var(--ui-surface, #fff);
    color: var(--ui-text, #333);
    font: inherit;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.kwsearch-filter-number input:focus { border-color: var(--kwsearch-filter-accent); outline: 0; }
.kwsearch-filter-search { position: relative; margin-bottom: 7px; }
.kwsearch-filter-search input {
    box-sizing: border-box;
    width: 100%;
    height: 36px;
    margin: 0;
    padding: 6px 32px 6px 9px;
    border: 1px solid var(--kwsearch-filter-border);
    border-radius: var(--ui-radius-control, 4px);
    background: var(--ui-surface, #fff);
    color: var(--ui-text, #333);
    font: inherit;
    font-size: 13px;
}
.kwsearch-filter-search input:focus { border-color: var(--kwsearch-filter-accent); outline: 0; }
.kwsearch-filter-search > svg { position: absolute; top: 10px; right: 9px; color: var(--kwsearch-filter-muted); pointer-events: none; }
.kwsearch-filter-search--loading > svg { visibility: hidden; }
.kwsearch-filter-search .kwsearch-filter-search__loading { position: absolute; top: 50%; right: 9px; width: 16px; height: 16px; min-height: 0; transform: translateY(-50%); pointer-events: none; }
.kwsearch-filter-options { display: grid; gap: 1px; max-height: 216px; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior-y: contain; list-style: none; scrollbar-gutter: stable; scrollbar-width: thin; }
.kwsearch-filter-options--preview { max-height: none; overflow: visible; }
.kwsearch-filter-option { min-width: 0; }
.kwsearch-filter-option-more { appearance: none; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 38px; margin: 8px 0 0; padding: 7px 12px; border: 1px solid var(--kwsearch-filter-border); border-radius: var(--ui-radius-control, 6px); background: var(--ui-surface, #fff); color: var(--ui-text, #333); font: inherit; font-size: 12px; line-height: 1.2; cursor: pointer; transition: border-color .15s ease; }
.kwsearch-filter-option-more[aria-busy="true"] { gap: 8px; cursor: progress; }
.kwsearch-filter-option-more:hover { border-color: var(--kwsearch-filter-accent); }
.kwsearch-filter-option-more:focus-visible { outline: 2px solid var(--kwsearch-filter-accent); outline-offset: 2px; }
.kwsearch-filter-option-more[data-kwsearch-auto-hidden="true"] {
    position: absolute !important;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.kwsearch-filter-option-more[data-kwsearch-auto-hidden="true"]:focus-visible {
    position: relative !important;
    width: 100%;
    height: auto;
    min-height: 38px;
    margin: 8px 0 0;
    padding: 7px 12px;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
    border: 1px solid var(--kwsearch-filter-border);
}
.kwsearch-filter-option label { display: flex; align-items: center; gap: 8px; min-height: 31px; margin: 0; color: var(--ui-text, #333); font-size: 13px; cursor: pointer; }
.kwsearch-filter-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    place-content: center;
    box-sizing: border-box;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1px solid var(--kwsearch-filter-border);
    border-radius: 3px;
    background: var(--ui-surface, #fff);
    flex: 0 0 17px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.kwsearch-filter-option input[type="checkbox"]::before {
    content: "";
    width: 8px;
    height: 4px;
    margin-top: -1px;
    border: solid var(--kwsearch-filter-accent);
    border-width: 0 0 2px 2px;
    opacity: 0;
    transform: rotate(-45deg) scale(.65);
    transition: opacity .12s ease, transform .12s ease;
}
.kwsearch-filter-option input[type="checkbox"]:checked { border-width: 2px; border-color: var(--kwsearch-filter-accent); }
.kwsearch-filter-option input[type="checkbox"]:checked::before { opacity: 1; transform: rotate(-45deg) scale(1); }
.kwsearch-filter-option input[type="checkbox"]:focus-visible { outline: 2px solid var(--kwsearch-filter-accent); outline-offset: 2px; }
.kwsearch-filter-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kwsearch-filter-option input:disabled + span { opacity: .5; }
.kwsearch-filter-option label:has(input:disabled) { cursor: not-allowed; }
.kwsearch-filter-empty { margin: 10px 0; color: var(--kwsearch-filter-muted); font-size: 12px; }
.kwsearch-filter-no-results { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 12px 0; padding: 16px; border: 1px solid var(--ui-border, #e1e5ea); border-radius: var(--ui-radius-card, 8px); background: var(--ui-surface, #fff); color: var(--ui-text, #222); }
.kwsearch-filter-no-results p { flex: 1 1 320px; margin: 0; }
.kwsearch-filter-no-results .kwsearch-filter-action { width: auto; max-width: 100%; min-height: 44px; padding: 8px 14px; }
.kwsearch-filter-drawer .kwsearch-filter-select { box-sizing: border-box; display: block; width: 100%; max-width: 100%; min-height: 44px; margin: 0; }
.kwsearch-filter-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 6px; }
.kwsearch-filter-swatch {
    display: grid;
    justify-items: center;
    gap: 5px;
    min-width: 0;
    padding: 4px 2px;
    border: 1px solid transparent;
    border-radius: var(--ui-radius-control, 6px);
    background: transparent;
    color: var(--ui-text, #333);
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}
.kwsearch-filter-swatch:hover,
.kwsearch-filter-swatch:focus-visible,
.kwsearch-filter-swatch[aria-pressed="true"] { border-color: var(--kwsearch-filter-accent); }
.kwsearch-filter-swatch__image { display: block; box-sizing: border-box; width: 38px; height: 38px; border: 1px solid #0002; border-radius: 50%; background: var(--kwsearch-filter-swatch); }
.kwsearch-filter-swatch__label { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.kwsearch-filter-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 11px; border-top: 1px solid var(--kwsearch-filter-border); }
.kwsearch-filter-panel > .kwsearch-filter-actions { margin-top: 12px; }
.kwsearch-filter-action { box-sizing: border-box; width: 100%; min-height: 38px; margin: 0; font-size: 12px; }
.kwsearch-filter-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(25, 28, 31, .42); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.kwsearch-filter-overlay.kwsearch-filter-layer--visible { opacity: 1; pointer-events: auto; }
.kwsearch-filter-drawer {
    position: fixed;
    z-index: 91;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    box-sizing: border-box;
    width: min(390px, 100vw);
    border-left: 1px solid var(--kwsearch-filter-border);
    background: var(--ui-surface, #fff);
    box-shadow: -12px 0 32px #0002;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .22s cubic-bezier(.22, .8, .24, 1), visibility 0s linear .22s;
}
.kwsearch-filter-drawer.kwsearch-filter-layer--visible { transform: translateX(0); visibility: visible; transition-delay: 0s; }
.kwsearch-filter-drawer__header { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 16px; border-bottom: 1px solid var(--kwsearch-filter-border); }
.kwsearch-filter-drawer__header h2 { margin: 0; padding-left: 2px; font-size: 21px; }
.kwsearch-filter-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.kwsearch-filter-drawer__body { overflow-y: auto; padding: 4px 16px calc(14px + var(--kwsearch-filter-scroll-reserve, 0px)); overscroll-behavior: contain; scrollbar-width: thin; }
.kwsearch-filter-drawer__main[hidden] { display: none !important; }
.kwsearch-filter-drawer__body[data-kwsearch-filter-drawer-view="detail"] { display: grid; grid-template-rows: minmax(0, 1fr); overflow: hidden; padding-block: 10px; }
.kwsearch-filter-drawer__detail { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; gap: 10px; }
.kwsearch-filter-detail__search { margin: 0; }
.kwsearch-filter-detail__scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.kwsearch-filter-options--detail { max-height: none; overflow: visible; }
.kwsearch-filter-drawer .kwsearch-filter-option-more--all { margin-top: 8px; }
.kwsearch-filter-selected { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--kwsearch-filter-border); }
.kwsearch-filter-selected[hidden] { display: none !important; }
.kwsearch-filter-section { border-bottom: 1px solid var(--kwsearch-filter-border); }
.kwsearch-filter-section__header { display: grid; align-items: center; }
.kwsearch-filter-section__toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 8px 2px; border: 0; background: transparent; color: var(--ui-text, #222); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.kwsearch-filter-section__toggle > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kwsearch-filter-section__summary { margin-left: auto; flex-shrink: 0; }
.kwsearch-filter-section__chevron { width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .15s ease; }
.kwsearch-filter-section__toggle[aria-expanded="true"] .kwsearch-filter-section__chevron { transform: rotate(225deg); }
.kwsearch-filter-section__content { display: grid; grid-template-rows: 0fr; padding: 0 2px; opacity: 0; transition: grid-template-rows .22s cubic-bezier(.2, .8, .2, 1), padding-bottom .22s ease, opacity .16s ease; }
.kwsearch-filter-section--expanded .kwsearch-filter-section__content { grid-template-rows: 1fr; padding-bottom: 13px; opacity: 1; }
.kwsearch-filter-section__content-inner { min-height: 0; overflow: hidden; }
.kwsearch-filter-drawer__actions { padding: 10px 16px; background: var(--ui-surface, #fff); }
.kwsearch-filter-drawer .kwsearch-filter-range__track { height: 44px; margin: -7px 10px -6px; }
.kwsearch-filter-drawer .kwsearch-filter-range__track::before,
.kwsearch-filter-drawer .kwsearch-filter-range__track::after { top: 19px; }
.kwsearch-filter-drawer .kwsearch-filter-range input[type="range"] { height: 44px; }
.kwsearch-filter-drawer .kwsearch-filter-range input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; }
.kwsearch-filter-drawer .kwsearch-filter-range input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; }
.kwsearch-filter-drawer .kwsearch-filter-number input,
.kwsearch-filter-drawer .kwsearch-filter-search input { height: 44px; }
.kwsearch-filter-drawer .kwsearch-filter-search > svg { top: 50%; transform: translateY(-50%); }
.kwsearch-filter-drawer .kwsearch-filter-option label { min-height: 34px; }
.kwsearch-filter-drawer .kwsearch-filter-option input { width: 17px; height: 17px; flex-basis: 17px; }
.kwsearch-filter-drawer .kwsearch-filter-action { position: relative; }
.kwsearch-filter-drawer .kwsearch-filter-action::before { content: ""; position: absolute; inset: -3px 0; }
.kwsearch-filter-drawer .kwsearch-filter-icon-button { min-width: 44px; min-height: 44px; }
html:has([data-kwsearch-results-root]):not(:has(body.kwsearch-filter-drawer-open)) { scrollbar-gutter: stable; }
html:has(body.kwsearch-filter-drawer-open) {
    overflow: hidden;
    /* The root gutter is outside the fixed drawer; match its surface. */
    background-color: var(--ui-surface, #fff);
}
/* The theme reserves the root scrollbar gutter, including while scrolling is locked. */
body.kwsearch-filter-drawer-open { overflow: hidden; }
.kwsearch-filter-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[data-kwsearch-results-root] .kwsearch-product-grid { transition: opacity .2s ease; }
[data-kwsearch-results-root][aria-busy="true"] .kwsearch-product-grid { opacity: .5; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .kwsearch-filter-popover,
    .kwsearch-filter-overlay,
    .kwsearch-filter-drawer,
    .kwsearch-filter-section__content,
    .kwsearch-filter-chips,
    [data-kwsearch-results-root] .kwsearch-product-grid { transition-duration: .01ms; }
}

@media (max-width: 768px) {
    .kwsearch-results-toolbar__actions { gap: 8px; }
    .kwsearch-filter-trigger { min-height: 44px; padding-inline: 12px; }
    .kwsearch-filter-trigger--all { min-width: 86px; }
    .kwsearch-results-controls { min-height: 44px; gap: 5px; }
    .kwsearch-results-controls select { min-height: 44px; max-width: 154px; }
    .kwsearch-results-controls label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .kwsearch-filter-drawer { width: min(100%, 430px); }
}
@media (max-width: 599px) {
    .kwsearch-results-toolbar__actions {
        grid-template-columns: minmax(0, 1.1fr) minmax(116px, .9fr);
        width: 100%;
    }
    .kwsearch-filter-ui { grid-column: 2; }
    .kwsearch-filter-bar { width: 100%; overflow: visible; }
    .kwsearch-filter-trigger--all { width: 100%; min-height: 48px; font-size: 14px; }
    .kwsearch-results-controls { grid-column: 1; width: 100%; min-height: 48px; margin: 0; }
    .kwsearch-results-controls select { width: 100%; min-width: 0; max-width: none; min-height: 48px; flex: 1 1 auto; }
    .kwsearch-filter-chips {
        flex-wrap: wrap;
        gap: 8px 10px;
        overflow: visible;
        white-space: normal;
        scroll-snap-type: none;
    }
    .kwsearch-filter-chips--visible { max-height: none; }
    .kwsearch-filter-chip { max-width: 100%; flex: 0 1 auto; scroll-snap-align: none; }
    .kwsearch-filter-chip__edit { overflow: hidden; text-overflow: ellipsis; }
    .kwsearch-filter-chip__remove::before { content: ""; position: absolute; inset: -7px -8px; }
}
@media (max-width: 420px) {
    .kwsearch-results-controls select { max-width: none; font-size: 12px; }
    .kwsearch-filter-drawer__header { min-height: 54px; }
}

/* The legacy theme has no UI 2026 button primitives. Keep their adapter local to filters. */
.kwsearch-filter-action,
.kwsearch-filter-option-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--kwsearch-filter-border, #dfd8ca);
    border-radius: var(--ui-radius-control, 6px);
    background: var(--ui-surface, #fff);
    color: var(--ui-text, #2b2b2b);
    font-family: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    appearance: none;
}
.kwsearch-filter-action[data-kwsearch-filter-apply] {
    border-color: var(--kwsearch-filter-accent, #f4a700);
    background: var(--kwsearch-filter-accent, #f4a700);
    color: #fff;
}
.kwsearch-filter-action:hover,
.kwsearch-filter-option-more:hover,
.kwsearch-filter-option-more:focus-visible { border-color: var(--kwsearch-filter-accent, #f4a700); }
.kwsearch-filter-option-more:focus-visible { outline: 2px solid var(--kwsearch-filter-accent, #f4a700); outline-offset: 2px; }

.kwsearch-sort-help { position: relative; display: inline-flex; align-items: center; }
.kwsearch-sort-help__panel[hidden] { display: none; }
.kwsearch-sort-help__trigger { width: 24px; height: 24px; padding: 0; border: 1px solid var(--ui-text-muted, #777); border-radius: 50%; background: var(--ui-surface, #fff); color: var(--ui-text-muted, #555); font: inherit; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; }
.kwsearch-sort-help__panel {
    position: fixed;
    z-index: 120;
    display: grid;
    gap: 8px;
    box-sizing: border-box;
    width: min(330px, calc(100vw - 24px));
    padding: 13px;
    border: 1px solid var(--ui-border, #dfd8ca);
    border-radius: var(--ui-radius-card, 8px);
    background: var(--ui-surface, #fff);
    box-shadow: 0 12px 28px #0002;
    color: var(--ui-text, #333);
    font-size: 12px;
    line-height: 1.4;
}
.kwsearch-sort-help__panel span { display: block; }


.kwsearch-sort-help__trigger:focus-visible { outline: 2px solid var(--kwsearch-filter-accent); outline-offset: 2px; }
@media (max-width: 420px) { .kwsearch-sort-help__trigger { width: 22px; height: 22px; } }

.kwsearch-sort-help__panel { max-height: calc(100dvh - 16px); overflow-y: auto; }
.kwsearch-sort-help__panel strong { padding-right: 36px; }
.kwsearch-sort-help__close { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-size: 24px; cursor: pointer; }
.kwsearch-sort-help__close:focus-visible { outline: 2px solid var(--kwsearch-filter-accent); outline-offset: -4px; }
.kwsearch-sort-help__overlay { position: fixed; inset: 0; z-index: 119; background: #0006; }
.kwsearch-sort-help__overlay[hidden] { display: none; }
body.kwsearch-sort-help-open { overflow: hidden; }
@media (max-width: 768px) {
    .kwsearch-sort-help__panel { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(360px, calc(100vw - 32px)); padding: 20px; gap: 12px; font-size: 14px; }
}

/* Optional D/E comparison controls retain the production storefront palette. */
.kwsearch-model-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 18px; }
.kwsearch-model-switch__label { font-weight: 600; margin-right: 3px; }
.kwsearch-model-switch a { display: inline-flex; align-items: center; min-height: 38px; padding: 7px 11px; border: 1px solid var(--kwsearch-filter-border, #d6d4d4); border-radius: 5px; color: #212121; background: #fff; text-decoration: none; }
.kwsearch-model-switch a[aria-current="page"] { border-color: var(--kwsearch-filter-accent, #f4a700); background: var(--kwsearch-filter-accent, #f4a700); color: #fff; font-weight: 600; }
.kwsearch-model-switch a:focus-visible { outline: 2px solid var(--kwsearch-filter-accent, #f4a700); outline-offset: 2px; }
@media (max-width: 599px) { .kwsearch-model-switch a { min-height: 44px; } }
