/* Product page (11 Nov 2026): the menu card written up for the guest, and the Buy it now label.
   Loaded on product pages only. Motion lives behind prefers-reduced-motion and the .mw-prep class
   ybc-pdp.js adds, so without the script the card is simply printed. */

/* ── 1. The menu card ── */
.mcard { position: relative; margin-top: 40px; }
.mcard > h2 { margin-bottom: 16px; }
.mcard { --paper: #fffdf6; }
/* The paper: a slightly warm card with a soft shadow, set a touch off square. */
.mcard__paper { position: relative; isolation: isolate; padding: 4px 22px 14px; }
.mcard__paper::before { content: ''; position: absolute; inset: 0; background: var(--paper); border: 1px solid rgba(84,85,69,.12);
  box-shadow: 0 1px 0 rgba(84,85,69,.06), 0 18px 34px -22px rgba(84,85,69,.55); transform: rotate(-.4deg); z-index: -1; }
.mcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0 12px; border-bottom: 1.5px solid var(--ink); }
.mcard__menu { font: 600 30px/1 var(--head); text-transform: uppercase; letter-spacing: .14em; }
.mcard__for { font: 600 22px/1.1 var(--script); color: var(--orange); }
.mcard .course { border-top-style: dashed; }
.mcard .course:first-of-type { border-top: 0; }
.mcard .course h3 { font: 600 30px/1.05 var(--script); text-transform: none; letter-spacing: 0; color: var(--ink); margin: 2px 0 6px; }
.mcard__sig { text-align: right; padding: 6px 0 4px; margin: 0; }
.mcard__sig span { font: 600 24px/1 var(--script); color: var(--orange); }
.mcard__pen { position: absolute; left: 0; top: 0; width: 34px; height: 34px; pointer-events: none; opacity: 0; z-index: 2; filter: drop-shadow(2px 4px 3px rgba(0,0,0,.18)); }
.mcard__pen svg { width: 100%; height: 100%; display: block; }
.mw-l { display: block; }
.mcard__for .mw-l, .mcard__sig .mw-l { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .mw-prep [data-mw] { visibility: hidden; }
  .mw-prep.mw-all [data-mw] { visibility: visible; }
  .mw-prep .course > div > p, .mw-prep .mcard__paper > .ybc-fine { opacity: 0; transform: translateY(6px); transition: opacity .45s ease, transform .45s ease; }
  .mw-prep .course.mw-done > div > p, .mw-prep.mw-all .course > div > p, .mw-prep.mw-all .mcard__paper > .ybc-fine { opacity: 1; transform: none; }
  .mw-prep .course.mw-done > div > p + p { transition-delay: .12s; }
  .mw-prep .course__n .fd--circle { clip-path: circle(0% at 50% 50%); transition: clip-path .6s cubic-bezier(.6,.1,.3,1); }
  .mw-prep .course.mw-done .course__n .fd--circle, .mw-prep.mw-all .course__n .fd--circle { clip-path: circle(75% at 50% 50%); }
  .mw-prep .mcard__top { border-bottom-color: transparent; background-image: linear-gradient(var(--ink), var(--ink)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1.5px; transition: background-size .8s cubic-bezier(.6,.1,.3,1); }
  .mw-prep.mw-on .mcard__top { background-size: 100% 1.5px; }
}

/* ── 2. Buy it now ── */
.qb-open { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 10px; padding: 0 18px;
  background: #fff; border: 1.5px solid var(--ink); color: var(--ink); cursor: pointer; font: 700 17px/1 var(--text); transition: background .2s, color .2s; }
.qb-open__s { font: 600 21px/1 var(--script); color: var(--orange); }
.qb-open svg { width: 30px; height: 10px; flex: none; transition: transform .25s ease; }
.qb-open:hover { background: var(--ink); color: #fff; }
.qb-open:hover .qb-open__s { color: #fff; }
.qb-open:hover svg { transform: translateX(4px); }

.qb { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; color: var(--ink); overflow: auto; }
.qb[open] { display: grid; place-items: center; }
.qb::backdrop { background: rgba(50,50,40,.5); }
.qb__in { width: min(480px, calc(100vw - 24px)); margin: 24px auto; background: #fff; padding: 22px 22px 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); transform-origin: 50% 50%; }
.qb__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.qb__head h2 { font-size: 24px; line-height: 1; }
.qb__script { font: 600 30px/1 var(--script); color: var(--orange); text-transform: none; letter-spacing: 0; }
.qb__close { background: none; border: 0; font: 600 15px/1 var(--text); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 44px; }

/* The label: kraft card, string hole, ruled lines, written in by hand. */
.qb__label { position: relative; background: #e9dcc0; background-image: repeating-linear-gradient(0deg, transparent 0 37px, rgba(84,85,69,.14) 37px 38px);
  padding: 16px 16px 12px 46px; border-radius: 2px 14px 14px 2px; box-shadow: inset 0 0 0 1px rgba(84,85,69,.1); }
.qb__label::before { content: ''; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #d5c49e; }
.qb__stamp { position: absolute; right: 12px; top: 12px; width: 42px; height: 50px; background: var(--orange); outline: 2px dashed #e9dcc0; outline-offset: -5px; display: grid; place-items: center; transform: rotate(4deg); }
.qb__stamp .fd { width: 24px; height: 24px; color: #fff; }
.qb__row { display: grid; grid-template-columns: 44px 1fr; gap: 6px; align-items: start; margin: 0 0 12px; min-width: 0; }
.qb__k { font: 600 13px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); padding-top: 14px; }
.qb__row:first-of-type .qb__k { padding-top: 10px; }
.qb__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.qb__hand { font: 600 26px/1.1 var(--script); color: var(--ink); padding-right: 46px; }
.qb__chip { position: relative; }
.qb__chip input, .qb__day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qb__chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; background: rgba(255,255,255,.55); border: 1.5px solid rgba(84,85,69,.35); font: 600 14.5px/1 var(--text); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.qb__chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.qb__chip input:focus-visible + span, .qb__day input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.qb__v input { width: 100%; max-width: 220px; height: 44px; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; font: 600 26px/1 var(--script); color: var(--ink); padding: 0 2px; text-transform: uppercase; }
.qb__v input::placeholder { text-transform: none; color: rgba(84,85,69,.5); }
.qb__v input:focus { outline: none; border-bottom-color: var(--orange); }
.qb__reach { font-size: 13.5px; line-height: 1.4; margin-top: 6px; }
.qb__reach b { font-weight: 600; }
.qb__reach[data-state="invalid"] { color: #a4400a; }
.qb__days { display: flex; gap: 8px; flex-wrap: wrap; }
.qb__wait { font-size: 14px; font-style: italic; }
.qb__day span { position: relative; display: grid; justify-items: center; width: 64px; padding: 7px 0 6px; background: rgba(255,255,255,.55); border: 1.5px solid rgba(84,85,69,.25); cursor: pointer; line-height: 1; }
.qb__day b { font: 600 12px/1 var(--head); text-transform: uppercase; letter-spacing: .1em; }
.qb__day strong { font: 700 24px/1.1 var(--head); }
.qb__day small { font-size: 11.5px; color: var(--ink-2); }
.qb__day .fd--circle { position: absolute; inset: -7px -5px; width: auto; height: auto; pointer-events: none; clip-path: circle(0% at 50% 50%); transition: clip-path .45s cubic-bezier(.6,.1,.3,1); }
.qb__day input:checked + span { background: #fff; border-color: transparent; }
.qb__day input:checked + span .fd--circle { clip-path: circle(75% at 50% 50%); }
.qb__day.is-off span { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.qb__day.is-off small { text-decoration: none; }
.qb__post[hidden] { display: none; }
.qb__post { position: absolute; right: 64px; top: 8px; width: 92px; height: 92px; border-radius: 50%; border: 2px solid var(--orange); color: var(--orange); display: grid; place-content: center; text-align: center; transform: rotate(-14deg); line-height: 1; background: rgba(233,220,192,.6); }
.qb__post span { font: 600 12px/1 var(--head); text-transform: uppercase; letter-spacing: .12em; }
.qb__post b { font: 700 17px/1.2 var(--head); text-transform: uppercase; }
.qb__post i { font: 600 15px/1 var(--script); font-style: normal; }

.qb__sum { margin: 16px 0 12px; }
.qb__sum div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 15px; }
.qb__sum dt { margin: 0; } .qb__sum dd { margin: 0; font-weight: 600; white-space: nowrap; }
.qb__free { color: var(--orange); }
.qb__total { border-top: 1.5px solid var(--ink); margin-top: 4px; padding-top: 10px !important; font: 700 21px/1 var(--head) !important; text-transform: uppercase; }
.qb__total dd { font-variant-numeric: tabular-nums; }
.qb__alert { background: #fbe9dc; color: #7a3408; padding: 10px 12px; font-size: 14.5px; line-height: 1.45; margin: 0 0 12px; }
.qb__pay { gap: 10px; }
.qb__pay svg { width: 20px; height: 20px; }
.qb[data-no-delivery] .qb__pay { opacity: .55; }
.qb__fine { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); margin-top: 10px; }
.qb.is-going .qb__pay { cursor: progress; }

@media (prefers-reduced-motion: no-preference) {
  .qb[open]::backdrop { animation: qb-fade .3s ease; }
  .qb.is-writing .qb__hand { animation: qb-write .7s steps(16, end) .25s both; }
  .qb.is-writing .qb__stamp { animation: qb-stamp .45s cubic-bezier(.2,.8,.3,1.3) .5s both; }
  .qb__post:not([hidden]) { animation: qb-postmark .5s cubic-bezier(.2,.8,.3,1.4) both; }
  .qb.is-going .qb__pay::after { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: qb-spin .8s linear infinite; }
  .qb.is-going .qb__pay svg { display: none; }
}
@keyframes qb-fade { from { opacity: 0; } }
@keyframes qb-write { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% 0 -10% 0); } }
@keyframes qb-stamp { from { transform: scale(1.8) rotate(14deg); opacity: 0; } to { transform: none; opacity: .9; } }
@keyframes qb-postmark { from { transform: scale(2.2) rotate(6deg); opacity: 0; } 70% { opacity: 1; } to { transform: rotate(-14deg); } }
@keyframes qb-spin { to { transform: rotate(1turn); } }

@media (max-width: 700px) {
  .mcard__paper { padding: 2px 14px 10px; }
  .mcard .course h3 { font-size: 27px; }
  .mcard__menu { font-size: 24px; }
  .mcard__for { font-size: 20px; }
  /* A sheet from the bottom of the screen on phones. */
  .qb[open] { place-items: end center; }
  .qb__in { width: 100%; margin: 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 94svh; overflow: auto; }
  .qb__label { padding-left: 40px; }
  .qb__label::before { left: 11px; }
  .qb__day span { width: 60px; }
  .qb__post { right: 54px; width: 80px; height: 80px; }
}
