:root {
  --fondo: #f3f3f1;
  --carta: #ffffff;
  --inchiostro: #17181a;
  --grigio: #6d6f73;
  --tenue: #a4a6aa;
  --filo: rgba(23, 24, 26, 0.08);
  --accento: #2f6f4e;
  --foto: #6b5a42;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

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

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

.stage { position: relative; width: 100vw; height: 100vh; overflow: hidden; }

.fit { position: absolute; left: 50%; top: 50%; width: 392px; height: 466px; transform-origin: 50% 50%; }

.screen {
  position: relative;
  width: 392px;
  height: 466px;
  background: var(--carta);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--filo), 0 30px 60px -24px rgba(23, 24, 26, 0.18), 0 8px 18px -10px rgba(23, 24, 26, 0.1);
}

/* the header */
.bar { position: absolute; left: 0; right: 0; top: 0; height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 16px 0 18px; }
.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; color: inherit; font-weight: 640; font-size: 14px; letter-spacing: -0.01em; }
.brand svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.links { display: flex; gap: 12px; margin-left: auto; font-size: 11.5px; color: var(--grigio); }
.bag { position: relative; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; }
.bag svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.bag__count {
  position: absolute; right: 1px; top: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  background: var(--accento); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 0 0 2px var(--carta);
}

/* the product */
.product { position: absolute; left: 16px; right: 16px; top: 60px; bottom: 16px; display: grid; grid-template-columns: 172px 1fr; gap: 18px; }
.photo { position: relative; border-radius: 18px; background: var(--foto); overflow: hidden; }
.photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(23, 24, 26, 0.04); pointer-events: none; }
.photo__art { position: absolute; inset: 0; }
.photo__art img, .flyer__art img, .line__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; -webkit-user-drag: none; user-select: none; }
/* a soft light from above and a fine edge over the photo, so it sits on the white page like a print */
.photo__art::after, .flyer__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 30%, transparent 78%, rgba(0, 0, 0, 0.12)); pointer-events: none; }
.photo__tag { position: absolute; left: 10px; top: 10px; padding: 4px 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.78); font-size: 9.5px; font-weight: 600; letter-spacing: 0.01em; backdrop-filter: blur(6px); }

.info { display: flex; flex-direction: column; padding-top: 12px; min-width: 0; }
.info__kicker { font-size: 10.5px; color: var(--grigio); }
.info__name { margin-top: 6px; font-size: 25px; line-height: 1.02; font-weight: 680; letter-spacing: -0.025em; font-variation-settings: "wdth" 92; }
.info__price { margin-top: 8px; font-size: 15px; font-weight: 560; }
.swatches { display: flex; gap: 7px; margin-top: 20px; }
.sw { position: relative; height: 28px; padding: 0 11px; border-radius: 99px; background: #f4f4f3; font-size: 11px; font-weight: 600; color: var(--grigio); box-shadow: inset 0 0 0 1px rgba(23, 24, 26, 0.06); transition: color 0.25s, background-color 0.25s; }
.sw span { position: relative; }
.sw.is-on { background: var(--carta); color: var(--inchiostro); }
.sw::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 1.5px var(--inchiostro); opacity: 0; transform: scale(0.9); transition: opacity 0.25s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.sw.is-on::after { opacity: 1; transform: scale(1); }
.info__colour { margin-top: 9px; font-size: 11px; color: var(--grigio); }
.info__colour b { color: var(--inchiostro); font-weight: 600; }

.add {
  position: relative; margin-top: auto; height: 44px; border-radius: 99px; overflow: hidden;
  background: var(--inchiostro); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 22px -12px rgba(23, 24, 26, 0.6);
}
.add__fill { position: absolute; inset: 0; background: var(--accento); transform-origin: 0 50%; transform: scaleX(0); }
.add__label { position: relative; display: grid; place-items: center; height: 100%; font-variation-settings: "wdth" 100; }
.add__a, .add__b { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; }
.add__b { opacity: 0; }
.add__b svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.info__ship { margin-top: 10px; font-size: 10.5px; color: var(--grigio); text-align: center; }

/* the side bag */
.scrim { position: absolute; inset: 0; background: rgba(23, 24, 26, 0.22); opacity: 0; pointer-events: none; }
.scrim.is-on { pointer-events: auto; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 292px; display: flex; flex-direction: column;
  background: var(--carta); border-radius: 22px 0 0 22px;
  box-shadow: -1px 0 0 var(--filo), -24px 0 48px -20px rgba(23, 24, 26, 0.28);
  transform: translateX(104%);
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px 18px; }
.drawer__title { font-size: 15px; font-weight: 660; letter-spacing: -0.01em; }
.drawer__n { margin-left: 4px; font-size: 11.5px; font-weight: 500; color: var(--grigio); }
.close { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: #f4f4f3; }
.close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.lines { padding: 0 14px 0 18px; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 11px; align-items: start; padding: 12px 0; border-top: 1px solid var(--filo); overflow: hidden; }
.line--new { height: 0; padding: 0; border-top-color: transparent; }
.line__thumb { position: relative; width: 56px; height: 64px; border-radius: 12px; background: var(--foto); overflow: hidden; }
.line__thumb--cap { background: #f2f1ee; }
.line__thumb--cap img { object-position: 50% 50%; mix-blend-mode: multiply; }
.line__thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(23, 24, 26, 0.05); pointer-events: none; }
.line__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 2px; }
.line__name { font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; }
.line__meta { font-size: 10.5px; color: var(--grigio); }
.line__qty { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 10.5px; color: var(--grigio); }
.line__remove { font-size: 10.5px; color: var(--grigio); padding: 2px 0; }
.line__price { font-size: 12px; font-weight: 600; padding-top: 2px; }

.drawer__foot { margin-top: auto; padding: 14px 18px 18px; border-top: 1px solid var(--filo); }
.ship__text { font-size: 10.5px; color: var(--grigio); }
.ship__track { display: block; margin-top: 7px; height: 4px; border-radius: 99px; background: #eeeeec; overflow: hidden; }
.ship__fill { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--accento); transform-origin: 0 50%; }
.sub { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font-size: 12.5px; color: var(--grigio); }
.sub__v { color: var(--inchiostro); font-size: 17px; font-weight: 660; letter-spacing: -0.01em; }
.checkout { width: 100%; margin-top: 12px; height: 42px; border-radius: 99px; background: var(--inchiostro); color: #fff; font-size: 13px; font-weight: 600; }

/* the rolling digits */
.roll { display: inline-flex; overflow: hidden; vertical-align: bottom; }
.roll__c { display: inline-block; position: relative; height: 1.2em; line-height: 1.2em; overflow: hidden; }
.roll__col { display: flex; flex-direction: column; }
.roll__col span { height: 1.2em; line-height: 1.2em; text-align: center; }

/* the flying copy */
.flyer { position: absolute; left: 0; top: 0; border-radius: 18px; background: var(--foto); overflow: hidden; opacity: 0; pointer-events: none; box-shadow: 0 18px 30px -14px rgba(23, 24, 26, 0.35); }
.flyer__art { position: absolute; inset: 0; }

/* the drawn pointer */
.pointer { position: absolute; left: 0; top: 0; width: 22px; height: 22px; opacity: 0; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.pointer path { fill: var(--inchiostro); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }

@media (hover: hover) {
  .add:hover { box-shadow: 0 14px 26px -12px rgba(23, 24, 26, 0.7); }
  .close:hover { background: #ececea; }
  .line__remove:hover { color: var(--inchiostro); }
}
