/* ==========================================================================
   Nuvola Sleep — stile delle quattro pagine prodotto (demo)
   Si appoggia a /assets/base.css; qui solo l'identità del negozio:
   blu notte, crema caldo, lilla tenue. Nessuna risorsa esterna.
   ========================================================================== */

html { scrollbar-gutter: stable; }
html.bloccato { overflow: hidden; }

.store {
  --notte: #151b3f;
  --notte-2: #222a5e;
  --notte-3: #313a7d;
  --crema: #faf5ec;
  --crema-2: #f2eadb;
  --carta-s: #fffdf8;
  --lilla: #c9b8f3;
  --lilla-tenue: #efe9fc;
  --lilla-scuro: #5a43a6;
  --testo: #1a1f3d;
  --testo-tenue: #4f5571;
  --linea-s: #e2d8c6;
  --bordo-campo: #8f846e;
  --ambra: #c98417;
  --ok: #1d7550;
  --errore: #b3261e;
  --focus: #7a5ce6;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --barra-h: 72px;

  background: var(--crema);
  color: var(--testo);
}
.store :focus-visible { outline-color: var(--focus); }
.store [id] { scroll-margin-top: 4.5rem; }
/* :where() tiene bassa la specificità: non copre pulsanti e striscia DEMO */
:where(.store) a { color: var(--lilla-scuro); }
:where(.store) a:hover { color: var(--notte); }
.store h1, .store h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
.store h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.08; }
.store h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }

/* Sprite SVG nascosto (simboli riusati nella pagina) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Icone in linea (il base.css mette gli svg a blocco: qui li rimetto in riga) */
.ico {
  display: inline-block; flex: none; width: 1.15em; height: 1.15em; vertical-align: -.2em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Pulsanti del negozio ---------- */
.btn-store { background: var(--notte); color: var(--crema); box-shadow: 0 8px 20px rgba(21, 27, 63, .25); }
.btn-store:hover { background: var(--notte-3); color: #fff; }
.btn-lilla { background: var(--lilla); color: var(--notte); }
.btn-lilla:hover { background: #fff; color: var(--notte); }
.btn-bordo { background: transparent; color: var(--notte); border-color: var(--notte); }
.btn-bordo:hover { background: var(--notte); color: var(--crema); }
.btn-grande { padding: 1em 1.6em; font-size: 1.05rem; }
.btn-pieno { width: 100%; }
.icona-btn {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.icona-btn:hover { background: var(--crema-2); }
.icona-btn .ico { width: 1.3rem; height: 1.3rem; }

/* ---------- Barra annuncio + testata ---------- */
.annuncio { background: var(--notte); color: var(--crema); font-size: .86rem; font-weight: 600; }
.annuncio ul {
  list-style: none; margin: 0; padding: .5rem 1rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1.4rem;
}
.annuncio li { display: inline-flex; align-items: center; gap: .4rem; }
.annuncio .ico { color: var(--lilla); }

.testata { background: var(--crema); border-bottom: 1px solid var(--linea-s); }
.testata .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.marchio {
  display: inline-flex; align-items: center; gap: .55rem; text-decoration: none;
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--notte);
}
.store .marchio { color: var(--notte); white-space: nowrap; }
@media (max-width: 400px) { .marchio { font-size: 1.12rem; gap: .4rem; } .marchio svg { width: 34px; height: 26px; } .btn-carrello { padding: .45rem .7rem; } }
.marchio svg { width: 40px; height: 30px; color: var(--notte); }
.btn-carrello {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem;
  border: 2px solid var(--notte); border-radius: 999px; background: transparent; color: var(--notte);
  font: 700 .95rem/1 var(--font); cursor: pointer;
}
.btn-carrello:hover { background: var(--notte); color: var(--crema); }
.testata-destra { display: flex; align-items: center; gap: 1.1rem; }
.link-funnel { font-size: .88rem; font-weight: 600; }
.store .link-funnel { color: var(--testo-tenue); }
@media (max-width: 560px) { .link-funnel { display: none; } }
#contenuto:focus { outline: none; }
.conta {
  display: inline-grid; place-items: center; min-width: 1.45rem; height: 1.45rem; padding: 0 .35rem;
  border-radius: 999px; background: var(--lilla-scuro); color: #fff; font-size: .78rem; font-variant-numeric: tabular-nums;
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--crema) 0%, var(--lilla-tenue) 100%); padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-griglia { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 880px) {
  .hero-griglia { grid-template-columns: 1fr 1.05fr; }
  .hero-visual { order: -1; }
}
.scena { margin: 0; border-radius: 22px; overflow: hidden; background: #1b2350; box-shadow: 0 20px 50px rgba(21, 27, 63, .25); }
.scena svg { width: 100%; height: auto; }
.occhiello {
  display: inline-block; margin-bottom: .8rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lilla-scuro);
}
.voto { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin-bottom: .9rem; font-size: .92rem; }
.voto a { color: var(--testo-tenue); font-weight: 600; }
.stelle {
  --voto: 4.8;
  font-size: 1.1rem; letter-spacing: 2px; line-height: 1;
  background: linear-gradient(90deg, var(--ambra) calc(var(--voto) / 5 * 100%), #cfc6b4 0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sotto { font-size: 1.12rem; color: var(--testo-tenue); max-width: 560px; }
.vantaggi { list-style: none; padding: 0; margin: 1.1rem 0 1.4rem; display: grid; gap: .55rem; }
.vantaggi li { display: flex; gap: .6rem; align-items: flex-start; }
.vantaggi .ico { color: var(--ok); margin-top: .22em; stroke-width: 2.6; }
.hero-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }
.prezzo-da { margin: 0; font-size: .95rem; color: var(--testo-tenue); }
.prezzo-da strong { color: var(--testo); font-size: 1.15rem; }
.fiducia {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem;
  font-size: .88rem; color: var(--testo-tenue);
}
.fiducia li { display: flex; gap: .5rem; align-items: center; }
.fiducia .ico { width: 1.35em; height: 1.35em; color: var(--lilla-scuro); }

/* ---------- Sezioni ---------- */
.sez { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.sez-bianca { background: var(--carta-s); }
.sez-crema { background: var(--crema-2); }
.sez-notte { background: var(--notte); color: #e7e4f2; }
.sez-notte h2, .sez-notte h3 { color: #fff; }
.sez-notte .occhiello { color: var(--lilla); }
.intro { font-size: 1.1rem; color: var(--testo-tenue); max-width: 680px; }
.sez-notte .intro { color: #c9c6dc; }
.centro .intro { margin-inline: auto; }

/* Perché succede */
.perche-griglia { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .perche-griglia { grid-template-columns: 1.05fr 1fr; } }
.illustrazione { margin: 0; padding: 1rem; background: var(--crema); border: 1px solid var(--linea-s); border-radius: 18px; }
.illustrazione svg { width: 100%; height: auto; }
.illustrazione figcaption { margin-top: .5rem; font-size: .85rem; color: var(--testo-tenue); text-align: center; }
.cause { display: grid; gap: 1rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.causa { padding: 1.15rem 1.2rem; background: var(--crema); border: 1px solid var(--linea-s); border-radius: var(--raggio); }
.causa h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.causa p { margin: 0; font-size: .95rem; color: var(--testo-tenue); }
.nota-medica {
  margin: 1.5rem 0 0; padding: .8rem 1rem; font-size: .92rem; color: var(--testo);
  background: var(--lilla-tenue); border-left: 3px solid var(--lilla-scuro); border-radius: 0 10px 10px 0;
}

/* Come funziona */
.passi {
  list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: passo;
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.passo { padding: 1.4rem 1.3rem 1.3rem; background: var(--carta-s); border: 1px solid var(--linea-s); border-radius: var(--raggio); }
.passo::before {
  counter-increment: passo; content: counter(passo);
  display: grid; place-items: center; width: 2.3rem; height: 2.3rem; margin-bottom: .8rem;
  border-radius: 50%; background: var(--notte); color: var(--crema); font-weight: 800;
}
.passo h3 { margin-bottom: .35rem; }
.passo p { margin: 0; color: var(--testo-tenue); }

/* Cosa aspettarti */
.tempo { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
@media (min-width: 820px) { .tempo { grid-template-columns: repeat(3, 1fr); } }
.tappa { padding: 1.3rem; background: var(--crema); border: 1px solid var(--linea-s); border-radius: var(--raggio); }
.tappa-segno {
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin-bottom: .8rem;
  border-radius: 50%; background: var(--notte); color: #f6e7c1;
}
.tappa-segno svg { width: 1.5rem; height: 1.5rem; }
.tappa h3 { margin-bottom: .35rem; }
.tappa p { margin: 0; color: var(--testo-tenue); }

/* Confronto */
.tabella-confronto { margin-top: 2rem; overflow-x: auto; border-radius: var(--raggio); border: 1px solid var(--linea-s); background: var(--carta-s); }
.confronto { width: 100%; border-collapse: collapse; font-size: .95rem; }
.confronto caption { text-align: left; padding: .9rem 1rem; font-size: .88rem; color: var(--testo-tenue); caption-side: bottom; }
.confronto th, .confronto td { padding: .8rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linea-s); }
.confronto thead th { background: var(--notte); color: var(--crema); font-size: .85rem; letter-spacing: .02em; }
.confronto thead .col-nuvola { background: var(--lilla-scuro); color: #fff; }
.confronto tbody th { width: 28%; font-weight: 700; }
.confronto td.col-nuvola { background: var(--lilla-tenue); font-weight: 600; }
.confronto td.col-nuvola .ico { color: var(--ok); stroke-width: 2.6; margin-right: .3rem; }
.confronto td.col-altro { color: var(--testo-tenue); }
@media (max-width: 520px) { .confronto { font-size: .86rem; } .confronto th, .confronto td { padding: .65rem .6rem; } }

/* Numeri */
.badge-esempio {
  display: inline-flex; align-items: center; gap: .35em; padding: .25em .75em; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .03em;
  background: rgba(201, 184, 243, .16); color: var(--lilla); border: 1px solid rgba(201, 184, 243, .45);
}
.numeri { display: grid; gap: 1.5rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.numero { padding-top: 1rem; border-top: 2px solid var(--lilla); }
.numero .valore { display: block; font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.3rem); font-weight: 700; line-height: 1; color: #fff; }
.numero p { margin: .55rem 0 0; color: #c9c6dc; }
.nota-numeri { margin: 1.75rem 0 0; font-size: .85rem; color: #a9a6c2; }

/* Recensioni */
.etichetta-demo {
  display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1rem; padding: .35em .9em;
  border-radius: 999px; background: var(--lilla-scuro); color: #fff; font-weight: 700; font-size: .88rem;
}
.recensioni { display: grid; gap: 1.25rem; margin-top: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.recensione { margin: 0; padding: 1.3rem; display: flex; flex-direction: column; gap: .55rem; background: var(--crema); border: 1px solid var(--linea-s); border-radius: var(--raggio); }
.recensione h3 { font-size: 1.05rem; margin: 0; }
.recensione blockquote { margin: 0; }
.recensione blockquote p { margin: 0; }
.recensione .stelle { font-size: 1rem; }
.recensione-autore { margin: auto 0 0; padding-top: .4rem; font-size: .88rem; color: var(--testo-tenue); }
.tag-esempio {
  align-self: flex-start; padding: .2em .6em; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  background: var(--lilla-tenue); color: var(--lilla-scuro);
}

/* FAQ */
.faq { max-width: 780px; margin: 2rem auto 0; display: grid; gap: .7rem; }
.faq details { background: var(--carta-s); border: 1px solid var(--linea-s); border-radius: 12px; }
.faq summary { position: relative; padding: 1rem 3rem 1rem 1.15rem; font-weight: 700; cursor: pointer; list-style: none; border-radius: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 1.2rem; top: 50%; width: .6rem; height: .6rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq summary:focus-visible { outline-offset: -3px; }
.faq details p { margin: 0; padding: 0 1.15rem 1.1rem; color: var(--testo-tenue); }

/* ---------- Offerta a pacchetti ---------- */
.offerta { background: linear-gradient(180deg, var(--lilla-tenue) 0%, var(--crema) 100%); }
.offerta-griglia { display: grid; gap: 2rem; align-items: start; margin-top: 2rem; }
@media (min-width: 900px) { .offerta-griglia { grid-template-columns: 1fr 1.1fr; } .offerta-visual { order: -1; } }
.offerta-visual .scena { box-shadow: 0 14px 36px rgba(21, 27, 63, .2); }
.incluso { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .5rem; font-size: .95rem; }
.incluso li { display: flex; gap: .55rem; align-items: flex-start; }
.incluso .ico { color: var(--lilla-scuro); margin-top: .2em; }

.pacchetti { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: .9rem; }
.pacchetti legend { padding: 0; margin-bottom: .7rem; font-weight: 800; font-size: 1.05rem; }
.pacchetto { position: relative; display: block; cursor: pointer; }
.pacchetto input { position: absolute; top: 1.2rem; left: 1.2rem; width: 1px; height: 1px; opacity: 0; } /* resta raggiungibile da tastiera */
.pacchetto-corpo {
  display: grid; grid-template-columns: auto 1fr auto; gap: .15rem .9rem; align-items: center;
  padding: 1rem 1.1rem; background: var(--carta-s); border: 2px solid var(--linea-s); border-radius: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pacchetto:hover .pacchetto-corpo { border-color: var(--lilla-scuro); }
.pallino { grid-row: span 2; width: 1.3rem; height: 1.3rem; border: 2px solid var(--testo-tenue); border-radius: 50%; }
.pacchetto-nome { font-weight: 800; }
.pacchetto-per { grid-column: 2; font-size: .88rem; color: var(--testo-tenue); }
.pacchetto-prezzo { grid-row: span 2; text-align: right; font-weight: 800; font-size: 1.25rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pacchetto-prezzo s { display: block; font-size: .8rem; font-weight: 600; color: var(--testo-tenue); }
.pacchetto-prezzo small { display: block; font-size: .8rem; font-weight: 600; color: var(--testo-tenue); }
.pacchetto-risparmio { grid-column: 2 / 4; font-size: .85rem; font-weight: 700; color: var(--ok); }
.pacchetto-badge {
  position: absolute; top: -.75rem; right: 1rem; padding: .25em .75em; border-radius: 999px;
  background: var(--lilla-scuro); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .02em;
}
.pacchetto-con-badge { margin-top: .5rem; }
.pacchetto input:checked + .pacchetto-corpo { border-color: var(--notte); box-shadow: 0 0 0 1px var(--notte), 0 10px 24px rgba(21, 27, 63, .12); }
.pacchetto input:checked + .pacchetto-corpo .pallino { border-color: var(--notte); background: radial-gradient(circle, var(--notte) 0 42%, transparent 47%); }
.pacchetto input:focus-visible + .pacchetto-corpo { outline: 3px solid var(--focus); outline-offset: 3px; }

.opzione-regalo {
  display: flex; gap: .7rem; align-items: flex-start; margin-top: 1rem; padding: .85rem 1rem;
  background: var(--carta-s); border: 1px dashed var(--lilla-scuro); border-radius: 12px; cursor: pointer; font-size: .95rem;
}
.opzione-regalo input { width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; accent-color: var(--notte); flex: none; }

.riepilogo {
  margin: 1.1rem 0; padding: 1rem 1.15rem; border-radius: 14px; background: var(--notte); color: var(--crema);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem;
}
.riepilogo-tot { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.riepilogo-dett { font-size: .92rem; color: #d9d4ee; }
.riepilogo-dett strong { color: #b9f0d2; }
.sotto-cta { margin: .7rem 0 0; font-size: .85rem; color: var(--testo-tenue); text-align: center; }

.garanzia {
  display: flex; gap: 1.2rem; align-items: center; margin-top: 3rem; padding: 1.4rem 1.5rem;
  background: var(--carta-s); border: 2px dashed var(--lilla); border-radius: 18px;
}
.garanzia svg { width: 80px; height: 80px; flex: none; }
.garanzia h2 { font-size: 1.4rem; margin-bottom: .35rem; }
.garanzia p { margin: 0; color: var(--testo-tenue); }
@media (max-width: 520px) { .garanzia { flex-direction: column; align-items: flex-start; } }

/* ---------- Piede ---------- */
.piede { background: var(--notte); color: #c9c6dc; padding: 3rem 0 calc(2rem + var(--barra-h) + 16px); font-size: .93rem; } /* spazio per la barra fissa */
.piede a { color: #fff; }
.piede a:hover { color: var(--lilla); }
.piede .marchio { color: #fff; }
.piede .marchio svg { color: var(--crema); }
.piede-griglia { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.piede h2 { margin-bottom: .8rem; font-family: var(--font); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lilla); }
.piede ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.info-demo {
  margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, .14);
  display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.info-demo h3 { margin-bottom: .3rem; font-size: 1rem; color: #fff; }
.info-demo p { margin: 0; font-size: .88rem; }
.piede-fondo {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-size: .85rem;
}
.piede-fondo p { margin: 0; }

/* ---------- Avviso "da quale annuncio arrivi" ---------- */
.chip {
  position: fixed; z-index: 80; left: 12px; right: 12px; bottom: 12px;
  max-width: 430px; display: flex; gap: .7rem; align-items: flex-start;
  padding: .8rem .6rem .8rem .9rem; border-radius: 14px; border: 1px solid var(--linea-s);
  background: #fff; color: var(--testo); box-shadow: 0 14px 40px rgba(21, 27, 63, .28);
  font-size: .9rem; line-height: 1.45;
  opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease, bottom .25s ease;
}
.chip.visibile { opacity: 1; transform: none; }
.con-barra .chip { bottom: calc(var(--barra-h) + 22px); } /* sale sopra la barra di acquisto quando compare */
.chip[hidden] { display: none; }
.chip-segno { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none; border-radius: 50%; background: var(--lilla-tenue); color: var(--lilla-scuro); }
.chip-testo { flex: 1; min-width: 0; }
.chip-testo p { margin: 0; }
.chip-dettaglio { margin-top: .3rem !important; font-size: .8rem; color: var(--testo-tenue); }
.chip .icona-btn { width: 2.2rem; height: 2.2rem; margin: -.3rem 0 0; }
.chip.chip-attenzione { border-color: #e7b25b; }
.chip.chip-attenzione .chip-segno { background: #fdf0d8; color: #8a5a00; }
@media (min-width: 720px) { .chip { left: 20px; right: auto; } }

/* ---------- Barra fissa di acquisto ---------- */
.barra {
  position: fixed; z-index: 85; left: 0; right: 0; bottom: 0;
  padding: .6rem 0 calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(250, 245, 236, .97); border-top: 1px solid var(--linea-s); box-shadow: 0 -8px 24px rgba(21, 27, 63, .12);
  transform: translateY(110%); visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.barra.visibile { transform: none; visibility: visible; transition: transform .25s ease; }
.barra-dentro { width: min(100% - 1.5rem, var(--larghezza)); margin-inline: auto; display: flex; align-items: center; gap: .65rem; }
.barra-img { flex: none; display: grid; place-items: center; width: 52px; height: 40px; border-radius: 10px; background: #1b2350; }
.barra-img svg { width: 44px; height: auto; }
.barra-testo { flex: 1; min-width: 0; line-height: 1.25; }
.barra-nome { display: block; font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-prezzo { display: block; font-size: .88rem; color: var(--testo-tenue); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra .btn { padding: .75em 1.05em; white-space: nowrap; box-shadow: none; }
.barra .btn-carrello { padding: .45rem .7rem; }
@media (max-width: 400px) { .barra-img { display: none; } .solo-largo { display: none; } }
@media (min-width: 720px) {
  .barra {
    left: auto; right: 20px; bottom: 20px; width: min(600px, calc(100% - 40px));
    padding: .45rem .45rem .45rem .6rem; border: 1px solid var(--linea-s); border-radius: 999px;
    box-shadow: 0 12px 34px rgba(21, 27, 63, .22);
  }
  .barra-dentro { width: auto; }
  .barra-img { border-radius: 999px; }
}

/* ---------- Carrello laterale e finestra di pagamento ---------- */
dialog { color: var(--testo); }
dialog::backdrop { background: rgba(11, 15, 38, .55); }
dialog.drawer {
  margin: 0 0 0 auto; padding: 0; border: 0;
  width: min(440px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  background: var(--crema); box-shadow: -20px 0 60px rgba(11, 15, 38, .35);
}
@supports (height: 100dvh) { dialog.drawer { height: 100dvh; max-height: 100dvh; } }
dialog.drawer[open] { animation: drawer-entra .28s ease-out; }
@keyframes drawer-entra { from { transform: translateX(100%); } }
.drawer-dentro { height: 100%; display: flex; flex-direction: column; }
.drawer-testa { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem .9rem 1.25rem; border-bottom: 1px solid var(--linea-s); }
.drawer-testa h2 { margin: 0; font-size: 1.4rem; }
.drawer-testa h2:focus { outline: none; }
.drawer-avviso { margin: 0; padding: .65rem 1.25rem; font-size: .9rem; font-weight: 600; background: #e3f4ea; color: #154f36; }
.drawer-avviso:empty { display: none; }
.drawer-corpo { flex: 1; overflow-y: auto; padding: 1rem 1.25rem 1.25rem; }
.drawer-piede { padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom)); background: var(--carta-s); border-top: 1px solid var(--linea-s); }

.righe { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.riga-c { display: grid; grid-template-columns: 64px 1fr auto; gap: .2rem .8rem; align-items: start; padding-bottom: .9rem; border-bottom: 1px solid var(--linea-s); }
.riga-img { display: grid; place-items: center; width: 64px; height: 50px; border-radius: 10px; background: #1b2350; }
.riga-img svg { width: 54px; height: auto; }
.riga-nome { margin: 0; font-weight: 700; line-height: 1.3; }
.riga-sotto { margin: .1rem 0 0; font-size: .85rem; color: var(--testo-tenue); }
.qta { display: inline-flex; align-items: center; margin-top: .45rem; border: 1px solid var(--bordo-campo); border-radius: 999px; background: #fff; }
.qta button { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: transparent; color: var(--testo); cursor: pointer; }
.qta button:hover { background: var(--crema-2); }
.qta button:disabled { opacity: .35; cursor: not-allowed; background: transparent; }
.qta output { min-width: 1.8rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.riga-destra { display: grid; justify-items: end; gap: .3rem; }
.riga-tot { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.carrello-vuoto { text-align: center; padding: 2rem 0 1rem; color: var(--testo-tenue); }
.carrello-vuoto[hidden] { display: none; }

.extra-regalo { display: flex; align-items: center; gap: .6rem; margin-top: .9rem; padding: .7rem .8rem; border-radius: 12px; background: var(--lilla-tenue); font-size: .92rem; }
.extra-regalo[hidden] { display: none; }
.extra-regalo .ico { color: var(--lilla-scuro); width: 1.4rem; height: 1.4rem; }
.extra-regalo span { flex: 1; }
.link-btn { padding: .3rem .2rem; border: 0; background: none; color: var(--lilla-scuro); font: 700 .88rem var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--notte); }

.coupon { margin-top: 1.4rem; }
.coupon label { display: block; margin-bottom: .35rem; font-weight: 700; font-size: .92rem; }
.coupon-riga { display: flex; gap: .5rem; }
.coupon input {
  flex: 1; min-width: 0; padding: .7rem .85rem; border: 1.5px solid var(--bordo-campo); border-radius: 10px;
  background: #fff; color: var(--testo); font: 600 1rem var(--font); text-transform: uppercase; letter-spacing: .03em;
}
.coupon input[aria-invalid="true"] { border-color: var(--errore); }
.coupon .btn { padding: .7em 1.1em; box-shadow: none; }
.aiuto { margin: .4rem 0 0; font-size: .82rem; color: var(--testo-tenue); }
.coupon-msg { min-height: 1.3em; margin: .35rem 0 0; font-size: .88rem; font-weight: 600; }
.coupon-msg.ok { color: var(--ok); }
.coupon-msg.errore { color: var(--errore); }

.totali { margin: 0 0 1rem; display: grid; gap: .35rem; font-size: .95rem; }
.totali div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.totali dt { color: var(--testo-tenue); }
.totali dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.totali .sconto dd { color: var(--ok); }
.totali .sconto[hidden] { display: none; }
.totali .totale { margin-top: .25rem; padding-top: .5rem; border-top: 1px solid var(--linea-s); font-size: 1.2rem; }
.totali .totale dt { color: var(--testo); font-weight: 800; }
.piccolo-centro { margin: .6rem 0 0; font-size: .82rem; color: var(--testo-tenue); text-align: center; }

dialog.modale {
  padding: 0; border: 0; border-radius: 18px;
  width: min(580px, calc(100% - 1.5rem)); max-height: calc(100% - 1.5rem); overflow: auto;
  background: var(--carta-s); box-shadow: 0 30px 80px rgba(11, 15, 38, .45);
}
.modale-dentro { padding: 1.5rem; }
.modale-testa { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.modale-testa h2 { margin: 0 0 .6rem; font-size: 1.5rem; }
.pag-riepilogo { margin: 1rem 0; padding: .9rem 1rem; display: grid; gap: .35rem; background: var(--crema); border: 1px solid var(--linea-s); border-radius: 12px; font-size: .92rem; }
.pag-riepilogo div { display: flex; justify-content: space-between; gap: 1rem; }
.pag-riepilogo dt { color: var(--testo-tenue); }
.pag-riepilogo dd { margin: 0; font-weight: 700; text-align: right; }
.pag-etichetta { margin: 0 0 .35rem; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--testo-tenue); }
.pag-link { display: block; margin: 0; padding: .85rem 1rem; border-radius: 10px; background: var(--crema-2); color: var(--testo); font-size: .85rem; line-height: 1.5; word-break: break-all; }
.pag-copia { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .7rem 0 0; }
.pag-copia-msg { font-size: .88rem; font-weight: 600; color: var(--ok); }
.pag-dopo { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .5rem; font-size: .95rem; }
.modale h3 { margin: 1.4rem 0 .2rem; font-size: 1.05rem; }
.modale-azioni { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
