/* --- Banner Header --- */
.bfce-banner {
    background-color: #111111;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 0;
    overflow: hidden;
    width: 100%;
    position: relative;
    z-index: 99999;
}

.bfce-global-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.bfce-global-link:hover {
    opacity: 0.9;
    color: inherit;
}

.bfce-splide .splide__track {
    overflow: hidden;
}

.bfce-splide .splide__list {
    display: flex;
    align-items: center;
}

.bfce-slide {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding: 0 30px;
}

.bfce-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e50914;
    margin-right: 8px;
}

.bfce-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
}

.bfce-text {
    color: #ffffff;
}

/* --- Sezione Prodotto WooCommerce (Countdown & Termometro) --- */
.bfce-woo-promo-box {
    background: #fff8f8;
    border: 1px solid #ffd2d2;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.bfce-countdown-wrap {
    margin-bottom: 12px;
}

.bfce-cd-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #b32d2e;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.bfce-countdown-timer {
    font-size: 16px;
    font-weight: bold;
    color: #111;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bfce-time-block {
    background: #111;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    min-width: 32px;
    display: inline-block;
}

.bfce-time-block small {
    display: block;
    font-size: 9px;
    font-weight: normal;
    color: #aaa;
    text-transform: uppercase;
}

.bfce-stock-section {
    margin-top: 10px;
    border-top: 1px dashed #ffd2d2;
    padding-top: 10px;
}

.bfce-stock-text {
    font-size: 13px;
    color: #333;
    margin-bottom: 6px;
}

.bfce-stock-text strong {
    color: #b32d2e;
}

/* Termometro / Barra di progresso scorte */
.bfce-thermometer-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.bfce-thermometer-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9800, #e50914);
    border-radius: 4px;
    transition: width 0.4s ease;
}


/* --- EFFETTO NEVE SU TUTTA LA PAGINA --- */
.bfce-global-snow-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Permette all'utente di cliccare sui prodotti e bottoni senza ostacoli */
    z-index: 999990; /* Subito sotto a menu fissi o popup ma sopra al contenuto normale */
    overflow: hidden;
}

.bfce-snow-layer {
    position: absolute;
    top: -100px;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: repeat;
    pointer-events: none;
}

/* Primo strato: Fiocchi piccoli */
.bfce-snow-layer1 {
    background-image:
            radial-gradient(3px 3px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(2px 2px at 150px 70px, rgba(255, 255, 255, 0.6), transparent),
            radial-gradient(3px 3px at 280px 120px, rgba(255, 255, 255, 0.7), transparent),
            radial-gradient(2px 2px at 400px 40px, rgba(255, 255, 255, 0.9), transparent);
    background-size: 500px 500px;
    animation: bfceGlobalSnow 10s linear infinite;
}

/* Secondo strato: Fiocchi medi (con un po' di rosso Black Friday) */
.bfce-snow-layer2 {
    background-image:
            radial-gradient(4px 4px at 80px 180px, rgba(255, 255, 255, 0.8), transparent),
            radial-gradient(5px 5px at 220px 300px, rgba(229, 9, 20, 0.6), transparent),
            radial-gradient(4px 4px at 370px 150px, rgba(255, 255, 255, 0.7), transparent);
    background-size: 400px 400px;
    animation: bfceGlobalSnow 15s linear infinite;
}

/* Terzo strato: Fiocchi grandi che scendono più lentamente */
.bfce-snow-layer3 {
    background-image:
            radial-gradient(6px 6px at 100px 50px, rgba(255, 255, 255, 0.9), transparent),
            radial-gradient(5px 5px at 320px 240px, rgba(255, 215, 0, 0.7), transparent);
    background-size: 600px 600px;
    animation: bfceGlobalSnow 20s linear infinite;
}

@keyframes bfceGlobalSnow {
    0% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(50vh) translateX(20px);
    }
    100% {
        transform: translateY(100vh) translateX(-20px);
    }
}


/* =================================================================
   PERSONALIZZAZIONE BLACK FRIDAY PER ASTRA & WOOCOMMERCE
   ================================================================= */

/* 1. NASCONDI IL BADGE DI SALDO PREDEFINITO DI ASTRA E WOOCOMMERCE */
.woocommerce span.onsale,
.ast-onsale-card,
.onsale {
    display: none !important;
}

/* 2. STILE PER IL NUOVO BADGE CUSTOM (.onsale-custom) */
.onsale-custom {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    background: #e50914 !important; /* Rosso Black Friday */
    color: #ffffff !important;      /* Testo bianco */
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    z-index: 99 !important;
    display: inline-block !important;
    box-shadow: 0 4px 10px rgba(229, 9, 20, 0.4) !important;
    line-height: 1.2 !important;
    pointer-events: none; /* Impedisce che il badge blocchi i click sull'immagine */

    /* Effetto pulsazione dinamica */
    animation: bfceBadgePulse 2.5s ease-in-out infinite;
}

/* Keyframes per l'animazione di pulsazione */
@keyframes bfceBadgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(229, 9, 20, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 14px rgba(229, 9, 20, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(229, 9, 20, 0.4);
    }
}

/*!* 3. PULSANTI "AGGIUNGI AL CARRELLO" NELL'ARCHIVIO / SHOP *!*/
/*.ast-woo-shop-product-actions .ast-on-card-button,*/
/*.woocommerce ul.products li.product .ast-on-card-button {*/
/*    background-color: #111111 !important; !* Sfondo nero *!*/
/*    color: #ffffff !important;           !* Testo bianco *!*/
/*    border: 1px solid #e50914 !important; !* Bordo rosso fuoco *!*/
/*    border-radius: 4px !important;*/
/*    font-weight: 700 !important;*/
/*    transition: all 0.2s ease-in-out !important;*/
/*}*/

/*!* Effetto hover sui bottoni *!*/
/*.ast-woo-shop-product-actions .ast-on-card-button:hover,*/
/*.woocommerce ul.products li.product .ast-on-card-button:hover {*/
/*    background-color: #e50914 !important; !* Sfondo rosso al passaggio *!*/
/*    color: #ffffff !important;*/
/*    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4) !important;*/
/*}*/
