.commerce-page {
  --shop-ink: #181b20;
  --shop-muted: #505b69;
  --shop-blue: #175ac9;
  --shop-border: #e0e5ec;
  --shop-paper: #fff;
  --shop-panel: #f4f6f9;
  width: min(100% - 2rem, 1160px);
  margin-inline: auto;
  padding-block: clamp(1.5rem, 4.5vw, 3.875rem);
  color: var(--shop-ink);
}

.commerce-page .commerce-heading { margin: 0 0 clamp(1.25rem, 3vw, 2.25rem); }
.commerce-page .page-title { margin: 0; line-height: 1.05; }
.commerce-heading .text-lead { margin: .75rem 0 0; color: var(--shop-muted); }
.commerce-page .surface {
  min-width: 0;
  border: 1px solid var(--shop-border);
  border-radius: 22px;
  background: var(--shop-paper);
}
.commerce-page h2 { margin: 0; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.025em; }
.commerce-page small { color: var(--shop-muted); font-size: .78em; }
.commerce-page .link { color: var(--shop-blue); font-weight: 570; }
.commerce-heading .text-lead, .commerce-product-detail .text-lead { font-size: 1rem; line-height: 1.55; }
.commerce-page button, .commerce-page input, .commerce-page select, .commerce-page a, .commerce-page summary { touch-action: manipulation; }
.commerce-page .button { min-height: 46px; }
.commerce-page button[disabled] { cursor: progress; opacity: .67; }
.commerce-page .button:focus-visible,
.commerce-page a:focus-visible,
.commerce-page select:focus-visible,
.commerce-page input:focus-visible,
.commerce-page summary:focus-visible,
.commerce-page button:focus-visible { outline: 2px solid var(--shop-blue); outline-offset: 3px; }
.commerce-page .field { min-width: 0; display: grid; gap: 6px; color: var(--shop-ink); font-weight: 550; font-size: .875rem; }
.commerce-page .field input,
.commerce-page .field select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: .55rem .85rem;
  border: 1px solid #cdd6e0;
  border-radius: 10px;
  background: #fff;
  color: var(--shop-ink);
  font-size: 1rem;
  font-weight: 440;
  font-family: inherit;
}
.commerce-page .field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #4c5664 50%),
    linear-gradient(135deg, #4c5664 50%, transparent 50%);
  background-size: 5px 5px;
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-repeat: no-repeat;
  padding-right: 1.75rem;
}
.commerce-page .field small { font-weight: 450; font-size: .8125rem; }
.commerce-error { margin: 0; color: #a0271f; font-size: .875rem; line-height: 1.45; }
.commerce-page [hidden] { display: none !important; }

.commerce-crumb {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin: 0 0 1rem;
  color: var(--shop-muted);
  font-size: .875rem;
}
.commerce-crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.commerce-product-grid {
  display: grid;
  grid-template: "gallery intro" auto "gallery buy" 1fr / minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 1.4rem clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
}
.commerce-product-intro { grid-area: intro; min-width: 0; padding-top: .45rem; }
.commerce-product-gallery {
  grid-area: gallery;
  display: grid;
  position: sticky;
  top: 76px;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  height: clamp(330px, 44vw, 525px);
  overflow: hidden;
  margin: 0;
  isolation: isolate;
  border: 1px solid #e1e8ef;
  border-radius: clamp(20px, 3vw, 32px);
  background: radial-gradient(ellipse at 55% 36%, #fff 4%, #f7fafd 38%, #e6edf4 100%);
}
.commerce-product-gallery--pro {
  background: radial-gradient(ellipse at 56% 38%, #fbfdff 2%, #eff5fd 50%, #d8e6f5 100%);
}
.commerce-product-gallery img {
  display: block;
  width: min(70%, 19rem);
  height: 76%;
  object-fit: contain;
  transform: rotate(17deg);
  filter: drop-shadow(12px 13px 11px rgb(19 34 54 / .18));
}
.commerce-product-gallery--variant img {
  width: min(84%, 32rem);
  height: 83%;
  transform: none;
  filter: none;
  mix-blend-mode: multiply;
}
.commerce-product-gallery figcaption {
  position: absolute;
  inset: auto 14px 9px;
  color: var(--shop-muted);
  text-align: center;
  font-size: .76rem;
}
.commerce-product-detail { grid-area: buy; min-width: 0; }
.commerce-edition { font-size: .875rem; font-weight: 560; color: var(--shop-muted); margin-bottom: .4rem; }
.commerce-product-price { margin-top: .7rem; font-size: 1.375rem; font-weight: 680; font-variant-numeric: tabular-nums; }
.commerce-product-price small { font-size: .75rem; font-weight: 550; }
.commerce-page .commerce-options { display: grid; gap: .875rem; }
.commerce-flavors { min-width: 0; border: 0; margin: 0; padding: 0; }
.commerce-flavors legend { margin-bottom: .5rem; padding: 0; font-weight: 620; font-size: .9375rem; }
.commerce-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.commerce-choice {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: .5rem .65rem;
  border: 1px solid #d6dee7;
  border-radius: 11px;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 525;
}
.commerce-choice span { overflow-wrap: anywhere; }
.commerce-choice:has(:checked) { border-color: var(--shop-blue); background: #eef5ff; }
.commerce-choice:has(:focus-visible) { outline: 2px solid var(--shop-blue); outline-offset: 2px; }
.commerce-choice input { accent-color: var(--shop-blue); flex: 0 0 auto; margin: 0; }
.commerce-show-flavors { margin-top: 4px; text-align: start; }
.commerce-product-actions { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: end; gap: .75rem; }
.commerce-quantity > label { display: block; margin-bottom: .4rem; font-size: .875rem; font-weight: 620; }
.commerce-quantity-stepper {
  display: inline-grid;
  grid-template-columns: 44px 40px 44px;
  border: 1px solid var(--shop-border);
  border-radius: 10px;
  background: #fff;
}
.commerce-quantity-stepper :is(button, input) {
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--shop-ink);
  background: transparent;
  text-align: center;
}
.commerce-quantity-stepper button { font-size: 1.125rem; }
.commerce-quantity-stepper button:enabled:hover { background: #eef4fe; }
.commerce-quantity-stepper button:disabled { cursor: default; color: #818899; }
.commerce-quantity-stepper input { appearance: textfield; font-variant-numeric: tabular-nums; }
.commerce-quantity-stepper input::-webkit-inner-spin-button,
.commerce-quantity-stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.commerce-add-action .commerce-add-button { width: 100%; min-height: 46px; }
.commerce-add-button [data-purchase-total] { padding-left: .62rem; border-left: 1px solid #ffffff65; font-variant-numeric: tabular-nums; }
.commerce-mobile-selection,
.commerce-add-action .commerce-mobile-pick { display: none; }
.commerce-added { margin: 0; color: #29485f; font-size: .875rem; line-height: 1.4; }
.commerce-added a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -.5rem; margin-inline-start: .25rem; }
.commerce-product-story { margin-top: clamp(2rem, 5vw, 4rem); }
.commerce-product-story-head { margin-bottom: clamp(1rem, 2.7vw, 1.75rem); }
.commerce-product-story-head h2 { font-size: clamp(1.65rem, 3.2vw, 2.65rem); letter-spacing: -.045em; }
.commerce-product-story-head p { margin-top: .5rem; max-width: 64ch; color: var(--shop-muted); }
.commerce-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(1rem, 2.4vw, 1.625rem);
  align-items: start;
}
.commerce-story-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .875rem; min-width: 0; }
.commerce-story-image { overflow: hidden; border: 1px solid var(--shop-border); border-radius: 18px; background: var(--shop-panel); }
.commerce-story-image:first-child { grid-column: 1 / -1; }
.commerce-story-image img { display: block; width: 100%; height: auto; }
.commerce-story-image figcaption { padding: .75rem .9rem; }
.commerce-story-image figcaption strong { font-size: .9375rem; }
.commerce-story-image figcaption p { margin-top: .2rem; color: var(--shop-muted); font-size: .875rem; line-height: 1.45; }
.commerce-page .commerce-specs { padding: clamp(1rem, 2.5vw, 1.5rem); background: var(--shop-panel); }
.commerce-specs h3 { font-size: 1.225rem; letter-spacing: -.025em; }
.commerce-specs dl { margin: .7rem 0 .2rem; }
.commerce-specs dl div { display: grid; grid-template-columns: minmax(6rem, .8fr) minmax(0, 1.2fr); gap: 1rem; padding: .6875rem 0; border-bottom: 1px solid var(--shop-border); }
.commerce-specs dt { color: var(--shop-muted); font-size: .875rem; }
.commerce-specs dd { margin: 0; font-size: .9375rem; font-weight: 550; }
.commerce-specs a { display: inline-flex; min-height: 44px; align-items: center; font-size: .875rem; }

.commerce-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 2rem);
}
.commerce-page .commerce-summary { padding: clamp(1rem, 3vw, 1.5rem); background: var(--shop-panel); }
.commerce-summary h2 { margin-bottom: 1.15rem; }
.commerce-breakdown { margin: 0 0 .9rem; color: var(--shop-muted); font-size: .875rem; }
.commerce-breakdown > div { display: flex; justify-content: space-between; column-gap: 16px; padding: .4rem 0; }
.commerce-breakdown dd { margin: 0; font-variant-numeric: tabular-nums; text-align: end; }
.commerce-breakdown .commerce-total { border-top: 1px solid var(--shop-border); margin-top: .375rem; padding-top: .85rem; color: var(--shop-ink); font-weight: 690; font-size: 1rem; }
.commerce-total small { font-weight: 550; }
.commerce-summary .button { width: 100%; }
.commerce-summary-note { margin: 0 0 .75rem; color: var(--shop-muted); font-size: .8125rem; }
.commerce-summary-items { margin: 0 0 1rem; padding: 0; list-style: none; }
.commerce-summary-items li { display: flex; justify-content: space-between; gap: .65rem; margin-bottom: .7rem; font-size: .875rem; }
.commerce-summary-items li > span { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.commerce-summary-items small { display: block; font-size: .75rem; }
.commerce-back { margin: .5rem 0 0; font-size: .875rem; }
.commerce-back a { display: inline-flex; min-height: 44px; align-items: center; }
.commerce-page .commerce-empty { display: grid; justify-items: start; gap: .75rem; padding: clamp(1.25rem, 5vw, 3.5rem); background: var(--shop-panel); }
.commerce-empty p { margin: 0; color: var(--shop-muted); }
.commerce-empty .button { margin-top: .375rem; }
.commerce-gate-actions { display: flex; flex-wrap: wrap; gap: .625rem; }
.commerce-bag-list { list-style: none; margin: 0; padding: .25rem clamp(.875rem, 3vw, 1.5rem); }
.commerce-bag-item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  column-gap: clamp(.65rem, 2vw, 1.125rem);
  align-items: start;
  min-height: 105px;
  padding-block: 1rem;
}
.commerce-bag-item + .commerce-bag-item { border-top: 1px solid var(--shop-border); }
.commerce-bag-photo { display: grid; place-items: center; min-height: 85px; border-radius: 11px; background: #edf2f7; }
.commerce-bag-photo img { width: 86%; height: 68px; object-fit: contain; }
.commerce-bag-desc h2 { font-size: 1.05rem; }
.commerce-bag-desc h2 a:hover { color: var(--shop-blue); }
.commerce-bag-desc p { margin: .25rem 0 .6rem; color: var(--shop-muted); font-size: .875rem; }
.commerce-bag-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 0 .65rem; }
.commerce-bag-qty { flex: 0 0 4.25rem; }
.commerce-bag-qty span { font-size: .75rem; color: var(--shop-muted); }
.commerce-remove, .commerce-text-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--shop-blue);
  padding: 0 .25rem;
  cursor: pointer;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 560;
  line-height: 1.25;
}
.commerce-remove:hover, .commerce-text-button:hover { text-decoration: underline; }
.commerce-bag-price { font-size: .9375rem; font-variant-numeric: tabular-nums; }

.commerce-page .commerce-form { display: grid; gap: 1rem; padding: clamp(1.125rem, 3vw, 1.75rem); }
.commerce-form-heading { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.commerce-form-heading .commerce-text-button { flex: 0 0 auto; }
.commerce-checkout-contact .link { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.commerce-checkout-email { overflow-wrap: anywhere; color: var(--shop-muted); }
.commerce-confirmation-details h2 { overflow-wrap: anywhere; }
.commerce-confirmation-details h3 { margin-bottom: .25rem; font-size: 1rem; }
.commerce-confirmation-details address { color: var(--shop-muted); font-style: normal; }
.commerce-confirmation-date { margin-top: .3rem; color: var(--shop-muted); font-size: .875rem; }
.commerce-notice {
  margin: 0;
  padding: .8rem .875rem;
  border-radius: 11px;
  background: #f0f5fb;
  color: #354b63;
  font-size: .875rem;
  line-height: 1.45;
}
.commerce-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.commerce-age-field {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  color: var(--shop-ink);
  font-size: .875rem;
  cursor: pointer;
}
.commerce-age-field input { inline-size: 1.1rem; block-size: 1.1rem; flex: 0 0 auto; accent-color: var(--shop-blue); margin: 0; }
.commerce-form > .button { width: 100%; }

.commerce-account-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  align-items: center;
  gap: clamp(1.25rem, 6vw, 5rem);
  min-height: 430px;
}
.commerce-account-copy .commerce-heading { margin-bottom: 0; }
.commerce-page .commerce-account-panel { padding: clamp(1rem, 4vw, 2rem); background: var(--shop-panel); }
.commerce-auth-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid #dfe6ef;
  border-radius: 13px;
  background: #e9eef4;
  gap: 4px;
}
.commerce-auth-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--shop-muted);
  font-size: .875rem;
  font-weight: 600;
  border-radius: 9px;
  text-align: center;
}
.commerce-auth-nav a[aria-current="page"] {
  color: var(--shop-ink);
  background: #fff;
  box-shadow: 0 1px 3px rgb(27 45 65 / .11);
}
.commerce-page .commerce-auth-form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.commerce-auth-form .button { margin-top: .25rem; }
.commerce-account-layout { display: grid; grid-template-columns: minmax(225px, .4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.commerce-page .commerce-profile,
.commerce-page .commerce-orders { padding: clamp(1rem, 3vw, 1.5rem); }
.commerce-page .commerce-profile { background: var(--shop-panel); }
.commerce-profile h2, .commerce-orders h2 { margin-bottom: .875rem; }
.commerce-profile strong, .commerce-profile p { overflow-wrap: anywhere; }
.commerce-profile p { margin: .25rem 0 1.1rem; color: var(--shop-muted); }
.commerce-profile form .commerce-error { margin-bottom: .5rem; }
.commerce-orders [data-orders] > p:not(.notice) { margin: 0 0 .75rem; color: var(--shop-muted); }
.commerce-orders [data-orders] > .notice { margin-bottom: .75rem; }
.commerce-order-list { display: grid; gap: .625rem; }
.commerce-order-history { border: 1px solid var(--shop-border); border-radius: 12px; }
.commerce-order-history summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .625rem;
  align-items: center;
  padding: .7rem .85rem;
  list-style: none;
  min-height: 58px;
  font-size: .875rem;
  font-weight: 620;
  cursor: pointer;
}
.commerce-order-history summary::-webkit-details-marker { display: none; }
.commerce-order-history summary:after { content: "+"; font-weight: 450; color: var(--shop-blue); font-size: 1.12rem; }
.commerce-order-history[open] summary:after { content: "−"; }
.commerce-order-history summary small { display: block; font-weight: 450; font-size: .75rem; margin-top: .125rem; }
.commerce-order-detail { border-top: 1px solid var(--shop-border); padding: .85rem; font-size: .875rem; }
.commerce-order-detail ul { margin: 0; padding: 0; list-style: none; }
.commerce-order-detail li { display: flex; gap: .75rem; justify-content: space-between; margin-bottom: .5rem; }
.commerce-order-detail li span:last-child { white-space: nowrap; }
.commerce-order-address { padding-top: .5rem; }
.commerce-order-address p { margin: .375rem 0 0; color: var(--shop-muted); }

@media (max-width: 760px) {
  .commerce-order-layout,
  .commerce-account-entry,
  .commerce-account-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .commerce-account-entry { min-height: auto; }
  .commerce-product { padding-block-start: 8px; }
  .commerce-product .commerce-crumb { margin-bottom: .35rem; }
  .commerce-product-grid { grid-template: "intro" auto "gallery" auto "buy" auto / minmax(0, 1fr); gap: .83rem; }
  .commerce-product-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 8px; padding-top: 0; }
  .commerce-product-intro .commerce-edition { grid-column: 1 / -1; }
  .commerce-product-intro .page-title { font-size: clamp(1.65rem, 8.5vw, 2.3rem); }
  .commerce-product-price { margin: 0; padding-bottom: 1px; font-size: 1rem; white-space: nowrap; }
  .commerce-product-price small { font-size: .69rem; }
  .commerce-product-gallery { position: relative; top: auto; height: clamp(175px, 51vw, 260px); padding-bottom: 20px; }
  .commerce-product-gallery img { height: 82%; }
  .commerce-product-detail { padding-top: .2rem; }
  .commerce-choice { padding-inline: .5rem; gap: 6px; }
  #product-options > .commerce-flavors,
  #product-options .commerce-product-actions > .commerce-quantity,
  #product-options .commerce-added { display: none; }
  .commerce-product-actions { grid-template-columns: 1fr; }
  .commerce-add-action {
    position: fixed;
    z-index: 4;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
    gap: 9px;
    align-items: center;
    padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid var(--shop-border);
    background: #fff;
    box-shadow: 0 -4px 16px #1d345710;
  }
  .commerce-mobile-selection {
    display: grid;
    min-width: 0;
    min-height: 44px;
    align-content: center;
    padding: 4px;
    color: var(--shop-ink);
  }
  .commerce-mobile-selection small { color: var(--shop-muted); line-height: 1.25; font-weight: 580; }
  .commerce-mobile-selection span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
  .commerce-add-action .commerce-add-button { display: none; }
  .commerce-add-action .commerce-mobile-pick { display: inline-flex; width: 100%; padding-inline: 9px; white-space: nowrap; }
  .commerce-add-action .commerce-error { grid-column: 1 / -1; }
  body:has(.commerce-product) .footer { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .commerce-story-grid, .commerce-story-gallery { grid-template-columns: minmax(0, 1fr); }
  .commerce-story-image { border-radius: 14px; }
}

@media (max-width: 390px) {
  .commerce-bag-item { grid-template-columns: 3.125rem minmax(0, 1fr) auto; gap: .5rem; }
  .commerce-bag-photo { min-height: 72px; }
  .commerce-bag-photo img { height: 56px; }
  .commerce-field-row { gap: .5rem; }
  .commerce-form-heading { align-items: start; flex-direction: column; gap: 0; }
  .commerce-checkout-contact { align-items: center; flex-direction: row; }
}
