.dual-range-container {
    position: relative;
}

.price-display {
    text-align: center;
}

.range-slider {
    position: relative;
    height: 20px;
    margin: 20px 0;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 20px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    margin: 0;
    padding: 0;
}

.range-slider input[type="range"]::-webkit-slider-track {
    width: 100%;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    position: relative;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    z-index: 2;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-slider input[type="range"]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    border: none;
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-min::-webkit-slider-thumb {
    background: #007bff;
}

.range-max::-webkit-slider-thumb {
    background: #28a745;
}

.range-min::-moz-range-thumb {
    background: #007bff;
}

.range-max::-moz-range-thumb {
    background: #28a745;
}

/* Progress bar between sliders */
.range-slider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #007bff;
    transform: translateY(-50%);
    border-radius: 2px;
    z-index: 1;
}

/* Rating filter star styling */
.rating-filter .form-check-label {
    color: #000000 !important;
    font-weight: 500;
}

.rating-filter .form-check-label i.fas.fa-star.text-warning {
    color: var(--bs-warning) !important;
}

/* View Toggle Styling */
.view-toggle-btn {
    border-radius: 0 !important;
}

.view-toggle-btn:first-child {
    border-top-left-radius: 0.375rem !important;
    border-bottom-left-radius: 0.375rem !important;
}

.view-toggle-btn:last-child {
    border-top-right-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
}

.view-toggle-btn.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* List View Styling */
.products-list .product-card-list {
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    margin-bottom: 1rem;
    background: white;
    transition: box-shadow 0.15s ease-in-out;
    /* Flexbox's default align-items:stretch was stretching the (fixed-size)
       image container to match the taller info column, leaving a gray gap
       below the image itself. Align to the top instead — the info column,
       being the tallest, still determines the row's height either way. */
    align-items: flex-start;
}

.products-list .product-card-list:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
}

.products-list .product-image-list {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 0.375rem 0 0 0.375rem;
}

.products-list .product-info-list {
    padding: 1rem;
    flex: 1;
}

.products-list .product-title-list {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.products-list .product-price-list {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 0.5rem;
}

.products-list .product-description-list {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.products-list .product-actions-list {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.products-list .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Responsive adjustments for list view */
@media (max-width: 768px) {
    .products-list .product-image-list {
        width: 120px;
        height: 120px;
    }
    
    .products-list .product-info-list {
        padding: 0.75rem;
    }
    
    .products-list .product-title-list {
        font-size: 1rem;
    }
    
    .products-list .product-price-list {
        font-size: 1.1rem;
    }
}

/* Wishlist button styling for list view */
.wishlist-btn-product-detail {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #000 !important;
    background-color: transparent !important;
    position: relative;
}

.wishlist-btn-product-detail:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wishlist-btn-product-detail:active {
    transform: scale(0.98);
}

.wishlist-btn-product-detail i {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

/* When wishlisted, heart turns red */
.wishlist-btn-product-detail[data-wishlisted="true"] i {
    color: #dc3545 !important;
}

/* When not wishlisted, heart is black outline */
.wishlist-btn-product-detail[data-wishlisted="false"] i {
    color: #000 !important;
}

/* Disabled state for non-authenticated users */
.wishlist-btn-product-detail:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wishlist-btn-product-detail:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Color Filter - pill + visible name, same shape as the PDP's color chips
   (a dot next to its label instead of a bare swatch a shopper has to
   hover to identify) but wired the same way .size-button/.size-btn are:
   a <label class="color-option"> wraps the checkbox and the visible
   <span class="color-chip">, so multi-select and the rest of this file's
   filter-manager plumbing (syncColorChipState, applyFilterInstant) need
   no new mechanism, just a new look. */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-option {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.color-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.color-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 8px;
    border: 2px solid #dee2e6;
    border-radius: 999px;
    background-color: #fff;
    color: #495057;
    font-weight: 500;
    font-size: 0.8125rem;
    line-height: 1.2;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
}

.color-chip-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex: none;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.color-option input[type="checkbox"]:checked + .color-chip,
.color-chip.is-active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.color-option input[type="checkbox"]:checked + .color-chip .color-chip-dot,
.color-chip.is-active .color-chip-dot {
    border-color: rgba(255, 255, 255, 0.6);
}

.color-chip:hover {
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Smart Color Filter - Show More/Less (mirrors .brand-hidden) */
.color-hidden {
    display: none !important;
}

/* Smart Brand Filter - Show More/Less */
.brand-hidden {
    display: none !important;
}

.brand-option {
    transition: opacity 0.2s ease;
}

/* Size Filter Visual Buttons */
.size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-button {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.size-button input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.size-button .size-btn {
    min-width: 50px;
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    color: #495057;
    font-weight: 500;
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-block;
    user-select: none;
}

.size-button input[type="checkbox"]:checked + .size-btn {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.size-button .size-btn.is-active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25) !important;
}

.size-button .size-btn:hover {
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.size-button .size-btn .size-count {
    display: block;
    font-size: 0.7rem;
    margin-top: 2px;
    opacity: 0.8;
}

.size-button input[type="checkbox"]:checked + .size-btn .size-count {
    opacity: 1;
}

/* Disabled/Out of Stock Sizes */
.size-button .size-btn.disabled {
    background-color: #f8f9fa;
    color: #adb5bd;
    border-color: #dee2e6;
    cursor: not-allowed;
    text-decoration: line-through;
}

.size-button .size-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #dee2e6;
}

/* Compact, Professional Filter Sidebar */
.sticky-filter-sidebar {
    border: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    border-radius: 8px !important;
}

.sticky-filter-sidebar .card-header {
    background: white !important;
    color: #333 !important;
    padding: 0.65rem 0.9rem !important;
    border-radius: 8px 8px 0 0 !important;
    border: none !important;
    border-bottom: 2px solid #e9ecef !important;
}

.sticky-filter-sidebar .card-header h5 {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.sticky-filter-sidebar .card-body {
    padding: 0 !important;
}

/* Filter Sections */
.sticky-filter-sidebar .mb-3 {
    margin-bottom: 0 !important;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 0.9rem;
}

.sticky-filter-sidebar .mb-3:last-child {
    border-bottom: none;
}

/* Compact Form Labels */
.sticky-filter-sidebar .form-label {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 0.5rem !important;
}

/* Compact Form Controls */
.sticky-filter-sidebar .form-control,
.sticky-filter-sidebar .form-select {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.65rem !important;
    border-radius: 4px !important;
    border-color: #e0e0e0 !important;
}

.sticky-filter-sidebar .form-check {
    margin-bottom: 0.45rem !important;
    padding-left: 1.5rem !important;
}

.sticky-filter-sidebar .form-check-label {
    font-size: 0.8rem !important;
    color: #555 !important;
    cursor: pointer;
}

.fulfillment-filter-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.seller-fulfillment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    color: #7a4e00;
    background: linear-gradient(135deg, #fff7d6 0%, #f3d27a 100%);
    border: 1px solid #d8b45a;
    box-shadow: 0 1px 2px rgba(122, 78, 0, 0.15);
    white-space: nowrap;
}

.seller-fulfillment-badge i {
    font-size: 0.66rem;
}

.seller-fulfillment-badge--on-primary {
    color: #533300;
    background: #ffe7a4;
    border-color: #f4d27b;
}

.sticky-filter-sidebar .form-check-input {
    width: 1rem !important;
    height: 1rem !important;
    margin-top: 0.15rem !important;
    cursor: pointer;
}

/* Scrollable Filter Options */
.filter-options {
    max-height: 180px !important;
    overflow-y: auto !important;
    padding-right: 0.25rem;
    margin-top: 0.5rem;
}

.filter-options::-webkit-scrollbar {
    width: 4px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 2px;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Compact Size Buttons */
.size-buttons {
    gap: 5px !important;
    margin-top: 0.5rem;
}

.size-button .size-btn {
    min-width: 40px !important;
    padding: 5px 8px !important;
    font-size: 0.75rem !important;
    border-width: 1.5px !important;
    border-radius: 4px !important;
}

/* Compact Color Filter */
.color-swatches {
    gap: 6px;
    margin-top: 0.5rem;
}

.color-chip {
    padding: 4px 10px 4px 6px !important;
    font-size: 0.75rem !important;
    border-width: 1.5px !important;
}

.color-chip-dot {
    width: 11px !important;
    height: 11px !important;
    border-width: 2px !important;
}

/* Compact Buttons */
.sticky-filter-sidebar .btn-sm {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.7rem !important;
    border-radius: 4px !important;
}

.sticky-filter-sidebar .btn-link {
    font-size: 0.75rem !important;
    text-decoration: none !important;
    padding: 0 !important;
}

.sticky-filter-sidebar .btn-link:hover {
    text-decoration: underline !important;
}

/* Sticky positioning for desktop */
@media (min-width: 1280px) {
    .sticky-filter-sidebar {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sticky-filter-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sticky-filter-sidebar::-webkit-scrollbar-track {
        background: #f5f5f5;
    }

    .sticky-filter-sidebar::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 3px;
    }

    .sticky-filter-sidebar::-webkit-scrollbar-thumb:hover {
        background: #999;
    }
}

.active-filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0 0 1rem;
    padding: .7rem .9rem;
    border: 1px solid #e9ecef;
    border-radius: .5rem;
    background: #fff;
    font-size: .82rem;
}
.active-filter-label { color: #6c757d; font-weight: 600; }
.active-filter-chip {
    border: 1px solid #ced4da;
    border-radius: 999px;
    background: #f8f9fa;
    padding: .18rem .55rem;
    color: #343a40;
    cursor: pointer;
}
.active-filter-chip:hover { background: #e9ecef; }
.active-filter-clear { margin-left: auto; color: #6c757d; text-decoration: underline; }

/* Mobile/Tablet Optimizations */
@media (max-width: 1167.98px) {
    .category-page .row.g-0.px-3 > .col-lg-3.col-md-4.d-none.d-lg-block {
        display: none !important;
    }

    .category-page .row.g-0.px-3 > .products-content-col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .category-page .mobile-filter-toggle-wrap {
        margin-bottom: 0.55rem !important;
    }

    .filter-options {
        max-height: 150px !important;
    }

    .category-page .row.g-0.px-3 {
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }

    .category-page .products-content-col {
        padding-inline-start: 0 !important;
        padding-inline-end: 0 !important;
    }

    .category-page .product-grid-row {
        --bs-gutter-x: 0.55rem;
        --bs-gutter-y: 0.75rem;
    }

    .category-page .products-toolbar {
        display: grid !important;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.35rem;
        margin-bottom: 0.45rem !important;
    }

    .category-page .products-toolbar .results-count {
        grid-column: 1;
        align-self: center;
        margin: 0;
    }

    .category-page .products-toolbar .view-toggle-wrap {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        margin: 0;
    }

    .category-page .products-toolbar .quick-filter-pills {
        grid-column: 1 / -1;
        grid-row: 2;
        gap: 0.4rem !important;
        margin-top: 0.05rem;
    }

    .category-page .products-toolbar .quick-filter-pills .btn {
        padding: 3px 8px !important;
        font-size: 0.72rem !important;
    }
}

/* Phones and tablets: a compact category header, then one slim sticky bar with
   Filter and Sort, quick filters on one light swipeable row, no duplicate count
   or grid/list toggle. */
@media (max-width: 1167.98px) {
    .mobile-filter-toggle-wrap {
        position: sticky;
        top: 0;
        z-index: 30;
        margin: 0 -0.4rem 0.4rem !important;
        padding: 0.45rem 0.4rem;
        background: #fff;
        border-bottom: 1px solid #ececec;
    }

    .mobile-filter-bar {
        display: flex;
        gap: 0.5rem;
    }

    .mobile-filter-bar .mobile-filter-bar-btn {
        position: relative;
        flex: 1 1 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        min-height: 40px;
        padding: 0.4rem 0.75rem;
        border: 1px solid #d9d9d9;
        border-radius: 999px;
        background: #fff;
        color: #111;
        font-size: 0.82rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        box-shadow: none;
    }

    .mobile-filter-bar .mobile-filter-bar-btn .filter-count-badge {
        margin-left: 0.15rem !important;
        border-radius: 999px !important;
        background-color: #111 !important;
    }

    /* The native picker sits invisibly over the Sort button: one tap opens it. */
    .mobile-filter-bar .mobile-sort-btn select {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }

    .products-toolbar .results-count,
    .products-toolbar .view-toggle-wrap {
        display: none !important;
    }

    .products-toolbar .quick-filter-pills {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .products-toolbar .quick-filter-pills::-webkit-scrollbar {
        display: none;
    }

    .products-toolbar .quick-filter-pills .btn {
        flex: 0 0 auto;
        padding: 4px 12px !important;
        border-color: #e2e2e2 !important;
        border-radius: 999px !important;
        color: #333;
        font-size: 0.74rem !important;
        white-space: nowrap;
    }

    .products-toolbar .quick-filter-pills .btn i {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .category-hero {
        padding: 0.7rem 0 0.6rem;
        border-bottom: 0;
    }

    .category-hero .category-hero-breadcrumb {
        display: none;
    }

    .category-hero .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        column-gap: 0.6rem;
    }

    .category-hero .category-hero-title {
        margin: 0;
        font-size: 1.3rem;
        font-weight: 400;
        letter-spacing: 0.06em;
    }

    .category-hero .category-hero-subtitle {
        flex-basis: 100%;
        margin: 0.15rem 0 0;
        order: 3;
    }

    .category-hero .category-hero-count {
        margin: 0;
        font-size: 0.78rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   MODERN CATEGORY PAGE — 2025 refresh
   ═══════════════════════════════════════════════════════════ */

/* ── Category hero ──────────────────────────────────────────── */
.category-hero {
    background: #fff;
    border-bottom: 1px solid #ebebeb;
    padding: 1.15rem 0 1.2rem;
}

.category-hero-breadcrumb {
    font-size: 0.75rem !important;
    color: #aaa !important;
    margin-bottom: 0.9rem !important;
}

.category-hero-breadcrumb .breadcrumb-item a {
    color: #999;
    text-decoration: none;
    transition: color 0.15s;
}

.category-hero-breadcrumb .breadcrumb-item a:hover {
    color: #111;
}

.category-hero-breadcrumb .breadcrumb-item.active {
    color: #666;
}

.category-hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #ccc;
}

.category-hero-title {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 200;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #111;
    margin: 0 0 0.4rem;
    line-height: 1.1;
}

.category-hero-count {
    font-size: 0.72rem;
    color: #aaa;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

/* Shown under the title when a "Shop by Occasion" tile's own label takes
   over the header (see store/views/category.py's active_occasion_label) -
   the category name is demoted here rather than hidden, so a shopper
   still knows which category they're browsing within. */
.category-hero-subtitle {
    font-size: 0.95rem;
    color: #777;
    letter-spacing: 0.04em;
    margin: 0 0 0.4rem;
}

/* ── Product card — hover zoom & lift ───────────────────────── */
.product-card {
    border-color: #e8e8e8 !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07) !important;
    border-color: #dee2e6 !important;
}

.product-card .image-container {
    overflow: hidden !important;
}

.product-card .image-container img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.product-card:hover .image-container img {
    transform: scale(1.05);
}

/* ── Filter sidebar — uppercase section labels ───────────────── */
.sticky-filter-sidebar .mb-3 > .form-label.fw-bold {
    font-size: 0.68rem !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: #999 !important;
    font-weight: 700 !important;
}

/* ── Quick filter pills — pill shape ────────────────────────── */
.quick-filter-pills .btn {
    border-radius: 999px !important;
    font-weight: 500 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.02em !important;
    border-width: 1px !important;
    transition: all 0.18s ease !important;
}

.quick-filter-pills .btn:hover {
    background-color: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}

/* ── Toolbar — subtle bottom border ─────────────────────────── */
.category-page .products-toolbar {
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 1rem !important;
}

/* ── Active filter chips — pill style ───────────────────────── */
.category-page [class*="mb-2"] > .badge.bg-primary {
    border-radius: 999px !important;
    font-weight: 500 !important;
    font-size: 0.72rem !important;
    background-color: #111 !important;
}

.category-page [class*="mb-2"] > .btn-outline-danger {
    border-radius: 999px !important;
    font-size: 0.72rem !important;
}

/* Filter and Sort bottom sheets: styles live in base_mobile.css (shared with the brands page). */

/* ── Phones: compact search results header, and one set of grid margins for every
   listing page (category, search, brand, seller store) ── */
@media (max-width: 767.98px) {
    .search-page nav[aria-label="breadcrumb"] {
        display: none;
    }

    .search-page .search-results-header {
        margin: 0.75rem 0 0.35rem !important;
    }

    .search-page .search-results-header .h4 {
        font-size: 1.15rem;
        letter-spacing: 0.02em;
        text-transform: none;
    }

    .search-page .search-results-header hr {
        display: none;
    }

    .row.g-0.px-3:has(> .products-content-col) {
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }

    .products-content-col {
        padding-inline-start: 0 !important;
        padding-inline-end: 0 !important;
    }

    .product-grid-row.listing-grid {
        --bs-gutter-x: 0.55rem;
        --bs-gutter-y: 0.75rem;
    }
}

/* ── Mobile filter sheet: collapsible sections, chips, switches, live count ──
   Markup: store/templates/store/unified_filtering.html (#mobileFilterCollapse);
   behaviour: MobileFilterSheet in static/js/unified_filtering.js. */
@media (max-width: 991.98px) {
    #mobileFilterCollapse .mf-section {
        border-bottom: 1px solid #f0f0f0;
    }

    #mobileFilterCollapse .mf-summary {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        min-height: 54px;
        padding: 0.25rem 0;
        list-style: none;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    #mobileFilterCollapse .mf-summary::-webkit-details-marker {
        display: none;
    }

    #mobileFilterCollapse .mf-title {
        flex: none;
        font-size: 0.95rem;
        font-weight: 600;
        color: #111;
    }

    #mobileFilterCollapse .mf-selected {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        color: #6c757d;
        font-size: 0.85rem;
        text-align: end;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #mobileFilterCollapse .mf-chevron {
        flex: none;
        color: #999;
        font-size: 0.8rem;
        transition: transform 0.2s ease;
    }

    #mobileFilterCollapse .mf-section[open] .mf-chevron {
        transform: rotate(180deg);
    }

    #mobileFilterCollapse .mf-body {
        position: relative;
        padding: 0.25rem 0 1rem;
    }

    #mobileFilterCollapse .mf-clear {
        display: block;
        margin: -0.25rem 0 0.5rem auto;
        padding: 0;
        border: 0;
        background: none;
        color: #111;
        font-size: 0.8rem;
        font-weight: 600;
        text-decoration: underline;
    }

    #mobileFilterCollapse .mf-clear[hidden] {
        display: none;
    }

    /* Brand and product type: chips, like colour and size (no inner scroll box). */
    #mobileFilterCollapse #brand-filter-mobile,
    #mobileFilterCollapse #product-type-filter-mobile {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #mobileFilterCollapse .brand-option,
    #mobileFilterCollapse .product-type-option {
        position: relative;
        margin: 0;
        padding: 0;
    }

    #mobileFilterCollapse .brand-option .form-check-input,
    #mobileFilterCollapse .product-type-option .form-check-input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    #mobileFilterCollapse .brand-option .form-check-label,
    #mobileFilterCollapse .product-type-option .form-check-label {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 7px 14px;
        border: 1px solid #d9d9d9;
        border-radius: 999px;
        background: #fff;
        color: #333;
        font-size: 0.85rem;
        cursor: pointer;
        user-select: none;
    }

    #mobileFilterCollapse .brand-option .form-check-label .text-muted,
    #mobileFilterCollapse .product-type-option .form-check-label .text-muted {
        font-size: 0.75rem !important;
    }

    #mobileFilterCollapse .brand-option:has(.form-check-input:checked) .form-check-label,
    #mobileFilterCollapse .product-type-option:has(.form-check-input:checked) .form-check-label {
        border-color: #111;
        background: #111;
        color: #fff;
    }

    #mobileFilterCollapse .brand-option:has(.form-check-input:checked) .text-muted,
    #mobileFilterCollapse .product-type-option:has(.form-check-input:checked) .text-muted {
        color: rgba(255, 255, 255, 0.7) !important;
    }

    #mobileFilterCollapse .brand-option:has(.form-check-input:focus-visible) .form-check-label,
    #mobileFilterCollapse .product-type-option:has(.form-check-input:focus-visible) .form-check-label {
        outline: 2px solid #111;
        outline-offset: 2px;
    }

    /* Price: one two-handle slider; the number inputs stay in the DOM for Apply. */
    #mobileFilterCollapse .mf-price-inputs {
        display: none;
    }

    /* Sale and rating: options as chips in a row instead of a radio list. */
    #mobileFilterCollapse .mf-section[data-mf="sale"] .mf-body,
    #mobileFilterCollapse .mf-section[data-mf="rating"] .mb-2 {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    #mobileFilterCollapse .mf-section[data-mf="sale"] .mf-clear {
        flex-basis: 100%;
    }

    #mobileFilterCollapse .mf-section[data-mf="sale"] .form-check,
    #mobileFilterCollapse .mf-section[data-mf="rating"] .form-check {
        position: relative;
        margin: 0;
        padding: 0;
    }

    #mobileFilterCollapse .mf-section[data-mf="sale"] .form-check-input,
    #mobileFilterCollapse .mf-section[data-mf="rating"] .form-check-input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    #mobileFilterCollapse .mf-section[data-mf="sale"] .form-check-label,
    #mobileFilterCollapse .mf-section[data-mf="rating"] .form-check-label {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        padding: 7px 14px;
        border: 1px solid #d9d9d9;
        border-radius: 999px;
        font-size: 0.85rem;
        cursor: pointer;
    }

    #mobileFilterCollapse .mf-section[data-mf="sale"] .form-check:has(.form-check-input:checked) .form-check-label,
    #mobileFilterCollapse .mf-section[data-mf="rating"] .form-check:has(.form-check-input:checked) .form-check-label {
        border-color: #111;
        background: #111;
        color: #fff;
    }

    /* In stock / delivery: switches at the bottom, no section of their own. */
    #mobileFilterCollapse .mf-switches {
        padding: 0.5rem 0;
    }

    #mobileFilterCollapse .mf-switch-row .form-switch {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: space-between;
        min-height: 48px;
        margin: 0;
        padding: 0;
    }

    #mobileFilterCollapse .mf-switch-row .form-switch .form-check-input {
        float: none;
        width: 2.6em;
        height: 1.4em;
        margin: 0;
        cursor: pointer;
    }

    #mobileFilterCollapse .mf-switch-row .form-switch .form-check-input:checked {
        border-color: #111;
        background-color: #111;
    }

    #mobileFilterCollapse .mf-switch-row .form-check-label {
        font-size: 0.95rem;
        font-weight: 600;
        color: #111;
    }

    /* Footer: Reset + "Show N items", always visible. */
    #mobileFilterCollapse .mf-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        display: flex;
        gap: 10px;
        margin: 0 -1rem;
        padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #f0f0f0;
    }

    #mobileFilterCollapse .mf-reset {
        flex: 0 0 auto;
        padding: 0.7rem 1rem;
        border: 1px solid #d9d9d9;
        border-radius: 8px;
        background: #fff;
        color: #111;
        font-weight: 600;
    }

    #mobileFilterCollapse .mf-apply {
        flex: 1;
        padding: 0.7rem 1rem;
        border: 0;
        border-radius: 8px;
        background: #111;
        color: #fff;
        font-weight: 600;
    }

    #mobileFilterCollapse .mf-apply.is-loading {
        opacity: 0.75;
    }

    #mobileFilterCollapse .mf-apply.is-empty {
        background: #9a9a9a;
    }
}
