/* Product Filters CSS */
.filter-sidebar {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.filter-group h5 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #555;
}

/* Dropdown Checkbox Styles */
.dropdown-checkbox {
    position: relative;
    width: 100%;
}

.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-toggle:hover {
    border-color: #aaa;
}

.dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #555;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 5px;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-search {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.dropdown-options {
    padding: 5px 0;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 5px 15px;
    display: flex;
    align-items: center;
}

.dropdown-option:hover {
    background-color: #f5f5f5;
}

.dropdown-option input[type="checkbox"] {
    margin-right: 8px;
}

.dropdown-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-top: 1px solid #eee;
}

/* Price Range Styles */
.price-range {
    padding: 10px 0;
}

.price-range .form-group {
    margin-bottom: 15px;
}

.price-range label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.apply-filters, .reset-filters {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.apply-filters {
    background-color: #4CAF50;
    color: white;
    flex: 2;
}

.apply-filters:hover {
    background-color: #3e8e41;
}

.reset-filters {
    background-color: #f1f1f1;
    color: #333;
    flex: 1;
}

.reset-filters:hover {
    background-color: #ddd;
}

/* Color Swatch */
.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 5px;
    border: 1px solid #ddd;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .filter-sidebar {
        margin-bottom: 30px;
    }
}

/* Active Filter Badges */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    background-color: #e9ecef;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.filter-badge .close {
    margin-left: 5px;
    font-size: 1rem;
    cursor: pointer;
}

/* Pagination Styles */
.pagination-container {
    margin-top: 30px;
    margin-bottom: 20px;
}

.pagination .page-link {
    color: #4CAF50;
    border-color: #ddd;
}

.pagination .page-item.active .page-link {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
}

/* Products Header */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.results-count {
    font-size: 0.9rem;
    color: #666;
}

.sort-dropdown {
    width: 200px;
}

.view-options {
    display: flex;
    gap: 5px;
}

.view-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

.view-btn.active {
    background-color: #f1f1f1;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 767px) {
    .mobile-filter-toggle {
        display: block;
    }
    
    .filter-sidebar {
        display: none;
    }
    
    .filter-sidebar.show {
        display: block;
    }
}