#products-list-root {
    background: #ffffff;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    color: #111;
    position: relative;
}

/* Light Overlay for Readability */
#products-list-root::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    /* Subtle overlay */
    z-index: 0;
}

#products-list-root .container-fluid {
    position: relative;
    z-index: 1;
    /* Keep content above overlay */
}

/* Filter Sidebar */
.filter-sidebar {
    padding-top: 10px;
}

.filter-heading {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
}

.filter-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #111;
    margin-bottom: 15px;
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: #555;
    transition: color 0.2s;
}

.custom-checkbox.disabled-filter {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.custom-checkbox:hover {
    color: #111;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover input~.checkmark {
    border-color: #888;
}

.custom-checkbox input:checked~.checkmark {
    background-color: #111;
    border-color: #111;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text {
    margin-top: 1px;
}

/* Premium Sort Dropdown */
.sort-wrapper.premium-sort {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 8px 18px;
    border-radius: 50px;
    /* Pill Shape */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sort-wrapper.premium-sort:hover {
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.sort-wrapper.premium-sort:focus-within {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.sort-label {
    font-size: 0.75rem;
    color: #888;
    margin-right: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-select-premium {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 22px;
    padding-left: 2px;
    min-width: 140px;
    /* Ensure meaningful width */
}

/* Icon Animation on open is hard with native select, but focus helps */
.sort-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #555;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.sort-wrapper.premium-sort:focus-within .sort-icon {
    transform: translateY(-50%) rotate(180deg);
    color: #111;
}

.product-count {
    font-size: 0.9rem;
    color: #888;
}

/* Price Range Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 6px;
    margin-top: 10px;
}

.slider-track {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    border-radius: 5px;
    position: absolute;
    top: 0;
    left: 0;
}

.slider-track-active {
    height: 100%;
    background: #111;
    position: absolute;
    top: 0;
    border-radius: 5px;
    left: 0;
    right: 0;
    z-index: 1;
}

.range-slider {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2;
}

/* Thumbs */
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #111;
    cursor: pointer;
    pointer-events: all;
    margin-top: -6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.range-slider::-moz-range-thumb {
    height: 18px;
    width: 18px;
    border: 2px solid #111;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.range-slider:focus {
    outline: none;
}

/* Inputs styling override */
.input-group-text,
.form-control {
    font-size: 0.85rem;
}

/* Mobile Filter Sidebar Drawer */
@media (max-width: 767px) {
    .filter-sidebar {
        position: fixed;
        top: 83px;
        left: -100%;
        width: 100%;
        height: calc(100% - 83px);
        background: rgba(0, 0, 0, 0.5);
        z-index: 2005;
        transition: left 0.3s ease;
        padding: 0 !important;
    }

    .filter-sidebar.active {
        left: 0;
    }

    .filter-sidebar-content {
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: #fff;
        padding: 30px 20px;
        padding-bottom: 100px;
        /* Space for fixed bottom button */
        overflow-y: auto;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
    }

    .mobile-filter-actions {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        /* Matches sidebar width */
        padding: 20px;
        background: #fff;
        border-top: 1px solid #f0f0f0;
        z-index: 10;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    }

    .filter-header-mobile {
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 15px;
        margin-bottom: 25px !important;
    }

    #clear-filters-btn-mobile {
        border: none !important;
        text-decoration: none !important;
        box-shadow: none !important;
        padding: 0;
    }

    #clear-filters-btn-mobile:hover,
    #clear-filters-btn-mobile:focus,
    #clear-filters-btn-mobile:active {
        border: none !important;
        outline: none !important;
        color: #111 !important;
    }

    .filter-sidebar .filter-header {
        display: none !important;
        /* Hide the desktop header inside mobile tray */
    }
}

@media (max-width: 480px) {
    .filter-sidebar {
        top: 60px;
        height: calc(100% - 60px);
    }
}