/*
  Shop Walk 3D — tema "Boutique" (06/10/2026)
  Avorio, nero caldo, legno e un corallo bruciato come unico colore d'azione
  (stessa famiglia del corallo di citygraph.it, scurito per il contrasto AA col testo bianco).
  Ottone solo nei dettagli. Display: Gloock (serif a forte contrasto, da insegna di bottega);
  testo: Manrope. I NOMI delle variabili restano quelli storici (li usa anche vendita.css).
*/
:root {
  --cartone: #a9825a;          /* legno chiaro */
  --cartone-scuro: #6f5236;    /* legno scuro */
  --cartoncino: #fbf8f2;       /* avorio dei pannelli */
  --cartoncino-2: #f1ebe0;     /* avorio più caldo: campi, riepiloghi */
  --inchiostro: #1d1915;       /* nero caldo */
  --inchiostro-2: #5c5248;     /* testo secondario (7.2:1 su avorio) */
  --nastro: #b08a52;           /* ottone: filetti e dettagli */
  --accento: #c23d18;          /* corallo bruciato: azione (bianco sopra 5.3:1) */
  --accento-scuro: #8f2e12;
  --verde: #1e6b47;            /* WhatsApp / conferme (bianco sopra 6.5:1) */
  --verde-scuro: #154d33;
  --blu: #2d5a87;              /* link e anello del focus */
  --rep: #c23d18;
  --ombra: 0 18px 40px -20px rgba(40, 28, 16, .45), 0 2px 8px rgba(40, 28, 16, .08);
  --raggio: 14px;
  --bordo: 1px solid rgba(29, 25, 21, .14);
  --display: "Gloock", "Georgia", "Times New Roman", serif;
  --testo: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --filo: rgba(29, 25, 21, .1);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sx: max(16px, env(safe-area-inset-left));
  --dx: max(16px, env(safe-area-inset-right));
  --alto: max(14px, env(safe-area-inset-top));
  --basso: max(16px, env(safe-area-inset-bottom));
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #ece5d8;
  color: var(--inchiostro);
  font: 500 16px/1.45 var(--testo);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  caret-color: var(--accento);
  accent-color: var(--accento);
}
::selection { background: #ead9bb; color: var(--inchiostro); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong, b { font-weight: 700; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--blu); outline-offset: 3px; }
[hidden] { display: none !important; }

#scena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }

/* ---------- Caricamento: l'ingresso della boutique ---------- */
.carica {
  position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 14px;
  padding: 24px;
  background:
    radial-gradient(120% 80% at 50% 0%, #fffdf8 0%, rgba(255, 253, 248, 0) 60%),
    linear-gradient(180deg, #f7f2e9 0%, #ece4d6 100%);
  transition: opacity .7s var(--ease), visibility .7s;
}
.carica::before, .carica::after {
  content: ""; position: absolute; left: 50%; width: min(420px, 74vw); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--nastro), transparent); opacity: .55;
}
.carica::before { top: 22vh; }
.carica::after { bottom: 22vh; }
.carica.via { opacity: 0; visibility: hidden; }
.carica-titolo {
  margin: 6px 0 0; padding: 0 16px; text-align: center; text-wrap: balance;
  font: 400 clamp(38px, 7.4vw, 68px)/1 var(--display); letter-spacing: -.01em; color: var(--inchiostro);
  animation: carica-entra 1.1s var(--ease) both;
}
.carica-testo { margin: 0; color: var(--inchiostro-2); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; animation: carica-entra 1.1s .15s var(--ease) both; }
.carica-testo a { color: var(--accento-scuro); }
.carica-barra { width: min(240px, 60vw); height: 2px; margin-top: 6px; border-radius: 2px; background: rgba(29, 25, 21, .12); overflow: hidden; }
.carica-barra span { display: block; height: 100%; width: 4%; background: var(--inchiostro); }
/* lo scatolone diventa il sacchetto della boutique: linea sottile, nessun salto */
.carica-scatola { position: relative; width: 64px; height: 72px; margin-top: 10px; animation: carica-entra 1.1s var(--ease) both; }
.carica-scatola .faccia { position: absolute; left: 0; right: 0; bottom: 0; height: 54px; border: 1.5px solid var(--inchiostro); border-radius: 3px 3px 8px 8px; background: #fffdf8; }
.carica-scatola .faccia::before { content: ""; position: absolute; left: 50%; top: 18px; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); background: var(--accento); }
.carica-scatola .faccia i, .carica-scatola .faccia b { display: none; }
.carica-scatola .lembo { position: absolute; top: 0; left: 50%; width: 30px; height: 30px; margin-left: -15px; border: 1.5px solid var(--inchiostro); border-bottom: 0; border-radius: 15px 15px 0 0; background: none; }
.carica-scatola .l2 { display: none; }
@keyframes carica-entra { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

/* ---------- HUD ---------- */
.cartoncino { background: rgba(251, 248, 242, .94); border: var(--bordo); border-radius: 12px; box-shadow: var(--ombra); -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px); }
.hud-alto { position: fixed; z-index: 10; top: var(--alto); left: var(--sx); right: var(--dx); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; }
.hud-alto > * { pointer-events: auto; }
.marchio { display: flex; flex-direction: column; gap: 5px; padding: 9px 16px 10px; max-width: 46vw; }
.marchio-nome { font: 400 23px/1 var(--display); letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reparto-pill { align-self: flex-start; padding: 3px 10px 3px 9px; border-radius: 99px; background: var(--rep); color: var(--rep-testo, #fff); font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; transition: background-color .3s; }
.hud-tasti { display: flex; gap: 8px; align-items: center; }
.tasto-tondo, .tasto-carrello {
  height: 48px; min-width: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(251, 248, 242, .94); border: var(--bordo); border-radius: 12px; box-shadow: var(--ombra);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
}
.tasto-tondo:hover { background: #fff; transform: translateY(-1px); }
.tasto-tondo:active, .tasto-carrello:active { transform: translateY(1px) scale(.98); }
.tasto-carrello { padding: 0 14px 0 12px; background: var(--inchiostro); color: #f6efe2; border-color: var(--inchiostro); }
.tasto-carrello:hover { background: #2e2822; transform: translateY(-1px); }
.carrello-num { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 99px; background: var(--accento); color: #fff; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.carrello-tot { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .01em; }
.tasto-carrello.salta { animation: gonfia .6s var(--ease); }
@keyframes gonfia { 0% { box-shadow: 0 0 0 0 rgba(194, 61, 24, .55), var(--ombra); } 100% { box-shadow: 0 0 0 14px rgba(194, 61, 24, 0), var(--ombra); } }

.aiuto-comandi { position: fixed; z-index: 5; left: 50%; bottom: var(--basso); transform: translateX(-50%); margin: 0; padding: 8px 16px; border-radius: 99px; background: rgba(29, 25, 21, .82); color: #f6efe2; font-size: 13px; font-weight: 500; letter-spacing: .01em; white-space: nowrap; pointer-events: none; transition: opacity .6s; }
.aiuto-comandi.via { opacity: 0; }

@keyframes entra-su { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Etichette prezzo sugli scaffali: cartellini di carta */
.etichette { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.cartellino {
  position: absolute; left: 0; top: 0; padding: 3px 9px 4px; border-radius: 4px; background: #fffdf8; border: 1px solid rgba(29, 25, 21, .18);
  font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: .01em; will-change: transform; box-shadow: 0 4px 10px -4px rgba(40, 28, 16, .35);
}
.cartellino.attivo { background: var(--inchiostro); color: #f6efe2; border-color: var(--inchiostro); font-size: 13.5px; }

/* Joystick e azioni */
.joystick { position: fixed; z-index: 8; left: calc(var(--sx) + 6px); bottom: calc(var(--basso) + 6px); width: 124px; height: 124px; border-radius: 50%; background: rgba(251, 248, 242, .5); border: 1px solid rgba(29, 25, 21, .3); box-shadow: inset 0 2px 10px rgba(40, 28, 16, .12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: none; touch-action: none; }
.joy-pomo { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--inchiostro); border: 3px solid #fbf8f2; box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .45); }
.tocco .joystick { display: block; }
.tocco .aiuto-comandi { display: none; }
.azioni-basse { position: fixed; z-index: 8; right: var(--dx); bottom: calc(var(--basso) + 10px); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.tasto-azione {
  min-height: 56px; padding: 0 22px; display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 12px;
  background: var(--accento); color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .01em; box-shadow: 0 14px 30px -12px rgba(143, 46, 18, .7), 0 2px 6px rgba(40, 28, 16, .15);
  animation: entra-dx .45s var(--ease); transition: background-color .2s, transform .2s var(--ease);
}
.tasto-azione:hover { background: #a8340f; transform: translateY(-1px); }
.tasto-azione kbd { font: inherit; font-size: 11px; font-weight: 700; padding: 1px 6px; border: 0; border-radius: 5px; background: rgba(0, 0, 0, .22); color: #fff; min-width: 0; }
.tocco .tasto-azione kbd { display: none; }
@keyframes entra-dx { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ---------- Pannelli ---------- */
.pannello {
  position: relative; background: var(--cartoncino); border: var(--bordo); border-radius: var(--raggio); box-shadow: 0 30px 70px -30px rgba(40, 28, 16, .55), 0 2px 10px rgba(40, 28, 16, .08);
  padding: 26px 24px 24px;
}
.pannello h2 { margin: 0 48px 12px 0; font: 400 30px/1.08 var(--display); letter-spacing: -.01em; text-wrap: balance; }
/* il vecchio nastro adesivo diventa un filetto d'ottone in testa al pannello */
.nastro { position: absolute; top: 0; left: 24px; width: 44px; height: 3px; border-radius: 0 0 2px 2px; background: var(--nastro); pointer-events: none; }
.chiudi { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 99px; background: transparent; border: var(--bordo); color: var(--inchiostro); transition: background-color .2s, transform .2s var(--ease); }
.chiudi svg { width: 18px; height: 18px; }
.chiudi:hover { background: #fff; transform: rotate(90deg); }

aside.pannello {
  position: fixed; z-index: 20; top: calc(var(--alto) + 66px); right: var(--dx); bottom: var(--basso);
  width: min(400px, calc(100vw - 32px)); overflow-y: auto; overscroll-behavior: contain;
  animation: pannello-entra .55s var(--ease);
}
@keyframes pannello-entra { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
aside.pannello, .velo > .pannello { scrollbar-width: thin; scrollbar-color: #cdbfa8 transparent; }
.pannello::-webkit-scrollbar { width: 8px; }
.pannello::-webkit-scrollbar-thumb { background: #cdbfa8; border-radius: 8px; border: 2px solid var(--cartoncino); }

.scheda-testa { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; padding-right: 48px; }
.codice { padding: 3px 9px; border-radius: 4px; background: transparent; border: 1px solid rgba(29, 25, 21, .22); color: var(--inchiostro-2); font-size: 12px; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.reparto-mini { padding: 3px 10px; border-radius: 99px; background: var(--rep); color: var(--rep-testo, #fff); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.scheda h2 { font: 400 27px/1.12 var(--display); letter-spacing: -.01em; }
.prezzo { margin: 0 0 16px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--filo); }
.prezzo strong { font: 400 40px/1 var(--display); color: var(--inchiostro); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.prezzo span { color: var(--inchiostro-2); font-size: 13px; font-weight: 500; }
.pagina-catalogo { display: block; position: relative; width: 100%; padding: 0; border: var(--bordo); border-radius: 10px; overflow: hidden; background: #fff; aspect-ratio: 1240 / 1573; max-height: 46vh; margin-bottom: 16px; }
.pagina-catalogo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .6s var(--ease); }
.pagina-catalogo:hover img { transform: scale(1.02); }
.pagina-lente { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 8px; background: rgba(29, 25, 21, .86); color: #f6efe2; font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.riga-campi { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.campo { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--inchiostro-2); margin-bottom: 12px; letter-spacing: .01em; }
.campo input, .campo textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid rgba(29, 25, 21, .24); border-radius: 8px; background: #fff; color: var(--inchiostro); font-size: 15px; font-weight: 500; transition: border-color .2s, box-shadow .2s; }
.campo textarea { resize: vertical; }
.campo input::placeholder, .campo textarea::placeholder { color: #7a6c5e; }
.campo input:hover, .campo textarea:hover { border-color: rgba(29, 25, 21, .4); }
.campo input:focus, .campo textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(45, 90, 135, .22); border-color: var(--blu); }
.stepper { display: flex; justify-self: start; width: max-content; border: 1px solid rgba(29, 25, 21, .24); border-radius: 8px; background: #fff; overflow: hidden; }
.stepper button { width: 42px; border: 0; background: var(--cartoncino-2); color: var(--inchiostro); display: grid; place-items: center; transition: background-color .2s; }
.stepper button svg { width: 18px; height: 18px; }
.stepper button:hover { background: #e6dccb; }
.stepper input { width: 62px; min-height: 44px; border: 0; border-radius: 0; text-align: center; padding: 0; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input:focus { box-shadow: none; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
.subtotale { margin: 4px 0 14px; display: flex; justify-content: space-between; align-items: baseline; color: var(--inchiostro-2); font-weight: 500; }
.subtotale strong { color: var(--inchiostro); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tasto-grande {
  width: 100%; min-height: 58px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px;
  border: 0; border-radius: 10px; background: var(--accento); color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .01em;
  box-shadow: 0 16px 30px -14px rgba(143, 46, 18, .75), 0 2px 6px rgba(40, 28, 16, .12), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.tasto-grande:hover { background: #a8340f; transform: translateY(-1px); box-shadow: 0 20px 34px -14px rgba(143, 46, 18, .8), 0 2px 6px rgba(40, 28, 16, .12), inset 0 1px 0 rgba(255, 255, 255, .14); }
.tasto-grande:active { transform: translateY(1px); box-shadow: 0 6px 14px -8px rgba(143, 46, 18, .7); }
.tasto-grande:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.tasto-grande.verde { background: var(--verde); box-shadow: 0 16px 30px -14px rgba(21, 77, 51, .75), 0 2px 6px rgba(40, 28, 16, .12); }
.tasto-grande.verde:hover { background: var(--verde-scuro); }
.tasto-grande.chiaro { background: transparent; color: var(--inchiostro); border: 1px solid rgba(29, 25, 21, .3); box-shadow: none; }
.tasto-grande.chiaro:hover { background: #fff; border-color: var(--inchiostro); }

/* Carrello */
.righe { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--filo); }
.riga { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 2px; background: transparent; border-bottom: 1px solid var(--filo); }
.riga-nome { font-weight: 700; line-height: 1.25; }
.riga-nome small { display: block; font-weight: 500; color: var(--inchiostro-2); font-size: 13px; margin-top: 3px; }
.riga-prezzo { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.riga-comandi { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.riga .stepper input { width: 52px; min-height: 36px; }
.riga .stepper button { width: 36px; }
.riga-via { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border: 0; background: none; color: var(--accento-scuro); font-size: 13px; font-weight: 600; border-radius: 6px; }
.riga-via svg { width: 18px; height: 18px; }
.riga-via:hover { background: #f6e3da; }
.vuoto { text-align: center; padding: 26px 12px; color: var(--inchiostro-2); }
.vuoto p { margin: 0 0 6px; }
.vuoto strong { font: 400 22px/1.2 var(--display); color: var(--inchiostro); display: block; margin-bottom: 4px; }
.totale { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 4px; font-size: 15px; font-weight: 600; }
.totale strong { font: 400 32px/1 var(--display); color: var(--inchiostro); font-variant-numeric: tabular-nums; }
.nota-iva { margin: 0 0 16px; font-size: 13px; color: var(--inchiostro-2); }

/* Cassa */
.cassa-intro { margin: 0 0 16px; color: var(--inchiostro-2); }
.cassa-intro strong { color: var(--inchiostro); }
.spunta { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--inchiostro-2); margin: 4px 0 14px; }
.spunta input { width: 22px; height: 22px; margin: 0; accent-color: var(--inchiostro); flex: none; }
.link { padding: 0; border: 0; background: none; color: var(--blu); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 600; }
.errore { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #f8e6df; color: #8f2e12; border: 1px solid rgba(143, 46, 18, .35); font-weight: 600; }
.cassa-riepilogo { margin: 0 0 14px; padding: 12px 14px; border-radius: 8px; background: var(--cartoncino-2); font-size: 14px; }
.cassa-invio { display: grid; gap: 12px; }
.cassa-fatto h3 { margin: 6px 0 8px; font: 400 32px/1.05 var(--display); color: var(--verde-scuro); }
.cassa-fatto p { margin: 0 0 18px; }

/* Velo / dialoghi */
.velo { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: calc(var(--alto) + 8px) var(--dx) var(--basso) var(--sx); background: rgba(29, 25, 21, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: velo .3s ease-out; }
@keyframes velo { from { opacity: 0; } }
.velo > .pannello { width: min(560px, 100%); max-height: 100%; overflow-y: auto; animation: dialogo .5s var(--ease); }
@keyframes dialogo { from { opacity: 0; transform: translateY(14px) scale(.985); } }
#cercaInput { width: 100%; min-height: 52px; padding: 10px 16px; border: 1px solid rgba(29, 25, 21, .24); border-radius: 10px; background: #fff; font-weight: 500; font-size: 17px; }
#cercaInput::placeholder { color: #7a6c5e; }
#cercaInput:focus { outline: none; border-color: var(--blu); box-shadow: 0 0 0 3px rgba(45, 90, 135, .22); }
.cerca-reparti { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.cerca-reparti button { padding: 6px 12px; border-radius: 99px; border: 0; background: var(--c); color: var(--ct, #fff); font-size: 13px; font-weight: 700; transition: transform .2s var(--ease), filter .2s; }
.cerca-reparti button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cerca-risultati { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--filo); }
.cerca-risultati button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 8px; text-align: left; border: 0; border-bottom: 1px solid var(--filo); border-radius: 0; background: transparent; font-weight: 600; transition: background-color .15s; }
.cerca-risultati button:hover, .cerca-risultati button:focus-visible { background: #fff; }
.cerca-risultati .pallino { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cerca-risultati small { display: block; color: var(--inchiostro-2); font-size: 12.5px; font-weight: 500; }
.cerca-risultati .p { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cerca-vuoto { color: var(--inchiostro-2); padding: 10px 2px; }
.mappa-aiuto { margin: -4px 0 12px; color: var(--inchiostro-2); }
#mappaCanvas { width: 100%; height: auto; display: block; border: var(--bordo); border-radius: 10px; background: #ece5d8; cursor: pointer; touch-action: manipulation; }
.menu-voci { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; border-top: 1px solid var(--filo); }
.menu-voci button { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 4px; text-align: left; border: 0; border-bottom: 1px solid var(--filo); border-radius: 0; background: transparent; font-weight: 600; transition: color .2s; }
.menu-voci button svg { transition: transform .3s var(--ease); }
.menu-voci button svg { color: var(--inchiostro-2); }
.menu-voci button:hover { color: var(--accento-scuro); }
.menu-voci button:hover svg { color: var(--accento-scuro); transform: translateX(3px); }
.credit { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--inchiostro-2); }
.credit a { color: var(--inchiostro); font-weight: 700; text-underline-offset: 3px; }
.testo-corpo { color: var(--inchiostro-2); max-width: 68ch; }
.testo-corpo h3 { margin: 20px 0 6px; color: var(--inchiostro); font: 400 20px/1.2 var(--display); }
.testo-corpo p { margin: 0 0 10px; }
.testo-corpo ul { margin: 0 0 10px; padding-left: 20px; }
.testo-corpo a { color: var(--blu); text-underline-offset: 3px; }
.funzioni { list-style: none; padding: 0 !important; display: grid; gap: 0; border-top: 1px solid var(--filo); }
.funzioni li { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; padding: 12px 2px; background: transparent; border-bottom: 1px solid var(--filo); }
.funzioni li span { grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 99px; background: var(--c, var(--accento)); color: #fff; }
.funzioni li span svg { width: 17px; height: 17px; }
.funzioni b { color: var(--inchiostro); }
.tasti-legenda { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; }
kbd { display: inline-block; min-width: 26px; padding: 2px 7px; border: 1px solid rgba(29, 25, 21, .28); border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 700 12.5px/1.4 var(--testo); text-align: center; color: var(--inchiostro); }

.zoom { padding: 0; background: rgba(20, 16, 12, .92); overflow: auto; display: block; }
.zoom img { display: block; width: min(1000px, 100%); margin: 0 auto; background: #fff; }
.zoom .chiudi { position: fixed; top: var(--alto); right: var(--dx); z-index: 2; background: var(--cartoncino); }

.toast { position: fixed; z-index: 40; left: 50%; bottom: calc(var(--basso) + 80px); transform: translateX(-50%); padding: 11px 20px; border-radius: 10px; background: var(--inchiostro); color: #f6efe2; font-weight: 600; box-shadow: var(--ombra); animation: entra-su .45s var(--ease); max-width: calc(100vw - 32px); text-align: center; }

/* ---------- Telefono ---------- */
@media (max-width: 640px) {
  .marchio-nome { font-size: 19px; }
  .marchio { padding: 7px 11px 8px; max-width: 38vw; }
  .tasto-tondo, .tasto-carrello { height: 44px; min-width: 44px; border-radius: 11px; }
  .hud-tasti { gap: 5px; }
  .tasto-reparti span { display: none; }
  .marchio { max-width: 30vw; }
  .carrello-tot { display: none; }
  #btnMenu { order: -1; }
  aside.pannello {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); animation-name: foglio;
  }
  @keyframes foglio { from { transform: translateY(30%); opacity: 0; } }
  .pannello { padding: 22px 18px 18px; }
  .pannello h2 { font-size: 26px; }
  .scheda h2 { font-size: 23px; }
  .prezzo strong { font-size: 34px; }
  .nastro { left: 50%; margin-left: -22px; }
  .pagina-catalogo { max-height: 30vh; }
  .menu-voci { grid-template-columns: 1fr; }
  .riga-campi { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 460px) {
  .tasto-tondo, .tasto-carrello { height: 42px; min-width: 42px; }
  .tasto-carrello { padding: 0 10px; gap: 6px; }
  .hud-tasti { gap: 4px; }
  .marchio { max-width: 27vw; padding: 6px 9px 7px; }
  .marchio-nome { font-size: 17px; }
}
@media (max-width: 380px) { .marchio { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
