/* ==========================================================================
   1. MODULE : RAMADAN FEATURED (Panier)
   ========================================================================== */
.ramadan-section-container {
    display: block !important;
    margin: 30px 0 !important;
    padding: 25px !important;
    background: #fff !important;
    border: 1px solid #f2ebe2 !important;
    border-radius: 8px !important;
}

.rf-item {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f9f9f9 !important;
}

.rf-img img {
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: 5px !important;
}

.rf-title { flex: 1 !important; font-weight: 600 !important; }

.rf-desktop { display: flex !important; }
.rf-mobile { display: none !important; }

/* MODIFICATION MOBILE UNIQUEMENT */
@media (max-width: 768px) {
    .rf-desktop { display: none !important; }
    .rf-mobile { display: block !important; width: 100% !important; }
    
    .rf-mobile-top { 
        display: flex !important; 
        flex-direction: column !important; /* Image puis Titre/Prix en dessous */
        align-items: center !important; 
        text-align: center !important;
        gap: 10px !important; 
    }

    .rf-mobile-top img {
        width: 100px !important; /* Image plus grande en mobile car seule sur sa ligne */
        height: auto !important;
    }

    .rf-mobile-top div {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    .rf-title { 
        display: block !important; 
        width: 100% !important; 
        margin: 5px 0 !important;
    }

    .rf-price {
        display: block !important;
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    .rf-action { 
        width: 100% !important; 
        display: block !important;
    }

    .rf-action button, .rf-action a {
        width: 100% !important; /* Bouton toute la largeur */
        display: block !important;
        text-align: center !important;
    }

    .rf-item { 
        padding: 20px 0 !important;
    }
}

/* ==========================================================================
   2. MODULE : RAMADAN PACKS (Nettoyage Flèches et Boutons)
   ========================================================================== 


/* Suppression des boutons sous les produits du pack */
.ramadan-pack-container .add-to-cart-button,
.ramadan-pack-container .product-small .button,
.ramadan-pack-container .quick-view {
    display: none !important;
}

/* --- NETTOYAGE DES FLÈCHES FLATSOME (Les doubles et les ombres) --- */
.ramadan-pack-container .flickity-prev-next-button {
    background: #c4a97a !important; /* Fond doré */
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 1 !important; /* Toujours visible */
    visibility: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important; /* Ombre uniquement sur le bouton */
}

/* On tue les ombres fantômes du thème qui restent en haut */
.ramadan-pack-container .flickity-prev-next-button:before,
.ramadan-pack-container .flickity-prev-next-button:after {
    display: none !important;
    box-shadow: none !important;
    content: none !important;
}

/* On cache l'icône SVG originale (la noire) */
.ramadan-pack-container .flickity-prev-next-button svg {
    display: none !important;
}

/* On dessine notre flèche (Chevrolet blanc) */
.ramadan-pack-container .flickity-prev-next-button::after {
    content: '›' !important;
    color: #ffffff !important;
    font-size: 30px !important;
    font-family: Arial, sans-serif !important;
    line-height: 1 !important;
    display: block !important;
}
.ramadan-pack-container .flickity-prev-next-button.previous::after {
    content: '‹' !important;
}

/* Positionnement précis pour pas que ça sorte du cadre */
.ramadan-pack-container .flickity-prev-next-button.previous { left: -10px !important; }
.ramadan-pack-container .flickity-prev-next-button.next { right: -10px !important; }

/* ==========================================================================
   3. BANDEAU CADEAU (PROPRE)
   ========================================================================== */
.ramadan-gift-indicator {
    background: linear-gradient(135deg, #c4a97a 0%, #d4b98e 100%) !important;
    border: 2px solid #b8985e !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 30px !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
}

.gift-check-icon { display: none !important; } /* Pas de ✓ */

.gift-indicator-text { display: flex !important; flex-direction: column !important; gap: 8px !important; }
.gift-indicator-text strong { font-size: 1.25rem !important; color: #3d2f1f !important; }
.gift-indicator-text .gift-name {
    font-size: 1rem !important;
    color: #4d3f2f !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
}

/* 1. On définit la zone de contenu comme la référence pour le bouton */
.mfp-wrap:has(.product-quick-view-container) .mfp-container {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    pointer-events: none !important; /* Laisse passer le clic vers la boîte blanche */
}

/* 2. On force la boîte blanche à être le parent positionnel */
.mfp-wrap:has(.product-quick-view-container) .mfp-content {
    position: relative !important;
    pointer-events: auto !important; /* Réactive le clic sur le produit */
    display: inline-block;
    vertical-align: middle;
    margin: 0 auto;
}

/* 3. On déplace le bouton CLOSE à l'intérieur du coin de la boîte blanche */
.mfp-wrap:has(.product-quick-view-container) button.mfp-close {
    position: absolute !important;
    /* Ces valeurs placent le bouton par rapport au COIN de la fenêtre blanche du produit */
    top: 10px !important; 
    right: 10px !important;
    
    /* Style visuel */
    width: 40px !important;
    height: 40px !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Forçage de la visibilité et du clic */
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    
    /* Annulation des effets Flatsome */
    mix-blend-mode: normal !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    transition: transform 0.2s !important;
}

/* 4. On s'assure que le SVG à l'intérieur est visible */
.mfp-wrap:has(.product-quick-view-container) button.mfp-close svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #000 !important;
    pointer-events: none !important; /* Évite que le SVG bloque le clic sur le bouton */
}

/* 5. Effet au survol */
.mfp-wrap:has(.product-quick-view-container) button.mfp-close:hover {
    transform: scale(1.1) !important;
    background-color: #f8f8f8 !important;
}

/* ==========================================================================
   5. DESIGN COMPTEUR (STYLE AVADA DORÉ/BEIGE)
   ========================================================================== */
.ramadan-countdown-wrapper {
    background: #c4a97a !important; /* Doré */
    padding: 25px 15px !important;
    border-radius: 12px !important;
    text-align: center !important;
    margin-bottom: 30px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.countdown-label {
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 15px !important;
    font-size: 0.85rem !important;
}

.countdown-display {
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
}

.cd-box {
    background: #f2ebe2 !important; /* Beige */
    color: #000000 !important; /* Noir */
    padding: 12px 10px !important;
    border-radius: 8px !important;
    min-width: 75px !important;
    display: flex !important;
    flex-direction: column !important;
}

.cd-box span {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
}

.cd-box label {
    font-size: 0.65rem !important;
    text-transform: uppercase !important;
    margin-top: 4px !important;
    font-weight: 600 !important;
    color: #3d2f1f !important;
}

.ramadan-gift-placeholder {
    display: none !important;
}


/* ==========================================================================
   6. Banderole
   ========================================================================== */

/* BANNIÈRE SOUS HEADER */
.ramadan-after-header-wrapper {
    background-color: var(--r-color);
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.ramadan-top-bar {
    height: auto !important;
    min-height: 45px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white;
    font-weight: 600;
    text-align: center;
}

.ramadan-top-bar a {
    background: white;
    color: var(--r-color) !important;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    text-transform: uppercase;
}

.close-ramadan {
    cursor: pointer;
    font-size: 24px;
    margin-left: 15px;
    opacity: 0.8;
}

/* On supprime les règles de padding-top sur le body que j'avais données avant */
body.ramadan-banner-visible {
    padding-top: 0 !important;
}

/* CADEAU FLOTTANT ÉPURÉ */
.ramadan-gift-float { 
    position: fixed !important; 
    top: 50% !important;
    right: 0 !important;
    transform: translateY(-50%) !important; 
    z-index: 999999 !important; 
    cursor: pointer; 
    display: flex !important;
    transition: transform 0.3s ease;
}

.ramadan-gift-float:hover {
    transform: translateY(-50%) translateX(-5px) !important; /* Petit effet au survol */
}

.r-gift-icon { 
    background: #fff; 
    border: 3px solid var(--r-color); 
    border-radius: 15px 0 0 15px; /* Arrondi seulement côté gauche */
    width: 55px; 
    height: 55px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 24px; 
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
}

.r-gift-badge {
    position: absolute; 
    top: -8px; 
    left: -12px;
    background: #d63031; 
    color: white !important;
    font-size: 9px; 
    padding: 2px 6px; 
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 10;
    white-space: nowrap;
}

