.jbxsaf-filter-shell,
.jbxsaf-filter-shell * {
    box-sizing: border-box;
}

.jbxsaf-filter-shell {
    --jbxsaf-accent: #5b5bd6;
    --jbxsaf-accent-rgb: 91, 91, 214;
    --jbxsaf-accent-deep: #4141aa;
    --jbxsaf-accent-soft: #f0f0ff;
    --jbxsaf-accent-wash: #f8f8ff;
    --jbxsaf-text: #172033;
    --jbxsaf-muted: #667085;
    --jbxsaf-subtle: #98a2b3;
    --jbxsaf-border: #e4e7ec;
    --jbxsaf-border-strong: #d0d5dd;
    --jbxsaf-surface: #ffffff;
    --jbxsaf-panel-bg: #fbfcfe;
    --jbxsaf-danger: #b42318;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    isolation: isolate;
    color: var(--jbxsaf-text);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

.jbxsaf-filter-shell.jbxsaf-type-toys {
    --jbxsaf-accent: #e65f3c;
    --jbxsaf-accent-rgb: 230, 95, 60;
    --jbxsaf-accent-deep: #b83f23;
    --jbxsaf-accent-soft: #fff0eb;
    --jbxsaf-accent-wash: #fff9f6;
}

.jbxsaf-filter-shell button,
.jbxsaf-filter-shell input,
.jbxsaf-filter-shell select {
    font: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.jbxsaf-filter-shell .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.jbxsaf-filter-form {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.jbxsaf-panel {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--jbxsaf-border);
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0, rgba(var(--jbxsaf-accent-rgb), 0.075), transparent 31%),
        linear-gradient(180deg, var(--jbxsaf-surface) 0, var(--jbxsaf-panel-bg) 100%);
    box-shadow:
        0 18px 50px rgba(16, 24, 40, 0.09),
        0 2px 8px rgba(16, 24, 40, 0.035);
}

.jbxsaf-panel-accent {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--jbxsaf-accent), rgba(var(--jbxsaf-accent-rgb), 0.28));
}

.jbxsaf-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    padding: 4px 0 22px;
}

.jbxsaf-title-wrap {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    flex: 1 1 190px;
    gap: 13px;
}

.jbxsaf-title-copy {
    min-width: 0;
}

.jbxsaf-context-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(var(--jbxsaf-accent-rgb), 0.17);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--jbxsaf-accent-soft), var(--jbxsaf-surface));
    color: var(--jbxsaf-accent);
    box-shadow: 0 8px 22px rgba(var(--jbxsaf-accent-rgb), 0.13);
}

.jbxsaf-context-icon svg {
    width: 24px;
    height: 24px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.jbxsaf-type-toys .jbxsaf-context-icon svg path:first-child {
    fill: rgba(var(--jbxsaf-accent-rgb), 0.08);
}

.jbxsaf-eyebrow {
    display: block;
    margin: 0 0 2px;
    color: var(--jbxsaf-accent-deep);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.jbxsaf-heading {
    margin: 0;
    color: var(--jbxsaf-text);
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.025em;
}

.jbxsaf-description {
    max-width: 31rem;
    margin: 5px 0 0;
    color: var(--jbxsaf-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.jbxsaf-head-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.jbxsaf-active-count,
.jbxsaf-category-total {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--jbxsaf-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--jbxsaf-muted);
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.jbxsaf-has-active-filters .jbxsaf-active-count {
    border-color: rgba(var(--jbxsaf-accent-rgb), 0.22);
    background: var(--jbxsaf-accent-soft);
    color: var(--jbxsaf-accent-deep);
}

.jbxsaf-clear {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    margin: 0;
    padding: 4px 7px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--jbxsaf-accent-deep);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.jbxsaf-clear:hover:not(:disabled) {
    background: var(--jbxsaf-accent-soft);
    color: var(--jbxsaf-accent);
}

.jbxsaf-clear:disabled {
    opacity: 0.38;
    cursor: default;
}

.jbxsaf-filter-group {
    min-width: 0;
    padding: 20px 0;
    border-top: 1px solid var(--jbxsaf-border);
}

.jbxsaf-category-group {
    padding-bottom: 4px;
}

.jbxsaf-group-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin: 0 0 10px;
}

.jbxsaf-category-heading {
    align-items: flex-start;
    margin-bottom: 12px;
}

.jbxsaf-label {
    display: block;
    margin: 0;
    color: var(--jbxsaf-text);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.35;
}

.jbxsaf-group-hint {
    display: block;
    color: var(--jbxsaf-subtle);
    font-size: 0.73rem;
    line-height: 1.35;
}

.jbxsaf-category-heading .jbxsaf-group-hint {
    margin-top: 2px;
}

.jbxsaf-search-wrap,
.jbxsaf-sort-wrap {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
}

.jbxsaf-search,
.jbxsaf-sort {
    appearance: none;
    display: block;
    width: 100%;
    max-width: none;
    min-height: 50px;
    margin: 0;
    border: 1px solid var(--jbxsaf-border-strong);
    border-radius: 13px;
    background-color: var(--jbxsaf-surface);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
    color: var(--jbxsaf-text);
    font-size: 0.9rem;
    line-height: 1.35;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.jbxsaf-search {
    padding: 12px 42px 12px 14px;
    background-image: none !important;
}

.jbxsaf-search::-webkit-search-decoration {
    -webkit-appearance: none;
}

.jbxsaf-sort {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding: 12px 43px 12px 14px;
    background-image: none !important;
    cursor: pointer;
}

.jbxsaf-sort::-ms-expand {
    display: none;
}

.jbxsaf-search::placeholder {
    color: #98a2b3;
    opacity: 1;
}

.jbxsaf-search:hover,
.jbxsaf-sort:hover {
    border-color: rgba(var(--jbxsaf-accent-rgb), 0.42);
}

.jbxsaf-search:focus,
.jbxsaf-sort:focus {
    outline: none;
    border-color: var(--jbxsaf-accent);
    box-shadow:
        0 0 0 4px rgba(var(--jbxsaf-accent-rgb), 0.11),
        0 1px 2px rgba(16, 24, 40, 0.03);
}

.jbxsaf-search-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    display: inline-flex;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--jbxsaf-subtle);
}

.jbxsaf-search-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.jbxsaf-search-wrap:focus-within .jbxsaf-search-icon {
    color: var(--jbxsaf-accent);
}

.jbxsaf-search::-webkit-search-cancel-button {
    margin-right: -27px;
    cursor: pointer;
}

.jbxsaf-select-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: 17px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--jbxsaf-muted);
    border-bottom: 2px solid var(--jbxsaf-muted);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.jbxsaf-categories {
    min-width: 0;
    max-height: 490px;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding: 5px;
    border: 1px solid var(--jbxsaf-border);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.82);
    scrollbar-color: rgba(var(--jbxsaf-accent-rgb), 0.35) transparent;
    scrollbar-width: thin;
}

.jbxsaf-categories::-webkit-scrollbar {
    width: 7px;
}

.jbxsaf-categories::-webkit-scrollbar-track {
    background: transparent;
}

.jbxsaf-categories::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(var(--jbxsaf-accent-rgb), 0.34);
    background-clip: padding-box;
}

.jbxsaf-category-row {
    position: relative;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    padding: 8px 9px 8px calc(9px + (var(--jbxsaf-depth, 0) * 18px));
    border: 0;
    border-bottom: 1px solid #edf0f4;
    border-radius: 0;
    background: transparent;
    color: var(--jbxsaf-text);
    cursor: pointer;
    font-size: 0.86rem;
    line-height: 1.35;
    transition: background-color 150ms ease, color 150ms ease;
}

.jbxsaf-category-row:last-child {
    border-bottom-color: transparent;
}

.jbxsaf-category-row:hover {
    background: var(--jbxsaf-accent-wash);
}

.jbxsaf-category-row.jbxsaf-is-selected {
    background: linear-gradient(90deg, var(--jbxsaf-accent-soft), rgba(255, 255, 255, 0.82));
}

.jbxsaf-all-row {
    min-height: 49px;
    margin-bottom: 2px;
    padding-left: 9px;
    border-bottom-color: rgba(var(--jbxsaf-accent-rgb), 0.16);
    border-radius: 10px 10px 4px 4px;
    background: var(--jbxsaf-accent-wash);
    font-weight: 800;
}

.jbxsaf-category-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.jbxsaf-check-ui {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border: 1.5px solid #c7cdd6;
    border-radius: 6px;
    background: var(--jbxsaf-surface);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    transition:
        border-color 150ms ease,
        background-color 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease;
}

.jbxsaf-check-ui::after {
    content: "";
    width: 8px;
    height: 4px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg) scale(0.7);
    transition: opacity 120ms ease, transform 150ms ease;
}

.jbxsaf-category-row input:checked + .jbxsaf-check-ui {
    border-color: var(--jbxsaf-accent);
    background: var(--jbxsaf-accent);
    box-shadow: 0 4px 10px rgba(var(--jbxsaf-accent-rgb), 0.22);
}

.jbxsaf-category-row input:checked + .jbxsaf-check-ui::after {
    opacity: 1;
    transform: translateY(-1px) rotate(-45deg) scale(1);
}

.jbxsaf-category-row input:focus-visible + .jbxsaf-check-ui {
    outline: 3px solid rgba(var(--jbxsaf-accent-rgb), 0.2);
    outline-offset: 2px;
}

.jbxsaf-category-row:active .jbxsaf-check-ui {
    transform: scale(0.93);
}

.jbxsaf-term-name {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    overflow-wrap: anywhere;
}

.jbxsaf-depth-0:not(.jbxsaf-all-row) .jbxsaf-term-name {
    font-weight: 750;
}

.jbxsaf-branch {
    position: relative;
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-left: -2px;
    border-bottom: 1.5px solid rgba(var(--jbxsaf-accent-rgb), 0.42);
    border-left: 1.5px solid rgba(var(--jbxsaf-accent-rgb), 0.42);
    border-radius: 0 0 0 3px;
}

.jbxsaf-term-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 24px;
    padding: 3px 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #f2f4f7;
    color: var(--jbxsaf-muted);
    font-size: 0.72rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.jbxsaf-category-row.jbxsaf-is-selected .jbxsaf-term-count {
    border-color: rgba(var(--jbxsaf-accent-rgb), 0.16);
    background: var(--jbxsaf-surface);
    color: var(--jbxsaf-accent-deep);
}

.jbxsaf-selection-summary {
    display: flex;
    align-items: center;
    min-height: 24px;
    gap: 7px;
    margin-top: 8px;
    padding: 0 4px;
    color: var(--jbxsaf-muted);
    font-size: 0.73rem;
    font-weight: 650;
    line-height: 1.35;
}

.jbxsaf-selection-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--jbxsaf-accent);
    box-shadow: 0 0 0 4px rgba(var(--jbxsaf-accent-rgb), 0.1);
}

.jbxsaf-submit {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    margin: 20px 0 0;
    padding: 12px 15px 12px 18px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--jbxsaf-accent), var(--jbxsaf-accent-deep));
    box-shadow: 0 11px 24px rgba(var(--jbxsaf-accent-rgb), 0.22);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        opacity 160ms ease;
}

.jbxsaf-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 27px rgba(var(--jbxsaf-accent-rgb), 0.28);
}

.jbxsaf-submit:active {
    transform: translateY(0);
}

.jbxsaf-submit:disabled {
    opacity: 0.68;
    cursor: wait;
    transform: none;
}

.jbxsaf-submit-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.05rem;
    line-height: 1;
    transition: transform 160ms ease;
}

.jbxsaf-submit:hover .jbxsaf-submit-arrow {
    transform: translateX(2px);
}

.jbxsaf-status {
    min-height: 1.2em;
    margin: 10px 2px 0;
    color: var(--jbxsaf-muted);
    font-size: 0.73rem;
    font-weight: 600;
    line-height: 1.35;
}

.jbxsaf-is-loading .jbxsaf-status {
    color: var(--jbxsaf-accent-deep);
}

.jbxsaf-mobile-toggle {
    appearance: none;
    display: none;
    width: 100%;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid var(--jbxsaf-border);
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(var(--jbxsaf-accent-rgb), 0.1), transparent 42%),
        var(--jbxsaf-surface);
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.075);
    color: var(--jbxsaf-text);
    cursor: pointer;
    text-align: left;
}

.jbxsaf-mobile-toggle-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.jbxsaf-mobile-context-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.jbxsaf-mobile-context-icon svg {
    width: 21px;
    height: 21px;
}

.jbxsaf-mobile-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.jbxsaf-mobile-label {
    color: var(--jbxsaf-accent-deep);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    line-height: 1.2;
    text-transform: uppercase;
}

.jbxsaf-mobile-copy strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--jbxsaf-text);
    font-size: 0.95rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jbxsaf-toggle-icon {
    position: relative;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 1px solid rgba(var(--jbxsaf-accent-rgb), 0.17);
    border-radius: 10px;
    background: var(--jbxsaf-accent-soft);
}

.jbxsaf-toggle-icon::before,
.jbxsaf-toggle-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: var(--jbxsaf-accent-deep);
    transform: translate(-50%, -50%);
    transition: transform 180ms ease;
}

.jbxsaf-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.jbxsaf-mobile-open .jbxsaf-toggle-icon::after {
    transform: translate(-50%, -50%) rotate(0);
}

.jbxsaf-clear:focus-visible,
.jbxsaf-submit:focus-visible,
.jbxsaf-mobile-toggle:focus-visible {
    outline: 3px solid rgba(var(--jbxsaf-accent-rgb), 0.22);
    outline-offset: 3px;
}

.jbxsaf-grid-loading {
    position: relative !important;
    min-height: 170px;
    opacity: 0.48;
    pointer-events: none;
    transition: opacity 160ms ease;
}

.jbxsaf-grid-loading::after {
    content: "";
    position: absolute;
    z-index: 9999;
    top: 86px;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(16, 24, 40, 0.14);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: jbxsaf-spin 0.72s linear infinite;
}

.jbxsaf-error {
    margin: 0;
    padding: 13px 15px;
    border: 1px solid #f2b8b5;
    border-radius: 12px;
    background: #fff6f5;
    color: var(--jbxsaf-danger, #b42318);
    font: inherit;
}

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

@media (max-width: 767px) {
    .jbxsaf-filter-shell.jbxsaf-js-ready .jbxsaf-mobile-toggle {
        display: flex;
    }

    .jbxsaf-filter-shell.jbxsaf-js-ready .jbxsaf-filter-form {
        display: none;
        margin-top: 10px;
    }

    .jbxsaf-filter-shell.jbxsaf-js-ready.jbxsaf-mobile-open .jbxsaf-filter-form {
        display: block;
    }

    .jbxsaf-panel {
        padding: 20px 16px 17px;
        border-radius: 17px;
        box-shadow: 0 12px 32px rgba(16, 24, 40, 0.08);
    }

    .jbxsaf-panel-head {
        gap: 14px;
        padding-bottom: 18px;
    }

    .jbxsaf-title-wrap {
        flex-basis: 100%;
    }

    .jbxsaf-head-actions {
        width: 100%;
        justify-content: space-between;
    }

    .jbxsaf-filter-group {
        padding: 17px 0;
    }

    .jbxsaf-categories {
        max-height: min(440px, 55vh);
    }

    .jbxsaf-category-row {
        min-height: 48px;
        padding-right: 7px;
    }

    .jbxsaf-submit {
        min-height: 54px;
    }
}

@media (max-width: 380px) {
    .jbxsaf-description {
        display: none;
    }

    .jbxsaf-context-icon:not(.jbxsaf-mobile-context-icon) {
        width: 42px;
        height: 42px;
    }

    .jbxsaf-category-total {
        display: none;
    }

    .jbxsaf-panel {
        padding-right: 13px;
        padding-left: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jbxsaf-filter-shell *,
    .jbxsaf-grid-loading,
    .jbxsaf-grid-loading::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
