/* --- 0. BASE E FONT --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
body, h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5, p, a, button, input { font-family: 'Poppins', sans-serif !important; }

/* --- 0.1 SFONDO --- */
body { background-image: url('/img/sfondo.jpg') !important; background-size: 300px !important; background-repeat: repeat !important; background-attachment: fixed !important; background-color: #f9f9f9 !important; }
#wrapper { background-color: transparent !important; }

/* --- 1. BARRA SPEDIZIONE --- */
.free-shipping-bar { width: 100% !important; background-color: #ffc107 !important; color: #000000 !important; text-align: center !important; font-weight: bold !important; padding: 10px 0 !important; font-size: 16px !important; text-transform: uppercase !important; display: block !important; }

/* --- 2. HEADER E LOGO --- */
#header, .header-top { background-color: #1a1a1a !important; }
#_desktop_logo { flex: 0 0 300px !important; max-width: 300px !important; padding: 10px 0 !important; }
#_desktop_logo a img { max-width: 100% !important; width: 300px !important; height: auto !important; }
#header .header-nav { display: flex !important; align-items: center !important; justify-content: flex-end !important; gap: 20px !important; height: 50px !important; background-color: #1a1a1a !important; color: #ffffff !important; }
#header .header-nav a, #header .header-nav span, #header .header-nav i { color: #ffffff !important; fill: #ffffff !important; }
#header { border-bottom: 4px solid #f39c12; }
.header-top, #header { border-top: 4px solid #f39c12; }

/* --- 2.1 CARRELLO --- */
#header .header-nav .blockcart, #header .header-nav .blockcart.inactive, #header .header-nav .blockcart a, #header .header-nav .blockcart span, #header .header-nav .blockcart i, #header .header-nav .blockcart .shopping-cart { color: #ffffff !important; fill: #ffffff !important; background-color: transparent !important; border: none !important; }

/* --- 3. PRODOTTI E BOTTONI (Miniature) - FIX ALLINEAMENTO --- */
.product-miniature { display: flex !important; flex-direction: column !important; height: 100% !important; position: relative !important; overflow: hidden !important; }
.product-miniature .thumbnail-container { display: flex !important; flex-direction: column !important; background: #ffffff !important; border: 2px solid #000000 !important; padding: 15px !important; height: 100% !important; }
.product-miniature .product-title { min-height: 45px !important; margin-bottom: 10px !important; }
.product-miniature .product-actions { margin-top: auto !important; padding-top: 15px !important; display: flex !important; flex-direction: column !important; justify-content: flex-end !important; width: 100% !important; }
.product-miniature .add-to-cart { width: 100% !important; margin: 0 auto !important; display: flex !important; justify-content: center !important; align-items: center !important; }

/* --- 4. SCHEDA PRODOTTO (Box Bianco) --- */
#product, .product-container { background-color: #ffffff !important; padding: 40px !important; border-radius: 10px !important; margin-bottom: 20px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important; }
#main { background-color: transparent !important; }
.h1 { font-weight: 700 !important; color: #1a1a1a !important; margin-bottom: 20px !important; }

/* --- 4.1 DESCRIZIONE LUNGA --- */
.product-description { max-height: 350px !important; overflow-y: auto !important; padding: 15px !important; border: 1px solid #eeeeee !important; border-radius: 8px !important; background-color: #fcfcfc !important; color: #333333 !important; line-height: 1.8 !important; font-size: 15px !important; }
.product-description::-webkit-scrollbar { width: 8px; }
.product-description::-webkit-scrollbar-track { background: #f1f1f1; }
.product-description::-webkit-scrollbar-thumb { background: #ffc107; border-radius: 4px; }

/* --- 5. FOOTER --- */
#footer { background-color: #1a1a1a !important; color: #ffffff !important; padding: 40px 0 !important; border-top: 5px solid #ffc107 !important; }
#footer .block_newsletter, #footer .footer-container, #footer .row { background-color: transparent !important; }
#footer h4, #footer a, #footer p, #footer li, #footer span { color: #ffffff !important; }

/* --- 6. PULIZIA E BLINDATURA BOTTONI --- */
.wishlist-button, .wishlist-button-add, .heart-icon, .wishlist-heart { display: none !important; }
.add-to-cart, .btn-primary { background-color: #ffc107 !important; color: #000000 !important; border-radius: 25px !important; padding: 10px 15px !important; font-weight: 700 !important; text-transform: uppercase !important; text-align: center !important; box-shadow: 0 4px 6px rgba(0,0,0,0.2) !important; border: none !important; font-size: 11px !important; white-space: nowrap !important; display: inline-block !important; transition: all 0.3s ease !important; }
.add-to-cart:hover, .btn-primary:hover { background-color: #e0a800 !important; color: #000000 !important; box-shadow: 0 6px 8px rgba(0,0,0,0.3) !important; }

/* --- CATEGORIE --- */
.category-header { padding: 0 !important; margin-bottom: 10px !important; }
.category-header h1 { margin: 0 !important; padding: 10px 0 !important; font-size: 24px !important; }

/* --- SOTTOCATEGORIE --- */
#subcategories ul { display: flex !important; flex-wrap: wrap !important; justify-content: flex-start !important; gap: 15px !important; padding: 0 !important; margin: 0 !important; }
#subcategories ul li { width: auto !important; min-width: 60px !important; text-align: center !important; margin: 0 !important; }
#subcategories .subcategory-image img { width: 50px !important; height: 50px !important; object-fit: contain !important; margin: 0 auto 5px auto !important; }
#subcategories .subcategory-name { font-size: 11px !important; white-space: nowrap !important; }

/* --- MEDIA QUERIES E FIX --- */
@media (max-width: 767px) {
    .product-description { max-height: none !important; height: auto !important; overflow: visible !important; padding: 10px !important; word-wrap: break-word !important; }
    .product-actions, .add-to-cart, #product .add-to-cart, .btn-primary { max-width: 100% !important; width: 100% !important; display: block !important; }
    #product, .product-container { padding: 15px !important; margin-bottom: 10px !important; }
    #footer { padding-bottom: 80px !important; }
    #footer .links ul li a, #footer .links ul li { color: #333333 !important; }
}

/* --- FIX POPUP E ALTRO --- */
#js-modal-content, .modal-content, #content-termini { color: #333333 !important; background-color: #ffffff !important; }
#js-modal-content p, .modal-content p, #js-modal-content li, .modal-content li, #content-termini p, #content-termini li { display: block !important; font-size: 14px !important; line-height: 1.5 !important; }
#content-termini h2 { color: #000000 !important; font-size: 18px !important; font-weight: bold !important; }
input[name="submitNewsletter"][value="OK"] { display: none !important; }
.block_newsletter p { color: #ffffff !important; }


/* --- 7. SLIDER FULL-WIDTH --- */
/* --- CONFIGURAZIONE DESKTOP --- */
@media (min-width: 768px) {
    #carousel, .carousel, .home-slider, .carousel-inner {
        width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        height: 550px !important;
        overflow: hidden !important;
    }
    .carousel-item, .carousel-item img {
        width: 100vw !important;
        height: 550px !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

/* --- CONFIGURAZIONE MOBILE --- */
@media (max-width: 767px) {
    #carousel, .carousel, .home-slider {
        width: 100% !important;
        position: relative !important;
        left: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        height: 200px !important;
    }
    .carousel-item img {
        width: 100% !important;
        height: 200px !important;
        object-fit: contain !important;
        object-position: center !important;
        background-color: #f6f6f6;
    }
}

/* --- FIX ACCAVALLAMENTO CATEGORIE --- */
.block-categories .category-sub-menu li {
    position: relative !important;
    padding-right: 30px !important; /* Spazio a destra per l'icona */
}

.block-categories .category-sub-menu .collapse-icons {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
}

.block-categories .category-sub-menu a {
    display: block !important;
    padding-right: 5px !important; /* Evita che il testo tocchi l'icona */
}

/* --- EFFETTO HOVER MENU PRINCIPALE --- */
.top-menu a[data-depth="0"]:hover,
.top-menu .dropdown-item:hover {
    color: #ffc107 !important;
    background-color: transparent !important; /* Mantiene lo sfondo pulito */
}

/* Aggiungiamo anche la sottolineatura al menu principale */
.top-menu a[data-depth="0"]:hover {
    border-bottom: 2px solid #ffc107 !important;
}
