/* Ordering. Layout: menu column + a sticky bag column on wide screens; bag becomes a bottom bar and sheet on phones. */

.mode-bar { background: var(--yellow); border-bottom: var(--rule); }
.mode-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.mode-seg { min-width: min(520px, 100%); background: var(--white); }
.kitchen-status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin: 0; }
.kitchen-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.kitchen-status.open .dot { background: var(--leaf); }
.kitchen-status.closed .dot { background: var(--red); }

.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; padding-block: 0 80px; }
.order-main { min-width: 0; }
.order-side { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); padding-top: 28px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1020px) {
  .order-layout { grid-template-columns: 1fr; gap: 0; padding-bottom: 120px; }
  .order-side { display: none; }
  .order-side.builder-on { display: flex; position: static; padding-top: 0; }
  .order-side.builder-on .bag-panel { display: none; }
}

/* ---------- category bar */
.cat-bar { position: sticky; top: calc(68px + env(safe-area-inset-top, 0px)); z-index: 20; background: var(--ground); display: flex; gap: 6px; overflow-x: auto; padding: 14px 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar a { flex: none; text-decoration: none; font-weight: 700; font-size: .92rem; padding: 9px 16px; border: var(--rule); border-radius: 999px; background: var(--white); white-space: nowrap; }
.cat-bar a.on { background: var(--ink); color: var(--cream); }
.cat-bar a.lean-link { border-color: var(--leaf); color: var(--leaf); }
.cat-bar a.lean-link.on { background: var(--leaf); color: var(--on-leaf); }

/* ---------- menu */
.menu-body { display: flex; flex-direction: column; gap: 56px; padding-top: 28px; }
.cat { scroll-margin-top: 150px; display: flex; flex-direction: column; gap: 20px; }
.cat-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; border-bottom: var(--rule); padding-bottom: 14px; flex-wrap: wrap; }
.cat-head .display { font-size: clamp(1.9rem, 4vw, 3rem); }
.cat-head p { color: var(--muted); }
.cat[data-kind="lean"] .cat-head { border-color: var(--leaf); }
.cat[data-kind="lean"] .cat-head .display { color: var(--leaf); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 680px) { .cards { grid-template-columns: 1fr; gap: 12px; } }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; background: var(--white); border: var(--rule); text-align: left; color: var(--ink); width: 100%; transition: transform .15s var(--ease), background-color .15s; min-width: 0; }
.card:hover { transform: translateY(-3px); }
.card .top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.card .price { font: 700 1.15rem/1.2 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card .desc { color: var(--muted); font-size: .95rem; flex: 1; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.card .add { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); border: var(--rule); font: 700 1.4rem/1 var(--sans); }
.card .badge { align-self: flex-start; color: var(--red-text); }
.card.lean .add { background: var(--leaf); color: var(--on-leaf); }
.card.lean .badge { color: var(--leaf); }
.card.soldout { opacity: .55; }
.card.soldout .add { visibility: hidden; }
.card .so { font: 700 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); }
.card .mini-mac { font-size: .82rem; font-weight: 700; color: var(--leaf); font-variant-numeric: tabular-nums; }
.card.build-card { background: var(--leaf); color: var(--on-leaf); grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.card.build-card .display { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.card.build-card .add { width: auto; border-radius: 999px; padding: 0 20px; background: var(--yellow); color: var(--ink); font-size: 1rem; height: 48px; }
.loading-line { padding: 40px 0; }

/* ---------- builder */
.build-head { padding: 32px 0 8px; display: flex; flex-direction: column; gap: 14px; }
.lh-logo { width: 220px; height: auto; }
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 36px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.step-h { display: flex; align-items: center; gap: 12px; }
.step-n { width: 34px; height: 34px; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font: 400 1.1rem/1 var(--display); flex: none; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 780px) { .opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.opt { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: var(--rule); background: var(--white); text-align: left; min-height: 104px; color: var(--ink); min-width: 0; }
.opt b { font-size: 1rem; line-height: 1.25; }
.opt .meta { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: auto; }
.opt[aria-pressed="true"] { background: var(--leaf); color: var(--on-leaf); border-color: var(--ink); }
.opt[aria-pressed="true"] .meta { color: #D8EBCB; }
.opt[aria-pressed="true"] .heat .off { fill: rgba(255,255,255,.3); }
.oz-row { display: grid; grid-template-columns: repeat(4, 1fr); border: var(--rule); border-radius: 16px; overflow: hidden; }
.oz-row button { min-height: 76px; border: 0; border-right: var(--rule); background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink); }
.oz-row button:last-child { border-right: 0; }
.oz-row b { font: 400 1.7rem/1 var(--display); font-variant-numeric: tabular-nums; }
.oz-row span { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.oz-row button[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.house-bowls { margin-top: 48px; display: flex; flex-direction: column; gap: 16px; }

/* the printed lid label */
.lid { background: var(--white); border: var(--rule); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.lid-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lid .dish { font-size: 1.3rem; }
.lid .macros.big b { font-size: 1.6rem; }
.lid-foot { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.lid-price { font-size: 1.6rem; margin: 0; }
@media (max-width: 1020px) {
  .order-side.builder-on { position: sticky; bottom: 0; top: auto; z-index: 30; margin: 0 calc(-1 * var(--gut-r)) 0 calc(-1 * var(--gut)); padding: 0; }
  .order-side.builder-on .lid { border-radius: 0; border-width: 2px 0 0; padding: 12px var(--gut-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gut); gap: 8px; }
  .order-side.builder-on .lid .dish, .order-side.builder-on .lid #lid-sub { display: none; }
  .order-side.builder-on .lid .macros.big b { font-size: 1.15rem; }
}

/* ---------- bag */
.bag-panel { background: var(--white); border: var(--rule); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bag-head { display: flex; justify-content: space-between; align-items: center; }
.bag-head .title { font-size: 1.2rem; }
.bag-lines { display: flex; flex-direction: column; }
.bag-empty { color: var(--muted); padding: 10px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.bline { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.bline:first-child { padding-top: 0; }
.bline .nm { font-weight: 700; line-height: 1.3; }
.bline .sub { font-size: .82rem; color: var(--muted); grid-column: 1; }
.bline .lp { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.bline .ctl { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.bline .qty { grid-template-columns: 34px 36px 34px; }
.bline .qty button { min-height: 34px; font-size: 1.05rem; }
.bline .mm { font-size: .78rem; font-weight: 700; color: var(--leaf); font-variant-numeric: tabular-nums; }
.plan-meter { background: var(--leaf-soft); border: 2px solid var(--leaf); padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: .88rem; }
.plan-meter .bar { height: 8px; background: rgba(47,107,42,.18); position: relative; }
.plan-meter .bar i { position: absolute; inset: 0 auto 0 0; background: var(--leaf); transition: width .4s var(--ease); }
.plan-meter .ticks { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 700; color: var(--leaf); font-variant-numeric: tabular-nums; }
.bag-totals { display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; }
.bag-totals .ln { display: flex; justify-content: space-between; }
.bag-totals .ln.disc { color: var(--leaf); font-weight: 700; }
.bag-totals .ln.tot { font-weight: 700; font-size: 1.15rem; border-top: var(--rule); padding-top: 10px; margin-top: 4px; }
.bag-totals .vat { font-size: .78rem; color: var(--muted); }

.bagbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px var(--gut-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gut); border: 0; border-top: var(--rule); background: var(--red); color: var(--on-red); font-weight: 700; font-size: 1rem; }
@media (max-width: 1020px) { .bagbar:not([hidden]) { display: flex; } }

/* ---------- item sheet */
.is-title { font-size: 1.9rem; }
.is-macros { background: var(--white); border: var(--rule); border-radius: 14px; padding: 14px; }
.opt-group { display: flex; flex-direction: column; gap: 10px; }
.opt-group h3 { font: 700 .78rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.opt-group .req { color: var(--red-text); }

/* ---------- checkout */
.co-sec { display: flex; flex-direction: column; gap: 12px; }
.co-sec > h3 { font: 700 .78rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .two { grid-template-columns: 1fr; } }
.pay-opts .choice small { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.co-sum { display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; }
.co-sum .ln { display: flex; justify-content: space-between; }
.co-sum .tot { font-weight: 700; font-size: 1.2rem; }
.co-sum .disc { color: var(--leaf); font-weight: 700; }
.reward-box { border: 2px solid var(--leaf); background: var(--leaf-soft); padding: 12px; display: flex; gap: 10px; align-items: center; }

/* ---------- macro fit meter on the lid label */
.fit { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.fit-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fit-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: center; font-size: .82rem; }
.fit-bar { height: 8px; border-radius: 4px; background: #EFE7CF; overflow: hidden; }
.fit-bar i { display: block; height: 100%; border-radius: 4px; background: var(--leaf); transition: width 420ms var(--ease); }
.fit-row.low .fit-bar i { background: var(--yellow); }
.fit-row.over .fit-bar i { background: var(--red); }
.fit-row b { font-size: .8rem; min-width: 64px; text-align: right; }
.fit-row.over b { color: var(--red-text); }
.lid-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lid-actions .btn { flex: 1 1 auto; }

/* ---------- saved bowls */
.my-bowls { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; }
.my-bowls:not(.glass) { background: var(--white); border: 1.5px solid var(--line); }
.mb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.mb-card { border: var(--rule); background: var(--cream); display: flex; flex-direction: column; }
.mb-load { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.mb-load:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.mb-load b { font: 400 1.05rem/1.2 var(--display); }
.mb-load .num { color: var(--leaf); font-weight: 700; }
.mb-acts { display: flex; gap: 6px; padding: 0 14px 14px; flex-wrap: wrap; }
@media (max-width: 1020px) {
  .order-side.builder-on .fit { display: none; }
  .order-side.builder-on .lid-actions { display: none; }
}
