.category-sidebar {
    background-color: #f9f9f9;
}
.category-checkbox {
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;    
    cursor: pointer;
}

.category-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #007bff; /* Customize checkbox color */
}

.category-checkbox p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Base modal overlay - hidden by default */
.filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    justify-content: center;
    align-items: center;
}

/* Show modal when active class is added */
.filter-modal.active {
    display: flex;
}

.filter-modal .category-checkbox {
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    background-color: #fff !important;
    display: flex !important;
}

.filter-modal .category-checkbox input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    accent-color: #007bff !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.filter-modal .category-checkbox p {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #333 !important;
    flex: 1 !important;
    line-height: 1.4 !important;
}

/* Style the modal content to match */
.filter-modal .modal-content {
    background: white !important;
    border-radius: 12px !important;
    padding: 20px !important;
    width: 90% !important;
    max-width: 400px !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2) !important;
}

.filter-modal .section-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
}

.filter-modal .item-count {
    background: #007bff !important;
    color: white !important;
    padding: 2px 8px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
}

.filter-modal .btn-close {
    font-size: 24px !important;
    cursor: pointer !important;
    background: transparent !important;
    border: none !important;
}

.filter-modal .btn-primary,
.filter-modal .btn-secondary {
    padding: 8px 16px !important;
    font-size: 14px !important;
}
.btn-close {
    cursor: pointer;
    line-height: 1;
}

/* Price Filter Modal */
#priceModal .modal-content {
    border-radius: 20px !important;
    padding: 1.25rem !important;
}
#priceModal .filter-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    justify-content: center;
    align-items: center;
}
#priceModal.active { display: flex; }

/* Dual range slider */
.slider-track-wrap {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.slider-track {
    position: absolute;
    left: 0; right: 0;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}
.slider-fill {
    position: absolute;
    height: 4px;
    background: #E8821A;
    border-radius: 2px;
}
.slider-track-wrap input[type=range] {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    appearance: none;
    pointer-events: none;
    margin: 0;
}
.slider-track-wrap input[type=range]::-webkit-slider-thumb {
    appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #E8821A;
    border: 3px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    pointer-events: all;
    cursor: grab;
}

/* Price display boxes */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.25rem;
}
.price-box {
    flex: 1;
    border: 1.5px solid #2A8F6C;
    border-radius: 20px;
    padding: 6px 14px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
}

/* Apply button */
#applyPriceFilterBtn {
    width: 100%;
    background: yellow !important;
    color: black !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 12px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* Hide original sidebar on mobile, show filter buttons instead */
@media (max-width: 768px) {
    .primary-sidebar.category-sidebar {
        display: none !important;
    }
    
    /* Make product grid full width on mobile */
    .row.flex-row-reverse .col {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Hide filter buttons on desktop, show on mobile only */
/* Hide filter buttons on desktop, show on mobile only */
.filter-buttons-mobile {
    display: none;
}

@media (max-width: 768px) {
    .filter-buttons-mobile {
        display: flex;
        gap: 8px;
        margin-bottom: 15px;
        width: 100%;
        padding: 0;
    }
    
    .filter-buttons-mobile .btn {
        flex: 1;
        width: 100%;
    }
}