/**
 * Sama Category Filter Frontend Styles
 * Version 1.1.58 — red/blue design (samamotor-red-blue-filter-html)
 */

/* Hide until JS places the bar above the product list — prevents top-of-page flash */
#aral-filter-root:not(.aral-placed) {
    position: absolute !important;
    left: -9999px !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
#aral-filter-root.aral-placed {
    position: relative;
    left: auto;
    width: 100%;
    height: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    overflow: visible;
}

.aral-filter-root {
    --sama-red: #e00000;
    --sama-red-dark: #bd0000;
    --sama-blue: #0868e8;
    --sama-navy: #092553;
    --sama-muted: #71809a;
    --sama-line: #dfe7f1;
    --sama-bg: #f5f8fc;
    --sama-soft-blue: #eef6ff;
    --sama-soft-red: #fff1f1;
    --sama-dark: #092553;
    --sama-orange: #f3a313;
    --sama-yellow: #ffd814;
    --sama-yellow-hover: #f7ca00;
    --sama-border: #dfe7f1;
    --sama-surface: #f5f8fc;
    --sama-chip-bg: #ffffff;
    --sama-chip-border: #dce4ed;
    --sama-chip-hover: #f8fbff;
    --sama-chip-on: #0868e8;
    --sama-chip-on-text: #ffffff;
    --sama-emoji-size: 18px;
    --sama-icon-size: 18px;
    --sama-hist-color: #111111;
    --sama-range-accent: #e00000;
    --sama-range-glow: #0868e8;
    --sama-range-glow-rgb: 8, 104, 232;
    width: 100%;
    margin: 0 0 10px;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--sama-navy);
}
.aral-chip-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    padding: 8px 10px 6px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-sizing: border-box;
    box-shadow: none;
}
.aral-chip-group {
    margin: 0;
    padding: 0;
    border-bottom: 0;
    box-sizing: border-box;
    flex: 0 0 calc(var(--aral-dw, 100%) - 6px);
    width: calc(var(--aral-dw, 100%) - 6px);
    max-width: calc(var(--aral-dw, 100%) - 6px);
    min-height: var(--aral-dh, 0px);
    order: var(--aral-do, 0);
    overflow: auto;
}
.aral-chip-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}
.aral-chip-clear,
.aral-compare-open {
    flex: 1 1 100%;
}
@media (max-width: 767px) {
    .aral-chip-group {
        flex: 0 0 calc(var(--aral-mw, 100%) - 6px);
        width: calc(var(--aral-mw, 100%) - 6px);
        max-width: calc(var(--aral-mw, 100%) - 6px);
        min-height: var(--aral-mh, 0px);
        order: var(--aral-mo, 0);
    }
}
.aral-rb-card {
    background: #fff;
    border: 1px solid var(--sama-line);
    border-radius: 12px;
    margin: 0;
    padding: 8px 12px;
    box-shadow: 0 2px 10px rgba(13, 48, 88, 0.04);
    height: 100%;
    box-sizing: border-box;
}
/* Range rows: fixed compact height — ignore per-card layout height from admin */
.aral-chip-group:has(.aral-rb-card--range) {
    min-height: 0 !important;
    height: auto !important;
    align-self: flex-start;
    overflow: visible;
}
.aral-rb-card--range {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    padding: 0 10px;
    display: flex;
    align-items: center;
    overflow: visible;
}
.aral-rb-card--range .aral-chip-range,
.aral-rb-card--range .aral-rb-range--h {
    width: 100%;
    min-height: 0;
    height: 44px;
    align-items: center;
}
.aral-rb-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 0 10px;
}
.aral-rb-head--inline {
    gap: 6px;
    margin: 0;
    flex: 0 0 auto;
    max-width: 150px;
    min-width: 0;
    align-self: center;
}
.aral-filter-prodcount {
    display: inline-block;
    margin-inline-start: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #0868e8;
    background: #eef6ff;
    border: 1px solid #d0dbea;
    border-radius: 999px;
    padding: 1px 7px;
    vertical-align: middle;
    white-space: nowrap;
}
.aral-rb-head--inline .aral-filter-prodcount {
    display: block;
    margin: 2px 0 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aral-rb-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--sama-soft-red), var(--sama-soft-blue));
    display: grid;
    place-items: center;
    font-size: 12px;
    color: var(--sama-red);
}
.aral-rb-icon--blue {
    color: var(--sama-blue);
}
.aral-rb-title {
    min-width: 0;
}
.aral-rb-title strong {
    display: block;
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
    color: var(--sama-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.aral-rb-head--inline .aral-rb-sub,
.aral-rb-range--h .aral-rb-sub {
    display: none;
}
.aral-rb-sub {
    margin: 0;
    color: var(--sama-muted);
    font-size: 12px;
    font-weight: 500;
}
.aral-chip-clear {
    display: inline-block;
    margin: 0 0 6px;
    color: #b42318;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.aral-chip-clear:hover {
    text-decoration: underline;
}
.aral-chip-group strong {
    display: inline;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--sama-dark);
}
.aral-filter-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 4px;
    font-size: 13px;
}
.aral-filter-icon {
    width: var(--sama-icon-size, 18px);
    height: var(--sama-icon-size, 18px);
    object-fit: contain;
    flex: 0 0 var(--sama-icon-size, 18px);
}
.aral-filter-emoji {
    font-size: var(--sama-emoji-size, 18px);
    line-height: 1;
    flex: 0 0 auto;
}
.aral-chip-count {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: var(--sama-muted);
    background: #eef1f3;
    border-radius: 999px;
    padding: 1px 7px;
    margin-right: 2px;
}
.aral-chip.is-on .aral-chip-count {
    background: rgba(255, 216, 20, 0.28);
    color: #fff;
}
.aral-chip.is-empty {
    opacity: 0.4;
    pointer-events: none;
}
.aral-compare-open {
    display: inline-block;
    margin: 0 10px 12px 0;
    padding: 7px 14px;
    border-radius: 20px;
    background: var(--sama-yellow);
    color: var(--sama-dark) !important;
    border: 1px solid #f0c14b;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.aral-compare-open:hover {
    background: var(--sama-yellow-hover);
    border-color: var(--sama-orange);
}
.aral-compare-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff8e1;
    border: 1px solid #f0c14b;
}
.aral-compare-bar[hidden] {
    display: none !important;
}
.aral-compare-go,
.aral-compare-clear {
    border: 0;
    border-radius: 8px;
    padding: 7px 12px;
    font-weight: 700;
    cursor: pointer;
}
.aral-compare-go {
    background: var(--sama-dark);
    color: #fff;
}
.aral-compare-clear {
    background: #fff;
    border: 1px solid var(--sama-border);
    color: var(--sama-dark);
}
.aral-compare-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    background: rgba(255,255,255,0.95);
    border: 1px solid var(--sama-border);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
article.product-miniature,
.ajax_block_product {
    position: relative;
}
.aral-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.aral-chip-group:has(.aral-chip-range) .aral-chip-row {
    width: 100%;
    display: flex;
    justify-content: center;
}
.aral-chip-group:has(.aral-chip-range) {
    /* Keep layout width from --aral-dw / --aral-mw (do not force 100%) */
    margin-inline: 0;
    box-sizing: border-box;
}
.aral-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--sama-chip-bg);
    color: var(--sama-dark);
    border: 1px solid var(--sama-chip-border);
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 0 rgba(18, 54, 83, 0.03);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.aral-chip:hover {
    background: var(--sama-chip-hover);
    border-color: var(--sama-orange);
    color: var(--sama-dark);
    box-shadow: 0 1px 4px rgba(243, 163, 19, 0.18);
}
.aral-chip.is-on {
    background: var(--sama-chip-on);
    color: var(--sama-chip-on-text);
    border-color: var(--sama-chip-on);
    box-shadow: 0 1px 4px rgba(18, 54, 83, 0.22);
}
.aral-chip.is-on:hover {
    background: #0e2a42;
    border-color: #0e2a42;
    color: #fff;
}
.aral-chip.has-img,
.aral-chip.aral-chip--img-btn {
    gap: 6px;
    padding: 4px 12px 4px 4px;
    min-height: 30px;
}
.aral-chip.has-img img,
.aral-chip.aral-chip--img-btn img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    flex: 0 0 22px;
    pointer-events: none;
    background: #f1f5f9;
}
.aral-chip.has-img span,
.aral-chip.aral-chip--img-btn span {
    line-height: 1.2;
}
.aral-chip.has-img.is-on img,
.aral-chip.aral-chip--img-btn.is-on img {
    box-shadow: 0 0 0 1px #fff;
}
.aral-chip-img-fallback {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 6px;
    background: #e2e8f0;
    border: 1px dashed #94a3b8;
}
.aral-chip-range {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px 8px;
    align-items: center;
    justify-content: stretch;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    box-sizing: border-box;
    --sama-range-track: #dfe6ef;
    min-height: 44px;
}
.aral-rb-range--h {
    flex-wrap: nowrap;
    align-items: center;
}
.aral-rb-range--h .aral-range-end-label {
    display: none;
}
.aral-range-row {
    display: contents;
}
.aral-range-main {
    min-width: 0;
    flex: 1 1 auto;
    align-self: center;
}
.aral-chip-range button,
.aral-rb-apply {
    display: none;
}
.aral-range-live-count {
    height: 28px;
    min-width: 0;
    padding: 0 8px;
    border-radius: 7px;
    background: linear-gradient(135deg, #fff4f4, #edf6ff);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--sama-navy);
    unicode-bidi: isolate;
    box-sizing: border-box;
    flex: 0 0 auto;
    white-space: nowrap;
    align-self: center;
}
.aral-range-live-count-num {
    color: var(--sama-red);
    font-size: 13px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}
.aral-range-live-count-txt {
    font-weight: 600;
    color: var(--sama-blue);
    font-size: 10px;
}
.aral-range-dual {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 44px;
    direction: ltr;
    touch-action: none;
    box-sizing: border-box;
    margin: 0;
}
.aral-range-dual.is-ltr {
    direction: ltr;
}
.aral-range-dual.is-rtl {
    direction: ltr; /* 1.1.51: keep physical left=low even if class leftover */
}
.aral-range-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
}
/* Stock histogram — vertical bars (~2× previous thickness). */
.aral-range-hist {
    position: absolute;
    left: 2px;
    right: 2px;
    top: 2px;
    height: 12px;
    z-index: 1;
    pointer-events: none;
}
.aral-range-hist-bar {
    position: absolute;
    bottom: 0;
    min-height: 3px;
    width: 3px !important;
    max-width: 3px;
    margin-left: -1.5px;
    border-radius: 1px;
    background: var(--sama-hist-color, #111111);
    opacity: 1;
}
.aral-range-hist-bar.is-empty {
    opacity: 0.4;
    background: var(--sama-hist-color, #111111);
}
.aral-range-rail {
    position: absolute;
    left: 0;
    right: 0;
    top: 20px;
    height: 5px;
    border-radius: 999px;
    background: #dfe6ef;
    box-shadow: none;
    overflow: visible;
    pointer-events: none;
}
.aral-range-ticks {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.aral-range-tick {
    position: absolute;
    top: 50%;
    width: 2px;
    height: 8px;
    margin-top: -4px;
    background: #a8b6c9;
    border-radius: 1px;
    transform: translateX(-50%);
}
.aral-range-tick.is-end {
    height: 12px;
    margin-top: -6px;
    background: #63738d;
}
.aral-range-glow {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--sama-glow-left, 0%);
    width: var(--sama-glow-width, 100%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sama-red, #e00000), var(--sama-blue, #0868e8));
    box-shadow: none;
    z-index: 0;
}
.aral-chip-range.is-submitting {
    opacity: 0.72;
    pointer-events: none;
}
.aral-range-dual.is-rtl .aral-range-glow {
    background: linear-gradient(90deg, var(--sama-red, #e00000), var(--sama-blue, #0868e8));
}
.aral-range-dual input[type="range"] {
    position: absolute;
    left: 0;
    width: 100%;
    top: 2px;
    margin: 0;
    height: 40px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}
.aral-range-dual input[type="range"]::-webkit-slider-runnable-track {
    height: 14px;
    background: transparent;
    border: none;
}
.aral-range-dual input[type="range"]::-moz-range-track {
    height: 14px;
    background: transparent;
    border: none;
}
/* Large hit targets — easier min/max grab (visual circle is smaller; thumb is the hit box) */
.aral-range-dual input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: grab;
    pointer-events: auto;
    margin-top: -15px;
    position: relative;
}
.aral-range-dual input[type="range"]::-moz-range-thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: grab;
    pointer-events: auto;
}
.aral-range-dual input[type="range"].aral-range-min {
    z-index: 3;
}
.aral-range-dual input[type="range"].aral-range-max {
    z-index: 4;
}
.aral-range-dual input[type="range"].aral-range-active {
    z-index: 6;
}
/* Circular red/blue thumbs (design) — visual only */
.aral-range-arrow {
    position: absolute;
    top: 22px;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 3px solid var(--sama-red, #e00000);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(30, 60, 100, 0.25);
    filter: none;
    pointer-events: none;
    z-index: 5;
    transform: translate(-50%, -50%);
    left: var(--sama-lo-left, 0%);
    box-sizing: border-box;
}
.aral-range-arrow--min {
    left: var(--sama-lo-left, 0%);
    border-color: var(--sama-red, #e00000);
}
.aral-range-arrow--max {
    left: var(--sama-hi-left, 100%);
    border-color: var(--sama-blue, #0868e8);
}
.aral-range-arrow::after {
    content: none;
    display: none;
}
.aral-range-handle-val {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    top: auto;
    min-width: 1.2rem;
    padding: 1px 5px;
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.1;
    color: #fff;
    background: var(--sama-red, #e00000);
    border-radius: 6px;
    unicode-bidi: isolate;
    pointer-events: none;
    z-index: 5;
    transform: translateX(-50%);
    white-space: nowrap;
}
.aral-range-handle-val--min {
    left: 50%;
    background: var(--sama-red, #e00000);
}
.aral-range-handle-val--max {
    left: 50%;
    background: var(--sama-blue, #0868e8);
}
.aral-range-end-label {
    position: absolute;
    top: 40px;
    font-size: 11px;
    font-weight: 700;
    color: #63738d;
    unicode-bidi: isolate;
    pointer-events: none;
    z-index: 4;
    white-space: nowrap;
}
.aral-range-end-label--min {
    left: 0;
    transform: none;
}
.aral-range-end-label--max {
    right: 0;
    left: auto;
    transform: none;
}
.aral-range-label {
    font-weight: 700;
    color: #0f172a;
    min-width: 7rem;
}

/* ---- Range handle variants (up to 6) — red/blue default ---- */
.aral-range-variant-0 {
    --sama-range-accent: #e00000;
    --sama-range-glow: #0868e8;
    --sama-range-glow-rgb: 8, 104, 232;
}
.aral-range-variant-1 {
    --sama-range-accent: #c97810;
    --sama-range-glow: #f3a313;
    --sama-range-glow-rgb: 243, 163, 19;
}
.aral-range-variant-1 .aral-range-arrow {
    border-left: 0;
    border-right: 0;
    border-top: 0;
    width: 18px;
    height: 18px;
    background: var(--sama-range-accent);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px;
    top: 23px;
}
.aral-range-variant-1 .aral-range-arrow--max {
    background: var(--sama-range-glow);
}
.aral-range-variant-1 .aral-range-arrow::after {
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 1px;
    border-width: 2px;
    transform: none;
}
.aral-range-variant-2 {
    --sama-range-accent: #0f766e;
    --sama-range-glow: #2dd4bf;
    --sama-range-glow-rgb: 45, 212, 191;
}
.aral-range-variant-2 .aral-range-arrow {
    border: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--sama-range-accent);
    top: 23px;
}
.aral-range-variant-2 .aral-range-arrow--max {
    background: var(--sama-range-glow);
}
.aral-range-variant-2 .aral-range-arrow::after {
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.aral-range-variant-3 {
    --sama-range-accent: #1e3a5f;
    --sama-range-glow: #3b82f6;
    --sama-range-glow-rgb: 59, 130, 246;
}
.aral-range-variant-3 .aral-range-arrow {
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 0;
    border-bottom: 18px solid var(--sama-range-accent);
    top: 23px;
}
.aral-range-variant-3 .aral-range-arrow--max {
    border-bottom-color: var(--sama-range-glow);
}
.aral-range-variant-3 .aral-range-arrow::after {
    top: 4px;
    left: -6px;
    border-radius: 0 0 2px 2px;
}
.aral-range-variant-4 {
    --sama-range-accent: #b45309;
    --sama-range-glow: #f59e0b;
    --sama-range-glow-rgb: 245, 158, 11;
}
.aral-range-variant-4 .aral-range-arrow {
    border: 0;
    width: 16px;
    height: 16px;
    background: var(--sama-range-accent);
    border-radius: 3px;
    top: 23px;
}
.aral-range-variant-4 .aral-range-arrow--max {
    background: var(--sama-range-glow);
}
.aral-range-variant-4 .aral-range-arrow::after {
    top: 2px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 1px;
}
.aral-range-variant-5 {
    --sama-range-accent: #be123c;
    --sama-range-glow: #fb7185;
    --sama-range-glow-rgb: 251, 113, 133;
}
.aral-range-variant-5 .aral-range-arrow {
    border: 0;
    width: 16px;
    height: 20px;
    background: var(--sama-range-accent);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    top: 23px;
}
.aral-range-variant-5 .aral-range-arrow--max {
    background: var(--sama-range-glow);
}
.aral-range-variant-5 .aral-range-arrow::after {
    top: 4px;
    left: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Compact horizontal range: one uniform circular handle (variants keep colors only) */
.aral-rb-range--h .aral-range-arrow,
.aral-rb-range--h.aral-range-variant-1 .aral-range-arrow,
.aral-rb-range--h.aral-range-variant-2 .aral-range-arrow,
.aral-rb-range--h.aral-range-variant-3 .aral-range-arrow,
.aral-rb-range--h.aral-range-variant-4 .aral-range-arrow,
.aral-rb-range--h.aral-range-variant-5 .aral-range-arrow {
    top: 22px;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 3px solid var(--sama-range-accent, var(--sama-red, #e00000));
    border-left: 3px solid var(--sama-range-accent, var(--sama-red, #e00000));
    border-right: 3px solid var(--sama-range-accent, var(--sama-red, #e00000));
    border-top: 3px solid var(--sama-range-accent, var(--sama-red, #e00000));
    border-bottom: 3px solid var(--sama-range-accent, var(--sama-red, #e00000));
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgba(30, 60, 100, 0.25);
    transform: translate(-50%, -50%);
}
.aral-rb-range--h .aral-range-arrow--max,
.aral-rb-range--h.aral-range-variant-1 .aral-range-arrow--max,
.aral-rb-range--h.aral-range-variant-2 .aral-range-arrow--max,
.aral-rb-range--h.aral-range-variant-3 .aral-range-arrow--max,
.aral-rb-range--h.aral-range-variant-4 .aral-range-arrow--max,
.aral-rb-range--h.aral-range-variant-5 .aral-range-arrow--max {
    border-color: var(--sama-range-glow, var(--sama-blue, #0868e8));
    background: #fff;
}
.aral-rb-range--h .aral-range-arrow::after,
.aral-rb-range--h.aral-range-variant-1 .aral-range-arrow::after,
.aral-rb-range--h.aral-range-variant-2 .aral-range-arrow::after,
.aral-rb-range--h.aral-range-variant-3 .aral-range-arrow::after,
.aral-rb-range--h.aral-range-variant-4 .aral-range-arrow::after,
.aral-rb-range--h.aral-range-variant-5 .aral-range-arrow::after {
    content: none;
    display: none;
}
.aral-rb-range--h .aral-range-handle-val {
    bottom: calc(100% + 2px);
    top: auto;
    transform: translateX(-50%);
}
.aral-chip-group--accordion {
    /* width follows --aral-dw / --aral-mw like other cards */
}
.aral-chip-group--accordion .aral-chip-accordion {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid var(--sama-border, #d5d9d9);
    border-radius: 12px;
    background: #fff;
    padding: 0 12px 10px;
}
.aral-chip-group--accordion .aral-chip-accordion > summary {
    font-size: 13px;
    font-weight: 700;
    color: var(--sama-dark, #123653);
    padding: 12px 2px;
}
.aral-chip-group--accordion .aral-chip-accordion .aral-chip-row {
    margin-top: 4px;
}
.aral-stroke-widget {
    width: 100%;
    max-width: 280px;
}
@media (min-width: 768px) {
    .aral-stroke-widget {
        max-width: 420px;
    }
}
.aral-stroke-title {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
}
.aral-stroke-visual {
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    padding: 4px 6px 2px;
    background: #fff;
    border: 1px solid #cfd5e4;
    border-radius: 8px;
}
.mini-actuator {
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
    padding: 2px 4px;
    box-sizing: border-box;
}
.mini-actuator svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 36px;
}
.mini-actuator .actuator-rod,
.mini-actuator .actuator-tip,
.mini-actuator .actuator-tip-pin {
    transition: x 0.25s ease-out, width 0.25s ease-out, cx 0.25s ease-out;
}
.stroke-marker--start,
.stroke-marker--end {
    stroke-linecap: round;
}
.aral-stroke-scale {
    display: flex;
    justify-content: space-between;
    gap: 2px;
    margin: 4px 0 0;
    padding: 0 2px;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    direction: ltr;
}
.aral-stroke-tick {
    flex: 1 1 0;
    margin: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    line-height: 1.1;
    cursor: pointer;
}
.aral-stroke-tick:hover {
    color: #123653;
}
.aral-stroke-tick.is-on {
    color: #123653;
    font-weight: 800;
}
.aral-stroke-tick.is-empty,
.aral-stroke-tick:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}
.aral-stroke-empty-msg {
    margin: 16px 0;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    color: #334155;
}
.aral-stroke-empty-msg a {
    color: #123653;
}
.aral-stroke-value {
    margin-top: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    direction: ltr;
}
.aral-stroke-value-num {
    font-variant-numeric: tabular-nums;
}
.aral-d-off { display: none !important; }
@media (max-width: 767px) {
    .aral-d-off { display: block !important; }
    .aral-m-off { display: none !important; }
}
@media (min-width: 768px) {
    .aral-m-off { display: none !important; }
}

.aral-filter-popup,
.aral-filter-button-wrapper,
.aral-filter-inline-bar,
.aral-filter-onpage,
.aral-filter-fab,
.aral-move-article {
    display: none !important;
}



/* ========================================
   Filter Popup Base
   ======================================== */

.aral-filter-onpage {
    display: block;
    width: 100%;
    margin: 0 0 18px;
    padding: 16px;
    background: linear-gradient(180deg, #fbfbfc 0%, #f7f8f8 100%);
    border: 1px solid #d5d9d9;
    border-radius: 14px;
    box-sizing: border-box;
}
.aral-onpage-group {
    margin: 0 0 12px;
}
.aral-onpage-group:last-child {
    margin-bottom: 0;
}
.aral-onpage-group strong {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #123653;
}
.aral-onpage-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.aral-onpage-chip {
    display: inline-block;
    padding: 7px 14px;
    background: #fff;
    color: #123653;
    border: 1px solid #d5d9d9;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.aral-onpage-chip:hover {
    background: #fff8e1;
    border-color: #f3a313;
    color: #123653;
}
.aral-onpage-chip.is-on {
    background: #123653;
    color: #fff;
    border-color: #123653;
}

.aral-filter-inline-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0 16px;
    padding: 12px 14px;
    background: #fff8e1;
    border: 1px solid #f0c14b;
    border-radius: 12px;
}
.aral-filter-inline-names {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.aral-filter-pill {
    background: #fff;
    color: #123653;
    border: 1px solid #d5d9d9;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.aral-filter-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aral-filter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.aral-filter-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

/* ========================================
   Header
   ======================================== */

.aral-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.aral-filter-header .aral-filter-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #123653;
}

.aral-filter-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    border-radius: 50%;
}

.aral-filter-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* ========================================
   Body
   ======================================== */

.aral-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.aral-filter-section {
    margin-bottom: 32px;
}

.aral-filter-section:last-child {
    margin-bottom: 0;
}

.aral-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #123653;
    margin-bottom: 14px;
}

.aral-filter-label .icon {
    color: #123653;
}

/* ========================================
   Radio with small images
   ======================================== */

.aral-filter-radio-image-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aral-filter-radio-image {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.aral-filter-radio-image input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.aral-filter-radio-image .aral-radio-thumb {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    color: #bbb;
}

.aral-filter-radio-image .aral-radio-thumb img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    pointer-events: none;
}

.aral-filter-radio-image .aral-radio-text {
    font-size: 14px;
    color: #333;
}

.aral-filter-radio-image:hover,
.aral-filter-radio-image.active,
.aral-filter-radio-image:has(input:checked) {
    border-color: #123653;
    background: rgba(18, 54, 83, 0.05);
}

/* ========================================
   Radio without images
   ======================================== */

.aral-filter-radio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aral-filter-radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.aral-filter-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.aral-filter-radio-option .radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.aral-filter-radio-option input:checked ~ .radio-mark,
.aral-filter-radio-option.active .radio-mark {
    border-color: #123653;
}

.aral-filter-radio-option input:checked ~ .radio-mark::after,
.aral-filter-radio-option.active .radio-mark::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #123653;
}

.aral-filter-radio-option .radio-label {
    font-size: 14px;
    color: #333;
}

.aral-filter-radio-option:hover,
.aral-filter-radio-option.active {
    border-color: #123653;
    background: rgba(18, 54, 83, 0.05);
}

/* ========================================
   Accordion list
   ======================================== */

.aral-filter-accordion {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 0 12px 12px;
    background: #fafafa;
}

.aral-filter-accordion > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    padding: 14px 4px;
    list-style: none;
}

.aral-filter-accordion > summary::-webkit-details-marker {
    display: none;
}

.aral-filter-accordion > summary::after {
    content: '';
    float: left;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-right: 2px solid #123653;
    border-bottom: 2px solid #123653;
    transform: rotate(45deg);
}

.aral-filter-accordion[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: 8px;
}

/* ========================================
   Image Select Filter (16:9 ratio)
   ======================================== */

.aral-filter-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.aral-filter-image-option {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
}

.aral-filter-image-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.aral-filter-image-option .image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
}

.aral-filter-image-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aral-filter-image-option .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
}

.aral-filter-image-option .image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.aral-filter-image-option:hover {
    border-color: #123653;
    box-shadow: 0 4px 12px rgba(18, 54, 83, 0.2);
    transform: translateY(-2px);
}

.aral-filter-image-option.active,
.aral-filter-image-option input:checked ~ .image-wrapper {
    border-color: #123653;
}

.aral-filter-image-option.active {
    border-color: #123653;
    box-shadow: 0 0 0 3px rgba(18, 54, 83, 0.2);
}

.aral-filter-image-option.active .image-label {
    background: linear-gradient(to top, rgba(18, 54, 83, 0.9), transparent);
}

/* ========================================
   Checkbox Filter
   ======================================== */

.aral-filter-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.aral-filter-checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.aral-filter-checkbox-option:hover {
    border-color: #123653;
    background: rgba(18, 54, 83, 0.05);
}

.aral-filter-checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.aral-filter-checkbox-option .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.aral-filter-checkbox-option input:checked ~ .checkmark {
    background: #123653;
    border-color: #123653;
}

.aral-filter-checkbox-option input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.aral-filter-checkbox-option .checkbox-label {
    font-size: 14px;
    color: #333;
}

/* ========================================
   FO cumulative checklist — red/blue grid
   ======================================== */

.aral-chip-group--checklist {
    min-width: min(100%, 280px);
}
.aral-chip-checklist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 14px;
    width: 100%;
    max-width: 100%;
    padding: 4px 0 6px;
}
.aral-check-option {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 43px;
    padding: 0 11px;
    margin: 0;
    text-decoration: none;
    color: var(--sama-navy, #092553);
    border-radius: 9px;
    border: 1px solid #dce4ed;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    unicode-bidi: isolate;
    box-sizing: border-box;
}
.aral-check-option:hover {
    border-color: #80b7fa;
    background: #f8fbff;
    color: var(--sama-navy, #092553);
    text-decoration: none;
}
.aral-check-option.is-empty {
    opacity: 0.45;
}
.aral-check-option.is-extra {
    display: none;
}
.aral-chip-checklist.is-expanded .aral-check-option.is-extra {
    display: flex;
}
.aral-check-box {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    border: 2px solid #aebbd0;
    border-radius: 4px;
    background: #fff;
    position: relative;
    box-sizing: border-box;
    display: grid;
    place-items: center;
}
.aral-check-option.is-on .aral-check-box::after {
    content: '✓';
    position: static;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    border: 0;
    transform: none;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.aral-check-option.is-on.is-tone-red {
    border-color: #ff6969;
    background: linear-gradient(90deg, #fff4f4, #fff);
}
.aral-check-option.is-on.is-tone-red .aral-check-box {
    background: var(--sama-red, #e00000);
    border-color: var(--sama-red, #e00000);
}
.aral-check-option.is-on.is-tone-blue {
    border-color: #65a8ff;
    background: linear-gradient(90deg, #eef6ff, #fff);
}
.aral-check-option.is-on.is-tone-blue .aral-check-box {
    background: var(--sama-blue, #0868e8);
    border-color: var(--sama-blue, #0868e8);
}
.aral-check-option.is-on:not(.is-tone-red):not(.is-tone-blue) {
    border-color: #65a8ff;
    background: linear-gradient(90deg, #eef6ff, #fff);
}
.aral-check-option.is-on:not(.is-tone-red):not(.is-tone-blue) .aral-check-box {
    background: var(--sama-blue, #0868e8);
    border-color: var(--sama-blue, #0868e8);
}
.aral-check-label {
    flex: 1 1 auto;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: inherit;
}
.aral-check-count {
    flex: 0 0 auto;
    margin-right: auto;
    margin-left: 0;
    min-width: 29px;
    height: 23px;
    padding: 0 6px;
    border-radius: 99px;
    background: #f0f3f7;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    color: #65738b;
    font-variant-numeric: tabular-nums;
    display: grid;
    place-items: center;
}
.aral-check-option.is-on .aral-check-count {
    color: #65738b;
    background: #f0f3f7;
}
.aral-check-more {
    border: 0;
    background: none;
    font: inherit;
    font-weight: 700;
    color: var(--sama-blue, #0868e8);
    cursor: pointer;
    margin: 8px 0 0;
    padding: 0;
}
@media (max-width: 720px) {
    .aral-rb-range--h {
        flex-wrap: nowrap;
    }
    .aral-rb-head--inline {
        flex: 0 0 auto;
        max-width: 96px;
    }
    .aral-range-live-count-txt {
        display: none;
    }
    .aral-chip-checklist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

/* FO color swatches (multi-select like checklist) */
.aral-chip-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    padding: 2px 0 4px;
}
.aral-color-swatch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    text-decoration: none;
    color: #0f172a;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.aral-color-swatch:hover {
    border-color: #94a3b8;
    color: #0f172a;
    text-decoration: none;
}
.aral-color-swatch.is-on {
    border-color: #123653;
    box-shadow: 0 0 0 1px #123653;
}
.aral-color-swatch.is-empty {
    opacity: 0.4;
}
.aral-color-swatch img,
.aral-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.2);
    flex: 0 0 auto;
    object-fit: cover;
    box-sizing: border-box;
}
.aral-color-dot--fallback {
    background: repeating-conic-gradient(#cbd5e1 0% 25%, #fff 0% 50%) 50% / 8px 8px;
}
.aral-color-name {
    line-height: 1.2;
    unicode-bidi: isolate;
}

/* ========================================
   Range Slider Filter
   ======================================== */

.aral-filter-range {
    padding: 12px 8px 8px;
    background: #f8fafc;
    border-radius: 12px;
    --sama-range-accent: #0b6e99;
    --sama-range-glow: #22c5e8;
    --sama-range-track: #d7dee8;
    --sama-range-glow-rgb: 34, 197, 232;
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    box-sizing: border-box;
}

.range-values {
    display: none;
}

.aral-filter-range .aral-range-dual {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 86px;
    direction: ltr;
    margin-bottom: 2px;
    box-sizing: border-box;
}
.aral-filter-range .aral-range-rail {
    position: absolute;
    left: 0;
    right: 0;
    top: 20px;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, #e8eef5 0%, var(--sama-range-track) 100%);
    overflow: visible;
    pointer-events: none;
}
.aral-filter-range .aral-range-glow {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--sama-glow-left, 0%);
    width: var(--sama-glow-width, 100%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sama-range-accent), var(--sama-range-glow));
    box-shadow:
        0 0 8px rgba(var(--sama-range-glow-rgb, 34, 197, 232), 0.75),
        0 0 16px rgba(var(--sama-range-glow-rgb, 34, 197, 232), 0.4);
}
.aral-filter-range .range-slider {
    position: absolute;
    left: 0;
    width: 100%;
    top: 16px;
    margin: 0;
    height: 44px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    cursor: pointer;
}
.aral-filter-range .range-slider::-webkit-slider-runnable-track {
    height: 12px;
    background: transparent;
}
.aral-filter-range .range-slider::-moz-range-track {
    height: 12px;
    background: transparent;
}
.aral-filter-range .range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    cursor: grab;
    box-shadow: none;
    pointer-events: auto;
    margin-top: -18px;
}
.aral-filter-range .range-slider::-moz-range-thumb {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    cursor: grab;
    box-shadow: none;
    pointer-events: auto;
}
.aral-filter-range .range-min-slider { z-index: 3; }
.aral-filter-range .range-max-slider { z-index: 4; }

.range-display {
    display: none;
}

/* ========================================
   Footer
   ======================================== */

.aral-filter-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
}

.aral-filter-footer button {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.aral-filter-footer .btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.aral-filter-footer .btn-cancel:hover {
    background: #e0e0e0;
    color: #333;
}

.aral-filter-footer .btn-submit {
    background: linear-gradient(135deg, #123653 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(18, 54, 83, 0.3);
}

.aral-filter-footer .btn-submit:hover {
    box-shadow: 0 4px 12px rgba(18, 54, 83, 0.4);
    transform: translateY(-1px);
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive - Mobile
   ======================================== */

@media (max-width: 767px) {
    .aral-filter-content {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        animation: slideUpFull 0.3s ease;
    }
    
    .aral-filter-image-grid,
    .aral-filter-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .aral-filter-body {
        padding: 20px;
    }
    
    .aral-filter-footer {
        padding: 16px 20px;
    }
    
    @keyframes slideUpFull {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .aral-filter-header {
        padding: 16px 20px;
    }
    
    .aral-filter-title {
        font-size: 16px;
    }
    
    .aral-filter-section {
        margin-bottom: 24px;
    }
}

@media (max-width: 767px) {
    .aral-chip-bar {
        padding: 12px 12px 8px;
        border-radius: 12px;
    }
    .aral-chip-group {
        margin: 0 0 12px;
        padding-bottom: 10px;
    }
    .aral-chip {
        padding: 6px 12px;
        font-size: 12px;
    }
    .aral-chip-row {
        gap: 6px;
    }
    .aral-range-dual {
        width: 100%;
        max-width: 100%;
        min-height: 44px;
    }
    .aral-chip-group:has(.aral-chip-range) {
        margin-inline: 0;
        padding-inline: 0;
    }
    .aral-chip-range {
        width: 100%;
        max-width: 100%;
    }
    .aral-filter-range {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
    }
}

/* ========================================
   Category layout (Angar / Warehouse)
   Description block moved BELOW products — top stays empty
   ======================================== */

body.page-category #js-product-list-header.aral-header-compact,
body.page-category .block-category.aral-header-compact {
    margin: 0;
    padding: 0;
    min-height: 0;
}

body.page-category #js-product-list-header.aral-header-compact:empty {
    display: none;
}

.aral-category-desc-bottom {
    clear: both;
    margin: 28px 0 8px;
    padding: 16px 0 24px;
    color: #444;
    line-height: 1.85;
    font-size: 14px;
    border-top: 1px solid #e8e8e8;
}

.aral-category-desc-bottom #category_desc {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 0;
}

.aral-category-desc-bottom #category_desc .category-image,
.aral-category-desc-bottom #category_desc .category-image.col-sm-2,
.aral-category-desc-bottom #category_desc .category-image.col-xs-12 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 12px;
}

.aral-category-desc-bottom #category_desc .category-image img {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.aral-category-desc-bottom #category_desc .category-desc,
.aral-category-desc-bottom #category_desc .category-desc.col-sm-10 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
}

.aral-category-desc-bottom .cat_desc,
.aral-category-desc-bottom .cat_desc.aral-cat-collapsed,
.aral-category-desc-bottom .category-desc {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

.aral-category-desc-bottom .cat_desc.aral-cat-collapsed::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
}

.aral-category-desc-bottom .samamotor-cat-desc-toggle {
    display: none !important;
}

.aral-forum-backlink-wrap {
    margin: 8px 0 16px;
}

.aral-forum-backlink {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #123653;
    text-decoration: none;
}

.aral-forum-backlink:hover {
    text-decoration: underline;
}

.aral-filter-body {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.aral-filter-section {
    width: 100%;
}

@media (min-width: 768px) {
    .aral-filter-section.aral-dw-half {
        width: calc(50% - 8px);
    }
    .aral-filter-button-wrapper.desktop-only.pos-top-left {
        justify-content: flex-start;
    }
    .aral-filter-button-wrapper.desktop-only.pos-top-center {
        justify-content: center;
    }
    .aral-filter-button-wrapper.desktop-only.pos-top-right {
        justify-content: flex-end;
    }
}

@media (max-width: 767px) {
    .aral-filter-section.aral-hide-mobile {
        display: none !important;
    }
    .aral-filter-fab {
        left: 50%;
        transform: translateX(-50%);
    }
    .aral-filter-button-wrapper.mobile-only.pos-bottom-left .aral-filter-fab {
        left: 20px;
        transform: none;
    }
    .aral-filter-button-wrapper.mobile-only.pos-bottom-right .aral-filter-fab {
        left: auto;
        right: 20px;
        transform: none;
    }
    .aral-category-desc-bottom #category_desc.hidden-sm-down,
    .aral-category-desc-bottom #category_desc {
        display: flex !important;
    }

    /* Avoid duplicate title: mobile already has .mobile_cat_name at top */
    .aral-category-desc-bottom #category_desc .category-desc .cat_name {
        display: none;
    }
}

/* ========================================
   Per-device filter layout (v1.1.30)

   Each filter is rendered once and carries BOTH layouts:
     --aral-do / --aral-mo  desktop and mobile order
     .aral-d-full|half      desktop width
     .aral-m-full|half      mobile width
     .aral-d-off/.aral-m-off hidden on that device

   Nothing here may depend on server-side device detection, because the
   shop serves cached pages to both phones and desktops.

   Selectors are deliberately all at the same specificity (0,3,0) so the
   mobile block below simply wins by source order.
   ======================================== */

.aral-filter-root .aral-filter-onpage {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.aral-filter-root .aral-filter-onpage > .aral-onpage-group {
    order: var(--aral-do, 0);
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.aral-filter-popup .aral-filter-body > .aral-filter-section {
    order: var(--aral-do, 0);
    box-sizing: border-box;
}

.aral-filter-root .aral-filter-inline-names > .aral-filter-pill {
    order: var(--aral-do, 0);
}

.aral-filter-root .aral-filter-onpage > .aral-d-full,
.aral-filter-popup .aral-filter-body > .aral-d-full {
    width: 100%;
}

.aral-filter-root .aral-filter-onpage > .aral-d-half,
.aral-filter-popup .aral-filter-body > .aral-d-half {
    width: calc(50% - 6px);
}

.aral-filter-root .aral-filter-onpage > .aral-d-off,
.aral-filter-popup .aral-filter-body > .aral-d-off,
.aral-filter-root .aral-filter-inline-names > .aral-d-off {
    display: none;
}

@media (max-width: 767px) {
    .aral-filter-root .aral-filter-onpage > .aral-onpage-group,
    .aral-filter-popup .aral-filter-body > .aral-filter-section,
    .aral-filter-root .aral-filter-inline-names > .aral-filter-pill {
        order: var(--aral-mo, 0);
    }

    .aral-filter-root .aral-filter-onpage > .aral-m-full,
    .aral-filter-popup .aral-filter-body > .aral-m-full {
        width: 100%;
    }

    .aral-filter-root .aral-filter-onpage > .aral-m-half,
    .aral-filter-popup .aral-filter-body > .aral-m-half {
        width: calc(50% - 6px);
    }

    /* Re-show what is only hidden on desktop, then hide what the mobile
       layout hides. Order matters: the .aral-m-off rule comes last. */
    .aral-filter-root .aral-filter-onpage > .aral-d-off,
    .aral-filter-popup .aral-filter-body > .aral-d-off {
        display: block;
    }

    .aral-filter-root .aral-filter-inline-names > .aral-d-off {
        display: inline-block;
    }

    .aral-filter-root .aral-filter-onpage > .aral-m-off,
    .aral-filter-popup .aral-filter-body > .aral-m-off,
    .aral-filter-root .aral-filter-inline-names > .aral-m-off {
        display: none;
    }
}

/* ---- FO layout editor (token mode only) ---- */
.aral-filter-root.is-layout-edit {
    outline: 2px dashed #c62828;
    outline-offset: 4px;
    padding-bottom: 56px;
}
.aral-layout-edit-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fff8f7;
    border: 1px solid #f5c2c0;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #4a1c1c;
}
.aral-layout-edit-banner-text {
    flex: 1 1 240px;
}
.aral-layout-edit-banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.aral-layout-edit-status {
    font-size: 12px;
    color: #666;
}
.aral-layout-edit-status.is-warn { color: #b45309; }
.aral-layout-edit-status.is-ok { color: #15803d; }
.aral-layout-edit-status.is-err { color: #b91c1c; }
.aral-layout-save-btn {
    appearance: none;
    border: 0;
    border-radius: 6px;
    padding: 8px 14px;
    background: #c62828;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.aral-layout-save-btn:disabled {
    opacity: 0.45;
    cursor: default;
}
.aral-layout-save-btn.is-dirty {
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.25);
}
.aral-filter-root.is-layout-edit .aral-chip-group {
    position: relative;
    outline: 1px dashed rgba(30, 90, 180, 0.45);
    background: rgba(255, 255, 255, 0.55);
    overflow: visible;
}
.aral-filter-root.is-layout-edit .aral-chip-group.is-dragging {
    opacity: 0.55;
}
.aral-filter-root.is-layout-edit .aral-chip-group.is-resizing {
    outline-color: #c62828;
}
.aral-layout-edit-tools {
    position: absolute;
    z-index: 5;
    top: 4px;
    inset-inline-start: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 3px 4px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #d0d7de;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.aral-layout-drag {
    cursor: grab;
    user-select: none;
    padding: 0 2px;
    color: #555;
}
.aral-layout-size {
    min-width: 2.5em;
    font-size: 11px;
    font-weight: 700;
    color: #1e3a5f;
}
.aral-layout-preset {
    appearance: none;
    border: 1px solid #c5ced8;
    border-radius: 4px;
    background: #f6f8fa;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1.4;
    cursor: pointer;
    color: #222;
}
.aral-layout-preset.is-on,
.aral-layout-preset:hover {
    border-color: #1e5ab4;
    background: #e8f0fe;
    color: #0b3d91;
}
/* Handle sits on the card edge (sibling of tools), not inside the toolbar */
.aral-layout-resize {
    position: absolute;
    z-index: 6;
    width: 18px;
    height: 18px;
    inset-inline-end: 0;
    bottom: 0;
    border-radius: 3px 0 0 0;
    background:
        linear-gradient(135deg, transparent 40%, #1e5ab4 40%, #1e5ab4 52%, transparent 52%),
        linear-gradient(135deg, transparent 62%, #1e5ab4 62%, #1e5ab4 74%, transparent 74%);
    cursor: ew-resize;
    touch-action: none;
}
html[dir="rtl"] .aral-layout-resize {
    border-radius: 0 3px 0 0;
}
.aral-layout-ctx {
    position: fixed;
    z-index: 99999;
    min-width: 180px;
    padding: 6px;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.aral-layout-ctx button {
    display: block;
    width: 100%;
    text-align: right;
    appearance: none;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.aral-layout-ctx button:hover {
    background: #eef3fb;
}
/* ---- FO sort bar (below filters / above products) ---- */
.aral-sort-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 10px 0 4px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--sama-line, #dfe7f1);
    border-radius: 10px;
    box-sizing: border-box;
}
.aral-sort-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--sama-navy, #092553);
    margin-left: 2px;
}
.aral-sort-params {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
}
.aral-sort-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 8px;
    border: 1px solid var(--sama-chip-border, #dce4ed);
    border-radius: 999px;
    background: #fff;
}
.aral-sort-item.is-on {
    border-color: var(--sama-blue, #0868e8);
    background: #eef6ff;
}
.aral-sort-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--sama-navy, #092553);
    line-height: 1.2;
}
.aral-sort-arrows {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1;
}
.aral-sort-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #65738b;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}
.aral-sort-arrow:hover {
    color: var(--sama-blue, #0868e8);
    background: #e8f0fe;
    text-decoration: none;
}
.aral-sort-arrow.is-active {
    color: #fff;
    background: var(--sama-blue, #0868e8);
}
.aral-sort-arrow--asc.is-active {
    background: var(--sama-red, #e00000);
}
.aral-sort-stock {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--sama-line, #dfe7f1);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    color: var(--sama-navy, #092553);
    cursor: pointer;
    user-select: none;
}
.aral-sort-stock input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--sama-blue, #0868e8);
    cursor: pointer;
}
@media (max-width: 767px) {
    .aral-sort-bar {
        padding: 8px 10px;
        gap: 8px;
    }
    .aral-sort-label {
        width: 100%;
    }
}

/* ---- Collapse filters (keep sort bar) ---- */
.aral-filter-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}
.aral-filters-toggle {
    appearance: none;
    border: 1px solid var(--sama-line, #dfe7f1);
    background: #fff;
    color: var(--sama-navy, #092553);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
}
.aral-filters-toggle:hover {
    border-color: var(--sama-blue, #0868e8);
    background: #eef6ff;
    color: var(--sama-blue, #0868e8);
}
.aral-filter-root.is-filters-collapsed .aral-chip-bar,
.aral-filter-root.is-filters-collapsed .aral-layout-edit-banner {
    display: none !important;
}
.aral-filter-root.is-filters-collapsed .aral-filter-toolbar {
    margin-bottom: 0;
}
.aral-filter-root.is-filters-collapsed .aral-filters-toggle {
    border-color: var(--sama-blue, #0868e8);
    background: #eef6ff;
    color: var(--sama-blue, #0868e8);
}
