/* Custom Product Filters CSS */
/* Create a file: /css/custom-filters.css in your theme directory */

.custom-product-filters {
    background: #f8f9fb;
    padding: 20px;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.filter-header h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding: 0;
}

.filter-group {
    margin-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
}

.filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.filter-title {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    user-select: none;
    transition: all 0.2s ease;
}

.filter-title:hover {
    background: rgba(139, 69, 195, 0.05);
    border-radius: 4px;
    margin: 0 -5px;
    padding: 10px 5px;
}

.filter-count {
    background: #8b45c3;
    color: white;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
    padding: 0 8px;
}

.filter-icon {
    font-size: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.filter-label {
    color: #6b21a8;
    font-weight: 500;
    flex-grow: 1;
    font-size: 14px;
}

.filter-toggle {
    color: #8b45c3;
    font-size: 20px;
    font-weight: 300;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.filter-options {
    padding-left: 42px;
    margin-top: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
    padding: 5px 0;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(139, 69, 195, 0.05);
    border-radius: 4px;
    margin: 0 -5px 8px -5px;
    padding: 5px;
}

.filter-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.filter-option input[type="checkbox"]:checked + .checkmark {
    background: #8b45c3;
    border-color: #8b45c3;
}

.filter-option input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.option-text {
    flex-grow: 1;
    color: #374151;
    font-size: 13px;
}

.option-count {
    color: #9ca3af;
    font-size: 12px;
    margin-left: auto;
}

.filter-actions {
    display: none; /* Hidden since we removed the buttons */
}

/* Loading state */
.elementor-loop-container.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.elementor-loop-container.loading::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

/* Responsive design */
@media (max-width: 768px) {
    .custom-product-filters {
        padding: 15px;
    }
    
    .filter-options {
        padding-left: 30px;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .clear-filters, .apply-filters {
        width: 100%;
    }
}

/* Animation for filter toggle */
.filter-title.active .filter-toggle {
    transform: rotate(45deg);
}

/* Checked state highlighting */
.filter-group.has-selections .filter-title {
    background: rgba(139, 69, 195, 0.1);
    border-radius: 4px;
    margin: 0 -5px;
    padding: 10px 5px;
}

.filter-group.has-selections .filter-count {
    background: #059669;
}

/* Prevent layout shifts */
.custom-product-filters {
    position: relative;
    z-index: 1;
}

/* Ensure filter container doesn't affect other elements */
.no-results-message {
    clear: both;
    display: block !important;
    margin: 20px 0;
}