.order-page { --paper: #fff; --field: #fbf7ee; --gold: #ead8a0; --brown: #2d2520; --muted: #6a6056; --edge: #ddd6ca; color: var(--brown); background: var(--paper); }
.order-page [hidden] { display: none !important; }
.order-page .site-header, .order-page footer { background: var(--gold); }
.order-page footer { padding: 20px 16px; }
.order-page footer img { display: block; width: 120px; height: auto; }
.order-page #main { position: relative; width: min(100%, 1120px); margin: auto; min-height: calc(100svh - 64px); padding: 32px clamp(16px, 4vw, 48px) 48px; }
.order-page .scene { max-width: 580px; margin: 0 auto; }
.order-page .scene.wide, .order-page #catalog, .order-page #start { max-width: none; }
.order-page h1, .order-page h2 { margin: 0; text-align: left; font-family: var(--type); text-transform: none; color: var(--brown); }
.order-page h1 { font-size: clamp(32px, 4vw, 52px); line-height: 1.07; font-weight: 820; letter-spacing: -.044em; margin-bottom: 28px; }
.order-page h2, .search-label { display: block; font-weight: 730; font-size: clamp(21px, 2.3vw, 29px); line-height: 1.2; letter-spacing: -.027em; }
.order-page p { margin: 10px 0 18px; line-height: 1.45; }
.order-page .muted, .order-page small { color: var(--muted); }
.order-page .notice:not(:empty) { border-left: 3px solid #987237; background: var(--field); padding: 13px 16px; margin: 0 auto 18px; max-width: 800px; }
.order-page .notice:empty, .results:empty, #source:empty, #qty-status:empty { display: none; }
.order-page .order-back { min-height: 44px; font-size: 22px; font-weight: 600; }
.order-back span { font-size: 14px; vertical-align: 2px; }
.order-page #start { max-width: 740px; }
.order-page .shopping-bag { position: relative; }
#bag-count { position: absolute; top: 0; right: 0; min-width: 20px; padding: 2px 4px; border-radius: 20px; text-align: center; font: 700 12px/16px var(--type); background: var(--brown); color: white; }
.order-page .method-grid { display: grid; gap: 12px; }
.method-grid button { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; text-align: left; background: white; border: 1px solid var(--edge); border-radius: 14px; padding: 18px 22px; }
.method-grid button:enabled:hover { border-color: var(--muted); }
.method-grid strong, .method-grid small { display: block; }
.method-grid strong { font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.method-grid small { margin-top: 4px; font-size: 15px; line-height: 1.4; }
.method-grid button:disabled { color: var(--muted); background: #fbfaf7; }
.method-grid button:disabled .method-arrow { visibility: hidden; }
.method-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: #f3e9c9; }
.method-icon img { display: block; width: 36px; height: 36px; }
.method-arrow { font-size: 26px; }
.order-page .primary, .order-page .outline { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 12px; padding: 12px 18px; border-radius: 999px; font: 650 16px/1.3 var(--type); text-align: center; letter-spacing: normal; text-transform: none; }
.order-page .primary { background: var(--brown); color: white; }
.order-page .primary:disabled { background: #eae6de; color: #665d52; }
.order-page .outline { width: fit-content; min-height: 44px; border: 1px solid var(--brown); }
.order-page .text-action { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 620; text-decoration: underline; }
.order-page input, .order-page textarea, .order-page select { width: 100%; min-width: 0; min-height: 48px; border: 1px solid #bfb6a9; border-radius: 10px; padding: 10px 12px; color: var(--brown); background: white; font: 450 16px/1.3 var(--type); }
.order-page textarea { resize: vertical; }
.fields, .fields label, .order-page .pair { display: grid; min-width: 0; }
.fields { align-content: start; gap: 18px; }
.fields label { gap: 7px; font-size: 14px; font-weight: 600; }
.order-page .pair { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.search-label { margin-bottom: 15px; }
.results { display: grid; list-style: none; padding: 0; gap: 8px; margin: 16px 0; }
.order-page .choice-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; text-align: left; border-radius: 12px; border: 1px solid var(--edge); padding: 14px; }
#source { font-size: 12px; }
#manual { margin-top: 16px; }
.location-strip { display: flex; justify-content: space-between; align-items: center; gap: 16px; width: 100%; padding: 14px 18px; min-height: 48px; background: var(--field); border: 1px solid var(--edge); border-radius: 11px; margin-bottom: 28px; text-align: left; }
.location-strip span { font-size: 14px; text-decoration: underline; }
.products { display: grid; }
.product { display: flex; align-items: center; gap: 16px; padding: 12px 4px; text-align: left; border-bottom: 1px solid var(--edge); width: 100%; }
.product img { width: 88px; height: 80px; border-radius: 10px; background: var(--field); object-fit: contain; }
.product strong { display: block; font-size: 19px; }
.product small { display: block; margin-top: 5px; font-size: 14px; }
.product .chevron { margin-left: auto; font-size: 24px; color: var(--muted); }
.product:disabled { opacity: .55; }
.desktop-photo { width: 100%; display: block; height: 100%; max-height: 430px; object-fit: cover; border-radius: 16px; }
.menu-grid > *, .checkout-grid > * { min-width: 0; }
#catalog-bag-shortcut { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding: 12px 16px; background: var(--field); border: 1px solid var(--edge); border-radius: 11px; }
#catalog-bag-shortcut strong, #catalog-bag-shortcut small { display: block; }
#catalog-bag-shortcut small { margin-top: 3px; font-size: 14px; }
#catalog-bag-shortcut .primary { width: auto; min-height: 44px; flex-shrink: 0; }
.quantity, .costs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quantity { border-top: 1px solid var(--edge); margin-top: 22px; padding: 18px 0; font-weight: 650; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--edge); border-radius: 28px; overflow: hidden; background: white; }
.stepper button, .stepper output { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
.stepper button { font-size: 22px; }
.stepper button:disabled { color: #aaa39b; }
.order-page .stepper input { width: 46px; min-height: 42px; padding: 2px; border: 0; text-align: center; border-radius: 0; appearance: textfield; }
.stepper input::-webkit-inner-spin-button { appearance: none; }
#back-to-store { display: none; }
.order-page:has(#checkout:not([hidden])) .site-header { min-height: 72px; border-bottom: 1px solid #c5af73; padding-inline: max(28px,calc((100% - 1120px)/2)); }
.order-page:has(#checkout:not([hidden])) :is(#open-menu,.shopping-bag,#order-back,footer) { display: none; }
.order-page:has(#checkout:not([hidden])) #back-to-store { display: inline-flex; align-items: center; justify-self: start; text-transform: none; }
.order-page:has(#checkout:not([hidden])) .wordmark img { width: 186px; }
.order-page #main:has(#checkout:not([hidden])) { width: min(100%,1144px); padding: 36px 20px 64px; }
.checkout-grid, .checkout-left { display: grid; align-items: start; gap: 12px; }
.checkout-panel, .checkout-receipt { min-width: 0; padding: 24px; border: 1px solid var(--edge); border-radius: 18px; background: white; }
.checkout-receipt { background: var(--field); }
#checkout h2, #checkout h3 { margin: 0; font-size: 21px; line-height: 1.24; font-weight: 740; letter-spacing: -.03em; }
.checkout-heading, .receipt-heading, .receipt-brand { display: flex; align-items: center; gap: 12px; }
.checkout-heading, .receipt-heading { justify-content: space-between; flex-wrap: wrap; }
.method-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--edge); border-radius: 24px; background: #f3eee3; }
.method-switch button { min-height: 36px; padding-inline: 11px; border-radius: 20px; font-weight: 550; font-size: 13px; }
.method-switch button[aria-pressed=true] { background: var(--gold); font-weight: 720; }
.method-switch button:disabled { color: #73695d; }
.checkout-name { display: grid; gap: 5px; padding: 18px 0 16px; font-weight: 650; font-size: 14px; line-height: 22px; }
.order-page .checkout-name input { min-height: 44px; border-radius: 8px; border-color: #c7c1b7; }
.order-page .checkout-name input[aria-invalid=true] { border-color: #9a3523; }
.field-error { color: #8f3223; font-weight: 500; }
.checkout-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #e7e3dd; }
.checkout-row svg { flex: none; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.checkout-row > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.checkout-row strong, .checkout-row small, .receipt-brand small { display: block; }
.checkout-row strong { font-size: 16px; font-weight: 610; line-height: 22px; }
.checkout-row small, .receipt-brand small { margin-top: 2px; color: #665e54; font-size: 14px; line-height: 20px; white-space: pre-line; }
.receipt-edit { min-height: 44px; padding: 6px 14px; border: 1px solid var(--edge); border-radius: 999px; background: var(--field); font-size: 14px; font-weight: 650; }
.receipt-edit:hover { border-color: var(--muted); }
.checkout-payment .checkout-row { border: 0; padding: 12px 0 0; }
.receipt-brand { gap: 13px; padding-bottom: 14px; border-bottom: 1px solid #e7e3dd; }
.receipt-brand img { width: 54px; height: 54px; object-fit: contain; }
.receipt-heading { padding-top: 15px; }
#checkout h3 { font-size: 18px; font-weight: 710; line-height: 22px; }
#checkout-quantity-summary { display: block; margin-top: 2px; font-size: 14px; line-height: 20px; }
#checkout-costs { margin: 15px 0; }
.costs-row { margin-top: 8px; align-items: start; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.costs-row:first-child { margin-top: 0; }
.costs-row dd { margin: 0; text-align: right; white-space: nowrap; }
.costs-row.total { margin-top: 15px; padding-top: 14px; border-top: 1px solid #e7e3dd; font-weight: 720; font-size: 18px; }
#checkout .primary { min-height: 50px; font-size: 17px; font-weight: 710; }
#checkout-handoff-help { margin: 15px 0 0; color: #665e54; font-size: 14px; line-height: 20px; }
#sent .text-action { display: flex; width: fit-content; margin: auto; }
#box-sheet { position: fixed; inset: auto 0 0; width: min(100%, 510px); height: auto; max-height: 90dvh; margin: 0 auto; padding: 0 0 env(safe-area-inset-bottom,0px); max-width: 100%; border-radius: 22px 22px 0 0; background: white; }
#box-sheet[open] { display: block; }
#box-sheet button { text-transform: none; letter-spacing: normal; }
#box-photo { display: block; width: 100%; height: clamp(130px,26vh,234px); object-fit: contain; background: var(--field); }
#close-box { position: absolute; top: 10px; right: 12px; width: 44px; border-radius: 50%; background: #fff; font-size: 23px; }
.box-body { display: grid; gap: 12px; padding: 22px 18px; }
.box-body .quantity, .order-page .box-body p { margin: 0; }
.stepper :focus-visible { outline-offset: -4px; }
@media (min-width: 760px) {
  .order-page #main { padding-block: 46px 90px; }
  .menu-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(26px,5vw,80px); }
  .checkout-grid { grid-template-columns: minmax(0,646fr) minmax(0,438fr); gap: 20px; }
  #box-sheet { inset: 0; margin: auto; border-radius: 22px; }
}
@media (max-width: 759px) {
  .desktop-photo { display: none; }
  .order-page #main { padding-top: 16px; }
  #start { padding-top: 12px; }
  .method-grid button { padding: 14px; gap: 12px; }
  .method-grid strong { font-size: 19px; }
  .method-icon { width: 48px; height: 48px; }
  .order-page:has(#checkout:not([hidden])) .site-header { min-height: 60px; padding-inline: 14px; }
  .order-page:has(#checkout:not([hidden])) .wordmark img { width: min(36vw,139px); }
  .order-page #main:has(#checkout:not([hidden])) { padding: 14px 12px 28px; }
  .checkout-grid, .checkout-left { gap: 12px; }
  .checkout-panel, .checkout-receipt { padding: 18px; border-radius: 15px; }
  .checkout-heading { gap: 10px; }
  .checkout-row { gap: 10px; }
  .scene > .primary:last-child, .fields > .primary:last-child { position: sticky; bottom: max(10px,env(safe-area-inset-bottom)); margin-top: 20px; }
}
@media (max-width: 340px) {
  .order-page .pair { grid-template-columns: 1fr; }
  .order-page:has(#checkout:not([hidden])) .wordmark img { width: 96px; }
  .order-page:has(#checkout:not([hidden])) #back-to-store { font-size: 12px; }
  .checkout-heading { align-items: start; flex-direction: column; }
  .order-page .quantity { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: no-preference) {
  .scene[data-arrival="forward"], .scene[data-arrival="back"] {
    --step-offset: 14px;
    animation: order-step-in 210ms cubic-bezier(.2,.75,.25,1);
  }
  .scene[data-arrival="back"] { --step-offset: -14px; }
  @keyframes order-step-in {
    from { opacity: .55; transform: translateX(var(--step-offset)); }
    to { opacity: 1; transform: translateX(0); }
  }

  #box-sheet {
    --box-away: translateY(100%);
    --box-motion-time: 150ms;
    --box-easing: cubic-bezier(.4,0,.8,.2);
    opacity: 0;
    transform: var(--box-away);
    transition: opacity var(--box-motion-time) var(--box-easing), transform var(--box-motion-time) var(--box-easing),
      display var(--box-motion-time) allow-discrete, overlay var(--box-motion-time) allow-discrete;
  }
  #box-sheet[open] {
    --box-motion-time: 240ms;
    --box-easing: cubic-bezier(.2,.8,.25,1);
    opacity: 1;
    transform: none;
  }
  #box-sheet:not([open]), #box-sheet:not([open])::backdrop { pointer-events: none; }
  #box-sheet::backdrop {
    opacity: 0;
    transition: opacity 150ms ease, display 150ms allow-discrete, overlay 150ms allow-discrete;
  }
  #box-sheet[open]::backdrop { opacity: 1; transition-duration: 240ms; }
  @starting-style {
    #box-sheet[open] { opacity: 0; transform: var(--box-away); }
    #box-sheet[open]::backdrop { opacity: 0; }
  }
  @media (min-width: 760px) {
    #box-sheet { --box-away: translateY(18px) scale(.975); }
  }
}
