/* caratteri salvati nella cartella fonts: nessuna richiesta a Google */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-400-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-400-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-400-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-400-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-700-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/atkinson-hyperlegible-700-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Stile farmacia: bianco, verde farmacia, croce verde. Ordinato e sanitario, senza temi decorativi. */
:root {
  --white: #ffffff;
  --mint: #eef6f1;         /* fondo del primo schermo e delle fasce chiare */
  --mint-deep: #dcece2;
  --line: #d5e0d9;
  --ink: #132019;
  --ink-soft: #4a5a51;
  --green: #12804a;        /* verde farmacia: pulsanti, croce, titoli brevi */
  --green-deep: #0b5c34;   /* fascia in alto, piede, testo verde */
  --green-light: #5fd394;
  --ok: #12703c;
  --low: #8a5200;
  --no: #b0281f;

  --f-head: "Archivo", "Arial", sans-serif;
  --f-text: "Atkinson Hyperlegible", "Verdana", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1); /* piccolo rimbalzo finale (menu del telefono) */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 32, 25, 0.06), 0 10px 28px -12px rgba(19, 32, 25, 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: #9fb5a8 var(--mint); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--green);
}
::selection { background: #bfe9d0; color: var(--ink); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
p, h1, h2, h3 { margin: 0; }
[id] { scroll-margin-top: 130px; }
svg { width: 1.2em; height: 1.2em; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; background: var(--white); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 16px; }
.todo { text-decoration: underline dashed; text-underline-offset: 0.25em; text-decoration-color: color-mix(in srgb, currentColor 60%, transparent); }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* la croce verde della farmacia: accesa quando è aperta */
.brand-cross {
  display: inline-block; width: 26px; height: 26px; flex: none; background: #9aaba1;
  clip-path: polygon(33% 0, 67% 0, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0 67%, 0 33%, 33% 33%);
  transition: background-color 0.6s;
}
.brand-cross.is-lit { background: var(--green-light); }

/* ———————————— testata ———————————— */

.masthead { position: sticky; top: 0; z-index: 20; background: var(--white); box-shadow: 0 1px 0 var(--line); }
.strip { display: none; background: var(--green-deep); color: var(--white); font-size: 0.98rem; }
.strip-inner { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter); display: flex; align-items: center; justify-content: center; }
.strip-state { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.strip-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-light); }
.strip-state[data-state="closed"] .strip-dot { background: transparent; border: 2px solid #b9d3c3; }
.strip-state[data-state="loading"] { visibility: hidden; }

.top { max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; background: var(--green); }
.brand-mark .brand-cross { width: 26px; height: 26px; background: #cfe9d9; }
.brand-mark .brand-cross.is-lit { background: var(--white); }
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font: 800 1.4rem var(--f-head); letter-spacing: -0.01em; color: var(--green-deep); }
.brand-place { font-size: 0.9rem; color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 34px); margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; padding: 8px 0; border-bottom: 2px solid transparent; transition: border-color 0.2s, color 0.2s; }
.nav a:hover { color: var(--green-deep); border-bottom-color: var(--green); }
.nav .nav-ico, .nav .nav-go { display: none; } /* solo nella tendina del telefono */
.top-call {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px;
  background: var(--green); color: var(--white); text-decoration: none; font: 700 1.02rem var(--f-head);
  transition: background-color 0.2s;
}
.top-call:hover { background: var(--green-deep); }
.menu-btn {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px;
  background: none; color: var(--ink); border: 1.5px solid var(--line); font: 700 1rem var(--f-text); cursor: pointer;
}
/* icona Menu: le tre linee si incrociano in una X all'apertura e tornano linee alla chiusura */
.menu-icon { position: relative; display: block; width: 22px; height: 22px; }
.menu-icon i {
  position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: currentColor;
  transition: transform 0.45s var(--spring), opacity 0.2s;
}
.menu-icon i:nth-child(1) { transform: translateY(-6px); }
.menu-icon i:nth-child(3) { transform: translateY(6px); }
.menu-btn[aria-expanded="true"] .menu-icon i:nth-child(1) { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon i:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.menu-btn[aria-expanded="true"] .menu-icon i:nth-child(3) { transform: rotate(-45deg); }
.menu-btn { transition: background-color 0.25s, border-color 0.25s, color 0.25s; }
.menu-btn[aria-expanded="true"] { background: var(--mint); border-color: var(--green); color: var(--green-deep); }

/* ———————————— primo schermo ———————————— */

/* fondo verde scuro con la foto degli scaffali virata in verde: piena a destra, sfuma sotto il testo a sinistra */
.hero-band { position: relative; isolation: isolate; overflow: hidden; background: #0a4a2b; color: var(--white); }
.hero-bg {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 72%;
  filter: grayscale(1) contrast(1.15) brightness(0.9); mix-blend-mode: luminosity; opacity: 0.7;
}
.hero-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, #0a4a2b 0%, rgba(10, 74, 43, 0.94) 32%, rgba(10, 74, 43, 0.5) 60%, rgba(18, 128, 74, 0.25) 100%),
    linear-gradient(0deg, rgba(6, 40, 23, 0.55), transparent 45%);
}
.hero-inner {
  max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(88px, 10vw, 128px);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.status-pill {
  display: inline-block; padding: 8px 18px 8px 14px; border-radius: 22px;
  background: var(--white); color: var(--ink); font-size: 1.05rem; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.45);
}
.status-pill #status-word { font-weight: 700; }
.status-dot { display: inline-block; vertical-align: 0.05em; margin-right: 9px; width: 11px; height: 11px; border-radius: 50%; background: #9aaba1; }
.status[data-state="open"] .status-dot { background: var(--green); box-shadow: 0 0 0 4px #cdebd9; }
.status[data-state="open"] #status-word { color: var(--green-deep); }
.status[data-state="closed"] .status-dot { background: var(--no); }
.status[data-state="closed"] #status-word { color: var(--no); }
.status-sep { color: var(--ink-soft); margin: 0 8px; }
.status-next { margin-top: 8px; font-size: 1rem; color: #cfe5d8; }
.status-next:empty { display: none; }
.status[data-state="loading"] .status-pill { visibility: hidden; }

.hero-title { margin-top: 22px; font: 800 clamp(2.6rem, 5.4vw, 4.1rem)/1 var(--f-head); letter-spacing: -0.025em; color: var(--white); }
/* all'apertura: le parole del nome salgono da una "fessura", poi compare la frase sotto */
.hero-word { display: inline-block; }
.hero-tagline { margin-top: 22px; font: 600 clamp(1.25rem, 2.2vw, 1.6rem)/1.3 var(--f-head); color: #cfe5d8; }
/* la parola che cambia sta su una riga sua (niente salti del testo), in verde chiaro con una sottolineatura che si disegna */
/* l'altezza comprende riga + sottolineatura, così la parola non viene mai tagliata sotto */
.hero-rotator { position: relative; display: block; height: calc(1.25em + 10px); font-size: 1.25em; line-height: 1.25; margin-top: 2px; }
.hero-rot-word { position: absolute; left: 0; top: 0; white-space: nowrap; color: var(--white); font-weight: 800; }
/* una sola sottolineatura: cambia larghezza con morbidezza fino alla misura della frase nuova (--w, da app.js) */
.hero-rot-line {
  position: absolute; left: 0; bottom: 0; height: 3px; width: var(--w, 0); border-radius: 2px; background: var(--green-light);
  transition: width 1.6s var(--calmo);
}
/* curve lente all'inizio e alla fine: il movimento parte e si posa con dolcezza */
:root { --calmo: cubic-bezier(0.65, 0, 0.35, 1); --posa: cubic-bezier(0.33, 0, 0.2, 1); }
@media (prefers-reduced-motion: no-preference) {
  .hero-word { animation: sale 0.9s var(--ease-out) both; }
  .hero-word + .hero-word { animation-delay: 0.14s; }
  .hero-tagline { animation: compare 0.8s var(--ease-out) 0.45s both; }
  /* la nuova frase si svela da sinistra a destra con un bordo sfumato (maschera che scorre), mentre
     la vecchia sfuma sul posto: le due cose avvengono insieme, senza vuoti. Poche proprietà, tutte fluide. */
  .hero-rot-word.is-in {
    -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 60%); mask-image: linear-gradient(90deg, #000 40%, transparent 60%);
    -webkit-mask-size: 250% 100%; mask-size: 250% 100%;
    animation: svela 1.8s var(--posa) both; will-change: opacity, -webkit-mask-position, mask-position;
  }
  .hero-rot-word.is-out { animation: sfuma 1.1s var(--calmo) both; will-change: opacity, filter; }
}
@keyframes sale { from { opacity: 0; transform: translateY(0.55em); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 -0.2em 0); } }
@keyframes compare { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes svela {
  from { opacity: 0; filter: blur(3px); -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  45% { opacity: 1; }
  70% { filter: none; }
  to { opacity: 1; filter: none; -webkit-mask-position: 0 0; mask-position: 0 0; }
}
/* la vecchia non scappa: si dissolve sul posto con un velo di sfocatura */
@keyframes sfuma { to { opacity: 0; filter: blur(4px); } }

.hours-card {
  position: relative; color: var(--ink);
  background: var(--white); border-radius: var(--radius); box-shadow: 0 2px 4px rgba(19, 32, 25, 0.08), 0 24px 48px -18px rgba(19, 32, 25, 0.4); padding: clamp(22px, 3vw, 32px);
}
/* avviso festività: riquadro giallo chiaro sotto il titolo */
.hours-alert {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: #fdf3d8; color: #5c3b00; font-size: 1rem; line-height: 1.45;
}
.hours-alert strong { font-family: var(--f-head); }
.hours-alert[hidden] { display: none; }
.card-title { display: flex; align-items: center; gap: 10px; font: 800 1.4rem var(--f-head); color: var(--green-deep); }
.card-title svg { color: var(--green); }
.hours { width: 100%; margin-top: 14px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { text-align: left; font-weight: 400; }
.hours td { text-align: right; font: 700 1.1rem var(--f-head); }
/* orari e telefoni in Archivo: lo zero barrato di Atkinson (08:00) sembra una Θ */
.status-line, .strip, .foot, .where-big { font-family: var(--f-head); }
.hours tr.is-closed td { color: var(--ink-soft); font-weight: 400; }
/* oggi: riga evidenziata in verde chiaro */
.hours tr.is-today th, .hours tr.is-today td { background: #e3f3ea; color: var(--green-deep); font-weight: 700; }
.hours tr.is-today th { border-radius: 8px 0 0 8px; padding-left: 12px; }
.hours tr.is-today td { border-radius: 0 8px 8px 0; padding-right: 12px; }
.hours-note { margin-top: 14px; font-size: 1rem; color: var(--ink-soft); }

/* ———————————— punti forti ———————————— */

/* barra bianca che sale sul fondo verde del primo schermo */
.perks {
  list-style: none; position: relative; z-index: 1;
  width: min(calc(100% - 2 * var(--gutter)), calc(var(--max) - 2 * var(--gutter)));
  margin: clamp(-72px, -6vw, -48px) auto 0; padding: clamp(20px, 2.4vw, 28px) clamp(20px, 2.6vw, 32px);
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 2px 4px rgba(19, 32, 25, 0.06), 0 22px 44px -20px rgba(19, 32, 25, 0.35);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.perks li { display: flex; align-items: flex-start; gap: 14px; padding: 4px clamp(14px, 2vw, 28px); border-left: 1px solid var(--line); }
.perks li:first-child { border-left: 0; padding-left: 0; }
.perks svg { width: 30px; height: 30px; color: var(--green); }
.perks span { display: grid; font: 500 0.98rem var(--f-head); /* Archivo: ci sono orari */ line-height: 1.35; color: var(--ink-soft); }
.perks strong { font: 700 1.08rem/1.25 var(--f-head); color: var(--ink); margin-bottom: 2px; }

/* ———————————— C'è in farmacia? ———————————— */

/* un grande riquadro verde chiaro sul fondo bianco */
.ask-band { max-width: var(--max); margin: clamp(40px, 6vw, 72px) auto 0; padding: 0 var(--gutter); }
.ask-section {
  padding: clamp(32px, 5vw, 64px); border-radius: calc(var(--radius) * 1.6); background: var(--mint);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start;
}
.big-title { font: 800 clamp(2.2rem, 4.6vw, 3.2rem)/1.05 var(--f-head); letter-spacing: -0.02em; color: var(--green-deep); text-wrap: balance; }
.lede { margin-top: 14px; max-width: 34rem; font-size: 1.2rem; color: var(--ink-soft); }

.ask { margin-top: 28px; position: relative; max-width: 34rem; }
.ask-label { display: block; font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
.ask-field { position: relative; background: var(--white); border-radius: 12px; }
.ask-input, .ask-ghost {
  width: 100%; min-height: 62px; padding: 16px 18px; border: 2px solid #9fb5a8; border-radius: 12px;
  font: 400 1.3rem/1.3 var(--f-text);
}
.ask-input { position: relative; display: block; background: transparent; color: var(--ink); }
.ask-ghost { position: absolute; inset: 0; overflow: hidden; white-space: pre; pointer-events: none; border-color: transparent; }
.ask-ghost-typed { color: transparent; }
.ask-ghost-rest { color: #8b978f; }
.ask-input::placeholder { color: #6b786f; }
.ask-input:focus { outline: 3px solid var(--green); outline-offset: 2px; border-color: var(--green); }
.ask-input[aria-invalid="true"] { border-color: var(--no); }
.ask-suggest {
  margin-top: 10px; display: block; width: 100%; text-align: left; padding: 12px 14px; cursor: pointer; border-radius: 10px;
  background: var(--mint); border: 1.5px dashed #9fb5a8; color: var(--ink); font: 400 1.05rem var(--f-text);
}
.ask-suggest strong { color: var(--green-deep); }
.ask-suggest:hover { background: var(--mint-deep); }
.ask-suggest[hidden] { display: none; }
.ask-hint { margin-top: 10px; font-size: 1rem; color: var(--ink-soft); }
.ask-hint.is-error { color: var(--no); font-weight: 700; }
.ask-btn {
  margin-top: 16px; width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--green); color: var(--white); border: 0; border-radius: 999px; cursor: pointer;
  font: 700 1.2rem var(--f-head); transition: background-color 0.2s;
}
.ask-btn svg { width: 1.2em; height: 1.2em; transition: transform 0.25s var(--ease-out); }
.ask-btn:hover { background: var(--green-deep); }
.ask-btn:hover svg { transform: scale(1.12) rotate(-8deg); } /* la lente "guarda" */
/* come funziona Cerca e prenota: tre passi numerati, brevi */
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; max-width: 34rem; }
.steps li { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-soft); font-size: 1.08rem; line-height: 1.35; }
.step-n {
  display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--green); color: var(--white); font: 800 0.95rem var(--f-head);
}
.ask-btn[aria-busy="true"] { opacity: 0.8; cursor: progress; }
.ask-btn[aria-busy="true"] svg { display: none; }

.answer-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 2.4vw, 26px); min-height: 9rem; }
.answer-card:focus { outline: none; }
.answer-card:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
/* riquadro prima della ricerca: tratteggiato e trasparente sul verde chiaro, icona nel tondo e frase al centro
   (è un posto che aspetta la risposta, non una scheda vuota) */
.answer-card[data-kind="idle"] {
  display: grid; place-items: center; min-height: 15rem; text-align: center;
  background: rgba(255, 255, 255, 0.55); box-shadow: none; border: 2px dashed #b9d3c3;
}
.p-idle { display: grid; justify-items: center; gap: 12px; max-width: 18rem; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.45; }
.p-idle-icon {
  display: block; width: 64px; height: 64px; padding: 17px; border-radius: 50%;
  background: var(--white); color: var(--green); box-shadow: 0 6px 16px -8px rgba(11, 92, 52, 0.35);
}
.p-title { font: 800 1.6rem/1.1 var(--f-head); color: var(--green-deep); }
.p-text { margin-top: 10px; color: var(--ink-soft); }
.dots span { display: inline-block; }

.packs-label { font: 700 1.2rem var(--f-head); }
.packs-scroll {
  margin-top: 10px; max-height: 24rem; overflow-y: auto; overscroll-behavior: contain;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-color: #9fb5a8 transparent;
}
.packs-scroll:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.packs { list-style: none; margin: 0; padding: 0; }
.packs li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.packs li:last-child { border-bottom: 0; }
.packs-hint { margin-top: 8px; font-size: 0.95rem; color: var(--ink-soft); }
/* i nomi in Archivo: lo zero barrato di Atkinson nei dosaggi (1000 mg) sembra una Θ */
.pack-name { font: 500 1.05rem/1.35 var(--f-head); min-width: 0; }
/* a destra lo stato e, sotto, il prezzo di vendita (assente per i farmaci di fascia A) */
.pack-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.pack-price { display: block; font: 800 1.08rem var(--f-head); color: var(--green-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* «cad.»: il prezzo è di una confezione, non cresce con i pezzi scelti */
.pack-price small { font: 500 0.78rem var(--f-text); color: var(--ink-soft); }
.pack-state {
  display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap;
  padding: 4px 12px 4px 8px; border-radius: 999px; font: 700 0.95rem var(--f-head);
}
.pack-state svg { width: 1.1em; height: 1.1em; }
.pack-state--ok { background: #def2e6; color: var(--ok); }
.pack-state--low, .pack-state--uno { background: #fdf0d5; color: var(--low); }
.pack-state--no { background: #fbe3e0; color: var(--no); }

/* nome e stato sulla stessa riga, sotto la scelta dei pezzi */
.packs li:has(.pack-actions) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 8px; align-items: start; }
.pack-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
/* − pezzi + : pillola con bordo verde; verde chiaro quando il prodotto è già nella richiesta */
.pick {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px;
  border: 1.5px solid var(--green); background: var(--white); transition: background-color 0.2s, border-color 0.2s;
}
.pick.is-in { background: #def2e6; border-color: var(--ok); }
.pick-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--mint-deep); color: var(--green-deep); font: 700 1.35rem/1 var(--f-head);
  transition: background-color 0.2s, transform 0.15s var(--ease-out), opacity 0.2s;
}
.pick-btn--piu { background: var(--green); color: var(--white); }
.pick-btn:hover { filter: brightness(1.08); }
.pick-btn:active { transform: scale(0.9); }
.pick-btn:disabled { opacity: 0.3; cursor: default; filter: none; transform: none; }
.pick-n { min-width: 5.4em; padding: 0 4px; text-align: center; font: 700 0.95rem var(--f-text); color: var(--green-deep); white-space: nowrap; }
.pick.is-in .pick-n { color: var(--ok); }
#request-count { display: inline-block; }

.p-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.call-btn, .again-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 10px 18px; border-radius: 999px;
  font: 700 1.1rem var(--f-head); text-decoration: none; cursor: pointer; transition: background-color 0.2s, color 0.2s;
}
.call-btn { background: var(--green); color: var(--white); border: 0; font-variant-numeric: tabular-nums; }
.call-btn:hover { background: var(--green-deep); }
.again-btn { background: none; color: var(--green-deep); border: 2px solid var(--green); }
.again-btn:hover { background: #e3f3ea; }
.p-demo { margin-top: 12px; font-size: 0.95rem; color: var(--ink-soft); }

/* ———————————— movimento: poco e discreto ———————————— */

@media (prefers-reduced-motion: no-preference) {
  .brand-cross.is-lit { animation: cross-on 0.8s var(--ease-out) 0.15s backwards; }
  .status[data-state="open"] .status-dot { animation: breathe 2.8s ease-in-out infinite; }
  .answer-card.is-printing { animation: appear 0.18s ease-out; }
  .dots span { animation: dot 1.2s infinite; }
  .dots span:nth-child(2) { animation-delay: 0.2s; }
  .dots span:nth-child(3) { animation-delay: 0.4s; }
}
@keyframes cross-on { from { background-color: #9aaba1; } }
@keyframes breathe { 50% { box-shadow: 0 0 0 7px #cdebd9; } }
@keyframes appear { from { opacity: 0.4; } }
@keyframes pop { 40% { transform: scale(1.08); } }
@keyframes bump { 35% { transform: translateY(-4px) scale(1.2); color: var(--green-light); } }
@keyframes dot { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

/* ———————————— richiesta in corso (solo con il numero WhatsApp) ———————————— */

/* una scheda bianca che galleggia in fondo allo schermo, con gli accenti verdi del sito.
   Sale con un piccolo rimbalzo, l'elenco si apre a tendina, le righe entrano ed escono scivolando. */
.request {
  position: fixed; z-index: 25; left: 0; right: 0; margin-inline: auto;
  bottom: calc(14px + env(safe-area-inset-bottom)); width: min(760px, 100% - 24px);
  background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 18px 44px rgba(11, 92, 52, 0.22), 0 3px 10px rgba(19, 32, 25, 0.08);
  animation: request-in 0.55s var(--spring);
}
.request[hidden] { display: none; }
.request.is-leaving { animation: request-out 0.3s cubic-bezier(0.5, 0, 0.75, 0) forwards; }
@keyframes request-in { from { transform: translateY(calc(100% + 24px)); opacity: 0; } }
@keyframes request-out { to { transform: translateY(calc(100% + 24px)); opacity: 0; } }
.request-inner { display: flex; flex-direction: column; padding: 10px 10px 10px 12px; }
.request-bar { display: flex; align-items: center; gap: 10px; }
.request-summary { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
/* il numero dei prodotti in un tondo verde, che salta quando se ne aggiunge uno */
.request-badge {
  display: grid; place-items: center; flex: none; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 999px;
  background: var(--green); color: var(--white); font: 800 1.1rem var(--f-head);
  box-shadow: 0 0 0 4px var(--mint-deep);
}
.request-text { display: grid; line-height: 1.2; }
.request-text strong { font: 800 1.05rem var(--f-head); color: var(--green-deep); }
.request-text span { color: var(--ink-soft); font-size: 0.9rem; }
.request-tot::before { content: " · "; }
.request-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 14px 0 16px; border-radius: 999px; cursor: pointer;
  background: var(--mint); color: var(--green-deep); border: 0; font: 700 1rem var(--f-text); transition: background-color 0.2s;
}
.request-toggle:hover { background: var(--mint-deep); }
.request-toggle svg { width: 18px; height: 18px; transition: transform 0.35s var(--spring); }
.request-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.request-send {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--green); color: var(--white); text-decoration: none; font: 700 1.05rem var(--f-head);
  box-shadow: 0 6px 16px rgba(18, 128, 74, 0.3); transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.request-send svg { width: 20px; height: 20px; }
.request-send:hover { background: var(--green-deep); }
.request-send:active { transform: scale(0.97); }
/* tendina: si apre e si chiude scorrendo in altezza (righe della griglia da 0 a "tutto") */
.request-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease-out); }
.request.is-open .request-panel { grid-template-rows: 1fr; }
.request-panel-in { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.request-list {
  list-style: none; margin: 10px 0 0; padding: 4px 4px 0 0; display: grid; gap: 6px;
  max-height: min(14rem, 34vh); overflow-y: auto; overscroll-behavior: contain;
  border-top: 1px solid var(--line); scrollbar-color: #9fb5a8 transparent;
}
.request-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 8px 9px 12px; border-radius: 14px;
  background: var(--mint); font-size: 1rem;
  transition: opacity 0.26s, transform 0.26s var(--ease-out);
}
.request-item:first-child { margin-top: 6px; }
.request-item.is-new { animation: request-item-in 0.5s var(--spring); }
.request-item.is-leaving { opacity: 0; transform: translateX(40px); }
@keyframes request-item-in { from { opacity: 0; transform: translateY(10px) scale(0.96); background: #c9ecd7; } }
/* pallino con il colore dello stato, come nei risultati */
.request-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.request-dot--low, .request-dot--uno { background: #d98a1c; }
.request-dot--no { background: var(--no); }
.request-name { flex: 1; min-width: 0; line-height: 1.3; }
.request-note { display: block; font-size: 0.85rem; color: var(--ink-soft); }
.request-remove {
  flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: var(--white); color: var(--green-deep); border: 1.5px solid var(--line); font: 700 0.95rem var(--f-text);
  transition: border-color 0.2s, background-color 0.2s;
}
.request-remove:hover { border-color: var(--green); }
.request-clear {
  display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0; align-self: flex-end;
  min-height: 42px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--no); border: 0; font: 700 0.98rem var(--f-text);
  transition: background-color 0.2s;
}
.request-clear svg { width: 18px; height: 18px; }
.request-clear:hover { background: #fbe9e7; }
/* dopo «Svuota tutto»: avviso con Annulla al posto dei pulsanti, per qualche secondo */
.request.is-undo .request-bar, .request.is-undo .request-panel { display: none; }
.request-undo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding-left: 6px;
  font: 700 1.05rem var(--f-head); color: var(--green-deep); animation: request-undo-in 0.35s var(--ease-out);
}
@keyframes request-undo-in { from { transform: translateY(8px); opacity: 0; } }
.request-undo[hidden] { display: none; }
.request-undo-btn {
  min-height: 46px; padding: 0 22px; border-radius: 999px; cursor: pointer; border: 0;
  background: var(--green); color: var(--white); font: 700 1.05rem var(--f-head);
}
@media (prefers-reduced-motion: no-preference) {
  .request-badge.bump { animation: badge-bump 0.5s var(--spring); }
}
@keyframes badge-bump { 35% { transform: scale(1.28); box-shadow: 0 0 0 8px #c9ecd7; } }
@media (prefers-reduced-motion: reduce) {
  .request, .request.is-leaving, .request-item.is-new, .request-undo { animation: none; }
  .request-panel, .request-item, .request-toggle svg { transition: none; }
}
body.has-request { padding-bottom: 110px; }
/* quantità: − 2 pezzi + sotto il nome del prodotto */
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 3px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); }
.qty-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--mint); color: var(--green-deep); font: 800 1.25rem/1 var(--f-head);
  transition: background-color 0.2s, transform 0.15s var(--ease-out);
}
.qty-btn:hover { background: var(--mint-deep); }
.qty-btn:active { transform: scale(0.9); }
.qty-btn:disabled { opacity: 0.35; cursor: default; }
.qty-n { min-width: 4.6em; text-align: center; font: 700 0.98rem var(--f-text); color: var(--green-deep); }
/* nome di chi scrive: obbligatorio, sopra l'elenco */
.request-who { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.request-who label { display: block; font: 700 0.98rem var(--f-text); color: var(--green-deep); margin-bottom: 6px; }
.request-who input {
  width: 100%; min-height: 50px; padding: 0 14px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--white); color: var(--ink); font: 400 1.1rem var(--f-text);
}
.request-who input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--mint-deep); }
.request-who input[aria-invalid="true"] { border-color: var(--no); box-shadow: 0 0 0 4px #fbe2df; }
.request-who-err { margin-top: 6px; color: var(--no); font-size: 0.92rem; }
.request-who.shake { animation: shake 0.4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.request-who + .request-list { border-top: 0; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .request-who.shake { animation: none; } }

/* ———————————— vieni a trovarci: foto della farmacia che scorrono da sole ———————————— */

.gallery { padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); overflow: hidden; }
.gallery-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.gallery-head .lede { margin-inline: auto; }
/* carosello «a vetrina»: una foto grande al centro, le vicine più piccole e sfumate ai lati.
   app.js dà a ogni foto la sua distanza dal centro (--o: -1, 0, 1…) e la classe is-active a quella centrale. */
.slider { --w: clamp(230px, 30vw, 360px); position: relative; margin-top: clamp(24px, 3.5vw, 40px); touch-action: pan-y; }
.slides { position: relative; height: calc(var(--w) * 4 / 3 + 24px); }
.slide {
  --o: 0; position: absolute; top: 0; left: 50%; width: var(--w); margin: 0;
  transform: translateX(calc(-50% + var(--o) * var(--w) * 0.78)) scale(var(--s, 1));
  opacity: var(--a, 1); z-index: var(--z, 1); transition: transform 0.9s var(--ease-out), opacity 0.6s;
  cursor: pointer;
}
.slide img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 20px; background: var(--mint-deep);
  box-shadow: 0 2px 6px rgba(19, 32, 25, 0.08), 0 24px 44px -18px rgba(11, 92, 52, 0.45);
}
.slide.no-anim { transition: none; }
.slide.is-active { cursor: default; }
/* lento avvicinamento della foto al centro, come uno sguardo che si posa */
.slide.is-active img { animation: posa 5s ease-out both; }
@keyframes posa { from { transform: scale(1); } to { transform: scale(1.035); } }
.slider-arrow {
  position: absolute; top: calc(var(--w) * 2 / 3); z-index: 10; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; border: 1px solid var(--line);
  background: var(--white); color: var(--green-deep); box-shadow: var(--shadow); transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.slider-arrow:hover { background: var(--mint); }
.slider-arrow:active { transform: scale(0.94); }
.slider-arrow svg { width: 22px; height: 22px; }
.slider-prev { left: calc(50% - var(--w) / 2 - 26px); }
.slider-prev svg { transform: rotate(180deg); }
.slider-next { right: calc(50% - var(--w) / 2 - 26px); }
.slider-dots { display: flex; justify-content: center; gap: 10px; margin-top: 6px; }
.slider-dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--line); transition: width 0.35s var(--ease-out), background-color 0.3s;
}
.slider-dots button[aria-current="true"] { width: 30px; background: var(--green); }
/* chi ha chiesto meno movimento: niente cambio automatico né effetti, si sfoglia con frecce e pallini */
@media (prefers-reduced-motion: reduce) {
  .slide, .slider-dots button { transition: none; }
  .slide.is-active img { animation: none; }
}
@media (max-width: 720px) {
  .slider { --w: min(68vw, 300px); }
  .slider-arrow { width: 44px; height: 44px; }
  .slider-prev { left: 8px; }
  .slider-next { right: 8px; }
}

/* ———————————— servizi (al banco) ———————————— */

.services {
  max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 112px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.services-photo { margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--green-deep); box-shadow: var(--shadow); }
.services-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.services-list { list-style: none; margin: 28px 0 0; padding: 0; }
.services-list li { display: flex; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line); }
.services-list li:last-child { border-bottom: 1px solid var(--line); }
.services-list svg {
  width: 48px; height: 48px; padding: 11px; border-radius: 12px; background: var(--mint); color: var(--green);
}
.services-list h3 { font: 700 1.25rem/1.2 var(--f-head); color: var(--green-deep); }
.services-list p { margin-top: 4px; color: var(--ink-soft); }

/* ———————————— dove siamo ———————————— */

.where { background: var(--mint); border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 96px) max(var(--gutter), (100% - var(--max)) / 2 + var(--gutter)); }
/* la mappa a tutta larghezza (le foto della farmacia sono nel carosello «Vieni a trovarci») */
.where-media { margin-top: clamp(28px, 4vw, 40px); }
.map { position: relative; height: clamp(300px, 34vw, 420px); border-radius: var(--radius); overflow: hidden; background: var(--mint-deep); box-shadow: var(--shadow); }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-go {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 14px; border-radius: 12px; background: var(--green-deep); color: var(--white); text-decoration: none;
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.4); transition: background-color 0.2s;
}
.map-go:hover { background: var(--green); }
.map-go svg { width: 26px; height: 26px; color: var(--green-light); }
.map-go span { display: grid; line-height: 1.2; }
.map-go strong { font: 700 1.15rem var(--f-head); }
.map-go small { font-size: 0.85rem; color: #c9dccf; }
.where-grid { margin-top: clamp(24px, 3vw, 36px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.where-col { background: var(--white); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.where-label { display: flex; align-items: center; gap: 8px; font: 700 1rem var(--f-head); color: var(--green); }
.where-label svg { width: 20px; height: 20px; }
.where-big { margin-top: 8px; font: 700 1.5rem/1.25 var(--f-head); }
.where-big a { text-decoration: none; }
.where-small { margin-top: 8px; color: var(--ink-soft); }
.where-link { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--green-deep); }
.where-link[hidden] { display: none; }

/* ———————————— piede ———————————— */

.foot { background: var(--green-deep); color: #cfe2d6; }
.foot-inner {
  max-width: var(--max); margin: 0 auto; padding: 44px var(--gutter) 32px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px 40px; font-size: 1rem;
}
.foot-col { display: grid; align-content: start; gap: 4px; }
.foot a { color: var(--white); text-decoration-color: rgba(255, 255, 255, 0.4); }
.foot a:hover { text-decoration-color: var(--white); }
.foot-col > a { justify-self: start; padding: 2px 0; }
.foot-name { display: flex; align-items: center; gap: 10px; color: var(--white); font: 800 1.3rem var(--f-head); margin-bottom: 6px; }
.foot-name .brand-cross { width: 20px; height: 20px; background: var(--green-light); }
.foot-label { color: var(--white); font-weight: 700; margin-bottom: 6px; }
.foot-legal { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.9rem; color: #bcd3c4; }

/* barra azioni: solo su telefono */
.bar { display: none; }

/* ———————————— schermi medi ———————————— */

/* schermi medi: lo spazio è poco, il pulsante Chiama resta ma diventa la sola cornetta tonda */
@media (max-width: 1000px) {
  .top-call { width: 46px; padding: 0; justify-content: center; flex: none; }
  .top-call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .top { gap: 18px; }
  .nav { gap: 16px; }
  .nav a, .brand-name { white-space: nowrap; }
}
@media (max-width: 1080px) {
  .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .perks li:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 900px) {
  .hero-inner, .ask-section, .services { grid-template-columns: minmax(0, 1fr); }
  .hours-card { max-width: 34rem; width: 100%; }
  /* ordine del telefono (spostato in app.js): primo schermo, Cerca e prenota, orari, punti forti */
  .hero-band:has(+ .ask-band) .hero-inner { padding-bottom: clamp(40px, 7vw, 64px); }
  .hours-slot { max-width: var(--max); margin: clamp(32px, 6vw, 48px) auto 0; padding: 0 var(--gutter); }
  .hours-slot .hours-card { margin: 0 auto; box-shadow: 0 2px 4px rgba(19, 32, 25, 0.06), 0 18px 36px -20px rgba(19, 32, 25, 0.3); border: 1px solid var(--line); }
  .hours-slot + .perks { margin-top: clamp(24px, 5vw, 40px); }
  .hero-band::before { background: linear-gradient(180deg, rgba(10, 74, 43, 0.9) 0%, rgba(10, 74, 43, 0.82) 55%, rgba(10, 74, 43, 0.6) 100%); }
  .services-photo { aspect-ratio: 16 / 10; }
  .where-grid { grid-template-columns: 1fr; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .foot-inner > .foot-col:first-child { grid-column: 1 / -1; }
  /* testata: sotto i 900 px le quattro voci non stanno accanto al logo senza andare a capo,
     quindi anche sul tablet le sezioni stanno dietro il pulsante Menu */
  .top { position: relative; padding-top: 10px; padding-bottom: 10px; gap: 12px; }
  .brand { margin-left: auto; margin-right: auto; }
  .brand-name { white-space: nowrap; }
  .menu-btn { display: inline-flex; order: -1; padding: 0 10px; }
  .menu-btn span:not(.menu-icon) { display: none; }
  /* a destra la cornetta tonda (come a Sestriere): bilancia il pulsante Menu, il logo resta al centro */
  .top-call { display: inline-flex; order: 2; width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; flex: none; }
  .top-call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .top-call svg { width: 22px; height: 22px; }
  /* la tendina è una scheda bianca che scende dalla testata con un piccolo rimbalzo; dietro, la pagina
     si scurisce e si sfoca. Le voci arrivano una dopo l'altra, le icone "sbocciano".
     Chiusa resta invisibile e fuori dalla tabulazione grazie a visibility. */
  .nav {
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 10px); margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
    background: var(--white); border-radius: 20px; border: 1px solid var(--line);
    box-shadow: 0 24px 48px rgba(10, 74, 43, 0.22), 0 4px 12px rgba(10, 74, 43, 0.08);
    transform-origin: 50% 0; transform: translateY(-14px) scale(0.96); opacity: 0; visibility: hidden;
    transition: transform 0.25s var(--ease-out), opacity 0.2s, visibility 0s 0.25s;
  }
  .nav.is-open {
    transform: none; opacity: 1; visibility: visible;
    transition: transform 0.5s var(--spring), opacity 0.25s, visibility 0s;
  }
  .nav > a {
    display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 0; border-radius: 14px;
    font: 700 1.2rem var(--f-head); color: var(--green-deep);
    opacity: 0; transform: translateX(-12px); transition: opacity 0.15s, transform 0.15s, background-color 0.2s;
  }
  .nav > a:hover, .nav > a:active { background: var(--mint); border: 0; }
  .nav .nav-ico {
    display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px;
    background: var(--mint); color: var(--green); transform: scale(0.6); transition: transform 0.15s, background-color 0.2s;
  }
  .nav .nav-ico svg { width: 22px; height: 22px; }
  .nav > a:hover .nav-ico { background: var(--white); }
  .nav-label { flex: 1; min-width: 0; }
  .nav .nav-go { display: block; flex: none; width: 20px; height: 20px; color: var(--green); opacity: 0.55; transition: transform 0.2s var(--ease-out), opacity 0.2s; }
  .nav > a:hover .nav-go { transform: translateX(3px); opacity: 1; }
  .nav.is-open > a { opacity: 1; transform: none; transition: opacity 0.3s, transform 0.45s var(--ease-out), background-color 0.2s; }
  .nav.is-open .nav-ico { transform: none; transition: transform 0.45s var(--spring), background-color 0.2s; }
  .nav.is-open > :nth-child(1), .nav.is-open > :nth-child(1) .nav-ico { transition-delay: 0.06s; }
  .nav.is-open > :nth-child(2), .nav.is-open > :nth-child(2) .nav-ico { transition-delay: 0.11s; }
  .nav.is-open > :nth-child(3), .nav.is-open > :nth-child(3) .nav-ico { transition-delay: 0.16s; }
  .nav.is-open > :nth-child(4), .nav.is-open > :nth-child(4) .nav-ico { transition-delay: 0.21s; }
  .nav.is-open > :nth-child(5) { transition-delay: 0.26s; }
  /* la pagina dietro la tendina: scurita e sfocata, un tocco qui chiude il menu (gestito in app.js) */
  body::after {
    content: ""; position: fixed; inset: 0; z-index: 19; pointer-events: none;
    background: rgba(10, 46, 28, 0.32); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity: 0; transition: opacity 0.3s;
  }
  body:has(.nav.is-open)::after { opacity: 1; pointer-events: auto; }
  /* con il menu aperto la pagina sotto resta ferma; se il telefono è in orizzontale e la scheda
     non ci sta, scorre solo la scheda */
  /* solo su html: se lo si mette anche su body, la testata fissa (sticky) si "sgancia" e sparisce */
  html:has(.nav.is-open) { overflow: hidden; overscroll-behavior: none; }
  .nav { max-height: calc(100dvh - 130px); overflow-y: auto; overscroll-behavior: contain; }
  [id] { scroll-margin-top: 120px; }
}
/* chi ha chiesto meno movimento al telefono vede il menu comparire subito, senza animazioni */
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .nav, .nav.is-open, .nav a, .nav.is-open a, .nav .nav-ico,
  .menu-icon i, body::after { transition: none; }
  body::after { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ———————————— telefono ———————————— */

@media (max-width: 720px) {
  .strip { display: block; }
  .brand-mark { width: 38px; height: 38px; border-radius: 9px; }
  .brand-mark .brand-cross { width: 22px; height: 22px; }
  .brand-name { font-size: 1.2rem; }
  .brand-place { font-size: 0.8rem; }
  /* sul telefono «Aperta · chiude alle…» è già nella fascia fissa in alto: nel primo schermo
     restano solo il nome e la frase che cambia, con più aria */
  .hero .status { display: none; }
  .hero-inner { padding-top: 40px; }
  .hero-title { margin-top: 0; font-size: clamp(2.5rem, 11.5vw, 3.1rem); }
  /* sul telefono la frase sta in una scheda verde scuro velata: si legge bene sopra la foto degli scaffali */
  .hero-tagline {
    margin-top: 18px; padding: 12px 16px 10px; border-radius: 16px; font-size: 1.05rem;
    background: rgba(6, 40, 23, 0.62); border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }
  .hero-rotator { font-size: 1.3em; }
  .hero-band:has(+ .ask-band) .hero-inner { padding-bottom: 36px; }
  .perks { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .perks li, .perks li:nth-child(3) { border-left: 0; padding: 14px 0; border-top: 1px solid var(--line); }
  .perks li:first-child { border-top: 0; }
  .ask-band { padding: 0; }
  .ask-section { border-radius: 0; padding: 48px var(--gutter); }
  /* sul telefono, prima della ricerca, una sola riga bassa: icona e frase affiancate */
  .answer-card[data-kind="idle"] { min-height: 0; padding: 14px 16px; text-align: left; }
  .p-idle { grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 12px; max-width: none; font-size: 1rem; }
  .p-idle-icon { width: 44px; height: 44px; padding: 11px; }
  .map-go { left: 10px; right: 10px; bottom: 10px; justify-content: center; }
  .bar {
    position: fixed; inset: auto 0 0 0; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr);
    background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(19, 32, 25, 0.08);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bar a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; color: var(--green-deep); text-decoration: none; font-weight: 700; font-size: 0.9rem; border-radius: 10px; }
  .bar a:active { background: var(--mint); }
  .bar svg { width: 24px; height: 24px; color: var(--green); }
  /* al centro, in evidenza: Cerca e prenota, con la lente in un tondo verde che sporge dalla barra */
  /* arancione caldo, l'unico colore acceso del sito: l'occhio ci va subito (testo scuro per leggibilità) */
  .bar .bar-main { position: relative; padding-top: 0; color: #b4380a; font-weight: 800; }
  .bar-main-ico {
    display: grid; place-items: center; width: 56px; height: 56px; margin-top: -26px; border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #ffb347 0%, #ff7a1a 45%, #e8430c 100%);
    border: 4px solid var(--white); box-shadow: 0 8px 18px rgba(232, 67, 12, 0.45);
    transition: transform 0.2s var(--ease-out);
  }
  /* un leggero alone che "respira" per farsi notare, senza disturbare */
  @media (prefers-reduced-motion: no-preference) {
    .bar-main-ico { animation: richiamo 3.2s ease-in-out infinite; }
  }
  @keyframes richiamo {
    0%, 100% { box-shadow: 0 8px 18px rgba(232, 67, 12, 0.45), 0 0 0 0 rgba(255, 122, 26, 0.45); }
    50% { box-shadow: 0 8px 18px rgba(232, 67, 12, 0.45), 0 0 0 8px rgba(255, 122, 26, 0); }
  }
  .bar .bar-main svg { color: var(--white); width: 24px; height: 24px; }
  .bar .bar-main:active { background: none; }
  .bar .bar-main:active .bar-main-ico { transform: scale(0.93); }
  .foot-inner { padding-bottom: 100px; }
  /* sul telefono niente scheda che galleggia: una barra fissa, a tutta larghezza, appoggiata sopra la barra
     Chiama · Indicazioni · Disponibilità, su una sola riga: numero dei prodotti · Vedi · Invia */
  .request {
    left: 0; right: 0; width: 100%; margin: 0; bottom: calc(98px + env(safe-area-inset-bottom)); /* sopra il tondo di Cerca e prenota */
    border-radius: 18px 18px 0 0; border-width: 1px 0 0; box-shadow: 0 -8px 22px rgba(11, 92, 52, 0.16);
  }
  .request-inner { padding: 8px 12px; }
  .request-bar { gap: 8px; }
  .request-summary { flex: 1; min-width: 0; gap: 8px; }
  .request-badge { min-width: 34px; height: 34px; font-size: 1rem; box-shadow: 0 0 0 3px var(--mint-deep); }
  .request-text { min-width: 0; }
  .request-text strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .request-text span { color: var(--ink); font-size: 0.9rem; line-height: 1.2; white-space: nowrap; }
  /* «3 prodotti» e, sotto, il totale: su una riga sola finirebbero sotto «Vedi/Chiudi» */
  .request-qta, .request-tot { display: block; overflow: hidden; text-overflow: ellipsis; }
  .request-tot { font-weight: 700; color: var(--green-deep); }
  .request-tot::before { content: none; }
  .request-toggle { flex: none; min-height: 44px; padding: 0 10px 0 12px; }
  .request-send { flex: none; justify-content: center; white-space: nowrap; min-height: 44px; padding: 0 16px; box-shadow: none; }
  .request-send-long { display: none; }
  /* elenco aperto compatto: nome su una riga, stato e prezzo accanto al nome, circa due prodotti in vista */
  .request-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; }
  .request-who label { margin: 0; font-size: 0.95rem; white-space: nowrap; }
  .request-who input { flex: 1; min-width: 0; width: auto; min-height: 42px; font-size: 1.05rem; }
  .request-who-err { flex-basis: 100%; margin-top: 0; }
  .request-list { max-height: min(10rem, 20vh); gap: 4px; }
  .request-item { gap: 10px; padding: 7px 8px 7px 10px; font-size: 0.98rem; }
  .request-item:first-child { margin-top: 4px; }
  .request-note { display: inline; font-size: 0.82rem; }
  .request-note::before { content: " · "; }
  .qty { margin-top: 4px; padding: 2px; }
  .request-remove { min-height: 36px; padding: 0 12px; font-size: 0.9rem; }
  .qty-btn { width: 32px; height: 32px; font-size: 1.15rem; }
  .qty-n { min-width: 4.2em; font-size: 0.92rem; }
  .request-clear { min-height: 36px; margin-top: 4px; font-size: 0.92rem; }
  body.has-request { padding-bottom: 164px; }
}
/* telefoni bassi: in vista resta circa un prodotto e mezzo, gli altri scorrono */
@media (max-width: 720px) and (max-height: 700px) {
  .request-list { max-height: 15vh; }
}

/* telefoni piccoli: testata e barra più basse, così resta più schermo per il contenuto */
@media (max-width: 380px) {
  .strip-inner { padding-top: 5px; padding-bottom: 5px; }
  .strip { font-size: 0.9rem; }
  .hero-rotator { font-size: 1.12em; } /* «un consiglio del farmacista» resta su una riga anche a 320 px */
  .top { padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-mark .brand-cross { width: 20px; height: 20px; }
  .brand-name { font-size: 1.08rem; }
  .brand-place { font-size: 0.74rem; }
  [id] { scroll-margin-top: 96px; }
  .nav { padding: 8px; }
  .nav > a { gap: 10px; padding: 8px 8px; font-size: 1.05rem; }
  .nav .nav-ico { width: 36px; height: 36px; border-radius: 10px; }
  .nav .nav-ico svg { width: 20px; height: 20px; }
  .bar a { padding: 5px 4px; font-size: 0.85rem; }
  .bar svg { width: 22px; height: 22px; }
  .request { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (max-width: 340px) {
  .brand-place { display: none; } /* telefoni piccolissimi: solo il nome accanto alla croce */
}
@media (max-width: 350px) {
  .request-text .request-qta { display: none; } /* sui telefoni piccolissimi: il numero nel tondo verde e il totale */
}
