@font-face {
 font-family: "GlamB";
 src: url("../font/glam-bold.ttf") format("truetype");
}
@font-face {
 font-family: "GlamR";
 src: url("../font/glam-regular.ttf") format("truetype");
}
:root {

  /* Couleurs principales */

--primarycolor: #f33a85;
--secondarycolor: #0e1a23;
--gray: gray;

}
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'GlamR',Arial, sans-serif;
        }
        body {
            background: #f8f8f8;
            color: #333;
            position: relative;
            min-height: 100vh;
            padding-bottom: 40px;
            font-family: 'GlamR';
        }
        /* Largeur de lecture commune au bandeau, à la barre de filtres et à la grille */
        .container {
            max-width: 1280px;
            width: 100%;
            margin: 0 auto;
        }
        .hero-banner {
            background: linear-gradient(105deg, #fdf7e6 0%, #fff5f3 32%, #fdeaf1 68%, #f9dbe9 100%);
            /* La marge basse laisse la barre de filtres chevaucher le bandeau */
            padding: 34px 20px 62px;
        }
        .hero-inner {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 32px;
            flex-wrap: wrap;
        }
        .hero-content {
            flex: 1 1 320px;
        }
        .hero-title {
            font-family: 'GlamB';
            font-size: 28px;
            line-height: 1.15;
            color: var(--secondarycolor);
        }
        .hero-highlight {
            color: var(--primarycolor);
        }
        .hero-subtitle {
            margin-top: 14px;
            font-size: 15px;
            line-height: 1.5;
            color: #6b6b6b;
        }
        /* Carte de choix de la réduction, posée sur le bandeau */
        .discount-card {
            position: relative;
            flex: 0 0 auto;
            width: 340px;
            max-width: 100%;
            margin-top: 26px;
            padding: 20px 28px 16px;
            background: #fff;
            border-radius: 34px;
            box-shadow: 0 6px 22px rgba(14, 26, 35, 0.09);
            text-align: center;
        }
        .discount-card-icon {
            position: absolute;
            top: -24px;
            left: 50%;
            transform: translateX(-50%);
            width: 38px;
        }
        .discount-card-title {
            font-family: 'GlamR';
            font-size: 15px;
            color: var(--secondarycolor);
            /* Laisse la place à la bulle de valeur qui remonte au-dessus du curseur */
            margin-bottom: 18px;
        }
        /* Bulle recalibrée pour tenir dans la carte sans recouvrir le titre */
        .discount-card .range-bubble {
            width: 42px;
            height: 42px;
            padding: 0;
            line-height: 42px;
            font-size: 14px;
            transform: translateX(-50%) translateY(-44px);
        }
        .discount-card .range-bubble::after {
            bottom: -18px;
            left: 5px;
            border-width: 16px;
            border-top-width: 10px;
        }
        /* Le slider occupe toute la largeur de la carte */
        .discount-card .range-container,
        .discount-card .range,
        .discount-card .range-ticks {
            width: 100%;
        }
        .discount-card .range-tick span {
            font-size: 14px;
            margin-top: 6px;
        }
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: white;
            /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
            padding-top: 0px;
            padding-bottom: 5px; 
            font-family: 'GlamB';
        }
        h1,h2,h3,h4,h5{
            font-weight: 500;
        }
        #rangeValue {
          position: relative;
          display: block;
          text-align: center;
          font-size: 1em;
          color: #999;
          font-weight: 400;
          display: none;
        }
        .range {
          width: 200px;
          height: 15px;
          -webkit-appearance: none;
          background: linear-gradient(91deg, #f33a85, #f33a85);
          outline: none;
          border-radius: 15px;
          overflow: hidden;
          
        }
        .range::-webkit-slider-thumb {
          -webkit-appearance: none;
          width: 15px;
          height: 15px;
          border-radius: 50%;
          background: white;
          cursor: pointer;
          border: 1px solid #000;
          box-shadow: -407px 0 0 400px #ebeaea;
          filter: drop-shadow(10px 0px 5px #ffc3ef);
          position: relative;
          z-index: 100;
        }
      
        .logo {
            font-size: 1.5em;
            font-weight: 500;
            margin: 0;
            line-height: 0;
        }
        .header-buttons button {
            position: relative;
            margin-left: 10px;
            padding: 4px 5px;
            border: none;
            background: #fff;
            color: white;
            cursor: pointer;
            border-radius: 5px;
        }
        .header-buttons {
            display: flex;
            align-items: flex-start;
            height: 70px;
        }
        .nb-product {
            text-align: center;
            width: 100%;
            padding: 26px 15px 14px;
            font-family: 'GlamR';
            font-weight: 500;
            color: #8b8b8b;
            font-size: 15px;
        }
        .pagination {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 6px;
            padding: 32px 15px 40px;
        }
        .pagination-btn {
            min-width: 38px;
            height: 38px;
            padding: 0 10px;
            border: 1px solid #e6e6e6;
            border-radius: 10px;
            background: #fff;
            color: var(--secondarycolor);
            font-family: 'GlamB';
            font-size: 14px;
            cursor: pointer;
        }
        .pagination-btn:hover:not(:disabled):not(.active) {
            border-color: var(--primarycolor);
            color: var(--primarycolor);
        }
        .pagination-btn.active {
            background: var(--secondarycolor);
            border-color: var(--secondarycolor);
            color: #fff;
            cursor: default;
        }
        .pagination-btn:disabled {
            color: #cfcfcf;
            cursor: default;
        }
        .pagination-gap {
            padding: 0 2px;
            color: #bbb;
            font-family: 'GlamR';
            font-size: 14px;
        }
        /* Pastille de réduction : en bas à gauche de l'image */
        .pourcent-discount {
            position: absolute;
            background-color: var(--secondarycolor);
            color: white;
            left: 0px;
            bottom: 0px;
            padding: 2px 8px 2px 6px;
            font-size: 15px;
            /* .product-media impose line-height: 0 pour coller à l'image */
            line-height: normal;
            margin-left: 10px;
            margin-bottom: 10px;
        }
        .product-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(1px, 1fr));
            gap: 0px;
            padding: 0px;
            position: relative;
        }
       
        .product {
            background: white;
            padding: 0px;
            border-radius: 0px;
            /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);*/
            text-align: center;
            position: relative;
            padding-bottom: 50px;
        }
        /* Repère de positionnement pour le logo, le coeur et la pastille de réduction.
           Le ratio fixe aligne les blocs d'info d'une même ligne, quelles que soient
           les dimensions du visuel — qui est hotlinké depuis le CDN de la marque
           et peut aussi ne pas charger du tout. */
        .product-media {
            position: relative;
            line-height: 0;
            aspect-ratio: 3 / 3;
            background: #f4f4f4;
            border: 1px dashed #e5e5e5;
        }
        /* Lien vers la fiche produit : couvre toute la zone image sans casser le ratio */
        .product-link {
            display: block;
            width: 100%;
            height: 100%;
        }
        .product .product-img {
            width: 100%;
            height: 100%;
            border-radius: 0px;
            /* contain plutôt que cover : on ne rogne pas le vêtement */
            object-fit: contain;
        }
        /* Logo de la marque : en haut à gauche de l'image */
        .brand-logo {
            position: absolute;
            top: 8px;
            left: 8px;
            width: auto;
            max-width: 64px;
            max-height: 26px;
            padding: 3px 5px;
            background: rgba(255, 255, 255, 0.92);
            border-radius: 4px;
            z-index: 2;
        }
        .favorite-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 30px;
            height: 30px;
            padding: 0;
            border: none;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.92);
            color: #d8d8d8;
            font-size: 17px;
            line-height: 30px;
            cursor: pointer;
            z-index: 2;
        }
        .favorite-btn.active {
            color: var(--primarycolor);
        }
        .product-info {
            margin-top: 10px;
            padding-left: 15px;
        }
        .price {
            display: flex;
            justify-content: left;
            align-items: center;
            gap: 10px;
        }
        .primary{
            color: var(--secondarycolor);
            font-style: italic;
        }
        .new-price {
            color: var(--primarycolor);
            color: #f33a85; 
            font-family: 'GlamB';
            font-size: 15px;
        }
        .old-price {
            text-decoration: line-through;
            color: var(--gray);
        }
        .alert-btn {
            background: none;
            border: none;
            font-size: 1.2em;
            cursor: pointer;
        }

        .product-sizes {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-top: 5px;
        }

        .size-tag {
            display: inline-block;
            padding: 2px 6px;
            background-color: #f0f0f0;
            border-radius: 4px;
            color: #666;
            font-size: 11px;
        } 
        .size-tag.active {
            background-color: #ffffff;
            color: #453c3c;
            border-bottom: 2px solid #24d277;
            border-radius: 0;
        }  
        /* Barre de filtres : chevauche le bas du bandeau */
        .filter-bar {
            position: relative;
            z-index: 3;
            width: 100%;
            padding: 0 20px;
            margin-top: -44px;
        }
        .filter-controls {
            display: flex;
            align-items: stretch;
            background: #fff;
            border-radius: 20px;
            box-shadow: 0 6px 22px rgba(14, 26, 35, 0.09);
        }
        /* Chaque contrôle ouvre sa modale et affiche sa sélection courante */
        .filter-control {
            position: relative;
            flex: 1 1 0;
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 14px 16px;
            border: none;
            background: transparent;
            cursor: pointer;
            text-align: left;
        }
        /* Séparateur vertical entre deux contrôles */
        .filter-control + .filter-control::before {
            content: '';
            position: absolute;
            left: 0;
            top: 14px;
            bottom: 14px;
            width: 1px;
            background: #ececec;
        }
        .filter-control-icon {
            flex: 0 0 34px;
            width: 34px;
        }
        .filter-control-text {
            flex: 1 1 auto;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .filter-control-label {
            font-family: 'GlamR';
            font-size: 12px;
            line-height: 1.2;
            color: #8b8b8b;
        }
        .filter-control-value {
            font-family: 'GlamB';
            font-size: 15px;
            line-height: 1.2;
            color: var(--secondarycolor);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .filter-control-chevron {
            flex: 0 0 auto;
            width: 9px;
            height: 9px;
            margin-right: 4px;
            border-right: 2px solid #9a9a9a;
            border-bottom: 2px solid #9a9a9a;
            transform: rotate(45deg) translate(-3px, -3px);
        }
        /* Tags des filtres actifs, sous la barre */
        .filter-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 0 4px;
            margin-top: 14px;
        }
        .filter-tags:empty {
            margin-top: 0;
        }
        .filter-tag {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 6px 8px 6px 12px;
            background: #fff;
            border: 1px solid #e6e6e6;
            border-radius: 18px;
            font-family: 'GlamR';
            font-size: 13px;
            color: var(--secondarycolor);
            box-shadow: 0 2px 6px rgba(14, 26, 35, 0.05);
        }
        .filter-tag .filter-tag-label {
            color: #9a9a9a;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: .02em;
        }
        .filter-tag .filter-tag-swatch {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 1px solid #ddd;
        }
        .filter-tag .filter-tag-remove {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #f0f0f0;
            color: #555;
            font-size: 14px;
            line-height: 1;
            cursor: pointer;
        }
        .filter-tag .filter-tag-remove:hover {
            background: var(--primarycolor);
            color: #fff;
        }
        /* "Tout sélectionner" en tête des vues sous-catégories / items */
        .category-select-all {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 15px;
            margin-bottom: 10px;
            background-color: #fff;
            border: 1px dashed var(--primarycolor);
            border-radius: 8px;
            color: var(--primarycolor);
            font-family: 'GlamB';
            font-size: 14px;
            cursor: pointer;
        }
        .category-select-all::before {
            content: '✓';
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border: 1px solid var(--primarycolor);
            border-radius: 5px;
            font-size: 13px;
            color: transparent;
        }
        .category-select-all.active {
            background-color: var(--primarycolor);
            color: #fff;
        }
        .category-select-all.active::before {
            color: #fff;
            border-color: #fff;
        }
        .range-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 70%;
            margin-top: 20px;
        }
        
        
      
        .range-labels {
            display: flex;
            justify-content: space-between;
            width: 100%;
            font-size: 12px;
            margin-top: 5px;
        }
        .txt-btn {
            color: var(--secondarycolor);
            display: block;
            font-size: 10px;
            line-height: 10px;
            font-family: 'GlamB';
            text-transform: uppercase;
            margin-top: 2px;
        }
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            justify-content: center;
            align-items: center;
            z-index: 100;
        }
        .modal-content {
            background: white;
            padding: 20px;
            padding-top: 35px;
            border-radius: 10px;
            text-align: center;
            max-width: 90%;
            overflow: auto;
            position: relative;
            min-width: 320px;
            border-left: 2px solid #e3b0ff;
            box-shadow: 4px 5px #b7dae6;
        }
        /* Mode déroulant : la classe est posée par anchorModalToTrigger(),
           uniquement au-dessus du point de rupture desktop */
        .modal.anchored {
            background: transparent;
            justify-content: flex-start;
            align-items: flex-start;
        }
        .modal.anchored .modal-content {
            position: fixed;
            /* top / left / width / max-height sont calculés depuis le bouton
               déclencheur ; cette valeur n'est qu'un garde-fou */
            margin: 0;
            max-width: none;
            min-width: 340px;
            max-height: calc(100vh - 150px);
            text-align: left;
            border-radius: 16px;
            border-left: none;
            box-shadow: 0 12px 30px rgba(14, 26, 35, 0.16);
        }
        .brand-buttons {
            display: grid;
            grid-template-columns: repeat(3,minmax(1px,1fr));
            gap: 10px;
            margin-top: 15px;
        }
        .brand-button {
            border: none;
            background: #f0f0f0;
            padding: 10px;
            border-radius: 7px;
            cursor: pointer;
            text-align: center;
        }
        .brand-button.active {
            background: #333;
            color: white;
        }
        .brand-button img {
            max-width: 50px;
            padding-top: 10px;
            padding-left: 3px;
            padding-right: 3px;
            padding-bottom: 10px;
            background-color: white;
        }

        /* Styles pour la nouvelle modal genre et tailles */
        .gender-size-container {
            margin-top: 15px;
        }
        .gender-buttons {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 20px;
            margin-top: 10px;
        }
        .gender-btn {
            padding: 10px 15px;
            border: none;
            background: #f0f0f0;
            border-radius: 5px;
            cursor: pointer;
            font-size: 15px;
        }
        .gender-btn.active {
            background: #333;
            color: white;
        }
        /* Partagé avec la modale catégories (#subcategoryContainer),
           dont l'affichage est piloté en style inline par showSubcategories() */
        .subcategory-container {
            display: none;
            margin-top: 10px;
        }
        .body-map-container {
            position: relative;
            width: 300px;
            height: 450px;
            margin: 0 auto;
            margin-top: 20px;
        }
        .body-silhouette {
            width: 100%;
            height: 100%;
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            opacity: 0.5;
        }
        .female-body {
            background-image: url('../img/silhouette-femme.jpg');
        }
        .male-body {
            background-image: url('../img/silhouette-homme.jpg');
        }
        .child-body {
            background-image: url('https://placehold.co/300x450/ffffff/cccccc?text=Child+Silhouette');
        }
        .girl-body {
            background-image: url('../img/silhouette-fille.jpg');
        }
        .boy-body {
            background-image: url('../img/silhouette-garcon.jpg');
        }
        .size-point {
            position: absolute;
            width: 30px;
            height: 30px;
            background-color: #333;
            color: white;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 20px;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .size-point:hover {
            background-color: #555;
        }
        .size-modal {
            display: none;
            position: absolute;
            background: white;
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
            z-index: 10;
            width: 200px;
        }
        .size-modal h4 {
            margin-bottom: 10px;
            font-size: 16px;
            border-bottom: 1px solid #eee;
            padding-bottom: 5px;
        }
        .size-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 8px;
        }
        .size-btn {
            padding: 6px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }
        .size-btn.active {
            background: #333;
            color: white;
            border-color: #333;
        }
        /* Bas : équivalence lettre affichée sous le numéro (data-equiv).
           En ::after pour ne pas polluer le textContent lu par le JS. */
        .size-btn--dual {
            line-height: 1.15;
            padding: 4px 2px;
        }
        .size-btn--dual::after {
            content: attr(data-equiv);
            display: block;
            font-size: 9px;
            font-weight: 400;
            color: #9a9a9a;
            margin-top: 1px;
        }
        .size-btn--dual.active::after {
            color: #d0d0d0;
        }
        .close-size-modal, .close-modal {
            position: absolute;
            top: 5px;
            right: 5px;
            border: none;
            background: none;
            font-size: 22px;
            cursor: pointer;
            color: #999;
            width: 30px;
            height: 30px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 50%;
        }
        .close-size-modal:hover, .close-modal:hover {
            color: #333;
            background-color: #f0f0f0;
        }
        .close-modal {
            top: 10px;
            right: 10px;
            font-size: 24px;
        }
        .body-map-container {
            display: none;
        }
        .body-map-container.active {
            display: block;
        }
        .selected-sizes {
            position: absolute;
            background-color: rgba(255, 255, 255, 0.9);
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 16px;
            white-space: nowrap;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
            text-align: center;
            min-width: 40px;
            transform: translateX(-50%);
            pointer-events: none;
            color: #333;
            border: 1px solid #ddd;
            max-width: 100px;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-right: 31px;
        }
        .size-point-container {
            position: absolute;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        /* Étiquette de zone à droite du « + » (Haut / Bas / Pieds / Poitrine),
           injectée par initSizePointLabels() pour clarifier chaque point. */
        .size-point-part {
            position: absolute;
            left: 36px;
            top: 6px;
            white-space: nowrap;
            font-family: 'GlamB';
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            color: var(--secondarycolor);
            background: rgba(255, 255, 255, 0.92);
            padding: 2px 7px;
            border-radius: 9px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
            pointer-events: none;
        }
        /* Titre au-dessus de la silhouette. Masqué tant qu'aucun genre n'est
           choisi (aucune silhouette affichée) ; révélé par selectGender(). */
        .size-map-title {
            display: none;
            text-align: center;
            margin-top: 18px;
            font-family: 'GlamB';
            font-size: 15px;
            color: var(--secondarycolor);
        }
        .size-map-title.visible {
            display: block;
        }

.product-info h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
    position: relative;
    max-width: 100%;
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 500;
    color:var(--secondarycolor);
}
.product-info h4 {
    text-align: left;
    font-size: 13px;
    font-family: 'GlamB';
    font-weight: 500;
}
       /* Styles pour la modal Catégories hiérarchique */
.categories-container {
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
    max-width: 280px;
}

.category-navigation {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item {
    color: #777;
    cursor: pointer;
    position: relative;
    padding-right: 16px;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.breadcrumb-item.active {
    color: #333;
    font-weight: 500;
}

.breadcrumb-item:hover {
    color: #f73785;
}

/* Styles pour les catégories principales */
.main-categories {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.main-category-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f7f9fc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.main-category-item:hover {
    transform: translateX(5px);
    color: #f73886;
    background: linear-gradient(45deg, #f8f9fc, transparent);
}

.category-number {
    margin-right: 15px;
    font-size: 20px;
}

.main-category-name {
    flex-grow: 1;
    font-weight: 500;
    font-size: 16px;
}

.category-arrow {
    font-size: 20px;
    color: #777;
}

/* Nombre de produits, sous-catégories incluses */
.category-count {
    flex: 0 0 auto;
    margin-left: 10px;
    padding: 1px 8px;
    background-color: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    font-family: 'GlamR';
    font-size: 12px;
    color: #8b8b8b;
}
.category-tag .category-count {
    background-color: #ffffff;
}
.category-tag.active .category-count {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

/* Styles pour les sous-catégories */
.subcategory-container {
    animation: fadeIn 0.3s ease;
}

.subcategory-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #f7f9fc;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subcategory-item:hover {
    transform: translateX(5px);
    color: #f73886;
    background: linear-gradient(45deg, #f8f9fc, transparent);
}

.subcategory-name {
    flex-grow: 1;
    font-weight: 500;
}

/* Styles pour les items spécifiques */
.items-container {
    animation: fadeIn 0.3s ease;
    max-width: 300px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.category-tag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 15px;
    background-color: #f7f7f7;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2sease;
    width: 100%;
}

.category-tag:hover {
    background-color: #edebeb;
}

.category-tag.active {
    background-color: #333;
    color: white;
}

.item-section-title {
    font-weight: 500;
    margin: 15px 0 10px 0;
    font-size: 16px;
    color: #555;
}

/* Animation pour les transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Styles pour la section des catégories sélectionnées */
.selected-categories {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.selected-categories h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 500;
}

.selected-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    padding: 5px;
    background-color: white;
    border-radius: 5px;
    border: 1px dashed #ddd;
    margin-bottom: 15px;
    max-width: 280px;
    max-height: 110px;
    overflow: auto;
}

.empty-selection {
    color: #999;
    font-style: italic;
    display: block;
    text-align: center;
    width: 100%;
    padding: 10px 0;
}

.selected-category-item {
    display: inline-flex;
    align-items: center;
    background-color: #333;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    gap: 8px;
}

.remove-category {
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.categories-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.apply-btn, .reset-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
}

.apply-btn {
    background-color: #f73785;
    color: white;
    flex-grow: 2;
}

.reset-btn {
    background-color: #f0f0f0;
    color: #333;
    flex-grow: 1;
}

.apply-btn:hover {
    background-color: #e62d7a;
}

.reset-btn:hover {
    background-color: #e0e0e0;
}

.color-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
    background: linear-gradient(135deg, #f73785 0%, #15ffd0 100%);
}

/* Styles pour la barre range avec graduations */
.range-container {
    position: relative;
    width: 200px;
}

.range-ticks {
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
}

.range-tick {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: #888;
}

.tick-line {
    height: 5px;
    width: 1px;
    background-color: #ccc;
    margin-bottom: 2px;
    display: none;
}
.range-tick span{
    color: var(--secondarycolor); 
    font-family: 'GlamB';
}

/* Style pour le loader */
.loading, .error {
    width: 100%;
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: var(--secondarycolor);
}
.loading {
    background-color: #f0f0f0;
}
.error {
    background-color: #ffdddd;
    color: red;
}

/* Styles pour la modal des couleurs */
.colors-container {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
}

.colors-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-group {
    margin-bottom: 10px;
}

.color-group h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #555;
    border-bottom: 1px solid #eee;
    padding-bottom: 3px;
}

.color-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 17px;
    margin: auto;
    margin-top: 15px;
    float: left;
}

.color-btn {
    width: 20px;
    height: 20px;
    border-radius: 112px;
    border: 1px solid #c8c8c8;
    cursor: pointer;
    position: relative;
    /* overflow: hidden; */
    transition: transform 0.2s ease;
    text-align: right;
    margin: auto;
    margin-bottom: -4px;
    margin-right: 21px;
    right: 0px;
    position: relative;
}

.color-btn .color-name{
    transition: all 0.2s ease;
}

.color-btn:hover .color-name {
   background-color: #f0f0f0;
    transform: translateX(5px);
}

.color-btn.active .color-name {
    /* border: 3px solid #f73785; */
    background-color: black;
    /* box-shadow: 0 0 0 2px white inset; */
    color: white !important;
}
.color-name {
    position: relative;
    bottom: -6px;

    padding-right: 200px;
    /* right: 0; */
    background-color: #f6f6f6;
    border-radius: 50px;
    /* padding: 3px 0; */
    font-size: 16px;
    text-align: left;
    line-height: 0px;
    
    height: 0px;
    position: absolute;
    color: black !important;
    padding: 14px;
}


/* Effets métalliques */
.metallic-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 40%, #FFD700 60%, #E6B800 100%);
}

.metallic-silver {
    background: linear-gradient(135deg, #E6E6E6 0%, #C0C0C0 40%, #E6E6E6 60%, #A9A9A9 100%);
}

.metallic-bronze {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 40%, #CD7F32 60%, #A67B5B 100%);
}

.metallic-copper {
    background: linear-gradient(135deg, #B87333 0%, #D2691E 40%, #B87333 60%, #A0522D 100%);
}

/* Styles pour la liste des couleurs sélectionnées */
.selected-colors {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    max-width: 360px;
}

.selected-colors h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.selected-colors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    padding: 5px;
    background-color: white;
    border-radius: 5px;
    border: 1px dashed #ddd;
    margin-bottom: 15px;
}

.selected-color-item {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    gap: 8px;
}

.color-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
}

.remove-color {
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.colors-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.apply-btn, .reset-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.apply-btn {
    background-color: #f73785;
    color: white;
    flex-grow: 2;
}

.reset-btn {
    background-color: #f0f0f0;
    color: #333;
    flex-grow: 1;
}

.apply-btn:hover {
    background-color: #e62d7a;
}

.reset-btn:hover {
    background-color: #e0e0e0;
}
/* Style pour la pastille (bulle) */
.range-bubble {
    position: absolute;
    background-color: #f73785;
    color: white;
    padding: 23px 11px;
    border-radius: 70px;
    width: 70px;
    height: 70px;
    margin: auto;
    font-size: 20px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(-82px);
    transition: opacity 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
}

.range-bubble::after{
    position: absolute;
    content: '';
    width: 0px;
    height: 0px;
    bottom: -30px;
    left: 11px;
    border: 24px solid transparent;
    border-top: 16px solid #f73886;
}

.range-bubble.visible {
    opacity: 1;
}

.range-container {
    position: relative;
}

.count{
    background-color: #0f1b22;
    color: white;
    border-radius: 10px;
    font-size: 13px;
    width: 39px;
    margin: auto;
}
.btn-brand.active img, .btn-gender.active img{
    filter: invert(1) hue-rotate(273deg) saturate(3) drop-shadow(2px 2px 0px cyan);
}

/* Bouton favoris de l'en-tête : le coeur remplace l'icône .gif des autres boutons */
/* Même gabarit que les icônes .gif des autres boutons, pour aligner le compteur */
.btn-favorites .favorites-icon {
    display: block;
    width: 40px;
    height: 40px;
    font-size: 25px;
    line-height: 40px;
    text-align: center;
    color: #d8d8d8;
}
.btn-favorites.active .favorites-icon {
    color: var(--primarycolor);
}

/* Les compteurs marques/couleurs/catégories ont laissé place aux valeurs
   affichées dans la barre de filtres : seul celui des favoris subsiste */
#favoriteCounter {
    position: absolute;
    color: #f33a85;
    font-family: 'GlamB';
    text-shadow: -1px 0px #fff, 1px 0px #fff, 1px 1px #fff, -1px 1px #fff, -1px -1px #fff, 1px -1px #fff, 0px -1px #fff, 0px 1px #fff;
    top: 35px;
    font-size: 13px;
    margin: auto;
    padding: 0;
    width: 100%;
    text-align: center;
    margin-left: -7px;
}

#favoriteCounter.active{
    font-size: 11px;
    left: 50%;
    margin-left: -11px;
    width: 22px;
    background-color: white;
    border-radius: 30px;
    text-align: center;
    border-top: 2px solid #000000;
    padding-top: 1px;
    top: 33px;
}

/* LOADER */
.row {
    position: absolute;
    z-index: 10;
    margin: auto;
    width: 100%;
    height: 100%;
}
.cell {
    width: 300px;
    text-align: center;
    margin: auto;
    height: 300px;
    position: relative;
    margin-top: 50vh;
    transform: translateY(-50%);
}
.circle {
    display: inline-block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-image: url(../img/logo.gif);
}

.gelatine {
  animation: gelatine 0.5s infinite;
}
@keyframes gelatine {
  from, to { transform: scale(1, 1) invert(1); }
  25% { transform: scale(0.9, 1.1) hue-rotate(330deg) invert(1) saturate(10); }
  50% { transform: scale(1.1, 0.9) invert(1); }
  75% { transform: scale(0.95, 1.05) invert(0); }
}

.container-header {
            max-width: 1280px;
            position: relative;
            height: 70px;
            margin: auto;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 10px;
        }

 /* Pour les écrans plus petits */
        @media (max-width: 768px) {
            .categories-container {
                max-height: 50vh;
            }
            
            .tags-container {
                gap: 6px;
            }
            
            .category-tag {
                padding: 6px 12px;
                font-size: 16px;
            }
            .range-ticks{
                width: 200px;
            }
            .color-name{
                left: -207px;
                width: 197px;
            }
            /* Quatre contrôles côte à côte sont illisibles sur mobile : on passe en 2x2 */
            .filter-controls {
                flex-wrap: wrap;
                border-radius: 16px;
            }
            .filter-control {
                flex: 1 1 50%;
                padding: 12px;
            }
            /* Le séparateur vertical ne vaut plus qu'entre les colonnes */
            .filter-control + .filter-control::before {
                display: none;
            }
            .filter-control:nth-child(even)::before {
                display: block;
            }
            .filter-control:nth-child(n+3) {
                border-top: 1px solid #ececec;
            }
            .hero-banner {
                padding-bottom: 74px;
            }
            .discount-card {
                width: 100%;
                margin-top: 34px;
            }
        }
        @media (min-width: 768px) {
            .product-grid {
                grid-template-columns: repeat(3, minmax(1px, 1fr));
            }
            .color-name{
                left: -202px;
                width: 194px;
            }
            .pourcent-discount {
            font-size: 20px;
            }
            .nb-product{
                font-size: 17px;
            }
            .hero-title {
                font-size: 34px;
            }
        }

        @media (min-width: 1024px) {

            .product-info h3, .product-info h4, .new-price{
                font-size: 16px;
            }
            .old-price{
                font-size: 17px;
            }
            .product-grid {
                grid-template-columns: repeat(4, minmax(1px, 1fr));
            }
        }

        @media (min-width: 2560px) {
            .product-grid {
                grid-template-columns: repeat(5, minmax(1px, 1fr));
            }
        }
