/* CSS pour Plugin Filtrage E-commerce - Version Améliorée */

.filtrage-ecommerce-container {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.filtrage-sidebar {
    width: 320px; /* Légèrement plus large */
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    height: fit-content;
    position: sticky;
    top: 20px;
    max-height: 90vh; /* Limite la hauteur totale */
    overflow-y: auto; /* Scroll global si nécessaire */
}

.filtrage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007cba;
}

.filtrage-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.25rem;
}

.filtrage-products-container {
    flex: 1;
    position: relative;
}

.filtrage-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.results-info {
    font-weight: 500;
    color: #495057;
}

.sorting-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sorting-options label {
    font-weight: 500;
    color: #495057;
}

.sorting-options select {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.products-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.products-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.products-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.products-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.products-grid[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

.product-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
    background: #f8f9fa;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
    line-height: 1.4;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 15px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6c757d;
    flex-grow: 1;
    align-items: flex-end;
}

.product-link {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
    font-weight: 500;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

.product-link:hover {
    background: #005a87;
    color: white;
}

/* Masquer les éléments indésirables */
.product-categories {
    display: none !important;
}

.product-category {
    display: none !important;
}

.product-rating {
    display: none !important;
}

.product-rating .stars {
    display: none !important;
}

.stock-status {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stock-status.instock {
    display: none;
}

.stock-status.outofstock {
    background: #f8d7da;
    color: #721c24;
}

/* ========== AMÉLIORATIONS POUR LES FILTRES ========== */

/* Groupe de filtres */
.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
}

.filter-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

/* Titre des filtres avec indicateur de collapse */
.filter-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #495057;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    transition: all 0.3s ease;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e9ecef;
    position: relative;
}

.filter-title:hover {
    background: #f8f9fa;
    border-color: #007cba;
    color: #007cba;
}

.filter-title::after {
    content: "▼";
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: #007cba;
}

.filter-title.collapsed::after {
    transform: rotate(-90deg);
}

/* Conteneur des options de filtres - AMÉLIORATION MAJEURE */
.filter-options {
    max-height: 400px; /* Augmenté de 300px à 400px */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    margin-top: 8px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
    position: relative;
}

/* Scrollbar personnalisée pour les filtres */
.filter-options::-webkit-scrollbar {
    width: 8px; /* Légèrement plus large */
}

.filter-options::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
    margin: 4px 0;
}

.filter-options::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #007cba 0%, #005a87 100%);
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #005a87 0%, #004060 100%);
}

/* Indicateur de scroll */
.filter-options::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 124, 186, 0.3), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-options.scrollable::before {
    opacity: 1;
}

.filter-options::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 124, 186, 0.3), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-options.scrollable::after {
    opacity: 1;
}

/* Structure des blocs de catégories - AMÉLIORÉE */
.category-block {
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.category-block:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-color: #007cba;
}

.category-block:last-child {
    margin-bottom: 0;
}

/* Catégorie parente - AMÉLIORÉE */
.filter-checkbox.parent-category {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
    padding: 12px 15px;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.filter-checkbox.parent-category:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.filter-checkbox.parent-category input[type="checkbox"]:checked ~ .label {
    color: #007cba;
    font-weight: 700;
}

/* Flèche de toggle - AMÉLIORÉE */
.toggle-children {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #007cba;
    font-size: 14px;
    transition: all 0.3s ease;
    user-select: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 124, 186, 0.1);
    border-radius: 50%;
}

.toggle-children:hover {
    background: rgba(0, 124, 186, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.toggle-children.collapsed {
    transform: translateY(-50%) rotate(-90deg);
}

.toggle-children.collapsed:hover {
    transform: translateY(-50%) rotate(-90deg) scale(1.1);
}

/* Conteneur des enfants - AMÉLIORÉ */
.children-categories {
    background: #fff;
    padding: 5px 0;
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 300px; /* Limite de hauteur pour les enfants */
    border-top: 1px solid #f8f9fa;
}

.children-categories.collapsed {
    max-height: 0;
    padding: 0;
    border-top: none;
}

/* Scroll interne pour les enfants si nécessaire */
.children-categories {
    overflow-y: auto;
}

.children-categories::-webkit-scrollbar {
    width: 6px;
}

.children-categories::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.children-categories::-webkit-scrollbar-thumb {
    background: #007cba;
    border-radius: 3px;
}

.children-categories .filter-checkbox {
    padding: 8px 15px;
    margin-bottom: 2px;
    border-bottom: none;
    transition: all 0.3s ease;
}

.children-categories .filter-checkbox:hover {
    background: #f8f9fa;
    padding-left: 20px;
}

/* Ajustements pour les niveaux dans les blocs */
.children-categories .filter-checkbox.level-1 {
    padding-left: 25px;
    border-left: 3px solid transparent;
}

.children-categories .filter-checkbox.level-1:hover {
    border-left-color: #007cba;
    padding-left: 30px;
}

.children-categories .filter-checkbox.level-2 {
    padding-left: 40px;
    border-left: 3px solid transparent;
}

.children-categories .filter-checkbox.level-2:hover {
    border-left-color: #17a2b8;
    padding-left: 45px;
}

.children-categories .filter-checkbox.level-3 {
    padding-left: 55px;
    border-left: 3px solid transparent;
}

.children-categories .filter-checkbox.level-3:hover {
    border-left-color: #28a745;
    padding-left: 60px;
}

/* Styles pour les checkboxes dans les catégories */
.filter-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 8px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.filter-checkbox.level-0 {
    padding-left: 6px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.filter-checkbox.level-1 {
    padding-left: 25px;
    font-weight: 500;
}

.filter-checkbox.level-2 {
    padding-left: 45px;
    font-weight: 400;
}

.filter-checkbox.level-3 {
    padding-left: 65px;
    font-weight: 400;
}

/* Icônes et images pour les catégories - AMÉLIORÉES */
.filter-checkbox .category-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

/* Images pour catégories principales */
.filter-checkbox.level-0 .category-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    margin-right: 12px;
}

.filter-checkbox.level-0 .category-icon.has-image {
    border-color: #007cba;
}

/* Icônes par défaut avec dégradés */
.filter-checkbox.level-0 .category-icon.no-image {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    position: relative;
}

.filter-checkbox.level-0 .category-icon.no-image::after {
    content: "📦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

.filter-checkbox.level-1 .category-icon.no-image {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    width: 18px;
    height: 18px;
}

.filter-checkbox.level-2 .category-icon.no-image,
.filter-checkbox.level-3 .category-icon.no-image {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    width: 16px;
    height: 16px;
}

/* Amélioration des checkboxes */
.filter-checkbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #007cba;
    cursor: pointer;
}

.filter-checkbox.level-0 input[type="checkbox"] {
    transform: scale(1.3);
}

/* Hover states différenciés et améliorés */
.filter-checkbox.level-0:hover {
    background: linear-gradient(135deg, rgba(0, 124, 186, 0.1) 0%, rgba(0, 124, 186, 0.05) 100%);
    border-radius: 6px;
    padding-left: 10px;
}

.filter-checkbox.level-1:hover,
.filter-checkbox.level-2:hover,
.filter-checkbox.level-3:hover {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(23, 162, 184, 0.05) 100%);
    border-radius: 4px;
}

/* Labels améliorés */
.filter-checkbox .label {
    flex: 1;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.filter-checkbox.level-0 .label {
    font-size: 0.95rem;
}

.filter-checkbox .count {
    color: #6c757d;
    font-size: 0.8rem;
    margin-left: auto;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.filter-checkbox:hover .count {
    background: #e9ecef;
}

.filter-checkbox input[type="checkbox"]:checked ~ .label {
    color: #007cba;
    font-weight: 600;
}

.filter-checkbox input[type="checkbox"]:checked ~ .count {
    background: #007cba;
    color: white;
}

/* Recherche rapide dans les catégories */
.category-search {
    margin-bottom: 10px;
    position: relative;
}

.category-search input {
    width: 100%;
    padding: 8px 12px 8px 35px;
    border: 1px solid #ced4da;
    border-radius: 20px;
    font-size: 0.9rem;
    background: #fff;
    transition: all 0.3s ease;
}

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

.category-search::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #6c757d;
}

/* Filtre prix amélioré */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.price-inputs input[type="number"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.price-inputs input[type="number"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.price-separator {
    color: #6c757d;
    font-weight: 500;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 50%;
    font-size: 0.8rem;
}

.price-range-info {
    text-align: center;
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.price-range-info small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Boutons améliorés */
.btn-clear-filters {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-clear-filters:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

/* Compteur de filtres actifs */
.filter-count {
    background: #6c757d;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    min-width: 22px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-group.has-active-filters .filter-count {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.filter-group.has-active-filters .filter-title {
    color: #007cba;
    font-weight: 700;
    border-color: #007cba;
    background: rgba(0, 124, 186, 0.05);
}

/* Filtres actifs */
.active-filters {
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.active-filters h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #495057;
    font-weight: 600;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.active-filter-tag {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
    transition: all 0.3s ease;
}

.active-filter-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.4);
}

.active-filter-tag .remove {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    transition: all 0.3s ease;
}

.active-filter-tag .remove:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Transitions et animations fluides */
.filter-options {
    transition: all 0.3s ease;
    overflow: hidden;
}

.filter-options.collapsed {
    max-height: 0;
    padding: 0;
    border: none;
    margin-top: 0;
}

/* Loading amélioré */
.filtrage-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(3px);
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.filtrage-loading p {
    color: #495057;
    font-weight: 500;
    margin: 0;
}

/* Messages améliorés */
.filtrage-messages {
    margin-bottom: 20px;
}

.filter-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.filter-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.filter-message.info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.filter-message .close {
    margin-left: auto;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.filter-message .close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Pagination améliorée */
.filtrage-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px 0;
}

.pagination-button {
    padding: 10px 15px;
    border: 1px solid #007cba;
    background: #fff;
    color: #007cba;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.1);
}

.pagination-button:hover {
    background: #007cba;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.pagination-button.current {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 15px;
    font-weight: 500;
}

/* Pas de produits amélioré */
.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    grid-column: 1 / -1;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.no-products h3 {
    margin-bottom: 15px;
    color: #495057;
}

.no-products p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Badges produits améliorés */
.product-card.on-sale::before {
    content: "PROMO";
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
    transform: rotate(3deg);
}

.product-card.new-product::after {
    content: "NOUVEAU";
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4);
    transform: rotate(-3deg);
}

.product-card.on-sale.new-product::after {
    top: 55px;
}

/* Focus states améliorés pour accessibilité */
.filter-checkbox input[type="checkbox"]:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.product-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.btn-clear-filters:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

/* Responsive Design amélioré */
@media (max-width: 1200px) {
    .filtrage-sidebar {
        width: 300px;
    }
    
    .products-grid[data-columns="6"],
    .products-grid[data-columns="5"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .filtrage-ecommerce-container {
        flex-direction: column;
    }
    
    .filtrage-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
        max-height: none;
        padding: 20px;
    }
    
    .filter-options {
        max-height: 250px;
    }
    
    .products-grid[data-columns="4"],
    .products-grid[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filtrage-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .sorting-options {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .products-grid,
    .products-grid[data-columns="2"],
    .products-grid[data-columns="3"],
    .products-grid[data-columns="4"],
    .products-grid[data-columns="5"],
    .products-grid[data-columns="6"] {
        grid-template-columns: 1fr;
    }
    
    .filtrage-sidebar {
        padding: 15px;
    }
    
    .filter-options {
        max-height: 200px;
    }
    
    .category-block {
        margin-bottom: 8px;
    }
    
    .filter-checkbox.parent-category {
        padding: 10px 12px;
    }
    
    .product-card {
        padding: 15px;
    }
    
    .filtrage-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        text-align: center;
    }
    
    .price-inputs {
        flex-direction: column;
        gap: 8px;
    }
    
    .price-separator {
        display: none;
    }
    
    .filtrage-pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-info {
        order: -1;
        width: 100%;
        text-align: center;
        margin: 0 0 15px 0;
    }
}

@media (max-width: 480px) {
    .filtrage-ecommerce-container {
        margin: 10px 0;
        gap: 15px;
    }
    
    .filtrage-sidebar {
        padding: 12px;
    }
    
    .filter-options {
        max-height: 180px;
    }
    
    .category-block {
        margin-bottom: 6px;
    }
    
    .filter-checkbox.parent-category {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .children-categories .filter-checkbox {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
    
    .active-filters {
        padding: 15px;
    }
    
    .active-filter-tag {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

/* Animations fluides */
.product-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.product-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }
.product-card:nth-child(9) { animation-delay: 0.9s; }
.product-card:nth-child(10) { animation-delay: 1.0s; }
.product-card:nth-child(11) { animation-delay: 1.1s; }
.product-card:nth-child(12) { animation-delay: 1.2s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation pour les filtres */
.filter-checkbox {
    animation: slideInLeft 0.3s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Masquer les badges natifs pour éviter les conflits */
.woocommerce-badges,
.product-badges,
.badges,
.sale-flash,
.onsale,
.woocommerce span.onsale,
.woocommerce ul.products li.product .onsale,
.product-card .onsale,
.new-badge,
.nouveau,
.new-product-badge {
    display: none !important;
}

.filtrage-ecommerce-container .product-card .sale-flash,
.filtrage-ecommerce-container .product-card .onsale,
.filtrage-ecommerce-container .product-card .new-badge,
.filtrage-ecommerce-container .product-card .nouveau,
.filtrage-ecommerce-container .product-card [class*="badge"],
.filtrage-ecommerce-container .product-card [class*="promo"],
.filtrage-ecommerce-container .product-card [class*="nouveau"],
.filtrage-ecommerce-container .product-card [class*="new"] {
    display: none !important;
}

.filtrage-ecommerce-container .product-card.on-sale::before,
.filtrage-ecommerce-container .product-card.new-product::after {
    display: block !important;
}

/* Effet de survol pour les blocs de catégories */
.category-block:hover .filter-checkbox.parent-category {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.category-block:hover .filter-checkbox.parent-category .category-icon {
    transform: scale(1.1);
}

/* Amélioration de la visibilité des éléments sélectionnés */
.filter-checkbox input[type="checkbox"]:checked + .checkmark + .category-icon {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

/* Indicateurs visuels pour les catégories avec des sous-catégories */
.filter-checkbox.parent-category .label::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #007cba;
    border-radius: 50%;
    margin-left: 8px;
    opacity: 0.6;
}

/* Ajout d'un effet de pulsation pour les filtres actifs */
.filter-group.has-active-filters .filter-title {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0.4);
    }
    70% {
        box-shadow: 0 0 0 4px rgba(0, 124, 186, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0);
    }
}
