/**
* 2007-2025 PrestaShop
* NOTICE OF LICENSE: Academic Free License (AFL 3.0)
*/

/* ==========================================================================
   1. STILI PER LE MINIATURE (VISUALIZZAZIONE NEL PRODOTTO)
   ========================================================================== */

#musthaveproduct_product_additional_info .musthaveproduct-thumbnails {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 10px; /* Aumentato leggermente per spaziatura */
    margin-top: 10px;
}

#musthaveproduct_product_additional_info .must-have-product {
    border: 1px solid rgba(0,0,0,0.1);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background: #fff;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    padding-bottom: 5px;
}

#musthaveproduct_product_additional_info a.optional-product.selected {
    border: 2px solid #2fb5d2; /* Colore evidenziato */
    box-shadow: 0 0 8px rgba(47, 181, 210, 0.3);
}

#musthaveproduct_product_additional_info .must-have-product:hover {
    border-color: #999;
}

#musthaveproduct_product_additional_info .must-have-product .current-price {
    margin-bottom: 0px;
    padding-top: 5px;
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

#musthaveproduct_product_additional_info .must-have-product .must-have-discount-wrapper {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 2;
    pointer-events: none;
}

#musthaveproduct_product_additional_info .must-have-product .must-have-discount-value {
    background-color: #f39d72;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-radius: 3px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

@media (max-width: 767px) {
    #musthaveproduct_product_additional_info .must-have-product {
        width: 80px; /* Più compatto su mobile */
    }
}

/* ==========================================================================
   2. STILI PER IL MODAL (POPUP) - VERSIONE "NUCLEAR" (FORZATA)
   ========================================================================== */

/* Overlay scuro a tutto schermo */
.musthave-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75) !important; /* Sfondo scuro */
    z-index: 2147483647 !important; /* Valore massimo possibile per stare sopra a tutto */
    backdrop-filter: blur(2px); /* Effetto sfocatura moderno (opzionale) */
    
    /* Centratura Flexbox */
    display: none; /* Gestito da JS (diventerà flex) */
    align-items: center !important;
    justify-content: center !important;
    
    /* Reset proprietà ereditate dal tema */
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

/* Box Bianco Centrale */
.musthave-modal-content {
    background: #fff !important;
    padding: 30px !important;
    border-radius: 8px !important;
    width: 90% !important;
    max-width: 550px !important;
    box-shadow: 0 15px 50px rgba(0,0,0,0.5) !important;
    position: relative !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    border: none !important;
}

/* Intestazione Modal */
.musthave-modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 15px !important;
    margin-bottom: 20px !important;
}

.musthave-modal-header h4 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #333 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Pulsante Chiudi (X) */
.musthave-close-modal {
    font-size: 30px !important;
    cursor: pointer !important;
    line-height: 20px !important;
    color: #aaa !important;
    font-weight: normal !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.musthave-close-modal:hover {
    color: #333 !important;
}

/* Corpo del Modal */
.musthave-modal-body p {
    font-size: 16px !important;
    color: #555 !important;
    margin-bottom: 10px !important;
    line-height: 1.5 !important;
}

/* Lista Prodotti nel Modal */
.musthave-modal-body ul#musthave-products-list {
    list-style: none !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    border-left: 4px solid #2fb5d2 !important; /* Colore azzurro */
    margin: 15px 0 25px 0 !important;
    border-radius: 0 4px 4px 0 !important;
}

.musthave-modal-body ul#musthave-products-list li {
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 15px !important;
    display: flex !important;
    align-items: center !important;
}
.musthave-modal-body ul#musthave-products-list li:last-child {
    margin-bottom: 0 !important;
}

.musthave-modal-body #musthave-modal-question {
    font-weight: bold !important;
    margin-top: 10px !important;
    display: block !important;
}

/* Footer con i Bottoni */
.musthave-modal-footer {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 15px !important;
    margin-top: 10px !important;
    border-top: 1px solid #eee !important;
    padding-top: 20px !important;
}

/* Stile Bottoni (Reset completo per evitare ereditarietà tema) */
.musthave-modal-footer .btn {
    padding: 12px 24px !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    letter-spacing: 0.5px !important;
    line-height: normal !important;
    height: auto !important;
    text-decoration: none !important;
    transition: opacity 0.2s !important;
    width: auto !important;
    display: inline-block !important;
}

/* Bottone Annulla (Grigio Scuro) */
.musthave-modal-footer .musthave-btn-cancel {
    background-color: #555 !important;
    color: #fff !important;
    border: 1px solid #555 !important;
}

/* Bottone Conferma (Verde o Colore Tema) */
.musthave-modal-footer .musthave-btn-confirm {
    background-color: #4cbb6c !important; /* Verde */
    color: #fff !important;
    border: 1px solid #4cbb6c !important;
    box-shadow: 0 4px 10px rgba(76, 187, 108, 0.3) !important;
}

.musthave-modal-footer .btn:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
}

/* Mobile responsive fixes */
@media (max-width: 576px) {
    .musthave-modal-content {
        padding: 20px !important;
        width: 95% !important;
    }
    .musthave-modal-footer {
        flex-direction: column-reverse !important;
    }
    .musthave-modal-footer .btn {
        width: 100% !important;
        text-align: center !important;
    }
}