/**
 * Alvoble Layered Navigation - https://alvoble.com
 * Copyright (c) 2026 Company System Ltd. All rights reserved.
 * See LICENSE.txt for licence details.
 *
 * Styles for the filter panel, the active filter strip, the toolbar and the mobile drawer. Colours and the font come
 * from the theme's design tokens (the Alvoble Storefront settings change them), with fallbacks so the module also
 * looks right on another theme. Logical properties are used throughout, so right-to-left languages mirror by
 * themselves (including the slider). Without script (html has no "alv-js" class) the panel simply stays inline.
 */

.alv-ln,
.alv-ln-results,
.alv-ln-toolbar {
    --alv-primary: var(--color-primary, #4458d6);
    --alv-ink: var(--color-ink, #0b1b2b);
    --alv-muted: var(--color-ink-muted, #475569);
    --alv-paper: var(--color-paper, #f7f8fa);
    --alv-surface: var(--color-surface, #fff);
    --alv-line: #cbd5e1;
    --alv-focus: var(--color-accent, #4458d6);
    --alv-radius: 0.5rem;
    font-family: var(--font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
    color: var(--alv-ink);
}

/* Hidden text for screen readers. */
.alv-ln-sr {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.alv-ln [hidden],
.alv-ln-results [hidden] {
    display: none !important;
}

/* ---------- the panel ---------- */

.alv-ln-panel {
    background: var(--alv-surface);
}

.alv-ln-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 0.5rem;
}

.alv-ln-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.alv-ln-close {
    display: none;
    align-items: center;
    justify-content: center;
    min-inline-size: 44px;
    min-block-size: 44px;
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
}

.alv-ln-group {
    border-block-end: 1px solid var(--alv-line);
}

.alv-ln-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-block: 0.75rem;
    cursor: pointer;
    list-style: none;
}

.alv-ln-summary::-webkit-details-marker {
    display: none;
}

.alv-ln-heading {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.alv-ln-chevron {
    flex: none;
    transition: transform 0.15s ease;
}

.alv-ln-group[open] > .alv-ln-summary .alv-ln-chevron {
    transform: rotate(180deg);
}

.alv-ln-content {
    padding-block-end: 0.75rem;
}

/* Focus rings: every control, high contrast against both light and dark backgrounds. */
.alv-ln a:focus-visible,
.alv-ln button:focus-visible,
.alv-ln input:focus-visible,
.alv-ln select:focus-visible,
.alv-ln summary:focus-visible,
.alv-ln-results a:focus-visible,
.alv-ln-results button:focus-visible,
.alv-ln-results select:focus-visible,
.alv-ln-results [tabindex="-1"]:focus-visible {
    outline: 3px solid var(--alv-focus);
    outline-offset: 2px;
}

.alv-ln-results [tabindex="-1"]:focus {
    outline: none;
}

/* ---------- options ---------- */

.alv-ln-options {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Long lists scroll inside a box (setting "Long-list handling"). The height is also set from the script, which reads the
   setting; this value is what a page without script gets. The box has no tabindex: its checkboxes are focusable, so
   the keyboard scrolls it and there is no extra tab stop or focus trap. */
.alv-ln-options--scroll {
    max-block-size: 15rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-inline-end: 0.25rem;
}

.alv-ln-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-block-size: 32px;
}

.alv-ln-option > input {
    flex: none;
    inline-size: 1.125rem;
    block-size: 1.125rem;
    margin: 0;
    accent-color: var(--alv-primary);
}

.alv-ln-label {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-block: 0.25rem;
    cursor: pointer;
}

.alv-ln-link {
    color: inherit;
    text-decoration: none;
}

.alv-ln-link:hover {
    text-decoration: underline;
}

.alv-ln-count {
    color: var(--alv-muted);
    font-size: 0.875rem;
}

.alv-ln-option.is-disabled .alv-ln-label {
    color: var(--alv-muted);
    opacity: 0.6;
    cursor: not-allowed;
}

.alv-ln-option.is-pending .alv-ln-label {
    font-style: italic;
    text-decoration: underline dotted;
}

.alv-ln-more,
.alv-ln-clear,
.alv-ln-reset {
    background: none;
    border: 0;
    padding: 0.5rem 0;
    color: var(--alv-primary);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.alv-ln-lookup {
    display: block;
    margin-block-end: 0.5rem;
}

.alv-ln-lookup-input,
.alv-ln-select,
.alv-ln-field input {
    inline-size: 100%;
    box-sizing: border-box;
    min-block-size: 40px;
    padding-inline: 0.5rem;
    border: 1px solid var(--alv-line);
    border-radius: var(--alv-radius);
    background: var(--alv-surface);
    color: inherit;
    font: inherit;
}

.alv-ln-nomatch {
    margin: 0.25rem 0;
    color: var(--alv-muted);
}

/* ---------- swatches: the selected state is a ring and a tick, never colour alone ---------- */

.alv-ln-options--swatch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.alv-ln-options--swatch .alv-ln-option {
    min-block-size: 0;
}

.alv-ln-options--swatch .alv-ln-option > input {
    position: absolute;
    opacity: 0;
    inline-size: 100%;
    block-size: 100%;
    margin: 0;
    cursor: pointer;
}

.alv-ln-swatch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 32px;
    block-size: 32px;
    box-sizing: border-box;
    padding-inline: 0.25rem;
    border: 1px solid var(--alv-line);
    border-radius: 50%;
    background-color: var(--alv-paper);
    font-size: 0.75rem;
    line-height: 1;
}

/* The colour or picture is drawn by an element, not by an inline style, so a strict content security policy holds. */
.alv-ln-swatch-fill {
    position: absolute;
    inset: 0;
    display: block;
    inline-size: 100%;
    block-size: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.alv-ln-swatch--text {
    border-radius: var(--alv-radius);
    background: var(--alv-surface);
}

.alv-ln-option.is-selected .alv-ln-swatch {
    box-shadow: 0 0 0 2px var(--alv-surface), 0 0 0 4px var(--alv-ink);
}

.alv-ln-option.is-selected .alv-ln-swatch::after {
    content: "\2713";
    position: absolute;
    inset-inline-end: -4px;
    inset-block-start: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 14px;
    block-size: 14px;
    border-radius: 50%;
    background: var(--alv-ink);
    color: var(--alv-surface);
    font-size: 10px;
}

.alv-ln-options--swatch .alv-ln-option > input:focus-visible + .alv-ln-label .alv-ln-swatch {
    outline: 3px solid var(--alv-focus);
    outline-offset: 3px;
}

.alv-ln-option.is-disabled .alv-ln-swatch {
    opacity: 0.4;
}

.alv-ln-option.is-disabled .alv-ln-swatch::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: linear-gradient(to top right, transparent 46%, var(--alv-ink) 47%, var(--alv-ink) 53%, transparent 54%);
}

/* ---------- price and number ranges ---------- */

.alv-ln-range {
    padding-block: 0.25rem;
}

.alv-ln-slider {
    position: relative;
    block-size: 28px;
}

.alv-ln-track {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 50%;
    block-size: 4px;
    margin-block-start: -2px;
    border-radius: 2px;
    background: var(--alv-line);
}

.alv-ln-fill {
    position: absolute;
    inset-block: 0;
    inset-inline-start: calc(var(--alv-from, 0) * 1%);
    inset-inline-end: calc((100 - var(--alv-to, 100)) * 1%);
    border-radius: 2px;
    background: var(--alv-primary);
}

/* Two native sliders on one track: only the thumbs take the pointer. */
.alv-ln-handle {
    position: absolute;
    inset: 0;
    inline-size: 100%;
    block-size: 100%;
    margin: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

[dir="rtl"] .alv-ln-handle,
[dir="rtl"] .alv-ln-slider {
    direction: rtl;
}

.alv-ln-handle::-webkit-slider-runnable-track {
    background: none;
}

.alv-ln-handle::-moz-range-track {
    background: none;
}

.alv-ln-handle::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    inline-size: 24px;
    block-size: 24px;
    border: 2px solid var(--alv-surface);
    border-radius: 50%;
    background: var(--alv-primary);
    box-shadow: 0 0 0 1px var(--alv-primary);
    cursor: grab;
}

.alv-ln-handle::-moz-range-thumb {
    pointer-events: auto;
    inline-size: 20px;
    block-size: 20px;
    border: 2px solid var(--alv-surface);
    border-radius: 50%;
    background: var(--alv-primary);
    cursor: grab;
}

.alv-ln-handle:focus-visible {
    outline: none;
}

.alv-ln-handle:focus-visible::-webkit-slider-thumb {
    outline: 3px solid var(--alv-focus);
    outline-offset: 2px;
}

.alv-ln-handle:focus-visible::-moz-range-thumb {
    outline: 3px solid var(--alv-focus);
    outline-offset: 2px;
}

.alv-ln-ends {
    display: flex;
    justify-content: space-between;
    margin: 0.25rem 0 0.5rem;
    color: var(--alv-muted);
    font-size: 0.875rem;
}

.alv-ln-fields {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.alv-ln-field {
    display: block;
    flex: 1;
    font-size: 0.875rem;
}

.alv-ln-range-error {
    margin: 0.25rem 0 0;
    color: #b91c1c;
    font-size: 0.875rem;
}

.alv-ln-range.is-pending .alv-ln-fields {
    outline: 1px dotted var(--alv-ink);
    outline-offset: 4px;
}

.alv-ln-nojs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-block-start: 0.5rem;
}

/* ---------- the active filters strip ---------- */

.alv-ln-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-block: 0.75rem;
}

.alv-ln-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.alv-ln-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-block-size: 32px;
    padding-inline: 0.75rem;
    border: 1px solid var(--alv-line);
    border-radius: 999px;
    background: var(--alv-paper);
    color: inherit;
    font-size: 0.875rem;
    text-decoration: none;
}

.alv-ln-chip:hover {
    border-color: var(--alv-ink);
}

.alv-ln-chip-x {
    font-size: 1.125rem;
    line-height: 1;
}

/* ---------- toolbar ---------- */

.alv-ln-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.alv-ln-toolbar--bottom {
    justify-content: space-between;
    margin-block-start: 1rem;
}

.alv-ln-amount {
    margin: 0;
    color: var(--alv-muted);
    font-size: 0.875rem;
}

/* Result count in the top toolbar (opt-in toolbar information); the theme places and styles it. */
.alv-ln-amount--top {
    flex: 1 1 auto;
    text-align: center;
}

.alv-ln-nav-select {
    min-block-size: 40px;
    padding-inline: 0.5rem;
    border: 1px solid var(--alv-line);
    border-radius: var(--alv-radius);
    background: var(--alv-surface);
    color: inherit;
    font: inherit;
}

.alv-ln-sorter,
.alv-ln-limiter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.alv-ln-sorter {
    margin-inline-start: auto;
}

.alv-ln-direction,
.alv-ln-mode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 40px;
    min-block-size: 40px;
    border: 1px solid var(--alv-line);
    border-radius: var(--alv-radius);
    color: inherit;
}

.alv-ln-modes {
    display: inline-flex;
    gap: 0.25rem;
}

.alv-ln-mode.is-active {
    background: var(--alv-paper);
    border-color: var(--alv-ink);
}

.alv-ln-mode--grid::before {
    content: "";
    inline-size: 18px;
    block-size: 18px;
    background: linear-gradient(to right, currentColor 0 45%, transparent 45% 55%, currentColor 55%),
        linear-gradient(to bottom, transparent 0 45%, var(--alv-surface) 45% 55%, transparent 55%);
    background-blend-mode: normal;
}

.alv-ln-mode--list::before {
    content: "";
    inline-size: 18px;
    block-size: 14px;
    background: repeating-linear-gradient(to bottom, currentColor 0 3px, transparent 3px 6px);
}

/* The Filters button only exists for the drawer. */
.alv-ln-trigger {
    display: none;
    align-items: center;
    gap: 0.5rem;
    min-block-size: 44px;
    padding-inline: 1rem;
    border: 1px solid var(--alv-ink);
    border-radius: var(--alv-radius);
    background: var(--alv-surface);
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.alv-ln-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 22px;
    block-size: 22px;
    padding-inline: 0.25rem;
    border-radius: 999px;
    background: var(--alv-ink);
    color: var(--alv-surface);
    font-size: 0.75rem;
}

/* ---------- results while an update is on its way ---------- */

.alv-ln-results {
    position: relative;
}

.alv-ln-results.is-loading,
.alv-ln-results[aria-busy="true"] {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.alv-ln-results.is-loading::after {
    content: "";
    position: absolute;
    inset-block-start: 1rem;
    inset-inline-start: 50%;
    inline-size: 28px;
    block-size: 28px;
    margin-inline-start: -14px;
    border: 3px solid var(--alv-line);
    border-block-start-color: var(--alv-primary);
    border-radius: 50%;
    animation: alv-ln-spin 0.8s linear infinite;
}

@keyframes alv-ln-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- footer with Reset and Apply: only in the drawer and in confirm mode ---------- */

.alv-ln-foot {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-block-start: 1px solid var(--alv-line);
    background: var(--alv-surface);
}

.alv-ln-apply {
    flex: 1;
    min-block-size: 44px;
    border: 0;
    border-radius: var(--alv-radius);
    background: var(--alv-primary);
    color: var(--color-on-primary, #fff);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.alv-ln-panel[data-alv-confirm="1"] .alv-ln-foot {
    display: flex;
    position: sticky;
    inset-block-end: 0;
}

.alv-ln-panel.has-pending .alv-ln-apply {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--alv-primary) 30%, transparent);
}

/* ---------- small screens: the drawer ---------- */

.alv-ln-backdrop {
    display: none;
}

@media (max-width: 767px) {
    .alv-js .alv-ln-trigger {
        display: inline-flex;
    }

    .alv-js .alv-ln-close {
        display: inline-flex;
    }

    .alv-js .alv-ln-panel {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        z-index: 1001;
        display: none;
        flex-direction: column;
        inline-size: min(352px, 100vw); /* px, not rem: Luma sets the root font size to 10 px */
        max-inline-size: 100%;
        box-sizing: border-box;
        padding-inline: 1rem;
        overflow: hidden;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.3);
    }

    .alv-js .alv-ln.is-open .alv-ln-panel {
        display: flex;
    }

    .alv-js .alv-ln-body {
        flex: 1;
        min-block-size: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-block-end: 1rem;
    }

    .alv-js .alv-ln.is-open .alv-ln-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: block;
        background: rgba(11, 27, 43, 0.5);
    }

    .alv-js .alv-ln-foot {
        display: flex;
        margin-inline: -1rem;
        padding-block-end: max(0.75rem, env(safe-area-inset-bottom));
    }

    /* Touch targets of at least 44 by 44 pixels. */
    .alv-js .alv-ln-summary,
    .alv-js .alv-ln-option,
    .alv-js .alv-ln-chip,
    .alv-js .alv-ln-more,
    .alv-js .alv-ln-clear,
    .alv-js .alv-ln-reset,
    .alv-js .alv-ln-lookup-input,
    .alv-js .alv-ln-field input,
    .alv-js .alv-ln-select {
        min-block-size: 44px;
    }

    .alv-js .alv-ln-options--swatch .alv-ln-option {
        min-inline-size: 44px;
        min-block-size: 44px;
        justify-content: center;
    }

    .alv-js .alv-ln-option > input {
        inline-size: 1.5rem;
        block-size: 1.5rem;
    }

    .alv-js .alv-ln-handle::-webkit-slider-thumb {
        inline-size: 32px;
        block-size: 32px;
    }

    .alv-js .alv-ln-slider {
        block-size: 44px;
    }

    .alv-js .alv-ln-direction,
    .alv-js .alv-ln-mode {
        min-inline-size: 44px;
        min-block-size: 44px;
    }
}

/* ---------- the drawer on every screen size ----------
   A theme that wants the filters in the drawer on large screens too (an image-led design, say) puts the class
   alv-ln-drawer-all on the body. The rules are those of the phone drawer above; the page script reads the same class. */

.alv-js body.alv-ln-drawer-all .alv-ln-trigger {
    display: inline-flex;
}

.alv-js body.alv-ln-drawer-all .alv-ln-close {
    display: inline-flex;
}

/* Luma and Blank give .columns its own stacking layer (position: relative; z-index: 1), so the drawer (z-index 1001
   inside it) stayed under the header's logo (z-index 5) on phones. While the drawer is open, the columns layer is lifted
   above the header (12 Nov 2026). */
body.alv-ln-lock .columns {
    z-index: 1000;
}

.alv-js body.alv-ln-drawer-all .alv-ln-panel {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 1001;
    display: none;
    flex-direction: column;
    inline-size: min(352px, 100vw); /* px, not rem: Luma sets the root font size to 10 px */
    max-inline-size: 100%;
    box-sizing: border-box;
    padding-inline: 1rem;
    overflow: hidden;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.3);
}

.alv-js body.alv-ln-drawer-all .alv-ln.is-open .alv-ln-panel {
    display: flex;
}

.alv-js body.alv-ln-drawer-all .alv-ln-body {
    flex: 1;
    min-block-size: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-block-end: 1rem;
}

.alv-js body.alv-ln-drawer-all .alv-ln.is-open .alv-ln-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: block;
    background: rgba(11, 27, 43, 0.5);
}

.alv-js body.alv-ln-drawer-all .alv-ln-foot {
    display: flex;
    margin-inline: -1rem;
    padding-block-end: max(0.75rem, env(safe-area-inset-bottom));
}

/* Touch targets of at least 44 by 44 pixels. */
.alv-js body.alv-ln-drawer-all .alv-ln-summary,
.alv-js body.alv-ln-drawer-all .alv-ln-option,
.alv-js body.alv-ln-drawer-all .alv-ln-chip,
.alv-js body.alv-ln-drawer-all .alv-ln-more,
.alv-js body.alv-ln-drawer-all .alv-ln-clear,
.alv-js body.alv-ln-drawer-all .alv-ln-reset,
.alv-js body.alv-ln-drawer-all .alv-ln-lookup-input,
.alv-js body.alv-ln-drawer-all .alv-ln-field input,
.alv-js body.alv-ln-drawer-all .alv-ln-select {
    min-block-size: 44px;
}

.alv-js body.alv-ln-drawer-all .alv-ln-options--swatch .alv-ln-option {
    min-inline-size: 44px;
    min-block-size: 44px;
    justify-content: center;
}

.alv-js body.alv-ln-drawer-all .alv-ln-option > input {
    inline-size: 1.5rem;
    block-size: 1.5rem;
}

.alv-js body.alv-ln-drawer-all .alv-ln-handle::-webkit-slider-thumb {
    inline-size: 32px;
    block-size: 32px;
}

.alv-js body.alv-ln-drawer-all .alv-ln-slider {
    block-size: 44px;
}

.alv-js body.alv-ln-drawer-all .alv-ln-direction,
.alv-js body.alv-ln-drawer-all .alv-ln-mode {
    min-inline-size: 44px;
    min-block-size: 44px;
}

/* In the drawer-everywhere layout the side column is not drawn: the panel is only the drawer. */
body.alv-ln-drawer-all .sidebar-main:has(.alv-ln) {
    position: absolute;
    inline-size: 0;
    block-size: 0;
    overflow: visible;
}

body.alv-ln-drawer-all {
    --page-layout: minmax(0, 1fr);
}

body.alv-ln-drawer-all .columns > .column.main {
    grid-column-start: 1;
}

body.alv-ln-lock {
    overflow: hidden;
}

/* ---------- user preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    .alv-ln *,
    .alv-ln-results,
    .alv-ln-results::after {
        transition: none !important;
        animation: none !important;
    }
}

@media (forced-colors: active) {
    .alv-ln-chip,
    .alv-ln-swatch,
    .alv-ln-trigger,
    .alv-ln-nav-select {
        border-color: CanvasText;
    }

    .alv-ln-fill {
        background: Highlight;
    }

    .alv-ln-handle::-webkit-slider-thumb {
        background: Highlight;
        border-color: Canvas;
    }

    .alv-ln-handle::-moz-range-thumb {
        background: Highlight;
        border-color: Canvas;
    }

    .alv-ln-option.is-selected .alv-ln-swatch {
        box-shadow: 0 0 0 2px Canvas, 0 0 0 4px CanvasText;
    }

    .alv-ln-option.is-selected .alv-ln-swatch::after {
        background: CanvasText;
        color: Canvas;
    }
}

/* ---------- the horizontal filter bar (setting "Position of the filters") ---------- */

/* The bar is only for large screens: small screens use the drawer of the side panel. */
.alv-ln-bar {
    display: none;
}

@media (min-width: 768px) {
    .alv-ln-bar {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        margin-block: 0.5rem 1rem;
        padding: 0.375rem 0.5rem;
        border: 1px solid var(--alv-line);
        border-radius: var(--alv-radius);
        background: var(--alv-surface);
    }

    .alv-ln-bar-groups {
        flex: 1 1 auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.375rem 0.5rem;
    }

    .alv-ln-group--bar {
        position: relative;
        border-block-end: 0;
    }

    .alv-ln-group--bar > .alv-ln-summary {
        min-block-size: 40px;
        padding: 0.25rem 0.75rem;
        border: 1px solid var(--alv-line);
        border-radius: 999px;
        background: var(--alv-surface);
    }

    .alv-ln-group--bar > .alv-ln-summary .alv-ln-heading {
        font-size: 0.9375rem;
        font-weight: 500;
    }

    .alv-ln-group--bar[open] > .alv-ln-summary,
    .alv-ln-group--bar:has(input:checked) > .alv-ln-summary {
        border-color: var(--alv-ink);
        background: var(--alv-paper);
    }

    .alv-ln-group--bar > .alv-ln-content {
        position: absolute;
        inset-block-start: calc(100% + 4px);
        inset-inline-start: 0;
        z-index: 30;
        box-sizing: border-box;
        inline-size: max-content;
        min-inline-size: 16rem;
        max-inline-size: min(24rem, 90vw);
        max-block-size: 70vh;
        padding: 0.75rem;
        overflow-y: auto;
        border: 1px solid var(--alv-line);
        border-radius: var(--alv-radius);
        background: var(--alv-surface);
        box-shadow: 0 8px 24px rgba(11, 27, 43, 0.18);
    }

    /* Reset and Apply (confirm mode) sit at the end of the same row, so an open pop-up never covers them. */
    .alv-ln-bar-foot {
        flex: none;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-inline-start: auto;
        min-block-size: 40px;
    }

    .alv-ln-bar-foot .alv-ln-apply {
        flex: 0 0 auto;
        padding-inline: 1.25rem;
    }

    .alv-ln-bar.has-pending .alv-ln-apply {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--alv-primary) 30%, transparent);
    }

    /* Only the bar carries the filters on a large screen: the side panel stays in the page as the drawer of phones. */
    .alv-ln--drawer-only,
    aside:has(> .alv-ln--drawer-only),
    .sidebar-main:has(.alv-ln--drawer-only) {
        display: none;
    }

    /* The Alvoble Storefront theme lays a two column page out with this custom property (side column + main column):
       without the side column the main column takes the whole width. */
    body.alv-ln-bar-only {
        --page-layout: minmax(0, 1fr);
    }

    body.alv-ln-bar-only .columns > .column.main {
        grid-column-start: 1;
    }

    /* Magento Luma / Blank (classic page-layout-* columns): reclaim full width when the filter
       sidebar is collapsed to bar-only or drawer-everywhere. Storefront keeps using --page-layout. */
    /* Bar-only: the side panel is not used on a large screen, so it is hidden. Drawer-everywhere must NOT hide the
       side column: the drawer panel lives inside it (display: none on the column hides the drawer too). That column is
       collapsed to zero size by the drawer-everywhere rules above instead. */
    body.alv-ln-bar-only.page-layout-2columns-left .sidebar-main:has(.alv-ln--drawer-only),
    body.alv-ln-bar-only.page-layout-2columns-right .sidebar-additional:has(.alv-ln--drawer-only) {
        display: none;
    }

    body.alv-ln-drawer-all.page-layout-2columns-right .sidebar-additional:has(.alv-ln) {
        position: absolute;
        inline-size: 0;
        block-size: 0;
        overflow: visible;
    }

    body.alv-ln-bar-only.page-layout-2columns-left .column.main,
    body.alv-ln-drawer-all.page-layout-2columns-left .column.main,
    body.alv-ln-bar-only.page-layout-2columns-right .column.main,
    body.alv-ln-drawer-all.page-layout-2columns-right .column.main {
        width: 100%;
        max-width: 100%;
        float: none;
        clear: both;
    }
}

/* ---------- the rating as a row of stars ---------- */

.alv-ln-stars-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: inherit;
    text-decoration: none;
}

.alv-ln-stars {
    display: inline-flex;
    gap: 2px;
    color: #b45309;
}

.alv-ln-star {
    fill: none;
}

.alv-ln-star.is-on {
    fill: currentColor;
}

.alv-ln-stars-up {
    color: var(--alv-muted);
    font-size: 0.875rem;
}

/* ---------- option tooltips (one popup, placed by the script, never clipped by a scrolling list) ---------- */

.alv-ln-tip {
    position: fixed;
    inset-inline-start: auto;
    left: var(--alv-tip-x, 0);
    top: var(--alv-tip-y, 0);
    z-index: 1100;
    box-sizing: border-box;
    max-inline-size: 15rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    background: var(--color-ink, #0b1b2b);
    color: var(--color-paper, #fff);
    box-shadow: 0 6px 20px rgba(11, 27, 43, 0.3);
    font-family: var(--font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
    font-size: 0.875rem;
    line-height: 1.35;
    pointer-events: none;
}

.alv-ln-tip[hidden] {
    display: none;
}

.alv-ln-tip img {
    display: block;
    max-inline-size: 100%;
    max-block-size: 8rem;
    margin-block-end: 0.375rem;
    border-radius: 0.25rem;
    object-fit: cover;
}

.alv-ln-tip p {
    margin: 0;
}

/* ---------- the category tree ---------- */

.alv-ln-tree {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alv-ln-tree .alv-ln-tree {
    padding-inline-start: 1rem;
}

.alv-ln-tree-row {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    min-block-size: 32px;
}

/* Without script the whole tree is open and has no buttons. */
.alv-ln-tree-toggle,
.alv-ln-tree-spacer {
    display: none;
}

.alv-js .alv-ln-tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    min-inline-size: 28px;
    min-block-size: 28px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
}

.alv-js .alv-ln-tree-spacer {
    display: inline-block;
    flex: none;
    inline-size: 28px;
}

.alv-ln-tree-toggle[aria-expanded="false"] .alv-ln-chevron {
    transform: rotate(-90deg);
}

[dir="rtl"] .alv-ln-tree-toggle[aria-expanded="false"] .alv-ln-chevron {
    transform: rotate(90deg);
}

.alv-ln-tree-toggle:focus-visible,
.alv-ln-tree-link:focus-visible {
    outline: 3px solid var(--alv-focus);
    outline-offset: 2px;
}

.alv-ln-tree-link {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-block: 0.25rem;
    color: inherit;
    text-decoration: none;
}

.alv-ln-tree-link:hover {
    text-decoration: underline;
}

.alv-ln-tree-node.is-current > .alv-ln-tree-row .alv-ln-tree-link {
    font-weight: 600;
}

.alv-js [data-alv-collapsed="1"] {
    display: none;
}

/* ---------- load more and automatic loading ---------- */

.alv-ln-more-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    margin-block: 1.5rem;
}

.alv-ln-loaded {
    margin: 0;
    color: var(--alv-muted);
    font-size: 0.875rem;
}

.alv-ln-loadmore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 44px;
    padding-inline: 1.75rem;
    border: 1px solid var(--alv-ink);
    border-radius: var(--alv-radius);
    background: var(--alv-surface);
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.alv-ln-loadmore:hover {
    background: var(--alv-paper);
}

.alv-ln-loadmore[aria-disabled="true"] {
    opacity: 0.6;
    cursor: progress;
}

/* With script the load-more control replaces the pager and the item count of the bottom toolbar. The pager stays in
   the page (hidden) so search engines still find the page links. */
.alv-js .alv-ln-results--more nav.pages,
.alv-js .alv-ln-results--more [aria-label="pagination"],
.alv-js .alv-ln-results--more .pager,
.alv-js .alv-ln-results--more .alv-ln-toolbar--bottom .alv-ln-amount {
    display: none;
}

/* ---------- filters fixed by a landing page ---------- */

.alv-ln-chip.is-locked {
    border-style: dashed;
    background: var(--alv-surface);
    cursor: default;
}

.alv-ln-chip.is-locked:hover {
    border-color: var(--alv-line);
}

@media (forced-colors: active) {
    .alv-ln-tip {
        border: 1px solid CanvasText;
        background: Canvas;
        color: CanvasText;
    }

    .alv-ln-group--bar > .alv-ln-content {
        border-color: CanvasText;
    }

    .alv-ln-chip.is-locked {
        border-style: dashed;
    }
}
