.group-menu {
    background-color: #fff;
    padding: 10px 0;
    display: flex;
    flex-wrap: nowrap; /* Empêche le retour à la ligne */
    justify-content: center;
    gap: 8px; /* Réduit l'espace entre les éléments */
}
/* Styles par défaut */
.group-item {
    color: #212529;
    cursor: pointer;
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 140px;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 8px;
    background-color: #fff;
    font-size: 15px;
    font-weight: 500;
    padding: 10px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
/* Effet au survol */
.group-item:hover {
    color: #fff;
    background-color: #f0151f;
    border-color: #f0151f;
    transform: translateY(-2px);
}
/* État actif */
.group-item.active {
    color: #fff;
    background-color: #f0151f;
    border-color: #f0151f;
    box-shadow: 0 4px 8px rgba(240, 21, 31, 0.3);
}
/* ===============================
   📱 Responsive : Réduction automatique pour les petits écrans
   =============================== */
@media (max-width: 768px) {
    .group-item {
        min-width: 100px;
        max-width: 120px;
        font-size: 14px;
        padding: 8px;
    }
}
@media (max-width: 576px) {
    .group-item {
        min-width: 85px;
        max-width: 100px;
        font-size: 13px;
        padding: 6px;
    }
}
@media (max-width: 400px) {
    .group-item {
        min-width: 60px;
        max-width: 85px;
        font-size: 12px;
        padding: 5px;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
}

.category-menu {
    background-color: #fff;
    padding: 10px 0;
}

/* Boutons de catégories */
.category-item {
    text-decoration: none;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
    border: 1px solid #dfdada;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px; /* Taille par défaut pour Desktop */
    height: 90px;
    padding: 10px;
}

/* Icônes des catégories */
.category-item i {
    font-size: 20px;
    margin-bottom: 5px;
    color: #f0151f; /* Rouge */
}
/* Nouvelle version (SVG) */
.category-item .category-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-item .category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(27%) sepia(95%) saturate(3730%) hue-rotate(347deg) brightness(94%) contrast(97%);
}

/* Nom des catégories */
.category-name {
    font-size: 14px;
}

/* Effets au survol et actif */
.category-item:hover {
    background-color: rgba(240, 21, 31, 0.1);
}

.category-item.active {
    background-color: rgba(240, 21, 31, 0.1);
}

.category-slider-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Swiper Wrapper - Active le scroll horizontal si nécessaire */
.swiper-wrapper {
    display: flex;
    justify-content: flex-start; /* Permet aux éléments d'aller jusqu'à la fin */
    align-items: center;
    flex-wrap: nowrap;
    padding-right: 10px; /* Ajoute un espace à droite pour éviter que le dernier élément soit coupé */
}

/* Swiper Slide - Éviter les contraintes de largeur */
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: auto !important;
}

/* Quand il n'y a pas assez de catégories pour swiper, on centre la ligne */
.category-swiper {
    display: flex;
    justify-content: center;
    overflow-x: auto; /* Active le scroll horizontal si besoin */
    scroll-snap-type: x mandatory; /* Permet un scroll fluide */
    -webkit-overflow-scrolling: touch; /* Active le momentum scroll sur iOS */
}

/* Supprime la scrollbar sur Chrome, Safari */
.category-swiper::-webkit-scrollbar {
    display: none;
}

/* ==============================
   📱 Ajustement responsive de Swiper
   ============================== */
@media (max-width: 1024px) {
    .category-item {
        width: 120px;
    }
}

@media (max-width: 768px) {
    .category-item {
        width: 110px;
    }
}

@media (max-width: 576px) {
    .category-item {
        width: 100px;
    }

    .category-item i {
        font-size: 22px;
    }

    .category-name {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .category-item {
        width: 90px;
        height: 68px; 
    }

    .category-item i {
        font-size: 20px;
    }

    .category-name {
        font-size: 10px;
    }
}

.swiper-custom-button-prev,
.swiper-custom-button-next {
    display: block;
    width: 25px;
    background-color: #dfdada;
    border: 1px solid #ccc;
    border-radius: 20px;
    position: absolute;
    padding: 0;
    margin: 0;
    top: 35%;
    z-index: 100;
    color: #fff;
    cursor: pointer;
    text-align: center;
}

.swiper-custom-button-prev {
    left: 1%;
    right: auto;
}

.swiper-custom-button-next {
    right: 0.1%;
    left: auto;
}

.swiper-button-disabled {
    display: none;
}


/* ==============================
   🎯 Barre de recherche (visible uniquement en md et +)
   ============================== */
.search-bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-input {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.search-btn {
    background-color: #f0151f;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.search-btn:hover {
    background-color: #c1121f;
}
