/* ─── RITOCCHI GRAFICI DEL SITO (stile dell'app) ───────────────────────────────
   Caricato in moduli/head.php dopo gli altri fogli. Non cambia i file esistenti:
   ogni blocco si può togliere da solo. I selettori iniziano con "html body" per
   valere più delle regole di shop.css (caricato dopo, nelle singole pagine).
   1. carte prodotto negli elenchi (telefono: due colonne)
   2. scheda prodotto (telefono): taglie, prezzo, informazioni, barra di acquisto
   3. riquadro "Dubbi sulla misura? Scrivici su WhatsApp" (tutte le larghezze)
   ─────────────────────────────────────────────────────────────────────────── */

/* ═══ 1. ELENCHI PRODOTTI ═════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  html body #prodotti ul.elenco-prodotti:has(> li.product) {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 12px;
    padding: 6px 12px 0; margin: 0; box-sizing: border-box;
  }
  /* elementi che non sono prodotti (es. "Non sai cosa scegliere?") prendono tutta la riga */
  html body #prodotti ul.elenco-prodotti:has(> li.product) > li:not(.product) { grid-column: 1 / -1; margin: 6px 0; }

  html body #prodotti ul.elenco-prodotti li.product {
    margin: 0; height: auto; display: flex; flex-direction: column; overflow: hidden; position: relative;
    background: #fff; border: 1px solid rgba(4, 47, 63, .07); border-radius: 16px;
    box-shadow: 0 1px 2px rgba(4, 47, 63, .04), 0 6px 18px rgba(4, 47, 63, .07);
    transition: transform .12s;
  }
  html body #prodotti ul.elenco-prodotti li.product:active { transform: scale(.985); }
  html body #prodotti ul.elenco-prodotti li.product:hover { box-shadow: 0 1px 2px rgba(4, 47, 63, .04), 0 6px 18px rgba(4, 47, 63, .07); }

  html body #prodotti ul.elenco-prodotti li.product .img {
    width: 100%; height: auto; aspect-ratio: 1 / 1; margin: 0; padding: 10px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; background: #fff;
  }
  html body #prodotti ul.elenco-prodotti li.product .img picture { display: contents; }
  html body #prodotti ul.elenco-prodotti li.product .img img { width: 100%; height: 100%; max-height: none; object-fit: contain; }

  /* testi: marchio, nome su due righe; niente descrizione (c'è nella scheda) */
  html body #prodotti ul.elenco-prodotti li.product .sotto {
    position: static; width: auto; margin: 0; padding: 4px 12px 12px; text-align: left;
    display: flex; flex-direction: column; flex: 1;
  }
  html body #prodotti ul.elenco-prodotti li.product .sotto .testi { flex: 1; }
  html body #prodotti ul.elenco-prodotti li.product .sotto h5 {
    text-align: left; padding: 0 0 3px; margin: 0;
    font: 600 .74rem/1.2 "Barlow Condensed", "DM Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  }
  html body #prodotti ul.elenco-prodotti li.product .sotto h5 a { color: #AB3940; }
  html body #prodotti ul.elenco-prodotti li.product .sotto h3 {
    text-align: left; height: auto; max-height: none; padding: 0; margin: 0;
    font-size: .88rem; line-height: 1.28; font-weight: 500; color: #10232B;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.56em;
  }
  html body #prodotti ul.elenco-prodotti li.product .sotto h3 a { color: #10232B; }
  html body #prodotti ul.elenco-prodotti li.product .sotto h4,
  html body #prodotti ul.elenco-prodotti li.product .sotto p { display: none; }

  /* taglie: piccole pastiglie su una riga sola */
  html body #prodotti ul.elenco-prodotti li.product .sotto .boxprezzi {
    position: static; display: block; text-align: left; color: #10232B; font-size: 1rem; margin-top: 8px;
  }
  html body #prodotti ul.elenco-prodotti li.product .sotto ul.varianti {
    display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 4px; height: auto; margin: 0 0 8px; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  html body #prodotti ul.elenco-prodotti li.product .sotto ul.varianti li {
    flex: 0 0 auto; height: 22px; line-height: 20px; margin: 0; padding: 0 8px; box-sizing: border-box;
    border: 1px solid #D5DDE0; border-radius: 999px; background: #fff; color: #5B6B72; font-size: .7rem; font-weight: 500;
  }
  html body #prodotti ul.elenco-prodotti li.product .sotto ul.varianti li.sele { background: #fff; color: #5B6B72; }

  /* prezzo: in evidenza; lo sconto diventa un'etichetta sulla foto */
  html body #prodotti ul.elenco-prodotti li.product .sotto .prezzi {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 2px 8px; width: auto; margin: 0; padding: 0; text-align: left; font-size: 1rem;
  }
  html body #prodotti ul.elenco-prodotti li.product .sotto .prezzi .prezzo { order: 1; font-weight: 700; font-size: 1.02rem; color: #10232B; flex-basis: auto; }
  html body #prodotti ul.elenco-prodotti li.product .sotto .prezzi:has(.risparmia) .prezzo { color: #AB3940; }
  html body #prodotti ul.elenco-prodotti li.product .sotto .prezzi .listino { order: 2; font-size: .78rem; font-weight: 400; color: #8A979D; flex-basis: auto; }
  html body #prodotti ul.elenco-prodotti li.product .sotto .prezzi .listino:empty { display: none; }
  html body #prodotti ul.elenco-prodotti li.product .sotto .risparmia {
    position: absolute; top: 10px; left: 10px; z-index: 3; width: auto; margin: 0; padding: 4px 8px;
    border-radius: 8px; background: #AB3940; color: #fff; font: 700 .72rem/1.2 "DM Sans", sans-serif;
    box-shadow: 0 2px 8px rgba(171, 57, 64, .3);
  }
  html body #prodotti ul.elenco-prodotti li.product .tipo {
    top: 10px; right: 10px; left: auto; bottom: auto; padding: 4px 8px; border-radius: 8px;
    font: 700 .66rem/1.2 "DM Sans", sans-serif; letter-spacing: .04em; background: #042F3F;
  }
}

/* ═══ 1b. HOME: "I NOSTRI PREFERITI" COME CAROSELLO ════════════════════════ */
@media (max-width: 1000px) {
  html body #prodotti.prodottihome ul.elenco-prodotti {
    display: flex; flex-wrap: nowrap; justify-content: flex-start; grid-template-columns: none; gap: 12px; margin: 0; padding: 4px 16px 14px;
    /* proximity: lo scatto resta, ma il browser non riallinea la fila da solo quando le immagini caricano */
    overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  html body #prodotti.prodottihome ul.elenco-prodotti::-webkit-scrollbar { display: none; }
  html body #prodotti.prodottihome ul.elenco-prodotti li.product-item,
  html body #prodotti.prodottihome ul.elenco-prodotti li.product-item:nth-child(n+5) {
    display: block; flex: 0 0 46%; width: auto; min-width: 158px; max-width: 230px; height: auto; min-height: 0; margin: 0;
    scroll-snap-align: start; position: relative; overflow: hidden; background: #fff;
    border: 1px solid rgba(4, 47, 63, .07); border-radius: 16px; box-shadow: 0 1px 2px rgba(4, 47, 63, .04), 0 6px 18px rgba(4, 47, 63, .07);
  }
  html body #prodotti.prodottihome .product-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
  html body #prodotti.prodottihome .product-link .img {
    width: 100%; height: auto; aspect-ratio: 1 / 1; margin: 0; padding: 10px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  }
  html body #prodotti.prodottihome .product-link .img picture { display: contents; }
  html body #prodotti.prodottihome .product-link .img img { width: 100%; height: 100%; max-height: none; object-fit: contain; }
  html body #prodotti.prodottihome .product-link .imgsopra { display: none; }
  html body #prodotti.prodottihome .sotto {
    position: static; width: auto; margin: 0; padding: 4px 12px 12px; text-align: left; display: flex; flex-direction: column; flex: 1;
  }
  /* il marchio è il testo libero dentro .testi */
  html body #prodotti.prodottihome .sotto .testi {
    flex: 1; text-align: left; color: #AB3940; font: 600 .74rem/1.2 "Barlow Condensed", "DM Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase;
  }
  html body #prodotti.prodottihome .sotto .testi h3 {
    margin: 3px 0 0; padding: 0; text-align: left; text-transform: none; letter-spacing: 0; color: #10232B;
    font: 500 .88rem/1.28 "DM Sans", sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.56em;
  }
  html body #prodotti.prodottihome .sotto .testi h4 { display: none; }
  html body #prodotti.prodottihome .sotto .boxprezzi { position: static; margin-top: 8px; text-align: left; display: block; }
  html body #prodotti.prodottihome .sotto ul.varianti { display: none; }
  html body #prodotti.prodottihome .sotto .prezzi {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 2px 8px; margin: 0; padding: 0; width: auto;
  }
  html body #prodotti.prodottihome .sotto .prezzi .prezzo { order: 1; font-weight: 700; font-size: 1.02rem; color: #10232B; }
  html body #prodotti.prodottihome .sotto .prezzi:has(.risparmia) .prezzo { color: #AB3940; }
  html body #prodotti.prodottihome .sotto .prezzi .listino { order: 2; font-size: .78rem; color: #8A979D; text-decoration: line-through; font-weight: 400; }
  html body #prodotti.prodottihome .sotto .risparmia {
    position: absolute; top: 10px; left: 10px; z-index: 3; width: auto; margin: 0; padding: 4px 8px; border-radius: 8px;
    background: #AB3940; color: #fff; font: 700 .72rem/1.2 "DM Sans", sans-serif; box-shadow: 0 2px 8px rgba(171, 57, 64, .3);
  }
}

/* ═══ 2. SCHEDA PRODOTTO (telefono) ═══════════════════════════════════════ */
@media (max-width: 1000px) {
  /* marchio e nome */
  html body #prodotto .sopra h4 {
    padding: 4px 20px 0; margin: 0; color: #AB3940;
    font: 600 .86rem/1.2 "Barlow Condensed", "DM Sans", sans-serif; letter-spacing: .12em; text-transform: uppercase;
  }
  html body #prodotto .sopra h4 a { color: #AB3940; }
  html body #prodotto .sopra h1 { padding: 4px 20px 6px; font-size: 1.9rem; line-height: 1.12; }

  /* prezzo */
  html body #prodotto .prezzi { padding: 6px 20px 2px; font-size: 1.85rem; font-weight: 700; color: #10232B; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  html body #prodotto .prezzi .listino { font-size: 1.05rem; font-weight: 400; color: #8A979D; text-decoration: line-through; }
  html body #prodotto .prezzi:has(.listino:not(:empty)) .cambiaprezzo { color: #AB3940; }
  html body #prodotto .risparmia { border-radius: 8px; padding: 3px 8px; font-weight: 700; font-size: .85rem; vertical-align: middle; }

  /* taglie: pastiglie grandi, comode da toccare */
  html body #prodotto ul.varianti { margin: 6px 20px 10px; padding: 0; gap: 8px; }
  html body #prodotto ul.varianti li {
    display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 42px; margin: 0;
    padding: 0 14px; box-sizing: border-box; border: 1.5px solid #D5DDE0; border-radius: 999px;
    background: #fff; color: #10232B; font-size: .95rem; font-weight: 600; transition: border-color .15s, background .15s;
  }
  html body #prodotto ul.varianti li:hover { background: #fff; color: #10232B; border-color: #042F3F; }
  html body #prodotto ul.varianti li.sele { background: #042F3F; border-color: #042F3F; color: #fff; }
  html body #prodotto ul.varianti li.disattiva { border-style: dashed; color: #A9B4B8; text-decoration: line-through; background: #fff; }

  /* spedizione, consegna, Klarna: un unico riquadro ordinato */
  html body #prodotto .red, html body #prodotto .notasped {
    margin: 0 20px; padding: 12px 14px 12px 46px; position: relative; background: #F3F1EC; color: #10232B; font-size: .92rem; line-height: 1.4;
  }
  html body #prodotto .red { margin-top: 14px; border-radius: 14px 14px 0 0; font-weight: 600; }
  html body #prodotto .notasped { border-radius: 0 0 14px 14px; border-top: 1px solid rgba(4, 47, 63, .07); margin-bottom: 12px; color: #5B6B72; }
  html body #prodotto .red::before, html body #prodotto .notasped::before {
    content: ""; position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
    background: no-repeat center / contain;
  }
  html body #prodotto .red::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23AB3940' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 6h13v10H1z'/%3E%3Cpath d='M14 10h4l3 3v3h-7'/%3E%3Ccircle cx='5.5' cy='18' r='2'/%3E%3Ccircle cx='17.5' cy='18' r='2'/%3E%3C/svg%3E");
  }
  html body #prodotto .notasped::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6B72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2.5 2.5'/%3E%3C/svg%3E");
  }
  html body #prodotto .boxklarna .int {
    margin: 0 20px 12px; width: auto; box-sizing: border-box; border: 1px solid rgba(4, 47, 63, .1); border-radius: 14px;
    padding: 12px 96px 12px 14px; background-size: auto 22px; background-position: right 14px center; font-size: .9rem;
  }

  /* barra di acquisto in basso */
  html body #prodotto .boxagg {
    bottom: 0; left: 0; right: 0; width: 100%; box-sizing: border-box; gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .95); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid rgba(4, 47, 63, .08); box-shadow: 0 -8px 24px rgba(4, 47, 63, .08);
  }
  html body #prodotto .boxagg .aggiungi {
    flex: 1; width: auto; height: 52px; line-height: 52px; border-radius: 14px; margin: 0;
    font-weight: 700; letter-spacing: .06em; box-shadow: 0 6px 16px rgba(171, 57, 64, .28); transition: transform .1s;
  }
  html body #prodotto .boxagg .aggiungi:active { transform: scale(.98); }
  html body #prodotto .boxagg .btn-wishlist { width: 52px; height: 52px; border-radius: 14px; margin: 0; border: 1.5px solid #D5DDE0; background: #fff; }
  /* "chiedi info": al suo posto c'è il riquadro WhatsApp nella pagina */
  html body:has(#prodotto .tr-aiuto) #prodotto .boxagg .info.mobile { display: none; }
  /* il riquadro WhatsApp nella pagina sostituisce il pulsante tondo che copriva la barra */
  html body:has(#prodotto .tr-aiuto) #whatsapp-widget { display: none; }
  html body #prodotto { padding-bottom: 90px; }
}

/* ═══ 3. RIQUADRO WHATSAPP NELLA SCHEDA PRODOTTO ═══════════════════════════ */
#prodotto .tr-aiuto {
  display: flex; align-items: center; gap: 14px; margin: 4px 20px 18px; padding: 14px 16px; border-radius: 16px;
  background: #fff; border: 1px solid rgba(4, 47, 63, .1); box-shadow: 0 1px 2px rgba(4, 47, 63, .04), 0 6px 18px rgba(4, 47, 63, .06);
  text-decoration: none; color: #10232B; transition: transform .12s, border-color .15s;
}
#prodotto .tr-aiuto:hover { border-color: #1FAF5A; }
#prodotto .tr-aiuto:active { transform: scale(.985); }
#prodotto .tr-aiuto .tr-aiuto-ico {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px; background: #1FAF5A; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
#prodotto .tr-aiuto .tr-aiuto-ico svg { width: 26px; height: 26px; }
#prodotto .tr-aiuto strong { display: block; font-size: .98rem; font-weight: 700; color: #10232B; }
#prodotto .tr-aiuto span.tr-aiuto-sub { display: block; font-size: .86rem; color: #5B6B72; margin-top: 2px; line-height: 1.35; }
#prodotto .tr-aiuto .tr-aiuto-freccia { margin-left: auto; color: #8A979D; font-size: 1.4rem; line-height: 1; }

/* ═══ 4. CARRELLO ═══════════════════════════════════════════════════════════
   Barra della spedizione gratuita, codice come biglietto, i codici del cliente
   (tutte le larghezze); righe e riepilogo a schede, pulsanti (telefono).
   Solo #carrello del carrello: conclusione ed esito hanno class="concludi". */
#carrello .tr-spedbar {
  margin: 14px 0 6px; padding: 14px 16px; border-radius: 16px; background: #F3F1EC; color: #10232B;
  font-family: "DM Sans", system-ui, sans-serif;
}
#carrello .tr-spedbar-testo { display: flex; align-items: center; gap: 10px; font-size: .95rem; line-height: 1.35; }
#carrello .tr-spedbar-testo svg { width: 24px; height: 24px; flex: 0 0 auto; color: #AB3940; }
#carrello .tr-spedbar-barra { height: 8px; border-radius: 4px; background: rgba(4, 47, 63, .1); margin-top: 10px; overflow: hidden; }
#carrello .tr-spedbar-barra i {
  display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #00B4D8, #1F9D7A);
  transition: width .6s cubic-bezier(.2, .9, .3, 1);
}
#carrello .tr-spedbar.ok { background: rgba(31, 157, 122, .1); }
#carrello .tr-spedbar.ok svg { color: #1F9D7A; }

/* codice applicato: biglietto */
#carrello li.tr-codice-ok { display: block; padding: 8px 0; border: 0; }
#carrello .tr-biglietto {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px;
  border: 1.5px dashed rgba(171, 57, 64, .45); background: rgba(171, 57, 64, .05); position: relative;
}
#carrello .tr-biglietto-ico { color: #AB3940; display: flex; }
#carrello .tr-biglietto-ico svg { width: 24px; height: 24px; }
#carrello .tr-biglietto-testo { flex: 1; display: flex; flex-direction: column; text-align: left; min-width: 0; }
#carrello .tr-biglietto-testo small { font-size: .74rem; color: #5B6B72; text-transform: uppercase; letter-spacing: .08em; }
#carrello .tr-biglietto-testo code { font: 700 1rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; color: #10232B; overflow: hidden; text-overflow: ellipsis; }
#carrello .tr-biglietto-valore { font-weight: 700; color: #AB3940; white-space: nowrap; }
#carrello .tr-biglietto .cancelcodice {
  position: static; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(4, 47, 63, .08);
  color: #10232B; font-size: 1.2rem; line-height: 1; cursor: pointer; flex: 0 0 auto;
}

/* i codici del cliente */
#carrello li.tr-codici-tuoi { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 4px 0 10px; border: 0; }
#carrello li.tr-codici-tuoi > span { font-size: .82rem; color: #5B6B72; width: 100%; text-align: left; }
#carrello .tr-usa-codice {
  border: 1.5px dashed rgba(171, 57, 64, .5); background: rgba(171, 57, 64, .05); color: #10232B; border-radius: 999px;
  padding: 6px 12px; font: 500 .84rem "DM Sans", sans-serif; cursor: pointer;
}
#carrello .tr-usa-codice b { color: #AB3940; }

@media (max-width: 1000px) {
  html body #carrello:not(.concludi) { padding-left: 12px; padding-right: 12px; box-sizing: border-box; }
  html body #carrello:not(.concludi) .colonna70, html body #carrello:not(.concludi) .colonna30 { width: 100%; margin: 0; padding: 0; }

  /* righe dei prodotti: schede */
  html body #carrello:not(.concludi) .colonna70 ul.elenco-prodotti li.scuro { display: none; }
  html body #carrello:not(.concludi) .colonna70 ul.elenco-prodotti li[dir] {
    position: relative; margin: 0 0 12px; padding: 12px 12px 12px 10px; border: 1px solid rgba(4, 47, 63, .07); border-radius: 16px;
    background: #fff; box-shadow: 0 1px 2px rgba(4, 47, 63, .04), 0 6px 18px rgba(4, 47, 63, .07); align-items: flex-start;
  }
  html body #carrello:not(.concludi) .colonna70 li[dir] .img { width: 76px; min-width: 76px; height: 76px; margin: 0 10px 0 0; }
  html body #carrello:not(.concludi) .colonna70 li[dir] .img img {
    width: 76px; height: 76px; object-fit: contain; border-radius: 12px; border: 1px solid rgba(4, 47, 63, .08); padding: 4px; box-sizing: border-box; background: #fff;
  }
  html body #carrello:not(.concludi) .colonna70 li[dir] h3 { font-size: .95rem; line-height: 1.3; font-weight: 600; color: #10232B; margin: 0; padding: 0; }
  html body #carrello:not(.concludi) .colonna70 li[dir] h3 span { font-weight: 400; color: #5B6B72; font-size: .86rem; }
  html body #carrello:not(.concludi) .colonna70 li[dir] h4 { font-size: .72rem; color: #8A979D; font-weight: 400; margin: 2px 0 0; padding: 0; }
  html body #carrello:not(.concludi) .colonna70 li[dir] .quanti { display: none !important; }
  html body #carrello:not(.concludi) .colonna70 li[dir] .prezzo .xprezzo,
  html body #carrello:not(.concludi) .colonna70 li[dir] .prezzo .listino { white-space: nowrap; }
  html body #carrello:not(.concludi) .colonna70 li[dir] .quant.q_m {
    display: inline-flex; align-items: center; margin: 10px 0 0; height: 36px; border: 1.5px solid #D5DDE0; border-radius: 999px; background: #fff;
  }
  html body #carrello:not(.concludi) .colonna70 li[dir] .prezzo .xprezzo { font-weight: 700; font-size: 1rem; color: #10232B; }
  html body #carrello:not(.concludi) .colonna70 li[dir] .prezzo .listino { font-size: .8rem; color: #8A979D; }

  /* riepilogo: una scheda */
  html body #carrello:not(.concludi) .dati ul.elenco-prodotti {
    margin: 4px 0 0; padding: 6px 16px; border-radius: 16px; background: #fff; border: 1px solid rgba(4, 47, 63, .07);
    box-shadow: 0 1px 2px rgba(4, 47, 63, .04), 0 6px 18px rgba(4, 47, 63, .07);
  }
  html body #carrello:not(.concludi) .dati ul.elenco-prodotti li { border-bottom: 1px solid rgba(4, 47, 63, .07); padding: 10px 0; }
  html body #carrello:not(.concludi) .dati ul.elenco-prodotti li:last-child { border-bottom: 0; }
  html body #carrello:not(.concludi) .dati ul.elenco-prodotti li .rightm { text-align: left; }
  html body #carrello:not(.concludi) .dati li.tr-codice-campo .relative { display: flex; gap: 8px; width: 100%; align-items: center; }
  html body #carrello:not(.concludi) .dati .codice_promo {
    flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 1.5px solid #D5DDE0; padding: 0 14px; font: 600 1rem "DM Sans", sans-serif;
    text-transform: uppercase; letter-spacing: .06em; box-sizing: border-box;
  }
  html body #carrello:not(.concludi) .dati .applica {
    height: 46px; padding: 0 18px; border-radius: 12px; border: 0; background: #042F3F; color: #fff; font-weight: 700; letter-spacing: .04em;
  }

  /* pulsanti */
  html body #carrello:not(.concludi) .dati button.concludi {
    width: 100%; margin: 14px 0 0; height: 56px; border: 0; border-radius: 16px; background: #AB3940; color: #fff;
    font: 700 1.05rem "DM Sans", sans-serif; letter-spacing: .02em; box-shadow: 0 8px 20px rgba(171, 57, 64, .3);
  }
  html body #carrello:not(.concludi) .dati button.continua {
    width: 100%; margin: 10px 0 0; height: 50px; border: 1.5px solid #D5DDE0; border-radius: 16px; background: #fff; color: #10232B;
    font: 600 .98rem "DM Sans", sans-serif;
  }
}

/* ═══ 5. HOME: BANNER DELL'APP (parti/app_promo.php) ════════════════════════ */
.tr-app-promo {
  margin: 40px 0; padding: 0 16px; box-sizing: border-box; font-family: "DM Sans", system-ui, sans-serif;
}
.tr-app-promo-int {
  max-width: 1180px; margin: 0 auto; position: relative; overflow: hidden; border-radius: 24px;
  background: radial-gradient(120% 120% at 100% 0%, #0E5A72 0%, #042F3F 58%) #042F3F; color: #fff;
  display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 24px; padding: 48px 56px 0;
}
.tr-app-promo-int::after {   /* onde del marchio */
  content: ""; position: absolute; left: -30px; bottom: -26px; width: 260px; height: 80px; opacity: .08; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 52'%3E%3Cg fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M2 10c10 0 10-8 20-8s10 8 20 8 10-8 20-8 10 8 20 8 10-8 20-8 10 8 20 8 10-8 20-8 10 8 20 8'/%3E%3Cpath d='M2 26c10 0 10-8 20-8s10 8 20 8 10-8 20-8 10 8 20 8 10-8 20-8 10 8 20 8 10-8 20-8 10 8 20 8'/%3E%3Cpath d='M2 42c10 0 10-8 20-8s10 8 20 8 10-8 20-8 10 8 20 8 10-8 20-8 10 8 20 8 10-8 20-8 10 8 20 8'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}
.tr-app-promo-testo { padding-bottom: 48px; position: relative; z-index: 1; }
.tr-app-promo-et { display: inline-block; font: 600 .82rem "Barlow Condensed", "DM Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #9FC3CE; }
.tr-app-promo h2 {
  margin: 8px 0 18px; padding: 0; text-align: left; color: #fff; font: 400 2.6rem/1.08 "DM Serif Display", Georgia, serif; text-transform: none; letter-spacing: 0;
}
.tr-app-promo ul { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.tr-app-promo li { display: flex; gap: 10px; align-items: flex-start; font-size: 1.02rem; line-height: 1.4; color: rgba(255, 255, 255, .88); text-align: left; padding: 0; margin: 0; border: 0; min-height: 0; background: none; }
.tr-app-promo li svg { width: 20px; height: 20px; flex: 0 0 auto; color: #E0525A; margin-top: 1px; }
.tr-app-promo-regalo {
  display: flex; gap: 12px; align-items: center; margin: 0 0 22px; padding: 12px 14px; border-radius: 14px; text-align: left;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-size: .96rem; line-height: 1.4; color: #fff;
}
.tr-app-promo-regalo svg { width: 30px; height: 30px; flex: 0 0 auto; color: #fff; background: #AB3940; border-radius: 10px; padding: 6px; box-sizing: border-box; transform: rotate(-6deg); }
.tr-app-promo-regalo b { color: #FFD2D5; }
.tr-app-promo-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.tr-app-promo-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 30px; border-radius: 999px;
  background: #AB3940; color: #fff !important; font: 700 1.02rem "DM Sans", sans-serif; text-decoration: none; box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  transition: transform .1s, filter .15s;
}
.tr-app-promo-btn:hover { filter: brightness(1.08); }
.tr-app-promo-btn:active { transform: scale(.97); }
.tr-app-promo-nota { font-size: .86rem; color: #9FC3CE; }

/* telefono con la foto vera dell'app */
.tr-app-promo-tel { align-self: end; display: flex; justify-content: center; position: relative; z-index: 1; }
.tr-app-promo-schermo {
  width: 260px; height: 400px; overflow: hidden; border-radius: 36px 36px 0 0; padding: 10px 10px 0; box-sizing: border-box;
  background: #0B1A20; box-shadow: 0 -10px 50px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 255, 255, .08);
  transform: rotate(-3deg) translateY(12px);
}
.tr-app-promo-schermo img { display: block; width: 100%; height: auto; border-radius: 28px 28px 0 0; }
body.tr-app-installata .tr-app-promo { display: none; }

@media (max-width: 860px) {
  .tr-app-promo { margin: 28px 0; padding: 0 12px; }
  .tr-app-promo-int { grid-template-columns: 1fr; padding: 30px 22px 0; gap: 0; border-radius: 22px; }
  .tr-app-promo-testo { padding-bottom: 26px; }
  .tr-app-promo h2 { font-size: 2rem; }
  .tr-app-promo-btn { width: 100%; }
  .tr-app-promo-nota { width: 100%; text-align: center; }
  .tr-app-promo-schermo { width: 220px; height: 250px; transform: none; }
}

/* banner compatto dell'app (carrello) */
.tr-app-mini {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; box-sizing: border-box;
  /* 16px su tutti e 4 i lati; sui monitor larghi resta centrato, con max 1280px */
  margin: 16px max(16px, calc((100% - 1280px) / 2)); max-width: 1280px;
  background: radial-gradient(120% 140% at 100% 0%, #0E5A72 0%, #042F3F 60%) #042F3F; color: #fff !important; text-decoration: none;
  font-family: "DM Sans", system-ui, sans-serif; text-align: left; transition: transform .12s;
}
.tr-app-mini:active { transform: scale(.985); }
.tr-app-mini img { width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto; }
.tr-app-mini-testo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-app-mini-testo b { font-size: .95rem; line-height: 1.25; color: #fff; }
.tr-app-mini-testo small { font-size: .8rem; line-height: 1.3; color: #9FC3CE; }
.tr-app-mini-freccia { font-size: 1.6rem; line-height: 1; color: #9FC3CE; }
body.tr-app-installata .tr-app-mini { display: none; }

/* ═══ 6. PERCHÉ COMPRARE DA NOI (page/parti/fiducia.php) ════════════════════
   Quattro riquadri chiari e leggeri: 2×2 su telefono, in fila su computer. */
.tr-fiducia {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  max-width: 1180px; margin: 32px auto; padding: 0 16px; box-sizing: border-box; font-family: "DM Sans", system-ui, sans-serif;
  clear: both;
}
.tr-fiducia-voce {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: #F3F1EC;
  color: #10232B; text-decoration: none; text-align: left; transition: background .15s;
}
a.tr-fiducia-voce:hover { background: #ECE8E0; }
.tr-fiducia-ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #AB3940;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(4, 47, 63, .06);
}
html body .tr-fiducia .tr-fiducia-ico svg { width: 22px; height: 22px; color: #AB3940; stroke: #AB3940; fill: none; }
.tr-fiducia-voce b { display: block; font-size: .95rem; line-height: 1.25; font-weight: 700; color: #10232B; }
.tr-fiducia-voce span { display: block; margin-top: 3px; font-size: .84rem; line-height: 1.35; color: #5B6B72; }
.tr-fiducia-voce div span { margin-top: 3px; }

@media (max-width: 1000px) {
  .tr-fiducia { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 22px auto; padding: 0 12px; }
  .tr-fiducia-voce { flex-direction: column; gap: 6px; padding: 12px; border-radius: 14px; }
  .tr-fiducia-ico { width: 30px; height: 30px; border-radius: 9px; }
  html body .tr-fiducia .tr-fiducia-ico svg { width: 17px; height: 17px; }
  .tr-fiducia-voce b { font-size: .86rem; }
  .tr-fiducia-voce span { font-size: .76rem; }
}
