/* WooCommerce Custom Filters - Styles */

.wcf-filters-widget {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wcf-filters-widget.wcf-filtering {
    opacity: 0.7;
    pointer-events: none;
}

/* Sections de filtres */
.wcf-filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.wcf-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 15px;
}

.wcf-filter-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.wcf-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcf-toggle:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.wcf-filter-content {
    overflow: hidden;
}

/* Filtre par prix */
.wcf-price-range {
    margin: 15px 0;
}

.wcf-price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.wcf-price-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    background: #fff;
    transition: border-color 0.2s ease;
}

.wcf-price-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.wcf-price-separator {
    color: #666;
    font-weight: 500;
}

.wcf-price-slider-container {
    position: relative;
    margin: 20px 0;
}

.wcf-price-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: 10px 0;
}

.wcf-price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.wcf-price-slider::-webkit-slider-thumb:hover {
    background: #005a87;
    transform: scale(1.1);
}

.wcf-price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Filtre par marques */
.wcf-brand-search {
    margin-bottom: 15px;
}

.wcf-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.wcf-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.wcf-brand-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    padding: 10px;
    background: #fafafa;
}

.wcf-brand-list::-webkit-scrollbar {
    width: 6px;
}

.wcf-brand-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wcf-brand-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.wcf-brand-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.wcf-brand-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.wcf-brand-item:last-child {
    border-bottom: none;
}

.wcf-brand-item:hover {
    background-color: rgba(0, 124, 186, 0.05);
}

.wcf-brand-checkbox {
    margin-right: 10px;
    cursor: pointer;
}

.wcf-brand-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.wcf-product-count {
    color: #666;
    font-size: 12px;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* Actions */
.wcf-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.wcf-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.wcf-btn-primary {
    background-color: #007cba;
    color: white;
}

.wcf-btn-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
}

.wcf-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.wcf-btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

/* Résultats */
.wcf-results-info {
    text-align: center;
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    color: #0066cc;
    font-weight: 600;
    font-size: 14px;
}

/* Loading */
.wcf-loading {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    margin: 15px 0;
}

.wcf-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: wcf-spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes wcf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages d'erreur */
.wcf-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcf-error-icon {
    font-size: 18px;
    color: #dc3545;
}

.wcf-error-text {
    flex: 1;
    font-size: 14px;
}

.wcf-error-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #721c24;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcf-error-close:hover {
    background: rgba(114, 28, 36, 0.1);
    border-radius: 50%;
}

/* Produits filtrés */
.wcf-no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.wcf-product-brands {
    font-size: 12px;
    color: #007cba;
    margin: 5px 0;
    font-weight: 500;
}

.wcf-product-rating {
    color: #ffc107;
    font-size: 14px;
    margin: 5px 0;
}

.wcf-no-image {
    background: #f0f0f0;
    padding: 40px 20px;
    text-align: center;
    color: #999;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .wcf-filters-widget {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .wcf-filter-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .wcf-price-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .wcf-price-separator {
        display: none;
    }
    
    .wcf-filter-actions {
        flex-direction: column;
    }
    
    .wcf-btn {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .wcf-filters-widget {
        padding: 12px;
    }
    
    .wcf-filter-title {
        font-size: 14px;
    }
    
    .wcf-brand-list {
        max-height: 180px;
    }
}
