/* =========================================
   STYLE PAGE PRODUIT (LUXE)
   ========================================= */

/* --- AJOUT DE L'ANIMATION SUR LES CONTENEURS --- */
.product-gallery, 
.purchase-panel, 
.product-info-full {
    /* J'ai mis 0.8s pour plus de rapidité */
    animation: fadeInDown 0.8s ease-out both;
}

/* Décalage pour l'effet de cascade */
.purchase-panel { animation-delay: 0.2s; }
.product-info-full { animation-delay: 0.4s; }

.product-page {
    position: relative;
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    
    /* Fond dégradé ambré - FORCER L'AFFICHAGE */
    background-color: #0e0e0e !important;
    background-image:
        radial-gradient(ellipse at 15% 50%, rgba(201, 164, 115, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 20%, rgba(201, 164, 115, 0.07) 0%, transparent 50%),
        linear-gradient(160deg, #0e0e0e 0%, #141210 50%, #0f0d0b 100%) !important;
}

.product-bg {
    display: none;
}

/* CONTENEUR PRINCIPAL */
.product-container {
    display: flex;
    flex-direction: column; 
    gap: 40px;
    max-width: 1200px;
    width: 98%;
    margin: 0 auto;
}

.product-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; 
    gap: 50px;
    align-items: start;
}

.product-description-full {
    width: 90%;
}

/* --- GALERIE IMAGES --- */
.product-gallery {
    display: flex;
    flex-direction: row; /* Sur desktop : on inverse avec row-reverse */
    gap: 14px;
    align-items: flex-start;
}

/* SUR DESKTOP : Inverser l'ordre pour que miniatures soient à gauche */
@media (min-width: 769px) {
    .product-gallery {
        flex-direction: row-reverse; /* Image principale à droite, miniatures à gauche */
    }
}

.thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 550px;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0; /* empêche la colonne de se réduire */
}

.thumbnails img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    object-fit: cover;
    display: block;
}

.thumbnails img:hover,
.thumbnails img.active {
    border-color: #c9a473;
}

.main-image {
    flex: 1; /* prend tout l'espace restant */
    max-width: 500px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.main-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}

/* SUR MOBILE : Ordre naturel (image en haut, miniatures en bas) */
@media (max-width: 768px) {
    .product-gallery {
        flex-direction: column; /* Ordre naturel du DOM */
        align-items: stretch;
    }

    .main-image {
        width: 100%;
        max-width: 100%;
        border-radius: 25px;
        margin-bottom: 12px;
    }

    .thumbnails {
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        padding-bottom: 6px; /* espace pour la scrollbar */
        /* Fix première image coupée */
        padding-left: 4px;
        padding-right: 4px;
        gap: 10px;
    }

    .thumbnails img {
        width: 60px;
        height: 60px;
        flex-shrink: 0; /* CRUCIAL : empêche les images de se comprimer */
    }
}

/* DÉFINITION DE L'ANIMATION (si pas déjà dans global.css) */
@keyframes fadeInDown {
    from { 
        opacity: 0; 
        transform: translateY(-30px); /* Négatif = vient du haut */
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
/* --- DÉTAILS PRODUIT (GLASSMORPHISM) --- */
.glass-panel {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px;
    color: #fff;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.tag {
    background: #fff;
    color: #000;
    padding: 1px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-details h1 {
    font-size: 2.5rem;
    margin: 20px 0 10px;
    font-weight: 700;
}

.price {
    font-size: 2rem;
    font-weight: 300;
    color: #ddd;
    margin-bottom: 25px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.description {
    font-size: 1rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 30px;
}

.features {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}

.features li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* BOUTON ACHETER */
.btn-buy {
    display: block;
    width: 100%;
    padding: 20px;
    background-color: #ffffff;
    color: #000000;
    text-align: center;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn-buy:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255,255,255,0.2);
    background-color: #f0f0f0;
}

.shipping-info {
    text-align: center;
    margin-top: 20px;
    color: #888;
    font-size: 0.85rem;
}

/* =========================================
   MODALE AJOUT PANIER (NOUVEAU)
   ========================================= */
.cart-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(8px);
    display: none; /* Caché par défaut */
    justify-content: center; align-items: center;
    z-index: 99999; 
    animation: fadeIn 0.3s ease;
}

.cart-modal-card {
    background: #111;
    border: 1px solid #333;
    padding: 40px; border-radius: 20px;
    text-align: center; max-width: 400px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    transform: translateY(20px); 
    animation: slideUp 0.3s ease forwards;
}

.success-icon-circle {
    width: 60px; height: 60px; margin: 0 auto 20px;
    background: #4caf50; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
}

.cart-modal-card h3 { font-size: 1.5rem; margin-bottom: 10px; color: #fff; margin-top:0; }
.cart-modal-card p { color: #aaa; margin-bottom: 30px; font-size: 0.95rem; }

.modal-buttons { display: flex; flex-direction: column; gap: 15px; }

.btn-view-cart {
    background: #fff; color: #000; padding: 15px;
    text-decoration: none; font-weight: 800; border-radius: 50px;
    text-transform: uppercase; transition: transform 0.2s;
    display: block; font-family: 'Montserrat', sans-serif;
}
.btn-view-cart:hover { transform: scale(1.05); }

.btn-continue {
    background: transparent; border: 1px solid #444; color: #ccc;
    padding: 12px; border-radius: 50px; cursor: pointer;
    font-size: 0.8rem; transition: 0.3s; font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}
.btn-continue:hover { border-color: #fff; color: #fff; }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { transform:translateY(20px); opacity:0; } to { transform:translateY(0); opacity:1; } }

/* --- SUR MOBILE (Le "Tout collé") --- */
@media (max-width: 900px) {
    .product-container {
        gap: 0 !important; 
        padding: 0 10px; /* Petit espace sur les côtés pour décoller du bord de l'écran */
    }

    .product-hero {
        display: block; 
    }

    /* 1. IMAGE : Arrondie partout pour créer une capsule indépendante */
    .main-image {
        aspect-ratio: 1 / 1;
        max-width: 100%;
        border-radius: 25px; /* Arrondi partout (haut et bas) */
        border: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 15px; /* Espace pour voir l'arrondi du bas de l'image */
    }

    /* 2. BLOC ACHAT : Début de la grande capsule de texte */
    .purchase-panel.glass-panel {
        border-radius: 25px 25px 0 0; /* Arrondi seulement en HAUT */
        margin-top: 0px; 
        border-bottom: none; /* Fusion avec le bloc suivant */
        padding: 30px 20px 10px 20px;
    }

    /* 3. BLOC DESCRIPTION : Fin de la grande capsule de texte */
    .product-info-full.glass-panel {
        border-radius: 0 0 25px 25px; /* Arrondi seulement en BAS */
        border-top: 1px solid rgba(255,255,255,0.05); /* Ligne de séparation subtile */
        padding: 10px 20px 40px 20px;
        margin-bottom: 20px; /* Espace en bas de page */
    }

    /* Ajustements texte mobile */
    .product-details h1 { font-size: 1.8rem; text-align: left; }
    .price { text-align: left; margin-bottom: 20px; }
    .info-grid { grid-template-columns: 1fr; gap: 20px; }
    
    .thumbnails {
        margin-top: 10px;
        margin-bottom: 20px;
    }
}
/* =========================================
   SECTION AVIS CLIENTS (REVIEWS)
   ========================================= */
   .reviews-section {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 5%;
    color: #fff;
}

.reviews-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

.reviews-header h2 {
    font-size: 1.8rem;
    font-family: 'Playfair Display', serif; /* Ta police titre */
    margin: 0;
}

.review-count-badge {
    /* 1. L'EFFET GLASS DORÉ */
    background: rgba(201, 164, 115, 0.25); /* Doré à 25% d'opacité */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); /* Pour Safari */
    
    /* 2. BORDURE & LUMIÈRE */
    border: 1px solid rgba(201, 164, 115, 0.5); /* Contour doré fin */
    box-shadow: 0 0 15px rgba(201, 164, 115, 0.2); /* Légère aura dorée */

    /* 3. TEXTE & FORME */
    color: #fff; /* Blanc (plus élégant que le noir sur du verre) */
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); /* Ombre portée pour lisibilité */
    
    font-weight: 700;
    font-size: 0.85rem;
    
    padding: 4px 12px; /* Un peu plus d'espace pour faire "capsule" */
    border-radius: 50px; /* Forme arrondie type "pillule" */
    
    vertical-align: middle;
    margin-left: 5px;
}

/* GRILLE DES AVIS */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* CARTE AVIS (Glassmorphism) */
.review-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.review-card:hover {
    background: rgba(255, 255, 255, 0.07);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-author {
    font-weight: bold;
    color: #fff;
    font-size: 1rem;
}

.verified-badge {
    font-size: 0.75rem;
    color: #4caf50; /* Vert pour "Achat vérifié" */
    display: flex;
    align-items: center;
    gap: 4px;
}

.review-stars {
    color: #c9a473; /* Étoiles dorées */
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.review-text {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.5;
    font-style: italic;
}

.review-date {
    display: block;
    margin-top: 15px;
    font-size: 0.75rem;
    color: #666;
    text-align: right;
}
/* =========================================
   ADAPTATION DYNAMIQUE LIVRAISON (PAGE PRODUIT)
   ========================================= */

/* On adapte le conteneur pour le fond sombre */
.product-page .shipping-badge-dynamic {
    background: rgba(255, 255, 255, 0.05); /* Fond transparent type verre */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px;
    border-radius: 12px;
    margin-top: 25px;
    margin-bottom: 20px;
}

/* Titre "Livraison" en gris clair */
.product-page .ship-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6); /* Gris perle */
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 700;
}

.product-page .ship-title svg {
    color: #c9a473; /* Rappel du doré Dreamini */
    width: 16px;
}

/* État du prix (Standard ou Gratuite) */
.product-page .ship-status {
    color: #ffffff; /* Texte blanc pour la lisibilité */
    font-size: 1.1rem;
    font-weight: 600;
}

/* On garde le vert pour la gratuité mais on le rend plus éclatant */
.product-page .ship-status.free {
    color: #4caf50; 
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Texte secondaire (Expédié sous 24h / Offerte dès...) */
.product-page .ship-sub {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Alerte Stock (si affichée) */
#stock-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 152, 0, 0.2);
}
/* Titres et listes dans la description */
.sub-title {
    color: #c9a473;
    font-size: 1.1rem;
    margin: 25px 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.benefit-list {
    list-style: none;
    padding: 0;
}

/* --- FIX RADICAL : ANTI-RÉTRÉCISSEMENT --- */

.benefit-list li {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0 !important; /* On utilise margin-right sur l'icône pour plus de contrôle */
    margin-bottom: 20px !important;
}

.benefit-list li i {
    /* LA RÈGLE MAGIQUE : flex-grow: 0, flex-shrink: 0, flex-basis: 28px */
    flex: 0 0 28px !important; 
    
    width: 28px !important;
    height: 28px !important;
    margin-right: 28px !important;
    margin-top: 4px !important; /* Aligne l'icône avec le haut du texte */
    color: #4caf50 !important;
    display: block !important;
}

/* On force l'icône SVG de Lucide à rester collée aux 28px du parent */
.benefit-list li i svg {
    width: 28px !important;
    height: 28px !important;
    display: block !important;
    stroke-width: 2.5 !important;
}

.benefit-list li span {
    flex: 1; /* Le texte prend tout le reste de la place, sans pousser l'icône */
    font-size: 0.95rem;
    line-height: 1.5;
}

.spec-block {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-block h4 {
    margin-top: 0;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(201, 164, 115, 0.3);
    padding-bottom: 8px;
    display: inline-block;
}

.spec-block ul {
    list-style: none;
    padding: 0;
    font-size: 0.85rem;
    color: #aaa;
}

.spec-block li {
    margin-bottom: 6px;
}

.pack-list, .cleaning-tips {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.6;
}

.pack-list i {
    width: 14px;
    margin-right: 8px;
    color: #c9a473;
}

/* Ajustement Grid Mobile */
@media (max-width: 900px) {
    .info-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
}