/* =====================================================================
   Cherry Box — base comune a tutte le pagine
   Reset, tipografia, bottoni, sezioni, testate delle pagine interne,
   testo lungo (privacy), comparsa allo scorrimento.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--testata) + 8px); }
body {
  margin: 0;
  background: var(--avorio);
  color: var(--inchiostro);
  font: 400 17px/1.55 var(--f);
  /* il Bodoni nel taglio più robusto: con quello da titoli le aste sottili spariscono (Jost non ha questo asse) */
  font-optical-sizing: none; font-variation-settings: "opsz" 11;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* il piè di pagina resta in fondo anche sulle pagine corte */
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
@supports (overflow: clip) { body { overflow-x: clip; } }
[hidden] { display: none !important; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.salta-al-contenuto { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--bordeaux); color: var(--avorio); padding: 12px 16px; text-decoration: none; font-weight: 500; }
.salta-al-contenuto:focus { top: 12px; }

/* ---------- Contenitori e sezioni ---------- */
.contenitore { max-width: var(--largo); margin: 0 auto; padding: 0 var(--g); }
.sezione { padding: 64px 0; }
@media (min-width: 900px) { .sezione { padding: 104px 0; } }

/* ---------- Tipografia: Bodoni per i titoli, Jost per tutto il resto ---------- */
h1, h2, h3 { font-family: var(--f-titoli); font-weight: 500; line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 1.6rem + 2vw, 3.1rem); }
h3 { font-size: 1.5rem; line-height: 1.2; }
p { text-wrap: pretty; }
.lead { font-size: 18px; color: var(--testo-sec); max-width: 34em; }
.intestazione { display: grid; gap: 12px; margin-bottom: 36px; justify-items: start; }
.intestazione p { color: var(--testo-sec); max-width: 36em; font-size: 18px; }
.intestazione--centro { justify-items: center; text-align: center; }
@media (min-width: 900px) { .intestazione { margin-bottom: 52px; } }

/* ---------- Icone dello sprite (a tratto) ---------- */
.icona-svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bottoni: il colore sale da sotto al passaggio del mouse ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  border: 1px solid var(--accento); background: var(--accento); color: var(--accento-testo);
  font-weight: 500; font-size: 16px; line-height: 1.1; letter-spacing: .02em; text-decoration: none; text-align: center;
  cursor: pointer; transition: color .35s var(--esce), border-color .35s var(--esce);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accento-sopra); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--esce); }
.btn--secondario { background: transparent; color: var(--testo); border-color: var(--testo); }
.btn--secondario::before { background: var(--accento); }
.btn .icona-svg { width: 20px; height: 20px; }
/* sul telefono tutti i bottoni sono a tutta larghezza, della stessa altezza */
@media (max-width: 699px) {
  .btn, .azioni { width: 100%; }
  .btn--filtri { width: auto; }
}
/* link con la sottolineatura che si ritira al passaggio del mouse */
.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 9px) / 100% 1px no-repeat;
  transition: background-size .5s var(--esce);
}
button.link { padding: 0; border: 0; cursor: pointer; }
.azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* ---------- Bollini: piccole etichette ---------- */
.bollino {
  display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px;
  background: var(--avorio); color: var(--bordeaux);
  font-size: 12px; font-weight: 500; line-height: 1.2; letter-spacing: .04em; white-space: nowrap;
}
.bollino--inox { background: var(--acciaio); color: var(--bordeaux); }
.bollino--italia { background: var(--avorio); color: var(--bordeaux); box-shadow: inset 0 0 0 1px var(--linea); }
.bollino--novita { background: var(--bordeaux); color: var(--avorio); }
.bollino--saldi { background: var(--ciliegia); color: var(--bianco); }

/* ---------- Testata delle pagine interne: bordeaux, come l'apertura ---------- */
.testa-pagina { padding: 44px 0 40px; }
.testa-pagina .contenitore { display: grid; gap: 14px; justify-items: start; }
.testa-pagina p { font-size: 18px; color: var(--testo-sec); max-width: 38em; }
@media (min-width: 900px) { .testa-pagina { padding: 76px 0 64px; } }

/* ---------- Percorso (briciole) ---------- */
.briciole { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 20px; font-size: 14px; color: var(--testo-sec); }
.briciole a { text-decoration: none; }
.briciole [aria-current] { color: var(--testo); font-weight: 500; }

/* ---------- Testo lungo (privacy) ---------- */
.testo-lungo { max-width: 46rem; }
.testo-lungo h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); margin: 40px 0 12px; }
.testo-lungo h2:first-child { margin-top: 0; }
.testo-lungo p { margin: 0 0 14px; line-height: 1.65; }
.testo-lungo a:not(.btn) { color: var(--bordeaux); text-underline-offset: 3px; }

/* ---------- Piccoli elementi condivisi ---------- */
.avviso { color: var(--testo-sec); font-size: var(--testo-sm); max-width: 40em; }
.vuoto { padding: 32px 0; color: var(--testo-sec); }
.segnaposto { display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px; background: var(--foto); color: var(--bordeaux); }
.segnaposto svg { width: 34%; max-width: 120px; height: auto; fill: currentColor; opacity: .3; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* messaggio accanto a un campo o a una scelta da correggere (negozio online) */
.msg-errore { margin-top: 6px; color: var(--ciliegia); font-size: 15px; font-weight: 500; line-height: 1.4; }
.msg-errore[hidden] { display: none; }

/* ---------- Comparsa allo scorrimento ---------- */
.js:not(.fermo) .rivela { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--esce), transform .9s var(--esce); transition-delay: calc(var(--i, 0) * 90ms); }
.js:not(.fermo) .rivela.visto { opacity: 1; transform: none; }
@media print { .js:not(.fermo) .rivela { opacity: 1; transform: none; } }

/* ---------- Effetti al passaggio del mouse: solo con il mouse, sul telefono resterebbero bloccati dopo il tocco ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover::before { transform: scaleY(1); }
  .btn:hover { border-color: var(--accento-sopra); }
  .btn--secondario:hover { color: var(--accento-testo); border-color: var(--accento); }
  .link:hover { background-size: 0 1px; background-position: 100% calc(100% - 9px); }
  .briciole a:hover { color: var(--testo); text-decoration: underline; text-underline-offset: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
