/*
 * Custom code goes here.
 * A template should always ship with an empty custom.css
 */

#checkout-header {
    border-bottom: 1px solid #ccc;
    background: #eee;
    position: fixed;
    width: 100%;
    z-index: 2;
}

#checkout #content-wrapper {
    margin-top: 150px;
}

#checkout a.text-muted.mt-2.mb-2.d-inline-block {
    float: right;
}

/* Custom - Menu Principale */
.cbp-horizontal .cbp-mainlink-icon, 
.cbp-horizontal .cbp-mainlink-iicon {
    display: block !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-bottom: 0.8rem !important;
    font-size: 2.3529411765rem !important;
    max-height: 2.3529411765rem !important;
    width: auto !important;
}

.cbp-horizontal .cbp-tab-title {
    display: block !important;
    text-align: center !important;
    font-size: 0.8823529412rem !important;
    line-height: 1em !important;
    font-weight: bold !important;
}

.cbp-horizontal > ul {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-end !important;
    float: none !important;
    margin: 0 auto !important;
    text-align: center !important;
    width: 100% !important;
}

.cbp-horizontal > ul > li {
    float: none !important;
    display: inline-block !important;
    margin: 0 !important;
}

.cbp-horizontal > ul > li > a.nav-link,
.cbp-horizontal > ul > li > a,
.cbp-horizontal > ul > li > a span.cbp-main-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 1rem !important;
    border-radius: 4px !important;
    position: relative !important;
    transition: all 0.2s ease-in-out !important;
}

.cbp-horizontal > ul > li > a:hover {
    width: 100% !important;
}

.cbp-horizontal .cbp-menu-badge,
.cbp-hrmenu .cbp-menu-badge {
    position: absolute !important;
    top: -14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 5 !important;
    white-space: nowrap !important;
}

/* Custom - Footer Generale */
#footer h5.block-title {
    border-bottom: 1px solid #e5e5e5 !important;
    padding-bottom: 6px !important;
    margin-bottom: 12px !important;
    display: block !important;
}

#footer .block-iqitcontactpage p,
#footer .block-iqitcontactpage .block-content > div {
    border-bottom: 1px solid #f0f0f0 !important;
    padding-bottom: 6px !important;
    margin-bottom: 6px !important;
}

#footer .block-newsletter form {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

#footer .block-newsletter .input-wrapper {
    display: flex !important;
    width: 100% !important;
}

#footer .block-newsletter input[type="email"] {
    flex-grow: 1 !important;
    width: calc(100% - 50px) !important;
    height: 44px !important;
    border: 1px solid #e0e0e0 !important;
    border-right: none !important;
    padding: 6px 12px !important;
}

#footer .block-newsletter button[type="submit"],
#footer .block-newsletter .btn {
    width: 50px !important;
    min-width: 50px !important;
    height: 44px !important;
    background-color: #f7c59f !important;
    border: 1px solid #f7c59f !important;
    color: #94783E !important;
    padding: 0 !important;
}

#footer .block-newsletter .ps-shown-by-js,
#footer .block-newsletter .custom-checkbox,
#footer .block-newsletter small {
    display: block !important;
    width: 100% !important;
    margin-top: 8px !important;
    font-size: 11px !important;
    color: #888 !important;
    line-height: 1.3 !important;
}

/* Custom - Footer Desktop */
@media (min-width: 768px) {
    #footer .footer-container > .container > .row:first-of-type {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
    }

    #footer .footer-container .col-12.col-md-auto {
        width: 25% !important;
        max-width: 320px !important;
    }

    #footer #footer-copyrights .container > .row {
        display: flex !important;
        flex-direction: row-reverse !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    #footer #footer-copyrights .container > .row > div:first-child {
        text-align: right !important;
    }

    #footer #footer-copyrights .container > .row > div:last-child {
        text-align: left !important;
    }
}

/* Custom - Footer Mobile */
@media (max-width: 767px) {
    #footer .footer-container .col-12.col-md-auto,
    #footer .footer-container .col-md {
        width: 100% !important;
        max-width: 100% !important;
    }

    #footer #footer-copyrights .container > .row {
        text-align: center !important;
    }

    #footer #footer-copyrights .payment-icons {
        margin: 10px auto !important;
    }
}

/* Custom - Vista Categorie Prodotti */
.view-switcher i.fa-solid,
.view-switcher i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
}

.view-switcher a[data-view="grid"] i::before {
    content: "\f00a" !important;
}

.view-switcher a[data-view="list"] i::before {
    content: "\f00b" !important;
}

.products-selection .view-switcher a {
    margin-right: 6px !important;
    font-size: 18px !important;
}

/* Custom - Selettore Quantità */
.bootstrap-touchspin .input-group-btn-vertical i,
.product-miniature .bootstrap-touchspin i,
.product-add-to-cart .bootstrap-touchspin i {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    display: inline-block !important;
    line-height: 1 !important;
    font-size: 11px !important;
}

.bootstrap-touchspin .bootstrap-touchspin-up i::before,
.bootstrap-touchspin .touchspin-up i::before {
    content: "\f077" !important;
}

.bootstrap-touchspin .bootstrap-touchspin-down i::before,
.bootstrap-touchspin .touchspin-down i::before {
    content: "\f078" !important;
}

/* Custom - Pulsante WhatsApp Flottante */
a.whatsapp-fixed-btn,
a.menu-item[href*="wa.me"] {
    animation: none !important;
    opacity: 1 !important;
    position: fixed !important;
    bottom: 75px !important; /* posizionato sopra al banner Resi e recesso */
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background-color: #25d366 !important; /* verde WhatsApp */
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
    z-index: 9999 !important;
}

a.whatsapp-fixed-btn .svg-icon,
a.menu-item[href*="wa.me"] .svg-icon {
    width: 30px !important;
    height: 30px !important;
}

a.whatsapp-fixed-btn path,
a.menu-item[href*="wa.me"] path {
    fill: #ffffff !important;
}

/* Custom - Risolve lo sfondamento della scheda prodotto */
.products .product-miniature,
.product-miniature .product-description {
    overflow: visible !important;
    height: auto !important;
}

/* Tronca leggermente la descrizione per estetica se abilitata */
.product-miniature .product-description-short {
    max-height: 4.8em !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 12px !important;
    line-height: 1.4 !important;
}

/* Nasconde le icone sovrapposte (cuore/wishlist, confronto) */
.product-miniature .product-functional-buttons {
    display: none !important;
}