/* ===========================================
   FILTRES DE PRODUITS - LAYOUT HORIZONTAL
   =========================================== */

.shop-filters-container {
    /* position: relative; */
    display: flex;
    align-items: center;
    overflow: hidden;
    position: sticky;
    top: 60px;
    z-index: 999;
    background-color: white;
}

.filters-scroll-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.filters-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0% 8px;
    min-width: max-content;
}

/* ===========================================
   BOUTONS DE NAVIGATION GAUCHE/DROITE
   =========================================== */

.filter-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #764ba2;
    border-radius: 50%;
    color: #764ba2;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(137, 43, 226, 0.15);
    backdrop-filter: blur(10px);
}

.filter-nav-btn:hover {
    background: #764ba2;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(137, 43, 226, 0.25);
}

.filter-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.filter-nav-left {
    left: 0;
}

.filter-nav-right {
    right: 0;
}

/* Masquer les boutons si pas nécessaires */
.filter-nav-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ===========================================
   ÉLÉMENTS DE FILTRE
   =========================================== */

.filter-item {
    position: relative;
    flex-shrink: 0;
}

/* Wrapper pour les éléments select */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid #e6e9ef;
    border-radius: 24px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.select-wrapper.is-custom {
    border-color: #764ba2;
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.08) 0%, rgba(102, 126, 234, 0.08) 100%);
    box-shadow: 0 4px 12px rgba(137, 43, 226, 0.12);
}

.select-wrapper.is-custom .select-icon,
.select-wrapper.is-custom .select-chevron {
    color: #4b2991;
}

.select-wrapper.is-custom .filter-select {
    color: #4b2991;
}

.select-icon,
.select-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #764ba2;
    font-size: 14px;
    pointer-events: none;
}

/* Style pour les éléments select */
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.9); 
    border: none;
    border-radius: 24px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(5px);
    min-width: 120px;
}

.filter-select option {
    background: #ffffff;
    color: #333;
    font-weight: 600;
}

.filter-select option:checked {
    background: #764ba2;
    color: #ffffff;
}

.filter-select option:hover {
    background: #f1ecff;
    color: #4b2991;
}

.filter-select:hover {
    background: rgba(255, 255, 255, 1);
}

.filter-select:focus {
    outline: none;
}

.select-wrapper:hover {
    border-color: #764ba2;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(137, 43, 226, 0.15);
}

.select-wrapper:focus-within {
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
    background: white;
}





.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e6e9ef;
    border-radius: 24px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    user-select: none;
    backdrop-filter: blur(5px);
}

.filter-btn:hover {
    border-color: #764ba2;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(137, 43, 226, 0.15);
}

.filter-btn:active {
    transform: translateY(0);
}

.filter-btn i {
    font-size: 12px;
    transition: all 0.3s ease;
}

.filter-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===========================================
   ÉTATS DES BOUTONS
   =========================================== */

/* Bouton actif (sélectionné) */
.filter-btn.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #764ba2;
    color: white;
    box-shadow: 0 4px 16px rgba(137, 43, 226, 0.3);
}

.filter-btn.active:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(137, 43, 226, 0.4);
}

/* Icône de check pour les filtres toggle */
.filter-check {
    display: none;
    color: #00ff88;
    font-size: 12px;
    animation: checkFadeIn 0.3s ease;
}

.filter-btn.active .filter-check {
    display: block;
}

@keyframes checkFadeIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* ===========================================
   DROPDOWNS
   =========================================== */

.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(137, 43, 226, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    /* padding: 12px 16px; */
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    /* border-bottom: 1px solid #f5f5f5; */
    font-size: 14px;
    font-weight: 500;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f8f8ff 0%, #e6e9ef 100%);
    color: #764ba2;
    padding-left: 20px;
}

.dropdown-item.selected {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    font-weight: 600;
}

/* ===========================================
   MODAL PRIX
   =========================================== */

.price-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.price-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(137, 43, 226, 0.2);
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e6e9ef;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #ff4757;
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.price-input-group input {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e6e9ef;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.price-input-group input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
    background: white;
}

.currency {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    margin-top: 4px;
}

.price-ranges h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.price-range-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.price-range-btn {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e6e9ef;
    border-radius: 12px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.price-range-btn:hover {
    border-color: #764ba2;
    background: rgba(118, 75, 162, 0.1);
    color: #764ba2;
    transform: translateY(-2px);
}

.price-range-btn.selected {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #764ba2;
    color: white;
    box-shadow: 0 4px 16px rgba(137, 43, 226, 0.3);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e6e9ef;
    background: #f8f8ff;
}

.btn-secondary,
.btn-primary {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e6e9ef;
    color: #333;
}

.btn-primary {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 43, 226, 0.4);
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 768px) {
    .shop-filters-container {
        padding: 0%;
    }

    .filters-row {
        gap: 8px;
    }

    .filter-btn {
        font-size: 13px;
        border-radius: 20px;
    }

    .filter-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .filter-nav-left {
        left: 4px;
    }

    .filter-nav-right {
        right: 4px;
    }

    .filter-nav-btn {
        display: none;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
        border-radius: 16px;
    }

    .price-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .price-range-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .price-range-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .filter-btn .filter-text {
        display: inline;
    }

    .filter-btn {
        padding: 8px 12px;
        min-width: auto;
        justify-content: center;
    }

    .price-range-buttons {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   ANIMATIONS ET TRANSITIONS
   =========================================== */

.filter-item {
    animation: filterFadeIn 0.5s ease;
}

@keyframes filterFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.filters-scroll-container {
    scroll-behavior: smooth;
}

/* Effet de pulsation pour les filtres actifs */
.filter-btn.active {
    animation: filterPulse 2s infinite;
}

@keyframes filterPulse {
    0% { box-shadow: 0 4px 16px rgba(137, 43, 226, 0.3); }
    50% { box-shadow: 0 6px 20px rgba(137, 43, 226, 0.4); }
    100% { box-shadow: 0 4px 16px rgba(137, 43, 226, 0.3); }
}

/* ===========================================
   ÉTATS SPÉCIAUX
   =========================================== */

.filter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.filter-btn.loading {
    position: relative;
    color: transparent;
}

.filter-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #764ba2;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}