:root {
  --fondo: #ffffff;
  --carta: #ffffff;
  --inchiostro: #141416;
  --secondario: #75757d;
  --tenue: #a3a3ab;
  --linea: #ececef;
  --scuro: #121214;
  --scuro-linea: rgba(255, 255, 255, .1);
  --scuro-testo: #f4f4f5;
  --scuro-tenue: rgba(244, 244, 245, .52);
  --accento: #7b6cff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }

.palco {
  position: relative;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vh, 28px) 16px;
  overflow: hidden;
}

/* ---------- the bag ---------- */
.borsa {
  width: min(360px, 100%);
  background: var(--carta);
  border: 1px solid var(--linea);
  border-radius: 20px;
  padding: clamp(12px, 3.4vh, 20px) clamp(14px, 4.4vw, 20px) clamp(12px, 3.4vh, 18px);
  box-shadow: 0 26px 50px -32px rgba(20, 20, 22, .32), 0 2px 6px -3px rgba(20, 20, 22, .08);
  transform-origin: 50% 60%;
}

.borsa__testa { display: flex; align-items: center; justify-content: space-between; margin-bottom: clamp(8px, 2.4vh, 14px); }
.marchio { display: inline-flex; align-items: center; gap: 7px; font-weight: 640; font-size: 14px; font-variation-settings: "wdth" 96; }
.marchio svg { width: 17px; height: 17px; fill: none; stroke: var(--inchiostro); stroke-width: 1.6; stroke-linecap: round; }
.borsa__conto { font-size: 12.5px; color: var(--secondario); display: inline-flex; align-items: center; gap: 6px; }
.borsa__numero {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: #f3f3f5; color: var(--inchiostro); font-size: 11px; font-weight: 600;
}

.righe { list-style: none; margin: 0; padding: 0; }
.riga {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: clamp(6px, 1.6vh, 9px) 0; border-top: 1px solid var(--linea);
}
.riga:first-child { border-top: 0; }
.riga__nome { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 560; line-height: 1.25; }
.riga__nota { font-size: 11.5px; font-weight: 450; color: var(--secondario); }
.riga__prezzo { font-size: 13px; font-weight: 540; }

.miniatura {
  position: relative; width: clamp(36px, 9vh, 44px); aspect-ratio: 1; border-radius: 11px;
  overflow: hidden; background: #ece7df;
}
/* the real product photo fills the square; a hairline ring on top keeps the edge crisp on white */
.miniatura img { display: block; width: 100%; height: 100%; object-fit: cover; }
.miniatura::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(18, 18, 20, .07);
}

.conti { margin: clamp(6px, 1.6vh, 10px) 0 clamp(10px, 2.6vh, 16px); padding-top: clamp(6px, 1.6vh, 10px); border-top: 1px solid var(--linea); }
.conti__riga { display: flex; justify-content: space-between; font-size: 12.5px; padding: 2px 0; }
.conti dt { color: var(--secondario); }
.conti dd { margin: 0; font-weight: 540; }

/* the Checkout pill: the background is its own element so it can sink and swell without moving the label */
.cassa {
  position: relative; width: 100%; height: clamp(40px, 11vh, 48px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px 0 20px; color: #fff; border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.cassa__fondo { position: absolute; inset: 0; border-radius: inherit; background: var(--scuro); box-shadow: 0 10px 18px -12px rgba(20, 20, 22, .7); }
.cassa__testo, .cassa__destra { position: relative; }
.cassa__testo { font-size: 15px; --wght: 560; --wdth: 100; font-weight: var(--wght); font-variation-settings: "wdth" var(--wdth); }
.cassa__destra { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 520; }
.cassa__prezzo { color: rgba(255, 255, 255, .72); }
.cassa__freccia { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cassa:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }

/* ---------- the payment page ---------- */
.pagina { position: absolute; inset: 0; pointer-events: none; visibility: hidden; }
.pagina.aperta { pointer-events: auto; }
.pagina__fondo { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: var(--scuro); }
.pagina__dentro {
  position: relative; height: 100%; width: min(400px, 100%); margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(10px, 3vh, 28px) 18px; color: var(--scuro-testo);
}

.barra { display: flex; align-items: center; justify-content: space-between; margin-bottom: clamp(8px, 2.6vh, 18px); }
.indietro {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--scuro-linea);
  -webkit-tap-highlight-color: transparent;
}
.indietro svg { width: 15px; height: 15px; fill: none; stroke: var(--scuro-testo); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.indietro:focus-visible, .paga:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
@media (hover: hover) { .indietro:hover { background: rgba(255, 255, 255, .12); } }
.sicuro { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--scuro-tenue); }
.sicuro svg { width: 14px; height: 14px; fill: none; stroke: var(--accento); stroke-width: 1.5; stroke-linecap: round; }

.pagina__titolo {
  margin: 0; font-size: clamp(28px, 8.6vh, 40px); line-height: 1; letter-spacing: -.01em;
  font-weight: 700; font-variation-settings: "wdth" 112; visibility: hidden;
}
.pagina__sotto { margin: clamp(4px, 1.4vh, 8px) 0 clamp(10px, 3vh, 20px); font-size: 12.5px; color: var(--scuro-tenue); }

.gruppo { border: 1px solid var(--scuro-linea); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .03); }
.campo {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: clamp(32px, 9.4vh, 44px); padding: 0 14px; border-top: 1px solid var(--scuro-linea); font-size: 13px;
}
.campo:first-child { border-top: 0; }
.campo::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 1px;
  background: var(--accento); transform: scaleX(var(--fuoco, 0)); transform-origin: left; transition: transform .45s cubic-bezier(.2, .9, .25, 1);
}
.campo.fuoco { --fuoco: 1; }
.campo__nome { color: var(--scuro-tenue); font-size: 12px; }
.campo__valore { display: inline-flex; align-items: center; gap: 7px; font-weight: 520; white-space: nowrap; }
.campo--doppio { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; }
.campo__meta { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 14px; }
.campo__meta + .campo__meta { border-left: 1px solid var(--scuro-linea); }
.chip { width: 21px; height: 15px; fill: none; stroke: var(--scuro-tenue); stroke-width: 1.1; }
.nascosto { width: 24px; height: 6px; fill: var(--scuro-testo); }
.cursore { width: 1.5px; height: 15px; background: var(--accento); border-radius: 1px; opacity: 0; }

.totale { display: flex; justify-content: space-between; align-items: baseline; margin: clamp(10px, 2.8vh, 18px) 2px clamp(8px, 2.4vh, 14px); font-size: 13px; color: var(--scuro-tenue); }
.totale__cifra { color: var(--scuro-testo); font-size: 16px; font-weight: 620; }

.paga {
  position: relative; width: 100%; height: clamp(40px, 11vh, 48px); border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--scuro);
  -webkit-tap-highlight-color: transparent;
}
.paga__fondo { position: absolute; inset: 0; border-radius: inherit; background: #fff; }
.paga__testo, .paga__prezzo { position: relative; font-size: 15px; font-weight: 620; }
.paga__prezzo { visibility: hidden; }

/* the two words that fly between the button and the page */
.volo {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; white-space: nowrap;
  color: #fff; visibility: hidden; transform-origin: 0 0; line-height: 1;
}
.volo--titolo { --wght: 560; --wdth: 100; font-weight: var(--wght); font-variation-settings: "wdth" var(--wdth); }
.volo--prezzo { font-weight: 520; }

.puntatore {
  position: absolute; left: 0; top: 0; z-index: 9; width: 22px; height: 22px; pointer-events: none;
  fill: #141416; stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
}

@media (hover: hover) {
  .cassa:hover .cassa__freccia { transform: translateX(2px); }
}
.cassa__freccia { transition: transform .35s cubic-bezier(.2, .9, .25, 1.4); }
.cassa.vicino .cassa__freccia { transform: translateX(2px); }
