/* ==========================================================================
   Carrello: pulsante + sulle righe, carrellino in basso, finestre di scelta,
   carrello e scontrino. Pulsanti rettangolari con angoli morbidi, come
   un'app di negozio; le bolle restano solo come piccolo tocco.
   ========================================================================== */

html.is-locked,
html.is-locked body {
  overflow: hidden;
}

/* ------------------------------------------------------- + sulle righe */

.row__add {
  position: relative;
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -4px -2px -4px 2px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 6px 14px -8px rgba(13, 59, 122, 0.8), inset 0 -2px 0 rgba(0, 0, 0, 0.16);
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, background-color 160ms ease;
}

.row__add:hover {
  background: #0f55ad;
}

.row__add:active {
  transform: scale(0.92);
}

.row__add--off {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--ink-faint);
}

.row__add-n {
  display: none;
}

.row__add .cartplus {
  width: 25px;
  height: 25px;
  margin: 1px 0 0 -1px;
}

.row__add-plus {
  display: none;
}

/* Già nel carrello: verde, con quanti ne hai presi e un + per aggiungerne */
.row__add.is-in {
  background: var(--green);
}

.row__add.is-in .cartplus {
  display: none;
}

.row__add.is-in .row__add-n {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  padding-top: 3px;
}

.row__add.is-in .row__add-plus {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--foam);
}

.offers .row__add.is-in .row__add-plus {
  box-shadow: 0 0 0 2px #fff1ef;
}

.news .row__add.is-in .row__add-plus {
  box-shadow: 0 0 0 2px #eaf8e6;
}

/* ------------------------------------------- l'aiuto della mascotte */

.ohint {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 20px 0 4px;
  transition: opacity 300ms ease, transform 300ms ease;
}

.ohint.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.listino.is-searching .ohint {
  display: none;
}

.ohint__mascot {
  flex: none;
  width: 78px;
  height: auto;
  margin-bottom: -4px;
  transform-origin: 50% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .ohint__mascot {
    animation: mascot-wave 3.2s ease-in-out infinite;
  }
}

@keyframes mascot-wave {
  0%,
  100% {
    transform: rotate(0deg) translateY(0);
  }
  20% {
    transform: rotate(-6deg) translateY(-3px);
  }
  40% {
    transform: rotate(4deg) translateY(0);
  }
  60% {
    transform: rotate(0deg);
  }
}

.ohint__bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 13px 40px 13px 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 26px -18px rgba(13, 59, 122, 0.55), inset 0 0 0 2px var(--foam-2);
}

/* la punta del fumetto verso la mascotte */
.ohint__bubble::before {
  content: '';
  position: absolute;
  left: -9px;
  bottom: 18px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-left: 2px solid var(--foam-2);
  border-bottom: 2px solid var(--foam-2);
  border-radius: 0 0 0 5px;
  transform: rotate(45deg) skew(8deg, 8deg);
}

.ohint__title {
  margin: 0 0 2px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--blue-ink);
}

.ohint__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.ohint__btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -4px 1px -6px;
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  vertical-align: baseline;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}

.ohint__btn .cartplus {
  width: 18px;
  height: 18px;
}

.ohint__close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
}

.ohint__close:hover {
  background: var(--foam);
}

/* -------------------------------------------------------- carrellino */

/* In basso al centro: a destra coprirebbe i pulsanti + delle righe. */
.cart-fab {
  position: fixed;
  left: 50%;
  translate: -50% 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 64px;
  min-width: 64px;
  padding: 0 18px 0 17px;
  border: 0;
  border-radius: 20px;
  background: var(--blue-ink);
  color: var(--white);
  box-shadow: 0 18px 34px -14px rgba(4, 30, 70, 0.75), inset 0 -3px 0 rgba(0, 0, 0, 0.22);
  -webkit-tap-highlight-color: transparent;
  transition: transform 140ms ease;
}

.cart-fab:active {
  transform: scale(0.95);
}

.cart-fab__icon {
  display: grid;
  place-items: center;
  margin-left: 1px;
}

.cart-fab__text {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.cart-fab.is-full .cart-fab__text {
  display: flex;
}

.cart-fab__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.78;
}

.cart-fab__total {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cart-fab__badge {
  position: absolute;
  top: -9px;
  right: -9px;
  display: none;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 14px;
  background: var(--red);
  color: var(--white);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 3px var(--foam);
}

.cart-fab.is-full .cart-fab__badge {
  display: block;
}

.cart-fab.is-bump {
  animation: fab-bump 520ms cubic-bezier(0.3, 1.6, 0.5, 1);
}

.cart-fab.is-bump .cart-fab__badge {
  animation: badge-pop 520ms cubic-bezier(0.3, 1.8, 0.5, 1);
}

@keyframes fab-bump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes badge-pop {
  0% {
    transform: scale(0.4);
  }
  60% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

body.is-editing .cart-fab,
body.print-preview .cart-fab {
  display: none;
}

/* Il carrellino non deve coprire messaggi e fondo pagina */
body.has-cart .toast {
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 88px);
  width: max-content;
  text-align: center;
}

body.has-cart .foot {
  padding-bottom: calc(max(34px, env(safe-area-inset-bottom)) + 84px);
}

/* La bolla che vola nel carrello */
.fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  pointer-events: none;
}

.fly__bubble {
  display: block;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff 0 9%, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle, rgba(140, 203, 250, 0.35) 50%, rgba(22, 98, 196, 0.85) 100%);
  box-shadow: 0 6px 16px -6px rgba(13, 59, 122, 0.6);
}

/* ------------------------------------------------------------ finestre */

dialog {
  color: var(--ink);
}

.csheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 560px;
  max-height: min(90vh, 760px);
  max-height: min(90dvh, 760px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--white);
  box-shadow: 0 -24px 60px -24px rgba(4, 30, 70, 0.5);
  overflow: hidden;
  overscroll-behavior: contain;
}

.csheet[open] {
  display: flex;
  flex-direction: column;
  animation: csheet-in 300ms cubic-bezier(0.2, 0.85, 0.25, 1);
}

.csheet.is-closing {
  animation: csheet-out 170ms ease-in forwards;
}

.csheet::backdrop {
  background: rgba(7, 28, 58, 0.5);
}

.csheet[open]::backdrop {
  animation: fade-in 260ms ease;
}

.csheet.is-closing::backdrop {
  animation: fade-out 170ms ease-in forwards;
}

@keyframes csheet-in {
  from {
    transform: translateY(100%);
  }
}

@keyframes csheet-out {
  to {
    transform: translateY(100%);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@media (min-width: 700px) {
  .csheet {
    inset: 0;
    margin: auto;
    height: fit-content;
    border-radius: 24px;
    box-shadow: 0 30px 80px -30px rgba(4, 30, 70, 0.6);
  }

  @keyframes csheet-in {
    from {
      transform: translateY(24px);
      opacity: 0;
    }
  }

  @keyframes csheet-out {
    to {
      transform: translateY(16px);
      opacity: 0;
    }
  }
}

.csheet__in {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  width: 100%;
}

.csheet__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 20px 14px;
  border-bottom: 1px solid var(--ink-faint);
}

/* maniglia del foglio, solo sul telefono */
.csheet__head::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 2px;
  background: var(--ink-faint);
}

@media (min-width: 700px) {
  .csheet__head::before {
    display: none;
  }
}

.csheet__titles {
  flex: 1;
  min-width: 0;
}

.csheet__kicker {
  margin: 0 0 2px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.csheet__title {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--blue-ink);
}

.csheet__sub {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
}

.csheet__sub s {
  margin-left: 2px;
  font-weight: 600;
}

.csheet__offer {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.csheet__desc {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 15px;
}

.iconbtn {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: -4px -6px 0 0;
  border: 0;
  border-radius: 12px;
  background: var(--foam);
  color: var(--blue-ink);
}

.iconbtn:hover {
  background: var(--foam-2);
}

.csheet__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 20px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.csheet__foot {
  display: grid;
  gap: 10px;
  padding: 14px 20px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--ink-faint);
  background: var(--white);
}

/* ------------------------------------------------- pulsanti delle finestre */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 4px 20px 0;
  border: 0;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, opacity 160ms ease, background-color 160ms ease;
}

.cta:active:not(:disabled) {
  transform: scale(0.98);
}

.cta svg {
  flex: none;
  margin-top: -4px;
}

.cta--wide {
  width: 100%;
}

.cta--blue {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 12px 24px -16px rgba(13, 59, 122, 0.9), inset 0 -3px 0 rgba(0, 0, 0, 0.16);
}

.cta--wa {
  background: var(--wa);
  color: var(--white);
  box-shadow: 0 14px 28px -16px rgba(10, 70, 30, 0.9), inset 0 -3px 0 rgba(0, 0, 0, 0.16);
}

.cta--white {
  background: var(--white);
  color: var(--blue-ink);
  box-shadow: inset 0 0 0 2px var(--foam-2);
}

.cta--line {
  background: transparent;
  color: var(--blue);
  box-shadow: inset 0 0 0 2px var(--blue);
}

.cta.is-wait {
  opacity: 0.75;
  cursor: progress;
}

.cta.is-wait svg {
  animation: wa-wait 1s ease-in-out infinite alternate;
}

@keyframes wa-wait {
  to {
    opacity: 0.35;
  }
}

.cta:disabled {
  background: #dfe7f0;
  color: rgba(14, 42, 74, 0.5);
  box-shadow: none;
  cursor: default;
}

.cta__price {
  padding-left: 12px;
  border-left: 1.5px solid rgba(255, 255, 255, 0.35);
  font-variant-numeric: tabular-nums;
}

.cta__price:empty {
  display: none;
}

.clink {
  justify-self: center;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clink.is-armed {
  color: var(--red);
}

/* ------------------------------------------------- scelta del formato */

.pick {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.pick + .pick {
  margin-top: 16px;
}

.pick__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 0;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 750;
  color: var(--blue-ink);
}

.pick__n {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding-top: 2px;
  border-radius: 8px;
  background: var(--blue-ink);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
}

.pick__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.pick__hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.pick__hint--in {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eaf8e6;
  color: #1f6a28;
}

.formats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.formats--n3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.formats--n4 {
  gap: 10px;
}

.formats--n3 .fmt,
.formats--n4 .fmt {
  min-height: 116px;
}

.formats--n3 .fmt__size {
  font-size: 18px;
}

.fmt {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 2px;
  min-height: 128px;
  padding: 12px 10px 12px;
  border-radius: 16px;
  background: var(--foam);
  box-shadow: inset 0 0 0 2px var(--foam-2);
  color: var(--blue);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 140ms ease, background-color 140ms ease, transform 120ms ease;
}

.fmt:active {
  transform: scale(0.98);
}

.fmt__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.fmt:has(.fmt__input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.bottle {
  --liquid: #a9dafc;
  display: block;
  margin-bottom: 8px;
  overflow: visible;
}

.bottle--f05 {
  width: 24px;
  height: 38px;
}

.bottle--f1 {
  width: 28px;
  height: 45px;
}

.bottle--small {
  width: 31px;
  height: 50px;
}

.bottle--big {
  width: 37px;
  height: 61px;
}

.fmt__size {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--blue-ink);
}

.fmt__price {
  font-size: 15px;
  font-weight: 750;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* profumazioni */
.scents {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.scent {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 8px 34px 8px 14px;
  border-radius: 12px;
  background: var(--foam);
  box-shadow: inset 0 0 0 2px var(--foam-2);
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 140ms ease, background-color 140ms ease;
}

.scent__input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.scent:has(.scent__input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.scent__check {
  position: absolute;
  right: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--foam-2);
  color: transparent;
}

.scent:has(.scent__input:checked) {
  background: #e8f2ff;
  box-shadow: inset 0 0 0 2.5px var(--blue);
  color: var(--blue-ink);
}

.scent:has(.scent__input:checked) .scent__check {
  background: var(--blue);
  box-shadow: none;
  color: var(--white);
}

.fmt__price small,
.cta__price small {
  margin-right: 4px;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.85;
}

.approx {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: #fff7e0;
  color: #6a4a00;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
}

.approx svg {
  flex: none;
  margin-top: 1px;
  color: #b07a00;
}

.fmt__check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--foam-2);
  background: var(--white);
  color: transparent;
}

.fmt:has(.fmt__input:checked) {
  background: #e8f2ff;
  box-shadow: inset 0 0 0 2.5px var(--blue);
}

.fmt:has(.fmt__input:checked) .bottle {
  --liquid: #5fb2f5;
}

.fmt:has(.fmt__input:checked) .fmt__check {
  background: var(--blue);
  box-shadow: none;
  color: var(--white);
}

.fmt:has(.fmt__input:checked) .fmt__price {
  color: var(--blue);
}

/* quantità */
.qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 16px;
  background: var(--foam);
  box-shadow: inset 0 0 0 2px var(--foam-2);
  transition: opacity 160ms ease;
}

.qty.is-off {
  opacity: 0.45;
}

.qty__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  color: var(--blue);
  box-shadow: 0 2px 6px -3px rgba(13, 59, 122, 0.5);
  -webkit-tap-highlight-color: transparent;
}

.qty__btn:active:not(:disabled) {
  transform: scale(0.94);
}

.qty__btn:disabled {
  color: rgba(14, 42, 74, 0.25);
  box-shadow: none;
  cursor: default;
}

.qty__input {
  width: 56px;
  height: 48px;
  padding: 4px 0 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--blue-ink);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.qty__input:focus {
  outline: none;
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--blue);
}

.qty--sm {
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
}

.qty--sm .qty__btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.qty--sm .qty__input {
  width: 40px;
  height: 38px;
  font-size: 20px;
}

/* ------------------------------------------------------------- carrello */

.clines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-faint);
}

.cline:first-child {
  padding-top: 2px;
}

.cline:last-child {
  border-bottom: 0;
}

.cline__main {
  min-width: 0;
}

.cline__name {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cline__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.cline__meta .bottle {
  flex: none;
  width: 11px;
  height: 18px;
  margin: 0;
  color: var(--blue);
}

.cline__meta .bottle--big {
  width: 12px;
  height: 20px;
}

.cline__meta .bottle--f05 {
  width: 9px;
  height: 14px;
}

.cline__meta .bottle--f1 {
  width: 10px;
  height: 16px;
}

.cline__total {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cline__scent {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 650;
}

.cline__scent strong {
  color: var(--blue-ink);
}

.cline__total small {
  display: block;
  margin-bottom: 1px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  color: var(--ink-soft);
}

.cline__ctrl {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cline__remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
}

.cline__remove:hover {
  background: #fff1ef;
  color: var(--red);
}

.cline.is-off .cline__name {
  opacity: 0.55;
  text-decoration: line-through;
}

.cline.is-off .cline__meta {
  color: var(--red);
}

/* chi ordina */
.cwho {
  margin-top: 6px;
  padding: 16px;
  border-radius: 16px;
  background: var(--foam);
  box-shadow: inset 0 0 0 2px var(--foam-2);
  scroll-margin: 20px;
}

.cwho__title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  color: var(--blue-ink);
}

.cwho__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cwho__field {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 14px;
  font-weight: 750;
  color: var(--ink-soft);
}

.cwho__field b {
  color: var(--red);
}

.cwho__input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 2px #d5e3f3;
  color: var(--ink);
  font-size: 17px; /* 16+ : su iPhone niente zoom */
  font-weight: 700;
}

.cwho__input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2.5px var(--blue);
}

.cwho__input[aria-invalid] {
  background-color: #fff5f4;
  box-shadow: inset 0 0 0 2.5px var(--red);
}

.cwho__pickup {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px dashed #cfe0f2;
}

.pdays {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.pday {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 4px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 2px #d5e3f3;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pday__input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pday:has(.pday__input:checked) {
  background: var(--blue);
  box-shadow: none;
  color: var(--white);
}

.pday:has(.pday__input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.pother {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 2px #d5e3f3;
  color: var(--blue);
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pother svg {
  flex: none;
}

.pother.is-on {
  background: var(--blue);
  box-shadow: none;
  color: var(--white);
}

/* il calendario vero è sopra, invisibile: toccando si apre quello del telefono */
.pother__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}

.pother:has(.pother__input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.ptime {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20' fill='none' stroke='%231662c4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  cursor: pointer;
}

.cwho__hint {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.cwho__error {
  margin: 8px 0 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 750;
}

.ctotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 750;
  color: var(--blue-ink);
}

.ctotal__value {
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cnote {
  margin: -6px 0 2px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.cnote--off {
  color: var(--red);
  font-weight: 700;
}

.cempty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 10px 18px;
  text-align: center;
  color: var(--ink-soft);
}

.cempty img {
  width: 96px;
  height: auto;
  margin-bottom: 6px;
}

.cempty p {
  margin: 0;
  max-width: 30ch;
}

.cempty__title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-ink);
}

.cempty__go {
  padding: 0 0 6px;
}

/* ------------------------------------------------------------- scontrino */

.rview {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 26%, var(--sky-low) 50%);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.rview[open] {
  display: block;
  animation: fade-in 220ms ease;
}

.rview.is-closing {
  animation: fade-out 170ms ease-in forwards;
}

.rview::backdrop {
  background: var(--sky-top);
}

.rview__in {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 0;
}

.rview__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  min-height: 56px;
  color: var(--white);
}

.rview__back {
  position: absolute;
  left: -6px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding: 0 14px 0 8px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  transform: translateY(-50%);
}

.rview__back:hover {
  background: rgba(255, 255, 255, 0.26);
}

.rview__back svg {
  stroke-width: 2.6;
}

.rview__title {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 800;
}

.rview :focus-visible {
  outline-color: var(--white);
}

/* La stampante: lo scontrino esce dalla fessura */
.printer {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin-top: 12px;
}

.printer__slot {
  position: relative;
  z-index: 2;
  height: 16px;
  margin: 0 -10px;
  border-radius: 10px;
  background: linear-gradient(180deg, #0b2a52, #123c70 60%, #0b2a52);
  box-shadow: 0 8px 14px -6px rgba(3, 20, 45, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.12);
}

.printer__slot::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 6px;
  height: 4px;
  border-radius: 2px;
  background: #04152b;
}

.printer__clip {
  position: relative;
  z-index: 1;
  margin: -8px -24px 0;
  padding: 0 24px 34px;
  overflow: hidden;
}

.printer__paper {
  filter: drop-shadow(0 14px 18px rgba(3, 25, 60, 0.28)) drop-shadow(0 2px 2px rgba(3, 25, 60, 0.12));
  animation: print-out 1500ms cubic-bezier(0.25, 0.75, 0.3, 1) both;
}

@keyframes print-out {
  from {
    transform: translateY(-100%);
  }
}

.receipt {
  --tooth: 10px;
  --paper: #fffdf7;
  padding: 26px 22px calc(26px + var(--tooth));
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0) 14px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.018), rgba(0, 0, 0, 0) 12%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0.018)),
    var(--paper);
  color: #24272b;
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.45;
  /* bordo strappato in fondo */
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% 100% / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) + 1px) no-repeat;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% 100% / calc(var(--tooth) * 2) var(--tooth) repeat-x,
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) + 1px) no-repeat;
}

.receipt p {
  margin: 0;
}

.receipt__logo {
  display: block;
  width: 150px;
  height: auto;
  margin: 2px auto 12px;
}

.receipt__shop {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.receipt__line {
  text-align: center;
}

.receipt__cut {
  height: 0;
  margin: 14px 0;
  border: 0;
  border-top: 1.5px dashed rgba(36, 39, 43, 0.45);
}

.receipt__title {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.receipt__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.receipt__meta {
  margin-top: 6px;
  font-size: 12.5px;
}

.receipt__customer {
  margin-top: 4px !important;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.receipt__customer span {
  font-weight: 400;
}

.receipt__colhead {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.receipt__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.receipt__items li + li {
  margin-top: 7px;
}

.receipt__name {
  min-width: 0;
  font-weight: 500;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.receipt__amt {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.receipt__sub {
  padding-left: 12px;
  color: rgba(36, 39, 43, 0.72);
  font-size: 12.5px;
}

.receipt__scent {
  font-weight: 500;
}

.receipt__count {
  font-size: 13px;
  text-transform: uppercase;
}

.receipt__total {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.receipt__total span:last-child {
  font-variant-numeric: tabular-nums;
}

.receipt__foot {
  font-size: 12px;
  text-align: center;
  color: rgba(36, 39, 43, 0.78);
}

.receipt__foot + .receipt__foot {
  margin-top: 6px !important;
}

.receipt__strong {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #24272b;
}

.receipt__thanks {
  margin-top: 14px !important;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.rview__actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 10px;
  width: calc(100% + 2 * var(--gutter));
  margin-top: auto;
  padding: 26px var(--gutter) max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(140, 203, 250, 0), var(--sky-low) 24px);
}

.rview__actions > * {
  width: 100%;
  max-width: 440px;
  justify-self: center;
}

.rview__help {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  padding: 0 0 max(22px, env(safe-area-inset-bottom));
}

.rview__hint {
  margin: 0;
  color: var(--blue-ink);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.rview__steps {
  display: grid;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
  color: var(--blue-ink);
  font-size: 15px;
  font-weight: 650;
}

.rview__steps li {
  position: relative;
  padding-left: 32px;
  counter-increment: passo;
}

.rview__steps li::before {
  content: counter(passo);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--blue-ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-1px);
}

.rview__num {
  white-space: nowrap;
}

.rview__alt {
  justify-self: center;
  border: 0;
  background: none;
  font-family: var(--body);
  cursor: pointer;
  padding: 6px 8px;
  color: var(--blue-ink);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rview__title:focus,
.csheet__title:focus {
  outline: none;
}

.rview__done {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 14.5px;
}

.rview__done p {
  margin: 0;
}

.rview__clear {
  flex: none;
  height: 42px;
  padding: 2px 14px 0;
  border: 0;
  border-radius: 10px;
  background: var(--blue-ink);
  color: var(--white);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .csheet[open],
  .csheet.is-closing,
  .rview[open],
  .printer__paper,
  .cart-fab.is-bump,
  .cart-fab.is-bump .cart-fab__badge {
    animation: none;
  }
}

@media print {
  .cart-fab,
  .row__add {
    display: none !important;
  }
}
