/* ═══════════════════════════════════════════════════════════════
   Farmacie — foglio di stile condiviso
   Un solo file per entrambi i siti: modificarlo qui cambia
   l'aspetto di tutte e due le farmacie.
   ═══════════════════════════════════════════════════════════════ */

/* ── Caratteri ─────────────────────────────────────────────────
   I file stanno in shared/fonts/, dentro il sito: nessuna richiesta
   ai server di Google (GDPR) e un collegamento in meno da aprire.  */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 75% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/source-serif-4-latin.woff2") format("woff2");
}

/* ── Token ─────────────────────────────────────────────────────
   Tutti i colori, gli spazi e i caratteri del sito nascono qui.
   Per cambiare il verde del sito basta cambiare --brand.          */

:root {
  --ink:        #12211C;   /* testo principale, verde-nero */
  --ink-2:      #47584F;   /* testo secondario */
  --ink-3:      #5F6C65;   /* testo terziario, etichette */
  --paper:      #F3F5F2;   /* sfondo pagina */
  --surface:    #FFFFFF;   /* schede */
  --line:       #DDE4DF;
  --line-2:     #C6D1CA;

  --brand:      #1F6B52;   /* pulsanti, link, stato aperta */
  --brand-deep: #123F31;   /* hero, hover */
  --brand-dark: #0C2C22;   /* footer */
  --brand-tint: #E5EDE8;
  --amber:      #A35E08;   /* SOLO prezzi e promozioni */
  --amber-tint: #F8EEDC;

  --on-dark:    #EDF2EE;
  --on-dark-2:  #A7BDB1;

  /* tinte delle sei categorie */
  --t-pelle:   #F6E8E2;
  --t-capelli: #EFE7F2;
  --t-circolazione: #E2EDF3;
  --t-ossa:    #F3EBDC;
  --t-fegato:  #E7EFE3;
  --t-sport:   #DFEBE9;

  /* una sola scala di spaziatura per tutto il sito */
  --s1: .25rem;  --s2: .5rem;   --s3: .75rem;  --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 2.5rem;  --s8: 4rem;
  --s9: 6rem;

  --r-xs: 6px; --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;

  /* elevazione: tre livelli, ombre tinte di verde e non di grigio */
  --e1: 0 1px 2px rgba(18,63,49,.05),  0 2px 6px rgba(18,63,49,.04);
  --e2: 0 2px 4px rgba(18,63,49,.05),  0 10px 26px rgba(18,63,49,.07);
  --e3: 0 6px 12px rgba(18,63,49,.07), 0 26px 60px rgba(18,63,49,.14);

  --ease: cubic-bezier(.2,.8,.3,1);
  --wrap: 1200px;
  --head-h: 100px;         /* aggiornato da site.js sull'altezza reale */

  --f-display: "Archivo", system-ui, -apple-system, sans-serif;
  --f-text: "Source Serif 4", Georgia, "Times New Roman", serif;
}

/* ── Passaggio fra le pagine ───────────────────────────────────
   Le due pagine si incrociano invece di lampeggiare bianco.
   Dove il browser non la conosce, questa regola viene ignorata.   */

@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) { animation-duration: .22s; }

/* ── Base ──────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* senza questo, arrivando da un'ancora il titolo finisce nascosto
     sotto l'intestazione fissa */
  scroll-padding-top: calc(var(--head-h) + var(--s5));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 1.125rem;
  line-height: 1.55;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

/* serve perché display:flex sulle schede vincerebbe sull'attributo hidden */
[hidden] { display: none !important; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

/* testo lungo: serif, riga corta, interlinea ampia */
.prosa {
  font-family: var(--f-text);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 68ch;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }

.sezione { padding-block: var(--s8); }
.sezione--stretta { padding-block: var(--s7); }
.sezione--chiara { background: var(--surface); }

/* ── Stati interattivi: definiti una volta, validi ovunque ──── */

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.su-scuro :focus-visible { outline-color: var(--on-dark); }

a, button { touch-action: manipulation; }   /* toglie il ritardo di 300ms al tocco */

/* ── Intestazione e barra di stato ──────────────────────────── */

/* il contenitore non deve generare un riquadro proprio: altrimenti
   l'intestazione resta "appiccicata" solo dentro i suoi 140px e poi
   scorre via insieme alla pagina */
#testa { display: contents; }

.testa {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: transform .28s var(--ease);
}
/* scorrendo verso il basso resta solo la barra verde con orario e "Chiama":
   su telefono sono 60px di schermo recuperati */
.testa--ritirata { transform: translateY(calc(-1 * var(--testa-riga-h, 60px))); }

.testa-riga {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s5);
  min-height: 60px;
}

.marchio {
  display: inline-flex; align-items: center; gap: var(--s3);
  text-decoration: none; padding: var(--s2) 0;
}
.marchio-croce {
  width: 30px; height: 30px; flex: none;
  border-radius: 8px; background: var(--brand);
  display: grid; place-items: center;
  transition: background-color .18s var(--ease);
}
.marchio-croce svg { width: 16px; height: 16px; fill: #fff; }
/* logo vero della farmacia: alto quasi quanto la riga, la linea è già
   ispessita nel file perché a questa misura l'originale sparirebbe */
.marchio-logo {
  height: 44px; width: auto; flex: none;
  transition: opacity .18s var(--ease);
}
.marchio:hover .marchio-logo { opacity: .8; }
.marchio:hover .marchio-croce { background: var(--brand-deep); }
.marchio-nome {
  font-weight: 700; font-size: 1.125rem;
  font-stretch: 108%; letter-spacing: -.02em;
}

.nav { display: flex; align-items: center; gap: var(--s2); }
.nav a {
  text-decoration: none;
  font-size: 1rem; font-weight: 500;
  color: var(--ink-2);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-xs);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--brand-tint); }
.nav a[aria-current="page"] { color: var(--brand); font-weight: 600; }

/* barra di stato: la cosa più pratica del sito, sempre visibile */
.stato-barra { background: var(--brand-deep); color: var(--on-dark); }
.stato-riga {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); min-height: 40px; font-size: .9375rem;
}
.stato-testo { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 500; }
.pallino {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--on-dark-2);
  position: relative;
}
/* l'alone batte tre volte all'arrivo e poi si spegne: richiama l'occhio
   una volta sola invece di lampeggiare per sempre in un angolo */
.pallino--aperta::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #57C88F; pointer-events: none;
  animation: alone 1.7s var(--ease) 2;
}
@keyframes alone {
  0%        { transform: scale(1);   opacity: .5; }
  70%, 100% { transform: scale(3.4); opacity: 0; }
}

/* il testo dello stato si aggiorna da solo ogni minuto: cambia in dissolvenza
   invece di scattare */
.stato-testo { transition: opacity .18s var(--ease); }
.stato-testo--cambia { opacity: 0; }
.pallino--aperta { background: #57C88F; box-shadow: 0 0 0 3px rgba(87,200,143,.22); }
.pallino--chiusa { background: #E0925E; box-shadow: 0 0 0 3px rgba(224,146,94,.2); }
.stato-azione {
  color: var(--on-dark); text-decoration: none; font-weight: 600;
  padding: var(--s2) var(--s3); margin-right: calc(var(--s3) * -1);
  border-radius: var(--r-xs);
  transition: background-color .18s var(--ease);
}
.stato-azione:hover { background: rgba(255,255,255,.12); }

/* ── Pulsanti ───────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-family: var(--f-display); font-size: 1rem; font-weight: 600;
  letter-spacing: -.01em; text-decoration: none; cursor: pointer;
  transition: background-color .18s var(--ease),
              border-color .18s var(--ease),
              color .18s var(--ease),
              transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primario { background: var(--brand); color: #fff; }
.btn--primario:hover { background: var(--brand-deep); }

.btn--fantasma {
  background: transparent; color: var(--ink);
  border-color: var(--line-2);
}
.btn--fantasma:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-deep); }

.btn--chiaro { background: rgba(255,255,255,.14); color: var(--on-dark); border-color: rgba(255,255,255,.28); }
.btn--chiaro:hover { background: rgba(255,255,255,.24); }

.btn--pieno { width: 100%; }

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  background: var(--brand-deep);
  color: var(--on-dark);
  padding-top: var(--s8);
  padding-bottom: calc(var(--s8) + 64px);   /* spazio per le card sporgenti */
  position: relative; overflow: hidden;
}
/* velo luminoso in alto a destra, per non lasciare il verde piatto */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(90ch 55ch at 88% -12%, rgba(120,200,164,.20), transparent 62%),
    radial-gradient(70ch 40ch at 4% 108%, rgba(9,34,26,.55), transparent 60%);
}
.hero .wrap { position: relative; z-index: 1; }

.hero-nome {
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: -.04em;
  line-height: .86;
  margin: 0;
  color: #fff;
  /* misura di partenza: site.js poi la ricalcola per riempire la riga */
  font-size: clamp(2.75rem, 10vw, 8rem);
}
/* width:max-content è necessario: senza, la riga occupa tutta la larghezza
   disponibile e la misura per adattare il corpo del testo torna sempre uguale
   allo spazio, quindi il nome resterebbe a dimensione fissa */
.hero-nome span {
  display: block; white-space: nowrap; width: max-content;
  overflow: hidden;
  /* spazio per le lettere, che sporgono oltre la riga: senza questo
     l'overflow taglierebbe le cime e le code */
  padding-block: .14em .08em; margin-block: -.14em -.08em;
}
/* ogni riga sale da sotto il proprio bordo, una dopo l'altra */
.hero-nome i {
  display: block; font-style: normal;
  animation: scopri .8s var(--ease) both;
}
.hero-nome span:nth-child(2) i { animation-delay: .09s; }
.hero-nome span:nth-child(3) i { animation-delay: .18s; }

@keyframes scopri {
  from { transform: translateY(112%); }
  to   { transform: none; }
}

.hero-claim {
  font-family: var(--f-text);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  line-height: 1.6;
  color: #C3D5CA;
  max-width: 54ch;
  margin-top: var(--s5);
}

/* le quattro card pratiche, sporgenti sul bordo del pannello verde */
.hero-card-zona { position: relative; z-index: 3; margin-top: -64px; }
.hero-cards {
  display: grid; gap: var(--s3);
  grid-template-columns: repeat(4, 1fr);
}
.hero-card {
  background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--e2);
  padding: var(--s4) var(--s5);
  min-height: 96px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
a.hero-card:hover { border-color: var(--brand); box-shadow: var(--e3); }
.hero-card-eti { font-size: .875rem; color: var(--ink-3); font-weight: 500; }
.hero-card-val {
  font-size: 1.125rem; font-weight: 700; font-stretch: 106%;
  letter-spacing: -.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hero-card-val--verde { color: var(--brand); }

/* ── Foto della vetrina ─────────────────────────────────────────
   La stessa immagine in due posti con ritagli diversi: object-position
   tiene alta l'inquadratura, così resta l'insegna e si perde il
   marciapiede, che non serve a nessuno.                            */

.vetrina-banda { margin: var(--s6) 0 0; }
.vetrina-banda img {
  width: 100%; height: auto; aspect-ratio: 2 / 1;
  object-fit: cover; object-position: center 32%;
  border-radius: var(--r-lg);
  background: var(--brand-tint);   /* colore d'attesa mentre carica */
}
.vetrina-banda figcaption {
  margin-top: var(--s3);
  font-family: var(--f-text); font-size: 1rem; line-height: 1.6;
  color: var(--ink-2); max-width: 62ch;
}

.vetrina-pannello { margin: 0 0 var(--s5); }
.vetrina-pannello img {
  width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; object-position: center 45%;
  border-radius: var(--r-md);
  background: var(--brand-tint);
}

@media (max-width: 760px) {
  /* su telefono un ritaglio largo diventa una fessura: si alza */
  .vetrina-banda img { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
  .vetrina-banda { margin-top: var(--s5); }
}

/* ── Intestazione di sezione ────────────────────────────────── */

.sez-testa {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s5); margin-bottom: var(--s6);
}
.sez-titolo {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-stretch: 110%;
}
/* durata delle promozioni, sotto il titolo: nel colore riservato a prezzi e offerte */
.sez-validita { margin-top: var(--s3); font-size: 1.125rem; font-weight: 600; color: var(--amber); letter-spacing: -.01em; }

.sez-link {
  font-size: 1rem; font-weight: 600; color: var(--brand);
  text-decoration: none; white-space: nowrap;
  border-bottom: 1.5px solid transparent; padding-bottom: 2px;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.sez-link:hover { border-bottom-color: var(--brand); color: var(--brand-deep); }

/* ── Tessere categoria ──────────────────────────────────────── */

.categorie {
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(6, 1fr);
}
.cat { text-decoration: none; display: block; }
.cat-figura {
  aspect-ratio: 1 / 1; border-radius: var(--r-md);
  overflow: hidden; display: grid; place-items: center;
  background: var(--brand-tint);
  border: 1px solid transparent;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.cat-figura img { width: 100%; height: 100%; object-fit: cover; }
.cat:hover .cat-figura { border-color: var(--brand); box-shadow: var(--e2); }
.cat-nome {
  display: block; margin-top: var(--s3); text-align: center;
  font-size: 1rem; font-weight: 600; letter-spacing: -.01em;
  color: var(--ink);
}

/* ── Bento promozioni ───────────────────────────────────────── */

.bento {
  display: grid; gap: var(--s4);
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: auto auto;
}
.promo {
  border-radius: var(--r-lg); padding: var(--s6);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  text-decoration: none; color: var(--ink);
  border: 1px solid rgba(18,33,28,.07);
  transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
.promo:hover { box-shadow: var(--e3); transform: translateY(-2px); }
.promo--grande { grid-row: span 2; }

.promo-sconto {
  align-self: flex-start;
  background: var(--surface); color: var(--amber);
  font-size: .875rem; font-weight: 700;
  padding: var(--s2) var(--s4); border-radius: var(--r-pill);
  box-shadow: var(--e1);
}
.promo-nome {
  margin-top: var(--s4);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-stretch: 106%;
}
.promo-desc {
  margin-top: var(--s2); max-width: 36ch;
  font-family: var(--f-text); font-size: 1rem; line-height: 1.5; color: var(--ink-2);
}
.promo-prezzo {
  margin-top: var(--s2);
  font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.promo-prezzo small {
  font-size: .875rem; font-weight: 500; letter-spacing: 0;
  color: var(--ink-3); margin-left: var(--s2);
  text-decoration: line-through;
}
.promo-foto { mix-blend-mode: multiply; }

.promo--grande { min-height: 430px; }
.promo--grande .promo-foto {
  margin-top: auto; align-self: flex-end;
  width: 70%; max-width: 340px; height: 240px;
  object-fit: contain; object-position: bottom right;
}

/* tessere piccole: testo a sinistra, prodotto a destra */
.promo:not(.promo--grande) {
  display: grid; min-height: 207px;
  grid-template-columns: 1fr minmax(0, 36%);
  grid-template-areas: "sconto foto" "nome foto" "desc foto" "prezzo foto";
  align-content: center; column-gap: var(--s5);
}
.promo:not(.promo--grande) .promo-sconto { grid-area: sconto; justify-self: start; }
.promo:not(.promo--grande) .promo-nome   { grid-area: nome; }
.promo:not(.promo--grande) .promo-desc   { grid-area: desc; }
.promo:not(.promo--grande) .promo-prezzo { grid-area: prezzo; }
.promo:not(.promo--grande) .promo-foto {
  grid-area: foto; align-self: center; justify-self: end;
  width: 100%; max-height: 150px; object-fit: contain;
}

/* quattro promozioni: griglia 2×2, tutte tessere "piccole" della stessa altezza.
   Sul telefono resta una colonna sola (vedi in fondo). */
.bento--quattro { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
/* etichetta sempre in alto e prezzo sempre in basso: le tessere affiancate
   combaciano anche se un nome va a capo su più righe dell'altro */
.bento--quattro .promo {
  grid-template-rows: auto auto 1fr auto;
  align-content: stretch;
}
.bento--quattro .promo .promo-nome { align-self: start; }
.bento--quattro .promo .promo-prezzo { align-self: end; }

/* ── Schede prodotto ────────────────────────────────────────── */

.griglia-prodotti {
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(4, 1fr);
}

.prodotto {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease),
              opacity .17s var(--ease), transform .17s var(--ease);
}
.prodotto:hover { border-color: var(--line-2); box-shadow: var(--e2); }

.prodotto-figura {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  padding: var(--s4);
  background: var(--brand-tint);
}
.prodotto-figura img {
  width: 100%; height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.prodotto-corpo {
  padding: var(--s4);
  display: flex; flex-direction: column; gap: var(--s2);
  flex: 1;
}
.prodotto-riga {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3); flex-wrap: nowrap;
}
.disponibilita {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .875rem; font-weight: 500; color: var(--ink-3);
  white-space: nowrap;
}
.disponibilita::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); flex: none;
}
.disponibilita--ordinabile::before { background: var(--amber); }

.prezzo {
  font-size: 1.125rem; font-weight: 700; color: var(--amber);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prezzo-pieno {
  font-size: .875rem; font-weight: 500; color: var(--ink-3);
  text-decoration: line-through; margin-right: var(--s2);
}
.prodotto-nome { font-size: 1.125rem; font-stretch: 104%; }
.prodotto-marca { font-size: .875rem; color: var(--ink-3); font-weight: 500; }
.prodotto-desc {
  font-family: var(--f-text); font-size: 1rem; line-height: 1.6;
  color: var(--ink-2); flex: 1;
}
.prodotto .btn { margin-top: auto; }

/* ── Filtri ─────────────────────────────────────────────────── */

.filtri {
  display: flex; flex-wrap: wrap; gap: var(--s3);
  margin-bottom: var(--s6);
}
.filtro {
  min-height: 44px; padding: 0 var(--s4);
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  font-family: var(--f-display); font-size: 1rem; font-weight: 600;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.filtro:hover { border-color: var(--brand); color: var(--brand-deep); }
.filtro[aria-pressed="true"] {
  background: var(--brand); border-color: var(--brand); color: #fff;
}

.vuoto {
  padding: var(--s8) var(--s5); text-align: center;
  color: var(--ink-2); font-family: var(--f-text);
  border: 1px dashed var(--line-2); border-radius: var(--r-md);
}

/* ── Schede servizio ────────────────────────────────────────── */

.griglia-servizi { display: grid; gap: var(--s4); grid-template-columns: repeat(2, 1fr); }
.griglia-servizi--tre { grid-template-columns: repeat(3, 1fr); }

.servizio {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden;
  display: grid; grid-template-columns: 38% 1fr;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.servizio:hover { border-color: var(--line-2); box-shadow: var(--e2); }
.servizio--verticale { grid-template-columns: 1fr; }

.servizio-figura { background: var(--brand-tint); }
.servizio--senza-foto { grid-template-columns: 1fr; }
.servizio-figura img { width: 100%; height: 100%; object-fit: cover; }
.servizio--verticale .servizio-figura { aspect-ratio: 16 / 10; }

.servizio-corpo {
  padding: var(--s5);
  display: flex; flex-direction: column; gap: var(--s3);
}
.servizio-nome { font-size: 1.1875rem; font-stretch: 104%; }
.servizio-desc {
  font-family: var(--f-text); font-size: 1rem; line-height: 1.65;
  color: var(--ink-2); flex: 1;
}
.servizio-meta {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4);
  font-size: .9375rem; color: var(--ink-3); font-weight: 500;
}
.servizio-meta b { color: var(--ink); font-weight: 600; }
.servizio .btn { align-self: flex-start; margin-top: auto; }

/* ── Orari ──────────────────────────────────────────────────── */

.due-colonne { display: grid; gap: var(--s5); grid-template-columns: 1fr 1fr; align-items: start; }

.pannello {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s6);
}
.sezione--chiara .pannello { background: var(--paper); }
.pannello-titolo { font-size: 1.25rem; margin-bottom: var(--s4); }

.orari { width: 100%; border-collapse: collapse; }
.orari th, .orari td {
  text-align: left; padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.orari tr:last-child th, .orari tr:last-child td { border-bottom: 0; }
.orari th { font-weight: 500; color: var(--ink-2); }
.orari td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.orari td span + span { margin-left: var(--s4); }
.hero-card-val span { display: block; }
.orari .oggi th, .orari .oggi td { color: var(--brand); font-weight: 700; }
.orari .chiuso td { color: var(--ink-3); font-weight: 500; }

/* ── Contatti ───────────────────────────────────────────────── */

.contatti-lista { display: grid; gap: var(--s3); }
.contatto {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.contatto-eti { font-size: .875rem; color: var(--ink-3); font-weight: 500; }
.contatto-val { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }

.mappa {
  position: relative;
  border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: var(--brand-tint);
}
/* height:auto serve: senza, l'attributo height="500" vince sulla proporzione */
.mappa img,
.mappa iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border: 0; }
@media (max-width: 760px) { .mappa img, .mappa iframe { aspect-ratio: 4 / 3; } }

/* Riquadro "posizione": quello che si vede al posto della mappa di Google
   finché non c'è il consenso. Stessa proporzione della mappa, così quando
   la mappa si carica la pagina non salta; se il contenuto è più alto
   (telefono), il riquadro cresce. */
.mappa-posizione {
  aspect-ratio: 16 / 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: var(--s6) var(--s5);
  background: var(--brand-tint);
}
@media (max-width: 760px) { .mappa-posizione { aspect-ratio: 4 / 3; padding: var(--s5) var(--s4); } }

.mappa-posizione-pin {
  width: 32px; height: 43px; margin-bottom: var(--s3);
  filter: drop-shadow(0 3px 4px rgba(18,63,49,.3));
}
.mappa-posizione-pin path { fill: #4F6F52; }      /* il verde del logo */
.mappa-posizione-pin circle { fill: #fff; }
.mappa-posizione-nome { font-weight: 700; font-size: 1.125rem; letter-spacing: -.02em; }
.mappa-posizione-ind { font-family: var(--f-text); font-size: 1rem; color: var(--ink-2); margin-top: var(--s1); }
.mappa-posizione-azioni {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3);
  margin-top: var(--s5);
}
.mappa-posizione-azioni .btn--fantasma { background: var(--surface); }
.mappa-posizione-nota {
  font-family: var(--f-text); font-size: .9375rem; line-height: 1.5; color: var(--ink-3);
  max-width: 44ch; margin-top: var(--s3);
}
@media (max-width: 760px) {
  .mappa-posizione-azioni { flex-direction: column; align-self: stretch; }
}

/* mappa di Google caricata: il riquadro "posizione" sparisce */
.mappa--google .mappa-posizione { display: none; }
.mappa-azioni { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }

.indicazioni { display: grid; gap: var(--s5); }
.indicazione-titolo { font-size: 1rem; margin-bottom: var(--s1); }
.indicazione-testo { font-family: var(--f-text); font-size: 1rem; line-height: 1.65; color: var(--ink-2); }

/* ── Nota legale in linea ───────────────────────────────────── */

.nota {
  font-family: var(--f-text); font-size: .9375rem; line-height: 1.65;
  color: var(--ink-3); max-width: 72ch; margin-top: var(--s5);
  padding-left: var(--s4); border-left: 2px solid var(--line-2);
}

/* ── Piede ──────────────────────────────────────────────────── */

.piede { background: var(--brand-dark); color: var(--on-dark); padding-block: var(--s8) var(--s6); }
.piede-griglia {
  display: grid; gap: var(--s6);
  grid-template-columns: 1.4fr 1fr 1fr;
  padding-bottom: var(--s6);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.piede h3 { font-size: 1rem; margin-bottom: var(--s3); color: #fff; }
.piede p, .piede li { font-size: 1rem; color: var(--on-dark-2); line-height: 1.7; }
.piede ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.piede a {
  color: var(--on-dark-2); text-decoration: none;
  transition: color .18s var(--ease);
}
.piede a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.piede-chi { font-family: var(--f-text); max-width: 42ch; }
.piede-legale {
  padding-top: var(--s5);
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
  font-size: .875rem; color: var(--on-dark-2);
}

/* "Preferenze cookie" è un pulsante (apre il banner) vestito da link del piede */
.piede-link {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: var(--on-dark-2); text-align: left;   /* stessa misura del testo accanto */
  transition: color .18s var(--ease);
}
.piede-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ── Novità: un servizio in evidenza ───────────────────────────
   La foto è la cosa che si nota; il testo e la scheda stanno accanto,
   senza riquadri attorno.                                          */

.novita { display: grid; grid-template-columns: 1.08fr 1fr; gap: var(--s8); align-items: center; }
.novita-foto, .novita-scheda, .chi-persone, .chi-interno { margin: 0; }
.novita-foto img {
  width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-lg); background: var(--brand-tint);
}
.novita-testo .prosa { margin-top: var(--s4); }
.novita-azione { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); margin-top: var(--s5); }
.novita-prezzo { font-size: 1rem; font-weight: 600; color: var(--ink-2); }

/* la scheda stampata: un foglio, quindi angoli vivi e ombra leggera */
.novita-scheda { margin-top: var(--s7); max-width: 380px; }
.novita-scheda img {
  width: 100%; height: auto; background: #fff; padding: var(--s4);
  border-radius: 2px; box-shadow: var(--e2);
}
.novita-scheda figcaption {
  font-family: var(--f-text); font-size: 1rem; line-height: 1.55;
  color: var(--ink-2); margin-top: var(--s3);
}

/* ── Chi siamo ─────────────────────────────────────────────────
   La foto delle persone non va oltre 620 px: il file è piccolo e
   più grande sgranerebbe.                                          */

.chi {
  display: grid; gap: var(--s5) var(--s8);
  grid-template-columns: minmax(0, 620px) 1fr; grid-template-rows: auto 1fr;
  grid-template-areas: "persone testo" "persone interno";
}
.chi-testo { grid-area: testo; }
.chi-testo .prosa { margin-top: var(--s4); }
.chi-persone { grid-area: persone; }
.chi-interno { grid-area: interno; min-height: 180px; position: relative; }
.chi-persone img {
  width: 100%; height: auto; border-radius: var(--r-lg); background: var(--brand-tint);
}
.chi-interno img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: var(--r-md); background: var(--brand-tint);
}

@media (max-width: 1024px) {
  .novita { grid-template-columns: 1fr 1fr; gap: var(--s6); }
  .novita-scheda { margin-top: var(--s6); }
  .chi {
    grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: var(--s5) var(--s6);
    grid-template-areas: "testo interno" "persone persone";
  }
}
@media (max-width: 760px) {
  .novita { grid-template-columns: 1fr; gap: var(--s5); }
  .chi { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "testo" "persone" "interno"; }
  .chi-interno { min-height: 0; }
  .chi-interno img { position: static; height: auto; aspect-ratio: 16 / 10; }
}

/* sconto sulla foto delle schede in promozione */
.prodotto-sconto {
  position: absolute; top: var(--s3); left: var(--s3); z-index: 1;
  background: var(--surface); color: var(--amber);
  font-size: .875rem; font-weight: 700;
  padding: var(--s1) var(--s3); border-radius: var(--r-pill); box-shadow: var(--e1);
}

/* ── Banner dei cookie ─────────────────────────────────────────
   Scheda flottante in basso a sinistra, non un muro: il sito resta
   usabile anche senza rispondere. Rifiuta e Accetta hanno lo stesso
   aspetto, come chiede il Garante; la X vale come rifiuto.          */

.cookie {
  position: fixed; z-index: 60;
  left: var(--s5); bottom: var(--s5);
  width: min(440px, calc(100vw - 2 * var(--s5)));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--e3);
  padding: var(--s5) var(--s5) var(--s5);
  opacity: 0; transform: translateY(16px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.cookie--visibile { opacity: 1; transform: none; }

.cookie-titolo { font-size: 1.25rem; padding-right: var(--s7); }
.cookie-testo {
  font-family: var(--f-text); font-size: .9375rem; line-height: 1.55;
  color: var(--ink-2); margin-top: var(--s3);
}
.cookie-testo + .cookie-testo { margin-top: var(--s2); }
.cookie-testo a { color: var(--brand); font-weight: 600; text-underline-offset: 3px; }
.cookie-testo a:hover { color: var(--brand-deep); }

.cookie-azioni { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s5); }

.cookie-chiudi {
  position: absolute; top: var(--s2); right: var(--s2);
  width: 48px; height: 48px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--r-sm); cursor: pointer;
  color: var(--ink-3);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.cookie-chiudi:hover { background: var(--brand-tint); color: var(--ink); }
.cookie-chiudi:active { transform: scale(.94); }
.cookie-chiudi svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 760px) {
  .cookie { left: var(--s3); bottom: var(--s3); width: calc(100vw - 2 * var(--s3)); padding: var(--s4) var(--s4) var(--s4); }
  /* sul telefono il banner non deve coprire orari e telefono in cima alla pagina */
  .cookie-titolo { font-size: 1.125rem; }
  .cookie-testo { font-size: .9375rem; line-height: 1.5; margin-top: var(--s2); }
  .cookie-azioni { margin-top: var(--s4); }
}

/* ── Immagini che rispondono al passaggio del mouse ──────────
   Solo dove esiste un mouse vero: sui telefoni un hover resta
   appiccicato dopo il tocco, e qui non si attiva affatto.        */

.cat-figura img,
.prodotto-figura img,
.servizio-figura img,
.promo-foto { transition: transform .3s var(--ease); }

.prodotto-figura, .servizio-figura { overflow: hidden; }

@media (hover: hover) {
  .cat:hover      .cat-figura img      { transform: scale(1.05); }
  .prodotto:hover .prodotto-figura img { transform: scale(1.05); }
  .servizio:hover .servizio-figura img { transform: scale(1.04); }
  .promo:hover    .promo-foto          { transform: scale(1.06); }
}

/* alla pressione la tessera rientra appena: dà la sensazione del tasto,
   e funziona anche al tocco */
.cat:active .cat-figura,
.promo:active { transform: scale(.985); }
.cat-figura { transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease); }

/* ── Filtri: le schede entrano ed escono invece di sparire ─── */

.prodotto--esce, .prodotto--entra { opacity: 0; transform: scale(.97); }

/* ── L'unico momento animato della pagina: l'apertura ──────── */

@keyframes entra {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero [data-entra] { animation: entra .7s var(--ease) both; }
.hero [data-entra="2"] { animation-delay: .1s; }

.hero-cards .hero-card { animation: entra .6s var(--ease) both; }
.hero-cards .hero-card:nth-child(1) { animation-delay: .22s; }
.hero-cards .hero-card:nth-child(2) { animation-delay: .28s; }
.hero-cards .hero-card:nth-child(3) { animation-delay: .34s; }
.hero-cards .hero-card:nth-child(4) { animation-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;   /* altrimenti le card restano invisibili per il ritardo */
    /* "none" e non una durata minima: con la durata e la proprietà di
       default (all) ogni modifica diventerebbe una transizione, e le
       misure prese da site.js leggerebbero il valore vecchio */
    transition: none !important;
  }
}

/* ── Adattamento a schermi piccoli ──────────────────────────── */

/* ── Schermi grandi ─────────────────────────────────────────────
   Su un monitor da 1920px un contenuto fisso a 1200px lascia 360px
   vuoti per lato. Si allarga a gradini, ma con un tetto: oltre una
   certa larghezza le righe di testo diventano faticose da leggere.  */

@media (min-width: 1500px) { :root { --wrap: 1340px; } }
@media (min-width: 1800px) { :root { --wrap: 1480px; --s8: 4.5rem; } }
@media (min-width: 2200px) { :root { --wrap: 1600px; --s8: 5rem; } }

@media (max-width: 1024px) {
  /* quattro card in fila su un tablet spezzano il numero di telefono a metà */
  .hero-cards { grid-template-columns: repeat(2, 1fr); }
  .categorie { grid-template-columns: repeat(3, 1fr); }
  .griglia-prodotti { grid-template-columns: repeat(3, 1fr); }
  .griglia-servizi--tre { grid-template-columns: repeat(2, 1fr); }
  .piede-griglia { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --s6: 1.5rem; --s7: 2rem; --s8: 2.5rem; --s9: 3rem; }

  .sez-testa { margin-bottom: var(--s5); }
  .filtri { gap: var(--s3); margin-bottom: var(--s5); }

  .testa-riga { flex-direction: column; align-items: stretch; gap: 0; padding-top: var(--s2); }
  .nav { justify-content: space-between; padding-bottom: var(--s2); }
  .nav a { padding: var(--s2); font-size: .9375rem; }

  .stato-riga { font-size: .875rem; gap: var(--s2); }

  .hero { padding-bottom: calc(var(--s8) + 48px); }
  .hero-card-zona { margin-top: -48px; }
  .hero-cards { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .hero-card { min-height: 84px; padding: var(--s3) var(--s4); }
  .hero-card-val { font-size: 1rem; }

  .sez-testa { flex-direction: column; align-items: flex-start; gap: var(--s3); }

  .categorie { grid-template-columns: repeat(2, 1fr); }
  .griglia-prodotti { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .prodotto-corpo { padding: var(--s3); }
  .prodotto-riga {
    flex-direction: column-reverse; align-items: flex-start; gap: var(--s1);
  }
  .prodotto-desc { display: none; }         /* su due colonne strette il testo non serve */
  .prodotto--promo .prodotto-desc { display: block; font-size: .9375rem; }   /* nelle offerte sì: è il formato */

  /* su telefono la tessera grande non ha senso: diventa compatta come le altre,
     con il testo a sinistra e il prodotto a destra */
  .bento { grid-template-columns: 1fr; grid-template-rows: none; }
  .promo { padding: var(--s5); }
  .promo, .promo--grande {
    grid-row: auto; min-height: 170px;
    display: grid;
    grid-template-columns: 1fr minmax(0, 32%);
    grid-template-areas: "sconto foto" "nome foto" "desc foto" "prezzo foto";
    align-content: center; column-gap: var(--s4);
  }
  .promo--grande .promo-sconto { grid-area: sconto; justify-self: start; }
  .promo--grande .promo-nome   { grid-area: nome; }
  .promo--grande .promo-desc   { grid-area: desc; }
  .promo-desc { font-size: .9375rem; }
  .promo--grande .promo-prezzo { grid-area: prezzo; }
  .promo-foto, .promo--grande .promo-foto {
    grid-area: foto; align-self: center; justify-self: end;
    margin-top: 0; width: 100%; max-width: none;
    height: 110px; object-fit: contain;
  }

  .griglia-servizi, .griglia-servizi--tre { grid-template-columns: 1fr; }
  .servizio { grid-template-columns: 1fr; }
  .servizio-figura { aspect-ratio: 16 / 9; }

  .due-colonne { grid-template-columns: 1fr; }
  .pannello { padding: var(--s5); }

  .contatto { flex-direction: column; align-items: stretch; }

  .piede-griglia { grid-template-columns: 1fr; }
}
