:root {
    --primary-black: #000000;
    --gray-light: #f5f5f5;
    --text-muted: #777;
    --accent-red: #ff4d4d;
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    margin: 0; padding-bottom: 70px; /* Espace pour la barre basse */
    background-color: #fff;
}

/* Header */
.client-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 17px; background: #fff;position: fixed;width: 91%; z-index: 100;
}
.logo { font-size: 24px; font-weight: 800; letter-spacing: 2px; font-family: 'Playfair Display';}
.header-icons { font-size: 20px; display: flex; gap: 15px; }

/* Filtres catégories */
.category-scroll {
    display: flex; gap: 11px; overflow-x: auto; padding: 10px 0px;
    scrollbar-width: none;background: white;
}
.cat-pill {
    padding: 10px 25px; border-radius: 20px; border: none;
    background: var(--gray-light); white-space: nowrap; cursor: pointer;
    font-weight: 500; color: #555;
}
.cat-pill.active { background: var(--primary-black); color: #fff; }

/* Bannière livraison */

.delivery-banner i { color: #fff; margin-right: 8px; }

/* Grille de produits */
.product-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 5px; padding: 96 0px;
}

.image-container {
    position: relative; border-radius: 15px; overflow: hidden;
    aspect-ratio: 3/4;
}
.image-container img { width: 100%; height: 100%; object-fit: cover; }

.badge {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 10px; border-radius: 5px; font-size: 10px; font-weight: bold;
}
.badge-top { background: #fff; color: #000; }
.badge-new { background: #fff; color: #000; }

.wishlist-btn {
    position: absolute; bottom: 5px; right: 10px;
    background: #fff; border: none; width: 35px; height: 35px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-info { padding: 4px 5px; }
.p-title { font-size: 14px; color: var(--text-muted); margin: 0; }
.p-price { font-size: 16px; font-weight: bold; margin: -3px 3px; }
.p-rating { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.p-rating i { color: #f1c40f; }

/* Barre de navigation basse */
.bottom-nav {
    position: fixed; bottom: 0; width: 100%; height: 65px;
    background: #fff; display: flex; justify-content: space-around;
    align-items: center; border-top: 1px solid #eee;z-index: 1;
}
.nav-item {
    text-decoration: none; color: #aaa; text-align: center;
    display: flex; flex-direction: column; font-size: 10px; gap: 4px;
}
.nav-item i { font-size: 20px; }
.nav-item.active { color: var(--primary-black); }
/* Empilement des couleurs à gauche */
.color-stack {
    position: absolute;
    left: 10px;
    top: 84%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0px;
    z-index: 0;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Pile d'actions à droite (Commentaire + Like) */
.action-stack {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.2s;
    top:-116%;
    right: 0%;
}

.action-btn:hover {
    transform: scale(1.1);
    background: #fff;
}

/* Meta info (Rating + Quality) */
.p-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.p-quality {
    font-size: 11px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
    color: #444;
    font-weight: 600;
    text-transform: uppercase;
}

/* Dynamisme visuel des catégories */
.cat-pill {
    transition: all 0.3s ease;
}
.cat-pill:active {
    transform: scale(0.95);
}
.color-more {
    font-size: 9px;
    font-weight: bold;
    color: #333;
    background: rgba(255,255,255,0.8);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
}
/* --- NAVIGATION ET BANNIÈRE FIXES --- */
.category-scroll {
    position: absolute;
   
    z-index: 100;
}


.category-scroll { top: 0px; }
.delivery-banner { 
    top: 94px; 
    height: 37px; 
    background: #000; 
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden; /* Important pour l'animation */
     position: fixed;
    width: 100%;
    left: 0;
   
    z-index: 100;
}

/* Espacement pour le contenu pour ne pas être caché sous le fixe */
.content { padding-top: 0px; }

/* --- ANIMATION BANNIÈRE (10s intervalle) --- */
.marquee-text {
    white-space: nowrap;
    display: inline-block;
    width: 100%;
    animation: scroll-text 20s linear infinite;
}

@keyframes scroll-text {
    0% { transform: translateX(100%); }
    80% { transform: translateX(-100%); }
    100% { transform: translateX(-100%); } /* Pause visuelle en fin de cycle */
}

/* --- BADGES DE QUALITÉ (Design exact de la vitrine) --- */
.quality-badge {
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 50px; /* Style pilule */
    font-weight: 800;
    text-transform: uppercase;
    color: black;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* PREMIUM : Scintillement Or */
.q-premium {
    background: linear-gradient(45deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    background-size: 400% 400%;
    animation: shine-gold 3s linear infinite;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* 1er CHOIX : Pulse Orange */
.q-1er {
    background-color: #ff6d00;
    animation: pulse-orange 2s infinite;
}

/* 2ème CHOIX : Gris Glint */
.q-2eme { background-color: #636e72; }

@keyframes shine-gold {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse-orange {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 109, 0, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(255, 109, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 109, 0, 0); }
}


.product-grid {
    transition: opacity 0.3s ease;
}
/* État actif du bouton Like */
.action-btn.wishlist-btn.liked {
    color: #ff4d4d;
    background: #fff;
}

.action-btn.wishlist-btn.liked i {
    font-weight: 900; /* Passe de regular à solid */
    animation: heartBeat 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Animation de battement */
@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Particule de cœur volant (Instagram style) */
.heart-particle {
    position: absolute;
    color: #ff4d4d;
    font-size: 14px;
    pointer-events: none;
    z-index: 100;
    animation: flyAndFade 3s ease-out forwards;
}

@keyframes flyAndFade {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
     10% {
        opacity: 1;
        transform: translateY(-40px) scale(1.5);
    }
    20% {
        opacity: 1;
        transform: translateY(-60px) scale(2) rotate(15deg);
    }
    40% {
        opacity: 1;
        transform: translateY(-80px) scale(4) rotate(15deg);
    }
}
.wishlist-btn { position: relative; } /* Important pour que le cœur se place par rapport au bouton */

.heart-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4d4d;
    pointer-events: none;
    animation: flyAndFade 0.8s ease-out forwards;
}
/* Badge de compteur */
.comment-wrapper { position: relative; }
.count-badge {
    position: absolute;
    top: -8px;
    right: -5px;
    background: var(--accent-red);
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 0;
    border: 1px solid white;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none; justify-content: center; align-items: flex-end; /* Apparition par le bas sur mobile */
    z-index: 2000;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    height: 70vh;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Style d'un commentaire */
.review-item {
    display: flex; gap: 12px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee;
}
.user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #ddd; }
.review-details h4 { font-size: 14px; margin: 0; }
.review-rating { color: #f1c40f; font-size: 10px; }
.review-text { font-size: 13px; color: #555; margin: 5px 0; }
.review-img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; margin-top: 5px; }
.action-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; }

.count-badge {
    position: absolute;
    top: -12px;
    background: #ff4d4d;
    color: white;
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 8px;
    font-weight: 800;
    border: 1.5px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 0;
}

/* Modal des commentaires (Style tiroir Apple) */
.modal-bottom {
    position: fixed;
    bottom: -100%; /* Caché par défaut */
    left: 0; width: 100%; height: 80%;
    background: white;
    z-index: 2000;
    border-radius: 25px 25px 0 0;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    padding: 20px;
}

.modal-bottom.active { bottom: 0; }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 1999;
}

/* Style Général Page Détails */
.product-page { padding-bottom: 100px; background: #fff; }

.back-navigation { position: absolute; top: 20px; left: 20px; z-index: 10; }
.circular-back {
    width: 45px; height: 45px; background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); color: #000; text-decoration: none;
}

.product-hero { width: 100%; text-align: center; padding: 40px 0; }
.product-hero img { max-width: 85%; height: auto; }

.purchase-container { padding: 0 20px; }

.title-price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.product-name { font-size: 22px; font-weight: 800; color: #1a237e; margin: 0; }
.product-price { font-size: 20px; font-weight: 900; color: #FF6D00; }

/* Groupes d'options */
.option-group label { display: block; font-size: 11px; font-weight: 800; color: #9E9E9E; margin-bottom: 8px; }
.options-flex { display: flex; gap: 20px; margin-bottom: 25px; align-items: flex-start; }

.selector-row { display: flex; gap: 10px; }

/* Couleurs */
.color-circle { width: 40px; height: 40px; border-radius: 50%; border: 2px solid transparent; padding: 2px; }
.color-circle.active { border-color: #000; box-shadow: 0 0 0 2px #fff inset; }

/* Tailles */
.size-box {
    width: 42px; height: 42px; border: 1px solid #E0E0E0; border-radius: 8px;
    background: #fff; font-weight: 800; transition: 0.2s;
}
.size-box.active { background: #000; color: #fff; border-color: #000; }

/* Quantité */
.qty-stepper {
    display: flex; align-items: center; background: #F5F5F5; border-radius: 4px; padding: 5px 10px; gap: 15px;
}
.qty-stepper button { border: none; background: none; font-size: 18px; font-weight: bold; cursor: pointer; }
.qty-stepper span { font-weight: 800; min-width: 20px; text-align: center; }

/* Formulaire */
.order-form .input-group { margin-bottom: 15px; }
.order-form input, .order-form select {
    width: 100%; padding: 12px 15px; border: 1px solid #EEEEEE; border-radius: 8px;
    font-size: 15px; color: #424242; font-weight: 600;
}

.divider { border: 0; border-top: 1px solid #F5F5F5; margin: 20px 0; }

.total-row { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 20px; }
.total-price { color: #FF6D00; font-size: 18px; }

/* Bouton Final */
.btn-order-now {
    width: 100%; background: #000; color: #fff; padding: 18px; border: none;
    border-radius: 12px; font-size: 16px; font-weight: 900; letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); cursor: pointer;
}
/* Slider Images */



.slide.active { opacity: 1; }

/* Empêcher que les couleurs poussent le reste */
.options-grid { display: flex; flex-direction: column; gap: 15px; }
.selector-row.scrollable {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px;
    scrollbar-width: none; /* Cache la barre de défilement */
}

/* Total Row Premium */
.total-row {
    background: #f9f9f9; padding: 15px; border-radius: 12px;
    display: flex; justify-content: space-between; align-items: center;
}
.final-price { font-weight: 900; color: #FF6D00; font-size: 1.2rem; }


    /* Correction du Slider */
    .slider-container { 
        position: relative; 
        width: 100%; 
        height: 400px; /* Force la hauteur */
        overflow: hidden; 
        background: #fdfdfd; 
        display: block; /* S'assure qu'il n'est pas masqué */
    }
    .slider-wrapper { 
        display: flex; 
        transition: transform 0.5s ease-in-out; 
        height: 100%; 
        width: 100%;
    }
    .slide { 
        min-width: 100%; 
        width: 100%;
        height: 100%; 
        object-fit: contain; /* Garde les proportions de l'image */
        flex-shrink: 0; /* Empêche l'image de s'écraser */
    }
    
    /* Correction des listes horizontales */
    .selector-row.scrollable { 
        display: flex; 
        gap: 10px; 
        overflow-x: auto; 
        padding: 10px 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; 
    }
    .selector-row.scrollable::-webkit-scrollbar { display: none; }
    
    .color-circle {
        flex-shrink: 0; /* Empêche les cercles de devenir des ovales */
        width: 35px;
        height: 35px;
        border-radius: 50%;
        border: 2px solid #eee;
    }
    .color-circle.active { border-color: #000; scale: 1.1; 
/* Container des infos */
.product-info {
    padding: 10px 5px;
}

.p-title {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Alignement Prix et Qualité */
.price-quality-row {
    display: flex;
    align-items: center; /* Aligne verticalement au centre */
    gap: 10px; /* Espace entre le prix et le badge */
    margin-bottom: 5px;
}

.p-price {
    font-weight: 800;
    color: #000;
    font-size: 15px;
}

  /* Gray */

/* Etoiles */
.rating-display {
    color: #f1c40f;
    font-size: 10px;
}
/* --- BADGES DE QUALITÉ (Design exact de la vitrine) --- */
.quality-badge {
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 50px; /* Style pilule */
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: inline-block;
}



/* Effet au survol de la carte produit */
.product-card:hover .image-container img {
    transform: scale(1.05);
}

.image-link {
    display: block;
    overflow: hidden;
}

.image-container img {
    transition: transform 0.4s ease;
}
.image-container {
    position: relative; /* Indispensable pour que les boutons se placent dessus */
    overflow: hidden;
    border-radius: 12px;
}

.main-card-link {
    display: block;
    width: 100%;
    height: 100%;
}

.action-stack {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10; /* Force l'affichage au-dessus de l'image */
}

.action-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.action-btn i {
    font-size: 16px;
    color: #333;
}

/* Couleur quand c'est liké */
.wishlist-btn.liked i {
    color: #e74c3c;
}

/* Animation au clic sur l'image */
.image-container:active img {
    transform: scale(0.96);
    transition: transform 0.1s;
}
/* DESIGN LUXE POUR LES COUPONS */
.coupon-selectable {
    display: flex;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.coupon-selectable.active {
    border-color: #bf953f;
    box-shadow: 0 5px 15px rgba(191, 149, 63, 0.2);
}

/* La barre de couleur à gauche */
.cp-indicator {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
    font-size: 14px;
    position: relative;
}

/* Pointillés de découpe */
.cp-indicator::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 0;
    bottom: 0;
    width: 2px;
    border-right: 2px dashed rgba(255,255,255,0.5);
}

.cp-details {
    padding: 12px 15px;
    flex-grow: 1;
}

.cp-code-name {
    display: block;
    font-weight: 900;
    font-size: 14px;
    color: #111;
    text-transform: uppercase;
}

.cp-desc {
    font-size: 11px;
    color: #777;
}

/* L'icône de validation dorée */
.check-icon {
    align-self: center;
    margin-right: 15px;
    color: #ddd;
    font-size: 18px;
}

.coupon-selectable.active .check-icon {
    color: #bf953f;
}