/* Sheets: the product in its showcase, the order, and the photo at full size. */
dialog.sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 100%;
  max-height: calc(100svh - 20px - env(safe-area-inset-top));
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom);
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--marfim);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
dialog.sheet::backdrop {
  background: rgb(20 16 13 / 0.56);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.sheet-grabber {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 50%;
  width: 40px;
  height: 5px;
  margin-left: -20px;
  border-radius: 9px;
  background: rgb(247 244 236 / 0.55);
}
.cart-sheet .sheet-grabber {
  background: var(--crema-2);
}
.icon-close {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--crema);
}
.sheet-x {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  background: rgb(32 27 23 / 0.55);
  color: var(--marfim);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* The showcase: the whole photo, uncropped, on the light of its own colors. */
.vitrine {
  position: relative;
  margin: 0;
  padding: 34px 22px 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--espresso);
  isolation: isolate;
}
.vitrine-glow {
  position: absolute;
  inset: -20%;
  z-index: -2;
  background-position: center;
  background-size: cover;
  filter: blur(42px) saturate(1.35);
  opacity: 0.55;
}
.vitrine::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 55% at 50% -5%, rgb(232 211 162 / 0.38), transparent 70%),
    linear-gradient(transparent 55%, rgb(32 27 23 / 0.55));
}
.vitrine-photo {
  display: block;
  width: min(100%, 50dvh, 520px);
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 20px;
  background: rgb(247 244 236 / 0.06);
  box-shadow:
    0 40px 60px -34px rgb(0 0 0 / 0.85),
    0 0 0 1px rgb(247 244 236 / 0.08);
}
.vitrine-zoom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgb(32 27 23 / 0.6);
  color: var(--marfim);
  font-size: 0.78rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.vitrine-zoom .icon {
  width: 16px;
  height: 16px;
}
.vitrine.is-empty {
  min-height: 160px;
}
.vitrine.is-empty .no-photo {
  color: var(--champagne);
}
.sheet-body {
  padding: 22px 22px 8px;
}
.sheet-category {
  margin: 0 0 6px;
  color: var(--torra);
  font-size: 0.84rem;
}
.sheet-body h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.85rem;
  font-variation-settings: "opsz" 48;
  line-height: 1.08;
}
.sheet-desc {
  margin: 10px 0 0;
  color: var(--torra);
  max-width: 60ch;
}
.sheet-price {
  margin: 14px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.option-group {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--crema-2);
}
.option-group h3 {
  margin: 0;
  font-size: 1rem;
}
.option-rule {
  margin: 2px 0 10px;
  color: var(--torra);
  font-size: 0.84rem;
}
.option-group > small {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--crema);
  font-size: 0.74rem;
  font-weight: 600;
}
.option-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--crema-2);
}
.option-row small {
  display: block;
  color: var(--torra);
}
.options-empty,
.sheet-note {
  color: var(--torra);
  font-size: 0.88rem;
}
.sheet-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 12px;
  padding: 14px 22px 18px;
  background: linear-gradient(rgb(247 244 236 / 0), var(--marfim) 22%);
}
.sheet-actions .primary {
  flex: 1;
  justify-content: space-between;
}
.sheet-actions .primary.is-ask {
  justify-content: center;
}
.stepper {
  display: inline-flex;
  align-items: center;
  height: 54px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--crema-2);
}
.stepper button {
  width: 46px;
  height: 100%;
  display: grid;
  place-items: center;
}
.stepper button:disabled {
  opacity: 0.35;
}
.stepper output {
  min-width: 22px;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stepper.is-small {
  height: 40px;
}
.stepper.is-small button {
  width: 38px;
}
.stepper .icon {
  width: 18px;
  height: 18px;
}

@media (min-width: 760px) {
  dialog.product-sheet {
    inset: 0;
    width: min(940px, calc(100vw - 48px));
    max-height: min(680px, calc(100dvh - 48px));
    margin: auto;
    border-radius: 28px;
    display: none;
    overflow: hidden;
  }
  dialog.product-sheet[open] {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .product-sheet .vitrine {
    grid-row: 1 / 3;
    padding: 40px;
  }
  .product-sheet .sheet-body {
    overflow-y: auto;
    padding: 40px 32px 8px;
  }
  .product-sheet .sheet-actions {
    padding: 14px 32px 28px;
  }
  .product-sheet .sheet-grabber,
  .cart-sheet .sheet-grabber {
    display: none;
  }
  dialog.cart-sheet {
    inset: 0 0 0 auto;
    width: 440px;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 28px 0 0 28px;
  }
}
