/* Drink builder, pickup bag and receipt */
#commerce-sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 480px);
  max-width: 100%;
  max-height: min(92dvh, 840px);
  padding: 0;
  margin: auto auto 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -14px 66px #11281b29;
}
#commerce-sheet::backdrop { background: #10201bd1; backdrop-filter: blur(5px); }
#commerce-sheet[open] { animation: com-sheet-in .24s cubic-bezier(.2,.8,.2,1); }
.com-form { display: flex; flex-direction: column; width: 100%; max-height: min(92dvh, 840px); margin: 0; }
.com-sheet-content { overflow: auto; overscroll-behavior: contain; min-height: 0; }
.com-drink-photo { position: relative; display: grid; place-items: center; isolation: isolate; height: clamp(212px, 30dvh, 264px); overflow: hidden; background: var(--drink-color); }
.com-drink-photo::before, .com-photo-orbit {
  content: ''; position: absolute; width: 205px; height: 205px; border: 1px solid #23392726; border-radius: 50%;
}
.com-drink-photo::before { width: 268px; height: 268px; }
.com-photo-orbit { background: #ffffff24; }
.com-sheet-art { position: absolute; height: 72%; width: auto; aspect-ratio: 220 / 416; inset: 0; margin: auto; z-index: 1; filter: drop-shadow(4px 9px 5px #382e2829); }
.com-sheet-art > img, .com-line-art > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.com-close { position: absolute; z-index: 2; right: 14px; top: 14px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #29362622; border-radius: 50%; color: var(--ink); background: #fffdf5ef; }
.com-options-body { padding: 22px clamp(20px, 5vw, 30px) 24px; }
.com-drink-title, .com-line-name, .com-page-heading, .com-totals > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.com-drink-title { align-items: baseline; }
.com-drink-title h2, .com-page-heading h1, .com-empty h1, .com-receipt h1 { margin: 0; font: 800 clamp(2.3rem, 8vw, 3.35rem)/.95 'Barlow Condensed', sans-serif; letter-spacing: -.025em; }
.com-drink-title h2 { font-size: clamp(1.9rem, 6.1vw, 2.3rem); }
.com-drink-title > strong { font-size: 1.04rem; white-space: nowrap; }
.com-description, .com-line-info p, .com-receipt-intro, .com-empty p { color: var(--muted); line-height: 1.5; }
.com-description { margin: 9px 0 22px; font-size: .94rem; }
.com-options { border: 0; padding: 0; min-width: 0; margin: 0 0 19px; }
.com-options:last-child { margin-bottom: 0; }
.com-options legend { padding: 0; margin-bottom: 8px; font-size: .94rem; font-weight: 700; }
.com-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.com-choice { position: relative; display: flex; min-width: 0; cursor: pointer; }
.com-choice input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.com-choice > span { border: 1px solid var(--line); border-radius: 12px; padding: 9px 13px; min-height: 44px; display: inline-flex; gap: 4px; align-items: center; background: #fffefa; font-size: .84rem; font-weight: 600; }
.com-choice small { font-size: .71rem; font-weight: 500; }
.com-choice input:checked + span { border-color: var(--green); background: #e8f1df; color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.com-choice input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.com-sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.com-size-card > span { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 5px; width: 100%; align-items: center; padding: 12px; }
.com-size-card strong { font-size: .93rem; }
.com-size-card b { font-size: .85rem; grid-column: 2; grid-row: 1; font-variant-numeric: tabular-nums; }
.com-size-card small { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); }
.com-levels { display: grid; gap: 7px; }
.com-levels-sweetness { grid-template-columns: repeat(3, minmax(0,1fr)); }
.com-levels-ice { grid-template-columns: repeat(4, minmax(0,1fr)); }
.com-levels .com-choice > span { justify-content: center; width: 100%; padding-inline: 4px; }
.com-choice-help { margin: -2px 0 9px; color: var(--muted); font-size: .85rem; }
.com-extras { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fffefa; }
.com-extra { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px 13px; min-height: 46px; cursor: pointer; }
.com-extra + .com-extra { border-top: 1px solid var(--line); }
.com-extra input { width: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.com-extra span { font-size: .89rem; font-weight: 600; line-height: 1.3; }
.com-extra small { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.com-extra:has(input:checked) { background: #e8f1df; color: var(--green); }
.com-sheet-actions { display: flex; align-items: center; gap: 12px; flex: none; padding: 13px clamp(16px, 4.5vw, 25px) max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.com-sheet-actions .com-primary { flex: 1; }
.com-primary, .com-outline { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 47px; padding: 12px 18px; border: 1px solid transparent; border-radius: 30px; font: 700 .93rem/1.25 'DM Sans', sans-serif; cursor: pointer; }
.com-primary { background: var(--green); color: #fffefa; }
.com-primary strong { color: var(--lime); font: inherit; font-variant-numeric: tabular-nums; }
.com-primary:hover { background: #173f2f; }
.com-outline { background: transparent; border-color: var(--line); color: var(--green); }
.com-outline:hover { background: #eaf0e3; }
.com-stepper { display: inline-flex; align-items: center; gap: 0; width: max-content; max-width: 100%; border: 1px solid var(--line); border-radius: 28px; background: #fffcf7; }
.com-stepper button { display: grid; place-items: center; flex: none; color: var(--ink); width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.com-stepper button:disabled { opacity: .3; cursor: default; }
.com-stepper output { min-width: 18px; text-align: center; font: 700 .88rem/1 'DM Sans', sans-serif; font-variant-numeric: tabular-nums; }
.com-page, .com-receipt, .com-empty { width: 100%; max-width: 1060px; margin: 0 auto; }
.com-page-heading { margin: 8px 0 24px; align-items: end; }
.com-page-heading p { margin: 0 0 6px; text-transform: uppercase; font-size: .72rem; font-weight: 700; letter-spacing: .11em; color: var(--muted); }
.com-count { border: 1px solid var(--line); border-radius: 20px; padding: 7px 13px; color: var(--green); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.com-bag-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; align-items: start; }
.com-panel { min-width: 0; padding: clamp(16px, 3.5vw, 28px); background: #fffefa; border: 1px solid var(--line); border-radius: 22px; }
.com-panel h2 { margin: 0 0 18px; font: 700 1.32rem/1.15 'DM Sans', sans-serif; letter-spacing: -.04em; }
.com-lines { padding: 0; list-style: none; margin: 0; }
.com-line { display: grid; grid-template-columns: 68px minmax(0,1fr); align-items: center; gap: 13px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.com-line:first-child { padding-top: 0; }
.com-line:last-child { border-bottom: 0; }
.com-line-art { position: relative; display: grid; place-items: center; width: 100%; height: 92px; border-radius: 16px; background: var(--drink-color); overflow: hidden; }
.com-line-art > img { width: 40px; height: 80px; filter: drop-shadow(2px 4px 3px #27291c26); }
.com-line-name { align-items: baseline; gap: 8px; }
.com-line-name h3 { margin: 0; font: 700 .97rem/1.2 'DM Sans', sans-serif; letter-spacing: -.02em; }
.com-line-name strong { flex: none; font-size: .9rem; }
.com-line-info p { font-size: .79rem; margin: 5px 0 8px; }
.com-line .com-stepper button { width: 44px; height: 44px; }
.com-items > .com-outline { width: 100%; }
.com-select { display: grid; gap: 8px; margin: 18px 0; font-size: .88rem; font-weight: 700; }
.com-select > span, .com-locked-reward, .com-point-award, .com-unlocked, .com-earn { display: flex; align-items: center; gap: 8px; }
.com-select small { margin-left: auto; font-size: .77rem; color: var(--muted); }
.com-select select { font: 500 1rem/1.3 'DM Sans', sans-serif; color: var(--ink); background: #fffefa; border: 1px solid var(--line); border-radius: 10px; width: 100%; min-height: 45px; padding: 10px 12px; }
.com-locked-reward { border-block: 1px solid var(--line); padding: 12px 0; font-size: .82rem; color: var(--muted); }
.com-locked-reward button { padding: 8px 0; margin-left: auto; color: var(--green); background: none; border: 0; text-decoration: underline; font: inherit; font-weight: 700; }
.com-totals { margin: 20px 0; }
.com-totals > div { margin: 8px 0; font-size: .92rem; }
.com-totals dt { color: var(--muted); }
.com-totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.com-totals .com-total { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; font-size: 1.1rem; font-weight: 700; }
.com-total dt { color: var(--ink); }
.com-earn { border-radius: 12px; color: var(--green); background: #edf5de; padding: 12px 14px; margin: 0 0 14px; }
.com-earn > span { display: grid; place-items: center; }
.com-earn strong, .com-earn small { display: block; }
.com-earn strong { font-size: .86rem; }
.com-earn small { font-size: .76rem; margin-top: 2px; }
.com-summary > .com-primary { width: 100%; justify-content: space-between; }
.com-disclaimer { font-size: .76rem; line-height: 1.45; text-align: center; color: var(--muted); margin: 12px 0 0; }
.com-empty { min-height: 48vh; padding: 38px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 15px; }
.com-empty p, .com-receipt-intro { margin: 0; }
.com-empty-mark { color: var(--green); border: 1px solid var(--line); border-radius: 30px; width: 88px; height: 88px; display: grid; place-items: center; transform: rotate(-7deg); background: var(--lime); }
.com-empty-mark svg { transform: rotate(7deg); }
.com-receipt { max-width: 580px; text-align: center; }
.com-receipt h1 { font-size: clamp(3.2rem, 12vw, 5.1rem); }
.com-receipt-intro { margin: 10px 0 23px; }
.com-point-award { justify-content: center; padding: 20px 15px; gap: 13px; background: #eaf2d5; border: 1px solid #cbdcb1; border-radius: 18px; text-align: left; color: var(--green); }
.com-award-icon { display: grid; place-items: center; width: 47px; height: 47px; flex: none; border-radius: 50%; background: var(--lime); }
.com-point-award strong { font: 800 2.05rem/1 'Barlow Condensed', sans-serif; }
.com-point-award p { margin: 4px 0 0; font-size: .83rem; }
.com-unlocked { justify-content: center; color: var(--green); font-size: .87rem; font-weight: 700; }
.com-receipt-actions { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 18px 0 23px; }
.com-receipt-detail { text-align: left; }
.com-receipt-detail .com-lines { margin-bottom: 16px; }
.com-receipt-detail .com-totals { margin-bottom: 10px; }
.com-quantity { font-size: .75rem; color: var(--muted); }
.com-bag-flight {
  position: fixed; top: 0; left: 0; z-index: 80; isolation: isolate; pointer-events: none;
  width: 62px; height: 110px; transform-origin: center; will-change: transform, opacity;
}
.com-bag-flight > img {
  position: relative; display: block; width: 100%; height: 100%; object-fit: contain;
  z-index: 1; filter: drop-shadow(0 2px 1px #fff9) drop-shadow(3px 6px 6px #19271a40);
}
.com-bag-flight::before {
  content: ''; position: absolute; inset: 13% -22%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--drink-color), transparent); opacity: .8;
}
.com-bag-flight i { display: block; position: absolute; left: 50%; top: 55%; }
.com-flight-pearl { width: 9px; height: 9px; border: 1px solid #f5edce; border-radius: 50%; background: #453122; }
.com-flight-shine { width: 16px; height: 16px; background: #e9ffae; clip-path: polygon(50% 0%,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0% 50%,38% 38%); }
.com-bag-flight i:nth-of-type(1) { --drift-x: -35px; --drift-y: 38px; }
.com-bag-flight i:nth-of-type(2) { --drift-x: 34px; --drift-y: 29px; }
.com-bag-flight i:nth-of-type(3) { --drift-x: -44px; --drift-y: -36px; }
.com-bag-flight i:nth-of-type(4) { --drift-x: 37px; --drift-y: -26px; width: 11px; height: 11px; }
.com-bag-flight i { animation: com-flight-trail .56s ease-out both; }
@keyframes com-flight-trail {
  0% { transform: scale(.3); opacity: 0; }
  30% { opacity: 1; }
  75% { opacity: .95; }
  100% { transform: translate(var(--drift-x), var(--drift-y)) scale(.65) rotate(30deg); opacity: 0; }
}
@keyframes com-sheet-in { from { opacity: .6; transform: translateY(22px); } }
@media (min-width: 600px) {
  #commerce-sheet { inset: 0; margin: auto; border-radius: 24px; }
  .com-drink-photo { height: clamp(230px, 29dvh, 270px); }
  .com-sheet-actions { padding-bottom: 15px; }
  .com-line { grid-template-columns: 76px minmax(0,1fr); }
  .com-line-art { height: 100px; }
  .com-receipt { padding: 4px 0 20px; }
}
@media (min-width: 900px) {
  .com-bag-grid { grid-template-columns: minmax(0,1.15fr) minmax(320px,.85fr); gap: 22px; }
}
@media (max-width: 359px) {
  .com-line { grid-template-columns: 53px minmax(0,1fr); gap: 8px; }
  .com-line-art { height: 80px; }
  .com-sheet-actions { gap: 7px; }
  .com-choice > span { padding: 9px 10px; }
  .com-receipt-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #commerce-sheet[open] { animation: none; }
}
