/**
 * Sama Category Filter Frontend Styles
 * Version 1.1.38 — stroke empty ranges + reliable mm parse
 */

.sama-filter-root {
    width: 100%;
    margin: 0 0 16px;
    box-sizing: border-box;
}
.sama-chip-bar {
    display: block;
    width: 100%;
    padding: 12px 14px;
    background: #f7f8fb;
    border: 1px solid #d8dce8;
    border-radius: 10px;
    box-sizing: border-box;
}
.sama-chip-clear {
    display: inline-block;
    margin: 0 0 10px;
    color: #b42318;
    font-size: 13px;
    font-weight: 700;
}
.sama-chip-group {
    margin: 0 0 12px;
}
.sama-chip-group:last-child {
    margin-bottom: 0;
}
.sama-chip-group strong {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    color: #1f2937;
}
.sama-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.sama-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #fff;
    color: #1f2937;
    border: 1px solid #cfd5e4;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}
.sama-chip.has-img img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 6px;
}
.sama-chip.is-on,
.sama-chip:hover {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}
.sama-chip-range {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.sama-chip-range button {
    padding: 6px 12px;
    border: 0;
    border-radius: 8px;
    background: #1d4ed8;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.sama-chip-group--accordion {
    width: 100%;
}
.sama-chip-group--accordion .sama-chip-accordion {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
.sama-chip-group--accordion .sama-chip-accordion > summary {
    font-size: 14px;
    color: #1f2937;
}
.sama-chip-group--accordion .sama-chip-accordion .sama-chip-row {
    margin-top: 4px;
}
.sama-stroke-widget {
    width: 100%;
    max-width: 280px;
}
@media (min-width: 768px) {
    .sama-stroke-widget {
        max-width: 420px;
    }
}
.sama-stroke-title {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
}
.sama-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;
}
.sama-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;
}
.sama-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;
}
.sama-stroke-tick:hover {
    color: #1d4ed8;
}
.sama-stroke-tick.is-on {
    color: #1d4ed8;
    font-weight: 800;
}
.sama-stroke-tick.is-empty,
.sama-stroke-tick:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}
.sama-stroke-empty-msg {
    margin: 16px 0;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    color: #334155;
}
.sama-stroke-empty-msg a {
    color: #1d4ed8;
}
.sama-stroke-value {
    margin-top: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    direction: ltr;
}
.sama-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; }
}

.sama-filter-popup,
.sama-filter-button-wrapper,
.sama-filter-inline-bar,
.sama-filter-onpage,
.sama-filter-fab,
.sama-move-article {
    display: none !important;
}



/* ========================================
   Filter Popup Base
   ======================================== */

.sama-filter-onpage {
    display: block;
    width: 100%;
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #eef2ff;
    border: 2px solid #4f46e5;
    border-radius: 14px;
    box-sizing: border-box;
}
.sama-onpage-group {
    margin: 0 0 12px;
}
.sama-onpage-group:last-child {
    margin-bottom: 0;
}
.sama-onpage-group strong {
    display: block;
    margin: 0 0 8px;
    font-size: 16px;
    color: #312e81;
}
.sama-onpage-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sama-onpage-chip {
    display: inline-block;
    padding: 8px 14px;
    background: #fff;
    color: #312e81;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}
.sama-onpage-chip.is-on,
.sama-onpage-chip:hover {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.sama-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: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
}
.sama-filter-inline-names {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sama-filter-pill {
    background: #fff;
    color: #312e81;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.sama-filter-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sama-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;
}

.sama-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
   ======================================== */

.sama-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.sama-filter-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.sama-filter-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    border-radius: 50%;
}

.sama-filter-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* ========================================
   Body
   ======================================== */

.sama-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.sama-filter-section {
    margin-bottom: 32px;
}

.sama-filter-section:last-child {
    margin-bottom: 0;
}

.sama-filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
}

.sama-filter-label .icon {
    color: #667eea;
}

/* ========================================
   Radio with small images
   ======================================== */

.sama-filter-radio-image-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sama-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;
}

.sama-filter-radio-image input[type="radio"] {
    margin: 0;
    flex-shrink: 0;
}

.sama-filter-radio-image .sama-radio-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    color: #bbb;
}

.sama-filter-radio-image .sama-radio-thumb img {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.sama-filter-radio-image .sama-radio-text {
    font-size: 14px;
    color: #333;
}

.sama-filter-radio-image:hover,
.sama-filter-radio-image.active,
.sama-filter-radio-image:has(input:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* ========================================
   Radio without images
   ======================================== */

.sama-filter-radio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sama-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;
}

.sama-filter-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.sama-filter-radio-option .radio-mark {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.sama-filter-radio-option input:checked ~ .radio-mark,
.sama-filter-radio-option.active .radio-mark {
    border-color: #667eea;
}

.sama-filter-radio-option input:checked ~ .radio-mark::after,
.sama-filter-radio-option.active .radio-mark::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
}

.sama-filter-radio-option .radio-label {
    font-size: 14px;
    color: #333;
}

.sama-filter-radio-option:hover,
.sama-filter-radio-option.active {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* ========================================
   Accordion list
   ======================================== */

.sama-filter-accordion {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 0 12px 12px;
    background: #fafafa;
}

.sama-filter-accordion > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    padding: 14px 4px;
    list-style: none;
}

.sama-filter-accordion > summary::-webkit-details-marker {
    display: none;
}

.sama-filter-accordion > summary::after {
    content: '';
    float: left;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-right: 2px solid #667eea;
    border-bottom: 2px solid #667eea;
    transform: rotate(45deg);
}

.sama-filter-accordion[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: 8px;
}

/* ========================================
   Image Select Filter (16:9 ratio)
   ======================================== */

.sama-filter-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.sama-filter-image-option {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
}

.sama-filter-image-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.sama-filter-image-option .image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
}

.sama-filter-image-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sama-filter-image-option .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
}

.sama-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;
}

.sama-filter-image-option:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.sama-filter-image-option.active,
.sama-filter-image-option input:checked ~ .image-wrapper {
    border-color: #667eea;
}

.sama-filter-image-option.active {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.sama-filter-image-option.active .image-label {
    background: linear-gradient(to top, rgba(102, 126, 234, 0.9), transparent);
}

/* ========================================
   Checkbox Filter
   ======================================== */

.sama-filter-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.sama-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;
}

.sama-filter-checkbox-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.sama-filter-checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.sama-filter-checkbox-option .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.sama-filter-checkbox-option input:checked ~ .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.sama-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);
}

.sama-filter-checkbox-option .checkbox-label {
    font-size: 14px;
    color: #333;
}

/* ========================================
   Range Slider Filter
   ======================================== */

.sama-filter-range {
    padding: 12px;
    background: #f9f9f9;
    border-radius: 12px;
}

.range-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 13px;
    color: #666;
}

.range-values .range-unit {
    margin-right: auto;
    padding-right: 8px;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #667eea, #764ba2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 8px;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: all 0.2s;
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.range-display {
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    color: #667eea;
    font-size: 16px;
    margin-top: 8px;
}

/* ========================================
   Footer
   ======================================== */

.sama-filter-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
}

.sama-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;
}

.sama-filter-footer .btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.sama-filter-footer .btn-cancel:hover {
    background: #e0e0e0;
    color: #333;
}

.sama-filter-footer .btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sama-filter-footer .btn-submit:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 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) {
    .sama-filter-content {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        animation: slideUpFull 0.3s ease;
    }
    
    .sama-filter-image-grid,
    .sama-filter-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .sama-filter-body {
        padding: 20px;
    }
    
    .sama-filter-footer {
        padding: 16px 20px;
    }
    
    @keyframes slideUpFull {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .sama-filter-header {
        padding: 16px 20px;
    }
    
    .sama-filter-title {
        font-size: 16px;
    }
    
    .sama-filter-section {
        margin-bottom: 24px;
    }
}

/* ========================================
   Category layout (Angar / Warehouse)
   Description block moved BELOW products → top stays empty
   ======================================== */

body.page-category #js-product-list-header.sama-header-compact,
body.page-category .block-category.sama-header-compact {
    margin: 0;
    padding: 0;
    min-height: 0;
}

body.page-category #js-product-list-header.sama-header-compact:empty {
    display: none;
}

.sama-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;
}

.sama-category-desc-bottom #category_desc {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 0;
}

.sama-category-desc-bottom #category_desc .category-image,
.sama-category-desc-bottom #category_desc .category-image.col-sm-2,
.sama-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;
}

.sama-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;
}

.sama-category-desc-bottom #category_desc .category-desc,
.sama-category-desc-bottom #category_desc .category-desc.col-sm-10 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
}

.sama-category-desc-bottom .cat_desc,
.sama-category-desc-bottom .cat_desc.sama-cat-collapsed,
.sama-category-desc-bottom .category-desc {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

.sama-category-desc-bottom .cat_desc.sama-cat-collapsed::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
}

.sama-category-desc-bottom .samamotor-cat-desc-toggle {
    display: none !important;
}

.sama-forum-backlink-wrap {
    margin: 8px 0 16px;
}

.sama-forum-backlink {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
}

.sama-forum-backlink:hover {
    text-decoration: underline;
}

.sama-filter-body {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sama-filter-section {
    width: 100%;
}

@media (min-width: 768px) {
    .sama-filter-section.sama-dw-half {
        width: calc(50% - 8px);
    }
    .sama-filter-button-wrapper.desktop-only.pos-top-left {
        justify-content: flex-start;
    }
    .sama-filter-button-wrapper.desktop-only.pos-top-center {
        justify-content: center;
    }
    .sama-filter-button-wrapper.desktop-only.pos-top-right {
        justify-content: flex-end;
    }
}

@media (max-width: 767px) {
    .sama-filter-section.sama-hide-mobile {
        display: none !important;
    }
    .sama-filter-fab {
        left: 50%;
        transform: translateX(-50%);
    }
    .sama-filter-button-wrapper.mobile-only.pos-bottom-left .sama-filter-fab {
        left: 20px;
        transform: none;
    }
    .sama-filter-button-wrapper.mobile-only.pos-bottom-right .sama-filter-fab {
        left: auto;
        right: 20px;
        transform: none;
    }
    .sama-category-desc-bottom #category_desc.hidden-sm-down,
    .sama-category-desc-bottom #category_desc {
        display: flex !important;
    }

    /* Avoid duplicate title: mobile already has .mobile_cat_name at top */
    .sama-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.
   ======================================== */

.sama-filter-root .sama-filter-onpage {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.sama-filter-root .sama-filter-onpage > .sama-onpage-group {
    order: var(--aral-do, 0);
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.sama-filter-popup .sama-filter-body > .sama-filter-section {
    order: var(--aral-do, 0);
    box-sizing: border-box;
}

.sama-filter-root .sama-filter-inline-names > .sama-filter-pill {
    order: var(--aral-do, 0);
}

.sama-filter-root .sama-filter-onpage > .aral-d-full,
.sama-filter-popup .sama-filter-body > .aral-d-full {
    width: 100%;
}

.sama-filter-root .sama-filter-onpage > .aral-d-half,
.sama-filter-popup .sama-filter-body > .aral-d-half {
    width: calc(50% - 6px);
}

.sama-filter-root .sama-filter-onpage > .aral-d-off,
.sama-filter-popup .sama-filter-body > .aral-d-off,
.sama-filter-root .sama-filter-inline-names > .aral-d-off {
    display: none;
}

@media (max-width: 767px) {
    .sama-filter-root .sama-filter-onpage > .sama-onpage-group,
    .sama-filter-popup .sama-filter-body > .sama-filter-section,
    .sama-filter-root .sama-filter-inline-names > .sama-filter-pill {
        order: var(--aral-mo, 0);
    }

    .sama-filter-root .sama-filter-onpage > .aral-m-full,
    .sama-filter-popup .sama-filter-body > .aral-m-full {
        width: 100%;
    }

    .sama-filter-root .sama-filter-onpage > .aral-m-half,
    .sama-filter-popup .sama-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. */
    .sama-filter-root .sama-filter-onpage > .aral-d-off,
    .sama-filter-popup .sama-filter-body > .aral-d-off {
        display: block;
    }

    .sama-filter-root .sama-filter-inline-names > .aral-d-off {
        display: inline-block;
    }

    .sama-filter-root .sama-filter-onpage > .aral-m-off,
    .sama-filter-popup .sama-filter-body > .aral-m-off,
    .sama-filter-root .sama-filter-inline-names > .aral-m-off {
        display: none;
    }
}
