.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 Swatch Styling */
.color-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, 44px);
    gap: 8px;
}

.color-swatch {
    position: relative;
    cursor: pointer;
    display: block;
    /* As a grid item, .color-swatch has no content of its own (the
       checkbox is position:absolute and doesn't count) — without an
       explicit min size, the browser's automatic-minimum-size shrinks it
       well below the .swatch child it contains, so the swatch overflows
       its own grid cell and overlaps the next one. Match .swatch's size. */
    min-width: 40px;
    min-height: 40px;
}

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

.color-swatch .swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
    position: relative;
}

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

.color-swatch input[type="checkbox"]:checked + .swatch::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.color-swatch .swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* For white/light colors, use a checkmark with dark background */
.color-swatch.light-color input[type="checkbox"]:checked + .swatch::after {
    color: #000;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-shadow: none;
}

/* 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 Swatches */
.color-swatches {
    gap: 7px;
    margin-top: 0.5rem;
}

.color-swatch {
    min-width: 28px;
    min-height: 28px;
}

.color-swatch .swatch {
    width: 28px !important;
    height: 28px !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: 992px) {
    .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;
    }
}

/* ═══════════════════════════════════════════════════════════
   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;
}

/* ── 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;
}
