.bundle-tabs {
    margin: 0px 0px 20px 0;
}

.tab-titles li {
    display: inline-flex;
    margin-right: 5px;
    min-width: 25%;
}

.image-icon{
    width:30px !important;
    height: 30px !important;
    margin-right: 5px;
}

.tab-titles{
    margin:0px;
}

/* ── Sticky wrapper (macro tabs + sub-tabs + prezzo) ── */
/* "Due menu" (20/10/2026): la barra grande sta nel flusso e scorre via; uscita del tutto,
   ricompare compatta e fissata in alto (is-stuck). Il segnaposto .erc-sticky-spacer, alto quanto
   la barra grande, tiene ferma la pagina. left/width del fisso li imposta il JS dal segnaposto. */
#sticky-bundle-wrapper {
    position: relative;
    z-index: 99999;
    background: #fff;
    overflow-anchor: none;
}

#sticky-bundle-wrapper.is-stuck {
    position: fixed;
    top: var(--sticky-top, 0); /* --sticky-top impostata da JS: header agganciato o barra admin */
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    /* Niente dissolvenza (04/11/2026): la compatta si aggancia quando prende esattamente il posto
       della parte bassa della barra grande, la dissolvenza faceva vedere lo "scattino" */
}
/* Solo dissolvenza, ferma al suo posto (28/10/2026): prima scendeva dall'alto (translateY) e,
   salendo e scendendo, il menu sembrava muoversi */
@keyframes erc-sticky-in {
    from { opacity: .4; }
    to   { opacity: 1; }
}
#sticky-bundle-wrapper.erc-sticky-measuring { animation: none; }
@media (prefers-reduced-motion: reduce) {
    #sticky-bundle-wrapper.is-stuck { animation: none; }
}
/* Il segnaposto non deve far scattare lo "scroll anchoring" del browser */
.erc-sticky-spacer { overflow-anchor: none; }
/* Scroll anchoring spento su tutta la pagina del Negozio (04/11/2026): quando la barra diventa
   fissa Chrome spostava comunque la pagina in avanti dell'altezza della barra (~225px, misurato
   in qa/tests/307) — era lo "scattino" segnalato. Le compensazioni che servono le fa già il JS. */
body:has(#sticky-bundle-wrapper) { overflow-anchor: none; }

#sticky-bundle-wrapper.is-stuck .macro-tab-img,
#sticky-bundle-wrapper.is-stuck .macro-price {
    display: none !important;
}

/* Categoria attiva: da scrolled (is-stuck) resta in fila con le altre, evidenziata (19/10/2026 —
   prima spariva dal menu in alto e ricompariva su una riga a parte, .active-macro-title, ora
   sempre nascosta). */
.active-macro-title {
    display: none !important;
}

/* Categoria senza sottocategorie (es. Olio CBD): niente riga sotto (20/10/2026 — prima ripeteva
   il nome della categoria, già evidenziato nella barra sopra). Su telefono/tablet la riga resta
   vuota (prezzo e pulsante stanno nella barra flottante) e sparisce tutta: classe .no-subs dal JS. */
#sticky-bundle-row .direct-macro-label { display: none !important; }
@media (max-width: 992px) {
    #sticky-bundle-wrapper.no-subs .sticky-bundle-row { display: none; }
}


/* ── Macro tab bar ── */
.bundle-macro-tabs-bar {
    background: #fff;
    border-bottom: 2px solid #e8e8e8;
    width: 100%;
}

.bundle-macro-tabs-bar .macro-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.bundle-macro-tabs-bar .macro-tabs > li {
    flex: 1;
    display: flex;
    min-width: 0;
    margin: 0;
}

.macro-tab-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 8px;
    text-decoration: none !important;
    color: #555;
    border-bottom: 3px solid transparent;
    text-align: center;
    transition: border-color 0.2s, color 0.2s;
    gap: 2px;
}

.macro-tab-button:hover,
.macro-tab-button.active {
    border-bottom-color: #65bc7b;
    color: #2c7a2c;
}

.macro-tab-button .category-name {
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.macro-tab-button .macro-quantity {
    display: none;
}

.macro-tab-button .macro-price {
    font-size: 0.78rem;
    color: #2c7a2c;
    font-weight: 600;
    display: block;
}

/* ── Sub-tab row (all'interno dello sticky wrapper) ── */
.sticky-bundle-row {
    background: #fff;
}


.tab-titles li a {
    text-decoration: none;
    padding: 5px 15px 3px;
    color: #333;
    width:100%;
}

.tab-titles li a.active {
    border-bottom: 3px solid #65bc7b;
}
.row{
    display: flex;
    align-items: center;
    margin: 0px !important;
}

.subcategory-button-cart.active .category-name{
    color: #65bc7b !important;
}

.title-bundle{
    text-align: center;
    margin: 10px;
}

.tab-content {
    padding: 20px;
    border-top: none;
}

.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999999;
}

.exit-popup {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.exit-popup button {
    margin: 10px;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
}

#confirm-exit {
    background: red;
    color: white;
}

#cancel-exit {
    background: transparent;
    position: absolute;
    top: 0;
    right: 0;
    padding: 0px !important;
}

.quantity-btn {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-left: 5px;
    text-align: center;
    line-height: 30px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

/* Contenitore generale */
#bundle-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Singolo bundle */
#bundle-list li {
    padding: 5px 0;
    margin: 0;
}

/* Titolo del bundle */
#bundle-list li strong {
    font-size: 1.1rem;
    color: #000;
    display: block;
    margin: 10px 0px;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}

/* Lista prodotti nel bundle */
#bundle-list li ul {
    margin: 10px 20px 20px;
    padding: 0;
    font-style: italic;
    color: #555;
    list-style: disc;
}

/* Pulsanti - look minimale */
#bundle-list li a.button,
#bundle-list li .delete-bundle-button,
#bundle-list li .add-bundle-to-cart-button {
    border: 1px solid #ccc;
    background-color: transparent;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Effetto hover */
#bundle-list li a.button:hover,
#bundle-list li .delete-bundle-button:hover,
#bundle-list li .add-bundle-to-cart-button:hover {
    background-color: #f0f0f0;
    border-color: #888;
}

/* Pulsante 'Elimina' con leggera enfasi */
#bundle-list li .delete-bundle-button {
    color: #d9534f;
    border-color: #d9534f;
}

#bundle-list li .delete-bundle-button:hover {
    background-color: #f8d7da;
}

/* Pulsante 'Aggiungi al Carrello' con enfasi verde */
#bundle-list li .add-bundle-to-cart-button {
    color: #000;
    border-color: #f5a841;
    background-color: #f5a841;
}

#bundle-list li .add-bundle-to-cart-button:hover {
    background-color: #eb8e13;
    color: #000;
    border: 1px solid #eb8e13;
}

/* Responsive: layout pulito su mobile */
@media (max-width: 600px) {
    #bundle-list li {
        padding: 12px 0;
    }

    #bundle-list li a.button,
    #bundle-list li .delete-bundle-button,
    #bundle-list li .add-bundle-to-cart-button {
        display: block;
        width: 100%;
        margin-bottom: 8px;
        text-align: center;
    }
}


/* Contenitore principale del prodotto */
.woocommerce-saved-bundles .bundle-product, .bundle-tabs .bundle-product{
    padding: 12px;
    align-items: center;
}

/* Immagine del prodotto */
.woocommerce-saved-bundles .bundle-product img.product-thumbnail, .bundle-tabs .bundle-product img.product-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    cursor: grab;
}

/* Contenuto prodotto (titolo + descrizione) */
.bundle-product-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Titolo prodotto */
.product-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 4px;
    color: #d9534f;
}

/* Descrizione del prodotto — troncata a 3 righe, "Altro" mostra tutto (desktop + mobile) */
.product-summary {
    font-size: 0.9rem;
    color: #666;
    margin: 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-summary.expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* Prodotti con aromi (es. Cannabis Light): comportamento originale, NON a 3 righe.
   Intera su desktop; su mobile nascosta dietro il toggle .info-icon (vedi sotto). */
.product-summary.product-summary-aromi {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}
.product-summary-mobile {
    font-size: 0.9rem;
    color: #666;
    margin: 4px 0;
    line-height: 1.4;
    display: none;
}
.info-icon {
    cursor: pointer;
    font-size: 15px;
    text-align: center;
}
.info-icon:hover {
    color: #007bff;
}
@media screen and (min-width: 600px) {
    .info-icon {
        display: none;
    }
}
@media screen and (max-width: 600px) {
    .product-summary.product-summary-aromi {
        display: none;
    }
}

.description-toggle {
    display: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #65bc7b;
    text-align: left;
    margin: 2px 0 4px;
}
.description-toggle.visible {
    display: inline-block;
}
.description-toggle:hover {
    color: #4c8a5a;
}

/* Wrapper quantità */
.quantity-wrapper {
    width:100%;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto; /* Spinge il selettore quantità sulla destra */
}

.quantity-wrapper span {
  position: relative;
}

.quantity-wrapper span[data-currency]::after {
  position: absolute;
  content: attr(data-currency);
  right: 4.5em;
  top: 50%;
  transform: translate(-100%, -50%);
}

/* Input quantità — stile card (come variazioni trinciato) */
.product-quantity-bundle {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    background: #fff;
    border: 2px solid #ddd !important;
    border-radius: 10px;
    padding: 6px 4px;
    width: 56px;
    transition: border-color 0.2s, background 0.2s;
}
.input-grammi.change-bg .product-quantity-bundle {
    border-color: #65bc7b !important;
    background: #f0faf2;
}
.text-grammi{
    margin-top: -15px;
    font-weight: 600;
    padding:0;
    font-size: 14px;
}

/* Rimuove le frecce dai campi number */
.product-quantity-bundle::-webkit-inner-spin-button,
.product-quantity-bundle::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


.icon-row{
    padding: 0px 50px !important;
    background-color: #f2f9f1;
    margin-bottom:15px;
    display: none; /* sezione icone non più utilizzata (era già sempre nascosta via inline style) */
    align-items: center;
}
.help-button{
    cursor: pointer;
}
/*
.quantity-decrement:hover,
.quantity-increment:hover {
    background-color: #e6b800;
}
*/
/* Responsive (per schermi piccoli) */
@media (max-width: 600px) {
    .bundle-product {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 0px !important;
    }
    .tab-titles li{
        width:48%;
    }
    .icon-row{
        padding: 20px 0 !important;
        display: none; /* vedi regola base */
        align-items: center;
        justify-content: space-around;
    }
    .subcategory-description-toggle{
        padding: 20px 0 !important;
    }
    .title-tab {
        /*display: block !important;*/
        padding: 0px !important;
    }
    .quantity-wrapper {
        margin-left: 0;
        justify-content: center;
    }
    .row{
        display: block;
        text-align: center;
    }
    .tab-titles{
        padding-left: 0px;
    }
    .product-quantity-bundle {
        width: 60px;
    }

    .col-lg-4, .col-lg-5{
        padding-left: 0px !important;
        padding-right: 0px !important;
    }
    .woocommerce-saved-bundles .bundle-product img.product-thumbnail, .bundle-tabs .bundle-product img.product-thumbnail{
        border: none !important;
        padding: 0px !important;
    }

    .quantity-wrapper span[data-currency]::after{
            right: 4.5em !important;
    }
    .title-bundle{
        font-size: 25px !important;
    }
}

/* Contenitore delle categorie */
#category-summary {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Ogni categoria */
.category-summary-item {
    text-align: center;
    position: relative;
}

/* Icona della categoria */
.category-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f5f5f5;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin:0px auto;
    margin-top: 20px;
}

/* Numerino rosso (quantità) */
.category-quantity::before {
    content: "x";
}

.category-quantity {
    position: absolute;
    top: -8px;
    right: 0px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 21px;
    height: 21px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

/* Nome e prezzo categoria */
.category-info {
    margin-top: 8px;
    position: relative;
}

.category-name {
    display: block;
    font-weight: bold;
    text-align: center;
}

.category-price {
    display: block;
    color: #28a745;
    font-size: 1rem;
    text-align: center;
}

.subcategory-button.active .category-price {
    color: #fff;
}

/* Piccolo testo per "Prezzo per grammo" */
.per-gram {
    font-size: 0.75rem;
    color: #777;
    margin-left: 5px;
}

.subcategory-button.active .per-gram {
    color: rgba(255, 255, 255, 0.8);
}

/* Messaggio del prossimo scaglione */
.next-step-msg {
    font-size: 0.75rem;
    color: red;
    font-weight: bold;
    text-align: right;
}

/* Prezzo totale */
#bundle-total-price {
        text-align: right;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c7a2c;
    margin-right: 20px;
}

#bundle-total-price.has-discount{
    margin-right: 5px;
    font-size: 1.1rem;
}


/* Contenitore dei bottoni allineato a destra */
.bundle-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px; /* Spazio tra i bottoni */
    margin-top: 10px;
    margin-bottom: 10px;
    align-items: center;
}

/* Stile base per tutti i bottoni */
.bundle-buttons button {
    padding: 8px 16px;
    border-radius: 5px;
    border: 1px solid transparent;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
}

/* Bottone "Aggiungi al Carrello" (Verde) */
.bundle-buttons .add-bundle-to-cart, #popup-add-bundle-to-cart, .save-bundle-btn {
    border: 1px solid #f5a841;
    background-color: #f5a841;
    color: #000;
}

.bundle-buttons .add-bundle-to-cart:hover, #popup-add-bundle-to-cart:hover, .save-bundle-btn:hover {
    background-color: #eb8e13;
    color: #000;
    border: 1px solid #eb8e13;
}

/* Bottone "Elimina" (Rosso) */
.bundle-buttons .delete-bundle-button {
    border: 1px solid #dc3545;
    background-color: #fff;
    color: #dc3545;
}

.bundle-buttons .delete-bundle-button:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Bottone "Carica" (Grigio) */
.bundle-buttons .load-bundle-button {
    border: 1px solid #6c757d;
    background-color: #fff;
    color: #6c757d;
}

.bundle-buttons .load-bundle-button:hover {
    background-color: #6c757d;
    color: #fff;
}

/* Bottone "Salva Bundle" (Blu) */
.bundle-buttons .save-bundle-button {
    background-color: #fff;
    color: #007bff;
}

/* Mobile Responsive */


#global-next-step-msg{
    text-align: right !important;
}

/* Lista prodotti bundle */
.bundle-product-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 5px 0;
}

/* Link "Clicca qui" */
.edit-bundle-link {
    display: block;
    border: 1px solid #ccc;
    background-color: transparent;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 15px;
    max-width: max-content;
}

.edit-bundle-link:hover {
    color: #0056b3;
}

.shop_table .bundle-products .product-info .variation dd{
    margin: 0px !important;
}

.shop_table .product-info .variation dd{
    width:100%;
}

.product-title-out{
    position: absolute;
    top: 10px;
    left: 30px;
    font-size: 10px;
    padding: 10px;
    background-color: red;
    border-radius: 5px;
    color: #fff;
    z-index: 10;
}

.product-aromi {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.aroma-item {
    padding: 5px 10px;
    border-radius: 5px;
    max-width: 60px;
    text-align: center;
    font-size: 11px;
    line-height: 14px;
}

.save-text {
    display: block !important;
    padding: 5px 10px;
    text-align: center;
    color: #000 !important;
    font-size: 11px !important;
    line-height: 14px;
}

.aroma-icon {
    display: block;
    width: 30px;
    height: 30px;
    margin: 5px auto;
}
.tab-content > p{
    padding: 0px 30px 20px;
}

@media (max-width: 600px) {
    .bundle-buttons {
        flex-direction: column;
        align-items: flex-end;
    }
    .bundle-buttons button {
        width: 100%;
    }
    .category-quantity{
        right:5px;
        top:0px !important;
    }
    .category-info{
        margin-top: 0px;
        display: flex;
        gap:10px !important;
    }
    #category-summary {
        position: fixed;
        top: 175px;
        left: 50%;
        border-radius: 0px;
        transform: translateX(-50%);
        width: 100%;
        z-index: 1000;
        padding: 5px;
        display: flex;
        align-items: center;
        margin: 0px;
    }
    .per-gram{
        margin-left: 0px;
    }
    .tab-content > p{
        display: none;
    }
    .tab-content{
        padding: 20px 0;
    }
    .col-lg-9{
        padding: 0px !important;
    }
    .col-lg-3{
        text-align: center;
    }
    .product-aromi{
        /* position: absolute; */
        top: -315px;
        z-index: 999;
        right: 25px;
        gap: 8px;
        display: flex;
        right: 10px;
        justify-content: center;
        margin-bottom: 10px;
    }
    .aroma-icon{
        width: 35px;
        height: 35px;
    }
    .aroma-item{
        padding: 5px;
    }
    .category-icon{
        display: none;
    }
    .product-title-out{
        position: relative;
        left: 0px;
        top: 0px;
        display: block;
    }
    .notification{
        margin-bottom: 0 !important;
        font-size: 13px !important;
    }
    .scaglioni-icon, .info-toggle-text, .spedizioni-icon{
        display: flex;
        align-items: center;
        padding: 5px 0 !important;
    }
    .sticky-tab-titles{
        padding: 0px !important;
    }
    .toggle-content-wrapper{
        padding: 0px 10px !important;
    }
    .aromi-flex{
        display: flex;
        align-items: center;
        justify-content: space-around;
    }
    .bundle-tabs .col-lg-6, .bundle-tabs .col-lg-12{
        padding: 0px !important;
    }
}

@media screen and (min-width:992px){ 
    .bundle-product{
        display: flex;
    }
    .bundle-buttons-mobile{
        display: none;
    }
    #bundle-total-price-mobile{
        display: none !important;
    }
}
@media screen and (max-width:992px){
    .bundle-price-container, .bundle-buttons{
        display: none !important;
    }
    .save-button, .bundle-buttons-mobile {
        position: relative;
    }
    .discount-d{
        display: none;
    }
    /*
    .bundle-buttons-mobile::before {
        content: '';
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: white;
        height: calc(85px + 45px);
        z-index: 999; 
        display: block;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1); 
    }
    */

    .bundle-buttons-mobile .add-bundle-to-cart {
        background-color: #f5a841;
        color: #000;
        font-size: 15px;
        padding: 8px 12px;
        border: none;
        border-radius: 12px;
        font-weight: 600;
        text-align: center;
        line-height: 1.2;
    }
    .bundle-buttons-mobile .add-bundle-to-cart.stop + .bundle-buttons-mobile::before {
        display: none;
    }
    .save-button .save-bundle-button{
        position: fixed;
        transform: translateX(120%);
        z-index: 1000;
        transition: all 0.3s ease;
        bottom: 5px;
        /* display: flex; */
        display: none;
        align-items: center;
    }
    .bundle-buttons-mobile .add-bundle-to-cart.stop {
        /*position: absolute !important;*/
        bottom: -30px !important;
    }
    .save-button .save-bundle-button.stop{
        position: absolute !important;
        bottom: -85px !important;
    }
    .bundle-form.container{
        padding: 0px !important;
    }
    /*
    .bundle-buttons-mobile::before {
        display: none; 
    }
    
    .bundle-buttons-mobile.has-fixed-background::before {
        display: block; 
    }
    */
}

@media screen and (min-width:600px){

    .edit-bundle-link{
        width:100%;
    }
}

.custom-bundle-product-quantity .product-quantity{
    display: none;
}


#notification-bar {
    position: relative;
    width: 100%;
    z-index: auto;
    text-align: left;
}

.notification {
    background-color: #28a745; /* Verde per successo */
    color: #000;
    padding: 12px 20px;
    margin: 10px 0 0;
    font-size: 16px;
    opacity: 0;
     visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    z-index: 1001;
}

.notification.error {
    background-color: #dc3545; /* Rosso per errori */
}

.notification.warning {
    background-color: #ffc107; /* Giallo per avvisi */
}

.notification.show {
    opacity: 1;
     visibility: visible;
    transform: translateY(0);
}

.swiper-pagination {
    position: absolute;
    bottom: 10px !important;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 10;
}

.swiper-pagination-bullet {
    background: #000 !important;
    width: 10px !important;
    height: 10px !important;
    margin: 0 5px !important;
    opacity: 0.5 !important;
    transition: opacity 0.3s !important;
}

.swiper-pagination-bullet-active {
    background: #65bc7b !important;
    opacity: 1 !important;
}

.swiper-pagination-horizontal.swiper-pagination-bullets {
    justify-content: center !important;
}

.swiper-slide {
    padding: 1px;
}

.swiper-wrapper {
    margin-bottom: 25px;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: #fff;
    width: var(--progress-fill-width, 0%); /* impostata da JS (animateProgressBar) */
    transition: width 1s ease-in-out; /* Animazione fluida */
}

.subcategory-description-toggle{
    padding: 0px 30px;
}
.toggle-content-wrapper{
    padding: 0px 50px;
}

.scaglioni-icon, .save-bundle-button, .info-toggle-text, .spedizioni-icon, .info-toggle{
    cursor: pointer;
    border: none;
    background-color: transparent;
    padding: 10px;
    font-weight: 400;
}
.title-product{
    padding: 0px 10px;
}

.summary{
    padding: 10px;
}

.icon-minicart{
    display: flex;
}

.title-tab{
    display: none;
    padding: 30px 50px;
    align-items: center;
}
.title-tab h2{
    margin: 0px;
}

.bundle-form.container{
    width:100% !important;
}


.notification.hide-notification {
    transform: translateX(-90%);
}

.notification-tab {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    background: #ccc;
    padding: 11px 8px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 0 3px 3px 0;
    display: none;
    height: 100%;
}

.notification.hide-notification .notification-tab {
    display: block;
}

.warning .notification-content{
    color:#000;
    text-align: center;

}

.notification-content span{
    color: red;
}


.bundle-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    width: 100%;
}

.bundle-product-wrapper {
    width: 49%;
    box-sizing: border-box;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin: 10px 0;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.bundle-product-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.bundle-product {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

/* Immagine e contenuto, metà e metà */
.bundle-product > .col-lg-6 {
    flex: 1;
}

.container:before{
    display: none !important;
}

/* Mobile: impila i prodotti uno sopra l'altro */
@media (max-width: 600px) {
    .bundle-form{
        display: block !important;
    }
    .bundle-product-wrapper {
        width: 100%;
    }
    .bundle-product {
        display: block;
    }
    .quantity-decrement, .quantity-increment{
        width:70px !important;
    }
}

@media (max-width: 1200px) and (min-width:600px) {
    .bundle-product-wrapper{
        width:48%;
    }
    .bundle-product {
        display: block;
    }
}

.input-grammi{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px 8px;
    margin-top: 10px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.change-bg{
    border-color: #65bc7b;
    background: #f0faf2;
    box-shadow: 0 0 0 3px rgba(101,188,123,0.3);
}

.input-grammi input{
    background-color: transparent !important;
    height: 40px !important;
    width: 50% !important;
    height: 40px !important;
}

/* Bottoni + e - colorati e arrotondati */
.quantity-decrement, .quantity-increment {
    border: none;
    color: #65bc7b;
    background: transparent;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    width: 25%;
}

.has-visible-notification{
    z-index: 1001 !important;
}
.grammi-label {
    display: block;
    text-align: center;
    font-size: 12px;
    color: #65bc7b;
    font-weight: 600;
}

.mobile-deal-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: #fff;
    color: #1c1c1c;
    padding: 8px 12px 10px;
    z-index: 100001;
    border-radius: 20px 20px 0 0;
    margin: 0;
    overflow: visible;
    width: 100%;
    box-shadow: 1px 1px 10px #65bc7b;
    font-size: 13px;
}
/* Sezioni deal bar */
.deal-bar-section {
    padding: 4px 0 2px;
}

/* Notification bar condivisa */
#notification-bar {
    position: relative;
}
#notification-bar .notification {
    background: transparent;
    text-align: left;
    padding: 2px 8px 4px 2px !important;
    margin: 0;
    font-size: 13px !important;
    font-weight: 500;
    line-height: 1.2;
}
#notification-bar .warning .notification-content { color: #000; }
#deal-bar-scaglioni .progress-bar { display: none; }

/* Nome categoria attiva — condiviso tra scaglioni e altre categorie */
#mobile-category-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1c1c1c;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 0 3px;
}
#mobile-category-name::before { content: '📍'; margin-right: 3px; }

.mobile-category-total {
    font-size: 15px;
    font-weight: 700;
    color: #65bc7b;
}

/* Bottone piena larghezza */
.deal-bar-button {
    margin-top: 6px;
}
.deal-bar-button .add-bundle-to-cart {
    width: 100% !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

/* Desktop notification bar */
.notification-bar-desktop {
    display: none;
}
@media (min-width: 993px) {
    .notification-bar-desktop.notification-bar-visible {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 10000;
        background: #28a745;
        color: #000;
        text-align: center;
        padding: 10px 20px;
        font-size: 15px;
    }
}

.mobile-deal-bar::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9));
    z-index: -1;
    pointer-events: none;
}

.deal-icon {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 4px;
}

.deal-message {
    font-size: 12px;
    line-height: 1.4;
    padding: 0px 10px;
}

.deal-progress {
    display: flex;
    align-items: center;
    margin-top: 6px;
    gap: 5px;
    padding: 0px 10px;
}

.price-per-gram-label {
    font-size: 13px;
    color: #fff;
    opacity: 0.85;
    padding-left: 8px;
    white-space: nowrap;
}

.deal-progress .step-dot {
    width: 15px;
    height: 15px;
    background-color: #b4b4b4;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}
.dots-container .step-dot { 
        display: inline-block;
}

.deal-progress .step-dot.active {
    background-color: #facc15; /* giallo oro */
}

.step-dot {
  position: absolute;
  left: var(--dot-left, 0%); /* impostata da JS (renderFixedDots) */
  width: 15px;
  height: 15px;
  background-color: #444;
  border-radius: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
    z-index: 1;
}
        .step-dot:last-child:before, .step-dot.active:before{
            content: "✓";
            font-size: 10px;
            width: 15px;
            height: 15px;
            display: block;
            text-align: center;
        }
        .step-dot.active {
            background-color: #facc15;
        }
        .step-dot.animated {
            animation: pop-in 0.3s ease;
        }
.step-progress-bar {
  position: relative;
  height: 4px;
  background-color: #eee;
  margin-top: 5px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
}

.step-progress-inner {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #facc15;
  width: var(--progress-width, 0%);
  transition: width 0.6s linear;
  border-radius: 2px;
}

.step-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #facc15;
  width: var(--progress-width, 0%);
  transition: width 1.6s linear;
  border-radius: 1.5px;
}
        #deal-progress {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            width: 100%;
        }
.dots-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin-top: -6px;
}
#deal-success-animation {
    position: fixed;
    /* Posizionamento dinamico calcolato via JavaScript */
    top: var(--success-animation-top, 50%);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    min-width: auto;
    
    /* Sfumatura verde invece che viola */
    background: linear-gradient(135deg, #34c759 0%, #28a745 50%, #20c997 100%);
    
    color: white;
    padding: 30px 40px;
    border-radius: 0; /* Rimosso border-radius per effetto a tutto schermo */
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 4px 20px rgba(52, 199, 89, 0.4); /* Ombra verde */
    z-index: 10000;
    animation: popupAppear 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(10px);
    transform: translateY(0); /* Rimuovi il centramento */
}

/* Animazione di apparizione */
@keyframes popupAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7) rotate(-10deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

/* Variante con sfondo sfocato */
#deal-success-animation.with-backdrop::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: -1;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    /* Più piccolo da telefono (28/10/2026, richiesta cliente: "troppo grande") */
    #deal-success-animation {
        padding: 14px 18px;
        font-size: 14px;
        line-height: 1.35;
        max-width: 100%;
    }
    #deal-success-animation strong { font-size: 14px; }
}

@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none !important;
  transition:all 5s linear;
  bottom: -100px;
}

#notification-content,
#deal-progress {
  transition: opacity 0.3s ease;
}

.di-flex{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 5px;
}
.di-flex .category-quantity-ali {
    position: relative;
    background-color: transparent;
    color: #facc15;
    font-size: 14px;
    right: 0px;
        font-weight: bold;
        padding-left: 5px;

}

.di-flex .category-quantity-ali:before{
    content: "(";
}

.di-flex .category-quantity-ali:after {
    content: " g)";
}
.savings-display{
    font-weight: 700;
    padding-right: 10px;
        color: #65bc7b;
}

.category-savings.category-outdoor .savings-display[data-category="coltivazione-indoor"]{
    display: none;
}
.category-savings.category-indoor .savings-display[data-category="coltivazione-outdoor"]{
    display: none;
}

/* Cart espandibile */
        .mobile-deal-bar .cart-expandable-content {
            position: absolute;
            bottom: 100%;
            left: 0;
            right: 0;
            background: white;
            border-radius: 20px 20px 0 0;
            box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
            max-height: var(--cart-expandable-max-height, calc(100dvh - 70px)); /* impostata da JS (updateCartExpandableHeight) */
            transform: translateY(100%);
            transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease, visibility 0.3s ease;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            overflow: hidden;
            z-index: 10;
        }

        .mobile-deal-bar.expanded .cart-expandable-content {
            transform: translateY(0);
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
        }

        .cart-expandable-header {
            padding: 15px 20px 10px;
            background: #f8f9fa;
            border-radius: 20px 20px 0 0;
            border-bottom: 1px solid #eee;
            position: relative;
        }

        .cart-expandable-header h3 {
            margin: 0;
            font-size: 14px;
            font-weight: 600;
            color: #333;
            text-align: center;
        }

        .cart-handle-new {
            position: absolute;
            top: 6px;
            left: 50%;
            transform: translateX(-50%);
            width: 35px;
            height: 4px;
            background: #bbb;
            border-radius: 2px;
        }

        .cart-close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            font-size: 25px;
            cursor: pointer;
            color: #666;
            width: 25px;
            height: 25px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cart-close-btn:hover {
            background: #e9ecef;
        }

        .cart-items-list {
            max-height: calc(70vh - 80px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 0 15px 15px;
        }

        .cart-item-row {
            display: flex;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #f0f0f0;
            gap: 12px;
        }

        .cart-item-row:last-child {
            border-bottom: none;
        }

        .cart-item-img {
            width: 60px;
            height: 60px;
            border-radius: 6px;
            object-fit: cover;
            flex-shrink: 0;
        }

        .cart-item-details {
            flex: 1;
            min-width: 0;
        }

        .cart-item-name {
            font-size: 15px;
            font-weight: 600;
            color: #333;
            margin: 0 0 3px 0;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            text-wrap: auto;
        }
        
        .mobile-total-display {
            padding: 10px;
            text-align: center;
            font-weight: bold;
            font-size: 14px;
            line-height: 1.4;
        }
        
        /* Separatore verde tra categorie */
        .cart-category-separator {
            height: 2px;
            background-color: #4CAF50;
            margin: 15px 0;
        }

        .cart-item-cat {
            font-size: 11px;
            color: #666;
            margin: 0;
        }

        .cart-quantity-controls {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .cart-qty-btn {
            width: 26px;
            height: 26px;
            border: 1px solid #ddd;
            background: white;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 14px;
            font-weight: bold;
            color: #333;
        }

        .cart-qty-btn:hover {
            background: #f8f9fa;
        }

        .cart-qty-btn.minus { color: #dc3545; }
        .cart-qty-btn.plus { color: #28a745; }

        .cart-qty-display {
            min-width: 20px;
            text-align: center;
            font-weight: bold;
            font-size: 13px;
        }

        .cart-empty-msg {
            text-align: center;
            padding: 30px 20px;
            color: #666;
            font-size: 14px;
        }

        .mobile-cart-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.3);
            z-index: 100000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .mobile-cart-overlay.show {
            opacity: 1;
            visibility: visible;
        }

/* Pannello carrellino mobile — body-level per evitare stacking context del tema */
#bundleCartPanel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100003;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#bundleCartPanel.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

#bundleCartPanel .cart-items-list {
    flex: 1;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.expand-hint {
    position: fixed;
    bottom: 98px;
    color: white;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 700;
    z-index: 9999;
    opacity: 1;
    letter-spacing: 1.5px;
    transition: opacity 0.3s 
ease, transform 0.3s 
ease;
    pointer-events: none;
    text-align: center;
    margin: 0px auto;
}

.barretta {
    border-bottom: 5px solid #cecece;
    text-align: center;
    border-radius: 50px;
    width: 70px;
    margin: 5px auto;
}

.mobile-deal-bar.expanded .barretta {
    border-bottom: 0px solid #cecece;
    text-align: center;
    border-radius: 50px;
    width: 70px;
    margin: 0px;
}

.cart-empty-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

.expand-hint.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

/* Testo informativo nel carrello */
.cart-footer-info {
    display: none !important;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    text-align: center;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}
    
    /* CSS per la gestione degli sconti fidelity */

/* Contenitori principali */
.bundle-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.mobile-price-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Quando c'è uno sconto, barra il prezzo originale */
.bundle-price.has-discount,
#bundle-total-price-mobile.has-discount {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 0.8em;
}

.bundle-price.has-discount .bundle-price-discount {
    text-decoration: none !important;
    color: #e74c3c !important;
    opacity: 1 !important;
    font-weight: bold;
    display: inline-block;
    margin-left: 10px;
}

/* Stile per il prezzo scontato */
.bundle-price-discount {
    font-weight: bold;
    font-size: 1.5em;
    color: #2c7a2c;
    margin-right: 20px;
}

#bundle-total-price-mobile-discount {
    font-weight: bold;
    font-size: 1.1em;
}


/* Responsive per mobile */
@media (max-width: 768px) {
    .bundle-price-container {
        align-items: center;
        text-align: center;
    }
    
    .mobile-price-container {
        gap: 2px;
    }
    
    #bundle-total-price-mobile.has-discount {
        font-size: 0.85em;
    }
}

/* Animazioni opzionali */
.bundle-price-discount,
#bundle-total-price-mobile-discount {
    animation: fadeInDiscount 0.3s ease-in;
}

@keyframes fadeInDiscount {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quando non c'è sconto, assicurati che tutto sia normale */
.bundle-price:not(.has-discount),
#bundle-total-price-mobile:not(.has-discount) {
    text-decoration: none;
    color: inherit;
    opacity: 1;
    font-size: inherit;
}

.strong-price{
    text-align: right;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c7a2c;
    margin-right: 5px;
}

.mobile-deal-bar.expanded {
    border-radius: 0 !important;
    padding-top: 0;
}
.mobile-deal-bar.expanded #mobile-category-name,
.mobile-deal-bar.expanded #notification-bar,
.mobile-deal-bar.expanded #deal-bar-scaglioni {
    display: none !important;
}
.mobile-deal-bar.expanded .deal-bar-button .add-bundle-to-cart {
    padding: 12px;
}
.mobile-deal-bar.expanded .mobile-price-container {
    padding-left: 6px;
}

/* Cart price simple (nel carrellino filtrato per categoria) */
.cart-price-simple {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    text-align: right;
}
.cart-price-simple strong { color: #1c1c1c; }

.cart-macro-title {
    font-weight: 700;
    margin: 14px 0 6px 0;
    color: #1a1a1a;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-left: 3px solid var(--cart-category-color, #65bc7b);
    padding-left: 8px;
}
.cart-macro-divider {
    margin: 10px 0;
}

.cart-category-title {
    font-weight: bold;
    margin: 10px 0 5px 0;
    color: #333;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.title-icon {
    font-size: 18px;
}

.cart-notification-content {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    padding: 5px;
    background: #f5f5f5;
    border-radius: 4px;
}

.cart-category-section {
    margin-bottom: 15px;
}

.cart-price-grid {
    padding: 5px 15px;
    background: #f8f9fa;
    margin-top: 15px;
    border-radius: 8px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.total-row {
    border-top: 2px solid #ddd;
    margin-top: 8px;
    padding-top: 12px;
    font-size: 1.1em;
}

.category-total-grams {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
    text-decoration: none;
}

/* POPUP DESKTOP per Bundle */
.desktop-bundle-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.desktop-bundle-popup.active {
    display: block;
}

.desktop-bundle-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.desktop-bundle-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.desktop-bundle-popup-header {
    padding: 20px;
    background: linear-gradient(135deg, #34c759 0%, #28a745 50%, #20c997 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.desktop-bundle-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.desktop-bundle-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.desktop-bundle-popup-close:hover {
    transform: scale(1.2) rotate(90deg);
}

.desktop-bundle-popup-body {
    padding: 20px;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

.desktop-bundle-popup-body::-webkit-scrollbar {
    width: 8px;
}

.desktop-bundle-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.desktop-bundle-popup-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.desktop-bundle-popup-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* IMPORTANTE: Usa gli stessi stili del carrellino mobile */
.desktop-bundle-popup-body .cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 10px;
}

.desktop-bundle-popup-body .cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.desktop-bundle-popup-body .cart-item-info {
    flex: 1;
}

.desktop-bundle-popup-body .cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.desktop-bundle-popup-body .cart-item-quantity {
    color: #666;
    font-size: 14px;
}

.desktop-bundle-popup-body .cart-item-price {
    font-weight: 600;
    color: #667eea;
}

.desktop-bundle-popup-body .cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.desktop-bundle-popup-body .cart-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    color: #2c7a2c;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s ease;
}

.desktop-bundle-popup-body .cart-qty-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.desktop-bundle-popup-body .cart-total {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

.desktop-bundle-popup-body .cart-total-amount {
    font-size: 24px;
    color: #667eea;
}

.desktop-bundle-popup-body .add-bundle-to-cart-mobile {
    width: 100%;
    padding: 15px;
    background: #f5a841;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.desktop-bundle-popup-body .add-bundle-to-cart-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Nascondi su mobile */
@media (max-width: 768px) {
    .desktop-bundle-popup {
        display: none !important;
    }
}

/* ===== SEZIONE SCONTO PUNTI (DISCOUNT) ===== */

.cart-discount-section {
    margin-top: 15px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 10px;
    padding: 12px;
}

.discount-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 8px;
}

.discount-title {
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4338ca;
    font-size: 14px !important;
}

.discount-icon {
    font-size: 18px;
}

.discount-points-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: auto;
}

.discount-toggle-icon {
    color: #4338ca;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.discount-section-content {
    padding-top: 10px;
    display:flex;
}

.discount-description {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.4;
    width:40%;
}

.discount-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    padding:0px 15px;
}

.discount-qty-btn {
    width: 36px;
    height: 27px;
    border: 1px solid #667eea;
    background: white;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #667eea;
}

.discount-qty-btn:hover {
    background: #667eea;
    color: white;
}

.discount-points-input {
    width: 80px;
    text-align: center;
    border: 1px solid #667eea;
    border-radius: 8px;
    padding: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #4338ca;
    background: white;
}

.discount-points-input::-webkit-inner-spin-button,
.discount-points-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.discount-points-input[type=number] {
    -moz-appearance: textfield;
}

.discount-preview {
    text-align: center;
    font-size: 14px;
    color: #333;
    padding: 8px;
    background: white;
    border-radius: 6px;
}

.discount-preview strong {
    color: #4338ca;
    font-size: 16px;
}

.points-discount-row span {
    color: #4338ca;
}

/* Responsive per mobile */
@media (max-width: 480px) {
    .cart-discount-section {
        padding: 10px;
    }

    .discount-points-input {
        width: 70px;
    }

    .discount-qty-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* ===== SEZIONE CREDITO RESO ===== */

.cart-credit-section {
    margin-top: 15px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    padding: 12px;
}

.credit-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
}

.credit-title {
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2e7d32;
    font-size: 14px !important;
}

.credit-icon {
    font-size: 18px;
}

.credit-balance-badge {
    background: #43a047;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: auto;
}

.credit-section-content {
    padding-top: 10px;
    display: flex;
}

.credit-description {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.4;
    width: 40%;
}

.credit-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 0px 15px;
}

.credit-qty-btn {
    width: 36px;
    height: 27px;
    border: 1px solid #43a047;
    background: white;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #43a047;
}

.credit-qty-btn:hover {
    background: #43a047;
    color: white;
}

.credit-amount-input {
    width: 80px;
    text-align: center;
    border: 1px solid #43a047;
    border-radius: 8px;
    padding: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #2e7d32;
    background: white;
}

.credit-amount-input::-webkit-inner-spin-button,
.credit-amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.credit-amount-input[type=number] {
    -moz-appearance: textfield;
}

.credit-preview {
    text-align: center;
    font-size: 14px;
    color: #333;
    padding: 8px;
    background: white;
    border-radius: 6px;
}

.credit-preview strong {
    color: #2e7d32;
    font-size: 16px;
}

/* Responsive per mobile */
@media (max-width: 480px) {
    .cart-credit-section {
        padding: 10px;
    }

    .credit-amount-input {
        width: 70px;
    }

    .credit-qty-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* ===== SEZIONE PRODOTTI OMAGGIO (GIFT) ===== */

.gift-separator {
    margin-top: 15px !important;
    border-top: 2px dashed #f5a841;
}

.cart-gift-section {
    margin-top: 15px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
    border-radius: 10px;
    padding: 12px;
}

.gift-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 8px;
}

.gift-title {
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d4920a;
    font-size: 14px !important;
}

.gift-icon {
    font-size: 18px;
}

.gift-counter {
    background: #f5a841;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: auto;
}

.gift-toggle-icon {
    color: #d4920a;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.gift-section-content {
    padding-top: 10px;
}

.gift-description {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.gift-category-accordion {
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8d9b5;
}

.gift-accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    background: #fffcf5;
    transition: background 0.2s ease;
}

.gift-accordion-toggle:hover {
    background: #fff8eb;
}

.gift-cat-name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}

.accordion-arrow {
    color: #999;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.gift-accordion-content {
    padding: 8px;
    border-top: 1px solid #e8d9b5;
}

.gift-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 6px;
}

.gift-item-row:last-child {
    margin-bottom: 0;
}

.gift-item-img {
    width: 45px;
    height: 45px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.gift-item-details {
    flex: 1;
    min-width: 0;
}

.gift-item-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gift-item-badge {
    display: inline-block;
    background: #f5a841;
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 3px;
    text-transform: uppercase;
}

.gift-quantity-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gift-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #333;
}

.gift-qty-btn:hover:not(:disabled) {
    background: #f5a841;
    border-color: #f5a841;
    color: white;
}

.gift-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gift-qty-btn.plus {
    background: #f5a841;
    border-color: #f5a841;
    color: white;
}

.gift-qty-btn.plus:hover:not(:disabled) {
    background: #e09530;
    border-color: #e09530;
}

.gift-qty-display {
    width: 24px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

/* Responsive per mobile */
@media (max-width: 480px) {
    .cart-gift-section {
        padding: 10px;
    }

    .gift-item-img {
        width: 40px;
        height: 40px;
    }

    .gift-item-name {
        font-size: 11px;
    }

    .gift-qty-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
}
/* ── Popup desktop e carrellino mobile: struttura sezioni ── */
.cart-section-divider {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 12px 0;
}

.cart-category-total {
    text-align: right;
    font-weight: 700;
    font-size: 1rem;
    color: #2c7a2c;
    padding: 4px 0 8px;
}

/* Variazione prodotto */
.variation-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
}

.variation-row:first-child {
    border-top: none;
}

.variation-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.variation-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.variation-price {
    font-size: 0.85rem;
    color: #2c7a2c;
    font-weight: 700;
}

.variation-rows {
    margin-top: 8px;
}

.variation-row .input-grammi {
    margin-top: 4px;
    width: 100%;
}

#erc-float-cart-btn{
    background-color: #f5a841e3 !important;
}

#erc-float-cart-btn .erc-float-cart-total{
    color:#000 !important;
}

/* ==========================================================================
   Sticky wrapper — scroll orizzontale tab su mobile
   ========================================================================== */

/* Immagine categoria nel macro tab — SOLO mobile (vedi @media sotto): su desktop
   occupava spazio nel flex-column .macro-tab-button e rompeva l'allineamento delle tab. */
.macro-tab-img {
    display: none;
}

@media (max-width: 992px) {
    /* Macro tab bar: scroll orizzontale */
    .macro-tabs-scroll-wrap {
        position: relative;
        overflow: hidden;
    }
    .bundle-macro-tabs-bar {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .bundle-macro-tabs-bar::-webkit-scrollbar { display: none; }

    .bundle-macro-tabs-bar .macro-tabs {
        width: max-content;
        min-width: 100%;
    }
    .bundle-macro-tabs-bar .macro-tabs > li {
        flex: 0 0 auto;
    }
    .macro-tab-button {
        min-width: 80px;
        max-width: 150px;
    }

    /* Titoli prodotto e nomi categoria nelle tab — dimensioni dedicate mobile */
    .bundle-product-non-scaglioni .bundle-product-title {
        font-size: 1rem; /* 16px */
    }
    .grammi-label {
        font-size: 14px;
    }
    .macro-tab-button .category-name {
        font-size: 0.75rem; /* 12px — sovrascrive lo 0.9rem globale, serve specificità pari */
    }
    .category-name {
        font-size: 0.75rem; /* 12px — copre anche il nome categoria nei sub-tab */
    }

    /* Immagine categoria nel macro tab — visibile solo qui (mobile). Tutte rettangolari 4:3
       a tutta larghezza della tab (23/10/2026): prima l'altezza fissa era annullata da un
       "height:auto" del tema e ogni immagine prendeva le proporzioni del proprio file. */
    .macro-tabs .macro-tab-button .macro-tab-img {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        object-position: center;
        border-radius: 10px;
        margin: 0 auto 4px;
    }

    /* Sub-tab col: position:relative per l'arrow */
    .sticky-tabs-col {
        position: relative;
        overflow: hidden;
        padding: 0;
    }

    /* Sub-tab row: scroll orizzontale */
    .sticky-tab-titles {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .sticky-tab-titles::-webkit-scrollbar { display: none; }

    .sticky-tab-titles .sub-tabs-for-macro {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
        min-width: 100%;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .sticky-tab-titles .sub-tabs-for-macro li {
        flex: 0 0 auto;
        white-space: nowrap;
        /* Annulla il 48% imposto dal breakpoint 600px */
        width: auto !important;
    }

    /* Frecce scroll hint */
    .macro-tabs-scroll-arrow,
    .sticky-tabs-scroll-arrow {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 44px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.93));
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 6px;
        pointer-events: none;
        z-index: 10;
        font-size: 22px;
        color: #666;
        line-height: 1;
        transition: opacity 0.2s;
    }
    .macro-tabs-scroll-arrow.scroll-arrow-hidden,
    .sticky-tabs-scroll-arrow.scroll-arrow-hidden {
        opacity: 0;
        pointer-events: none;
    }

    .macro-tabs-scroll-arrow-left,
    .sticky-tabs-scroll-arrow-left {
        left: 0;
        right: auto;
        background: linear-gradient(to left, transparent, rgba(255,255,255,0.93));
        justify-content: flex-start;
        padding-left: 6px;
        padding-right: 0;
    }
}

/* ==========================================================================
   Floating icons + side popup — mobile ≤992px
   ========================================================================== */

@media (min-width: 993px) {
    #erc-float-bar,
    #erc-side-popup,
    /* Frecce di scroll orizzontale tab — utili solo quando le tab vanno in
       overflow su schermi stretti; su desktop restavano visibili come testo
       semplice ('‹'/'›') perché tutte le loro regole erano solo dentro il
       media query mobile, senza uno stato di default nascosto. */
    .macro-tabs-scroll-arrow,
    .macro-tabs-scroll-arrow-left,
    .sticky-tabs-scroll-arrow,
    .sticky-tabs-scroll-arrow-left,
    /* Popup carrello mobile (#erc-cart-popup) — stesso bug: tutte le regole
       (incluso il display:none di stato chiuso) erano solo nel media query
       mobile, quindi restava visibile in coda alla pagina anche da desktop
       indipendentemente dalla classe .active. */
    #erc-cart-popup,
    /* Titolo categoria "is-stuck" — pensato solo per sostituire la tab bar su
       mobile quando si scrolla; su desktop lo stato is-stuck non è mai stato
       distinto da mobile, quindi compariva anche lì. Il logo sticky invece dal
       23/10/2026 compare anche su desktop accanto alle categorie (richiesta cliente). */
    .active-macro-title { display: none !important; }
}

@media (max-width: 992px) {

    /* ── Barra in basso (02/11/2026): tab come in un'app, sempre visibili ──── */
    :root { --erc-tabbar-h: calc(60px + env(safe-area-inset-bottom, 0px)); }
    #erc-float-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: var(--erc-tabbar-h);
        padding: 0 4px env(safe-area-inset-bottom, 0px);
        box-sizing: border-box;
        display: flex;
        align-items: stretch;
        gap: 4px;
        background: #fff;
        border-top: 1px solid #e5e5e5;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
        z-index: 1000000; /* sopra pannelli e carrellino: i tab restano toccabili */
    }

    .erc-float-btn {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        margin: 6px 0;
        padding: 0 2px;
        background: transparent;
        color: #333;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: background 0.15s;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    .erc-float-btn.is-active { background: #eef6f0; }
    .erc-float-btn.erc-btn-hidden { display: none !important; }

    .erc-float-icon {
        font-size: 20px;
        line-height: 1;
        display: block;
    }
    .erc-float-icon svg { display: block; width: 22px; height: 22px; } /* icone a linea (04/11/2026) */
    .erc-float-label {
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* La barra in basso del Negozio (scaglione/categoria) sta sopra i tab */
    .mobile-deal-bar { bottom: var(--erc-tabbar-h); }

    /* ── Pannello dei tab: sale dal basso come il riepilogo (02/11/2026) ───── */
    #erc-side-popup {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: var(--erc-tabbar-h);
        z-index: 100002;
        pointer-events: none;
        overflow: hidden;
    }
    #erc-side-popup.erc-popup-open {
        pointer-events: all;
    }

    .erc-popup-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }
    #erc-side-popup.erc-popup-open .erc-popup-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .erc-popup-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: calc(100% - 60px);
        background: #fff;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        will-change: transform;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
    }
    #erc-side-popup.erc-popup-open .erc-popup-panel {
        transform: translateY(0);
    }

    .erc-popup-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
        background: #fff;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    .erc-popup-title {
        margin: 0;
        font-size: 18px;
        font-weight: 700;
        color: #1a1a1a;
    }
    .erc-popup-close {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 40px;
        padding: 0 14px;
        background: #f3f3f3;
        border: none;
        border-radius: 999px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        color: #333;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
    }

    .erc-popup-body {
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 16px 12px 24px;
        -webkit-overflow-scrolling: touch;
    }
    .erc-popup-loading {
        text-align: center;
        color: #888;
        padding: 40px 0;
        font-size: 15px;
    }

    /* ── Popup spedizione ──────────────────────────────────────────────────── */
    .erc-popup-cap-label {
        display: block;
        font-weight: 600;
        margin-bottom: 8px;
        font-size: 15px;
    }
    .erc-popup-cap-input {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 20px;
        text-align: center;
        letter-spacing: 3px;
        box-sizing: border-box;
        margin-bottom: 14px;
    }
    .erc-popup-cap-result {
        font-size: 15px;
        line-height: 1.6;
        min-height: 40px;
    }

    /* ── Popup fidelity ────────────────────────────────────────────────────── */
    .erc-popup-fidelity-boxes {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 20px;
    }
    .erc-popup-fidelity-box {
        flex: 1;
        min-width: 140px;
        background: #f9f9f9;
        border: 1px solid #eee;
        border-radius: 10px;
        padding: 16px 12px;
        text-align: center;
    }
    .erc-popup-fidelity-box h4 {
        margin: 0 0 8px;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #999;
        font-weight: 600;
    }
    .erc-fid-value {
        font-size: 30px;
        font-weight: 700;
        color: #1a1a1a;
        line-height: 1;
        margin-bottom: 6px;
    }
    .erc-fid-sub {
        font-size: 12px;
        color: #666;
        line-height: 1.4;
    }

    .erc-popup-fidelity-accordion-toggle {
        width: 100%;
        background: none;
        border: none;
        border-top: 1px solid #eee;
        padding: 16px 0;
        text-align: left;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #333;
        -webkit-tap-highlight-color: transparent;
    }
    .erc-popup-fidelity-accordion-content {
        display: none;
        padding-bottom: 16px;
        font-size: 14px;
        line-height: 1.6;
        color: #444;
    }
    .erc-popup-fidelity-accordion-content.open {
        display: block;
    }
    .erc-popup-prezzi-content {
        font-size: 14px;
        line-height: 1.6;
    }
    /* Le tabelle prezzi hanno width:60% e padding scritti nel testo dell'opzione
       (style inline): !important serve a batterli. Nel pannello vanno a tutta larghezza. */
    .erc-popup-prezzi-content table {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 0 8px !important;
    }

    /* ── Float bar: icona carrello con totale ─────────────────────────────── */
    .erc-float-cart-total {
        font-size: 10px;
        font-weight: 700;
        color: #fff;
        letter-spacing: 0.2px;
        line-height: 1;
        display: block;
        white-space: nowrap;
    }

    /* ── Popup carrello completo (#erc-cart-popup) ────────────────────────── */
    #erc-cart-popup {
        display: none;
        position: fixed;
        inset: 0 0 var(--erc-tabbar-h) 0; /* termina sopra i tab in basso */
        z-index: 999999;
    }
    #erc-cart-popup.active {
        display: block;
    }
    .erc-cart-popup-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.5);
    }
    .erc-cart-popup-panel {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 16px 16px 0 0;
    }
    .erc-cart-popup-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid #eee;
        background: #fff;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 1;
    }
    .erc-cart-popup-close {
        background: none;
        border: none;
        color: #555;
        font-size: 28px;
        cursor: pointer;
        padding: 4px 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
    }
    .erc-cart-popup-title {
        margin: 0;
        font-size: 17px;
        font-weight: 700;
        color: #1a1a1a;
        flex: 1;
    }
    .erc-cart-popup-body {
        flex: 1;
        overflow-y: auto;
        padding: 16px 16px 60px;
        -webkit-overflow-scrolling: touch;
    }
}

/* Bottoni SALVA / SVUOTA nell'header del popup carrello */
.erc-cart-header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #1a1a1a;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    min-height: 32px;
}
.erc-cart-header-icon-btn:hover {
    border-color: #65bc7b;
    background: #f0faf2;
    color: #2c7a2c;
}
.erc-cart-header-icon-btn:active { background: #e4f5e8; }

/* Modal di conferma (salva / svuota) */
#erc-cart-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000010;
    display: flex;
    align-items: center;
    justify-content: center;
}
.erc-cart-confirm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
}
.erc-cart-confirm-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 24px 20px 20px;
    max-width: 300px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    text-align: center;
}
.erc-cart-confirm-msg {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px;
    line-height: 1.4;
}
.erc-cart-confirm-actions {
    display: flex;
    gap: 10px;
}
.erc-cart-confirm-ok,
.erc-cart-confirm-cancel {
    flex: 1;
    padding: 11px 0;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.erc-cart-confirm-ok {
    background: #f5a841;
    color: #fff;
}
.erc-cart-confirm-ok:hover { background: #e09630; }
.erc-cart-confirm-cancel {
    background: #f0f0f0;
    color: #444;
}
.erc-cart-confirm-cancel:hover { background: #e0e0e0; }

/* Span prezzo mobile (nascosti — usati solo internamente da JS per il float cart, mai mostrati:
   il prezzo/sconto è già visibile sotto l'icona del carrello float) */
#bundle-total-price-mobile,
#bundle-total-price-mobile-discount {
    display: none !important;
}

/* ==========================================================================
   Logo sticky + macro-tabs-row
   ========================================================================== */

.macro-tabs-row {
    display: flex;
    align-items: stretch;
}
.macro-tabs-row .macro-tabs-scroll-wrap {
    flex: 1;
    min-width: 0;
}

.erc-sticky-logo-wrap {
    display: none;
    flex-shrink: 0;
    align-items: center;
    padding: 4px 8px 4px 4px;
}
#sticky-bundle-wrapper.is-stuck .erc-sticky-logo-wrap {
    display: flex;
}
.erc-sticky-logo {
    width: 30px;
    height: 30px;
    /* object-fit: cover; */
    border-radius: 6px;
}

/* ==========================================================================
   Trinciati — selettore variazione
   ========================================================================== */

.trinciati-selector {
    padding: 8px 0 4px;
}

.trinciati-nav-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.trinciati-prev-btn,
.trinciati-next-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.trinciati-prev-btn:hover:not(:disabled),
.trinciati-next-btn:hover:not(:disabled) {
    background: #e0e0e0;
}
.trinciati-prev-btn:disabled,
.trinciati-next-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.trinciati-current-info {
    flex: 1;
    text-align: center;
}
.trinciati-current-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
}
.trinciati-current-price {
    display: block;
    font-size: 13px;
    color: #65bc7b;
    margin-top: 2px;
}

.trinciati-variation-row {
    padding: 4px 0;
}

/* ==========================================================================
   Prodotti non-scaglioni — titolo e descrizione sempre visibili
   ========================================================================== */

.bundle-product-non-scaglioni .bundle-product-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

/* ==========================================================================
   Bundle page title
   ========================================================================== */
.bundle-page-title {
    display: block;
    width: 100%;
    text-align: left;
    padding: 20px 0 10px;
}
.bundle-page-title h3 {
    display: block;
    width: 100%;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: left !important;
    float: none !important;
}

/* ==========================================================================
   Mobile deal bar — nome categoria + totale scaglioni affiancati
   ========================================================================== */
.mobile-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
#mobile-scaglioni-total {
    font-size: 15px;
    font-weight: 700;
    color: #65bc7b;
}
.mobile-deal-bar.expanded .mobile-category-header {
    display: none !important;
}

/* ==========================================================================
   Trinciati — card layout + input condiviso
   ========================================================================== */
.variation-attribute-title {
    margin: 4px 0 2px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.qty-label {
    display: block;
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.trinciati-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 0 4px;
}
.trinciati-variation-row {
    flex: 1;
    min-width: 90px;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    user-select: none;
}
.trinciati-variation-row.active {
    border-color: #65bc7b;
    background: #f0faf2;
    box-shadow: 0 0 0 3px rgba(101,188,123,0.3);
}
.trinciati-card-label {
    font-weight: 700;
    font-size: 13px;
    color: #1a1a1a;
    text-align: center;
}
.trinciati-card-price {
    font-size: 12px;
    color: #65bc7b;
    font-weight: 600;
}
.trinciati-qty-wrapper {
    margin: 20px 15%;
    display: flex;
    justify-content: center;
}

/* Card variazione esaurita (trinciati e var-card-row) */
.trinciati-variation-row.out-of-stock,
.var-card-row.out-of-stock {
    cursor: not-allowed;
    opacity: 0.5;
    border-color: #ddd !important;
    background: #f5f5f5 !important;
    box-shadow: none !important;
    filter: grayscale(1);
}
.variation-oos-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #fff;
    background: #b74536;
    padding: 2px 6px;
    border-radius: 6px;
}

/* Bottone deseleziona trinciato */
.trinciati-deselect-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    padding: 4px 10px;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.trinciati-deselect-btn:hover {
    border-color: #e07070;
    color: #c0392b;
}

/* ==========================================================================
   Varianti non-trinciato — card layout con input quantità
   ========================================================================== */
.var-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 0 4px;
    margin-top: 8px;
}
.var-card-row {
    position: relative;
    flex: 1;
    min-width: 90px;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.var-card-row.active {
    border-color: #65bc7b;
    background: #f0faf2;
    box-shadow: 0 0 0 3px rgba(101,188,123,0.3);
}
/* Badge quantità sul corner della card */
.var-card-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #65bc7b;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}
/* Input dentro var-card: occupa tutta la larghezza della card */
.var-shared-qty-wrapper {
    width: 100%;
}
.var-shared-qty-wrapper .quantity-wrapper {
    justify-content: center;
}
/* Il badge sulla card (.var-card-badge) mostra già la quantità: nell'input
   condiviso lasciamo visibili solo i bottoni +/-, non il numero */
.var-shared-qty-input {
    width: 20px;
    padding: 6px 0;
    border: none !important;
    background: transparent !important;
    color: transparent;
    text-shadow: none;
    caret-color: transparent;
    pointer-events: none;
}
.var-shared-qty-input::-webkit-inner-spin-button,
.var-shared-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Cannabis Light: il numero resta visibile, più grande e leggibile */
.product-quantity-bundle[data-is-scaglioni="1"] {
    font-size: 1.5rem;
    font-weight: 800;
    color: #65bc7b;
    width: 68px;
}

/* Con esattamente 4 variazioni su telefono: 2 e 2, non 3 e 1 */
@media (max-width: 600px) {
    .trinciati-cards-row:has(> :nth-child(4)):not(:has(> :nth-child(5))) > .trinciati-variation-row,
    .var-cards-row:has(> :nth-child(4)):not(:has(> :nth-child(5))) > .var-card-row {
        flex: 0 1 calc(50% - 5px);
        min-width: 0;
    }
}

/* ==========================================================================
   Notifiche aggiunta/rimozione prodotto
   ========================================================================== */
.cart-change-toast {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s;
}
.cart-change-toast.show { opacity: 1; }
.cart-change-toast.success { background: #e8f5e9; color: #2e7d32; border-left: 3px solid #65bc7b; }
.cart-change-toast.info    { background: #fff3e0; color: #e65100; border-left: 3px solid #ff9800; }

@media (min-width: 993px) {
    .notification-bar-desktop.notification-bar-cart-change {
        background: #2271b1;
        color: #fff;
    }
}

/* ==========================================================================
   Banner login nel carrellino popup
   ========================================================================== */
.bundle-login-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #5d4037;
}

.bundle-login-banner-text {
    flex: 1;
}

.bundle-login-banner-btn {
    background: #3a8a5c;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.bundle-login-banner-btn:hover {
    background: #2d7049;
}

/* ============================================================
   PREDISPOSIZIONE — rimozione style inline (02/07/2026)
   Classi e custom properties introdotte al posto di style=""
   sparsi in front-end-bundle.php / product-bundle.js / cart-fidelity-price.js
   ============================================================ */

/* Colore aroma (dinamico, da term meta aroma_color) */
.aroma-name {
    color: var(--aroma-color, #000);
}

/* Colore categoria (dinamico, da opzione admin erc_bundle_cat_color_{slug}) —
   applicato solo se la categoria ha un colore configurato (classe condizionale) */
.macro-tab-button.has-macro-color:hover,
.macro-tab-button.has-macro-color.active {
    border-bottom-color: var(--macro-color);
}
.subcategory-button.has-macro-color.active {
    background-color: var(--macro-color);
    color: #fff;
    border-color: var(--macro-color);
}

/* Sottolineatura titolo categoria nel carrellino (colore dinamico) */
.cart-category-title.has-category-color {
    text-decoration: underline 2px var(--cart-category-color);
    text-underline-offset: 3px;
}

/* Colonna prezzo + bottone nello sticky row (era style="display:flex;justify-content:flex-end;align-items:center;") */
.bundle-price-actions-col {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Blocchi toggle (accordion slideUp/slideDown) — nascosti di default */
.summary,
.summary-spedizioni,
.subcategory-description,
.text-toggle {
    display: none;
}

/* Risultato verifica CAP (era style="margin-top:10px;font-weight:bold") */
#cap-result {
    margin-top: 10px;
    font-weight: bold;
}

/* Span prezzo mobile nascosto — usato solo come sorgente dati da updateFloatCartTotal() via JS, mai mostrato */
#bundle-total-price-mobile {
    display: none;
}

/* Righe sconto nel price grid del carrellino (era style="color:#65bc7b") */
.discount-row {
    color: #65bc7b;
}

/* Bottone "PROCEDI AL PAGAMENTO" nel popup carrello (era style inline in buildCartBody) */
.add-bundle-to-cart-popup-confirm {
    width: 100%;
    padding: 15px;
    background: #f5a841;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
}

/* Popup Fidelity Card — utente non loggato */
.erc-popup-fidelity-login-msg {
    text-align: center;
    color: #888;
    padding: 30px 0;
}

/* Popup Fidelity Card — valore livello (colore dinamico da tier) */
.erc-fid-value.erc-fid-value--tier {
    font-size: 22px;
    color: var(--tier-color);
}

/* Popup Fidelity Card — testo prossimo livello */
.erc-popup-fidelity-next-tier {
    font-size: 13px;
    color: #666;
    margin-top: 16px;
}

/* Prezzo scontato nel carrello WC standard (cart-fidelity-price.js) */
.bundle-cart-price-original {
    color: #999;
}
.bundle-cart-price-discounted {
    text-decoration: none;
    font-weight: bold;
    color: #2c7a2c;
}

/* Blocco scroll body (era document.body.style.overflow / $('body').css('overflow', ...)) */
body.erc-no-scroll {
    overflow: hidden;
}
/* Anche sull'html (28/10/2026): se html ha un overflow proprio, quello del body non passa alla
   finestra e la pagina dietro il riepilogo continuava a scorrere */
html:has(> body.erc-no-scroll) {
    overflow: hidden;
}


/* ==========================================================================
   Carrello WooCommerce: righe del bundle senza etichetta (15/10/2026)
   La composizione ("di cui: …") e "Modifica il tuo ordine" sono item data con nome vuoto:
   il template di WooCommerce stampa comunque "<dt>:</dt>" → due ":" isolati nella riga.
   ========================================================================== */
/* il primo selettore batte ".woocommerce td.product-name dl.variation dt" di WooCommerce (carrello) */
.woocommerce td.product-name dl.variation dt.variation-,
dl.variation dt.variation- { display: none; }
.woocommerce td.product-name dl.variation dd.variation-,
dl.variation dd.variation- { float: none; clear: both; margin-left: 0; }
dl.variation dd.variation- p { margin: 0 0 4px; }

/* Messaggio nel popup di uscita (salvataggio bundle) */
.exit-popup-msg { margin: 8px 0 0; font-size: 14px; font-weight: 600; }
.exit-popup-msg.is-error { color: #b42318; }
.exit-popup-msg.is-warning,
.exit-popup-msg.is-success { color: #2d5a40; }

/* Barra di avanzamento degli scaglioni nella barra in basso: nascosta (02/11/2026, richiesta cliente) */
#deal-bar-scaglioni,
#deal-progress { display: none !important; }

/* Variazioni: il campo quantità compare dopo aver toccato una variazione (02/11/2026) */
.var-shared-qty-wrapper.var-qty-pending { display: none !important; }
