/* ============================================================
   PAGINA: bestellen.html — bestellijst + mandje (alleen afhalen)
   Gebouwd met thema-tokens; hergebruikt .dishlist, .card, .btn.
   ============================================================ */

.bestelgrid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(36px, 5vw, 80px); align-items: start; }

/* ── menu-only (bestellen doe je in de snackbar) ── */
.bestel__menu .panel__sub + .dishlist { margin-top: 10px; }
.bestel__notice { position: sticky; top: 110px; }
.bestel__notice .eyebrow { display: block; margin-bottom: 10px; }
.bestel__notice h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.1; margin-bottom: 12px; }
.bestel__notice > p { color: var(--ink-soft); }
.notice__facts { list-style: none; margin: 20px 0 0; border-top: 1px solid var(--line); }
.notice__facts li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.notice__facts li span:first-child { color: var(--ink-soft); }
.notice__facts li span:last-child { font-weight: 600; text-align: right; }
.notice__soon { font-size: .85rem; font-style: italic; color: var(--gold-text); margin: 16px 0 18px; }
.bestel__notice .btnrow { flex-wrap: wrap; gap: 12px; }

/* bestellijst: dishlist-rijen + aantal-stepper (interactief; alleen actief als online bestellen aanstaat) */
.bestel__menu .panel__sub + .orderlist { margin-top: 10px; }
.bestel__menu .panel__sub:not(:first-child) { margin-top: 36px; }
.bestel__menu .panel__sub { scroll-margin-top: 130px; } /* deeplink vanaf snackbar.html valt niet onder de nav */
.orderitem { display: flex; align-items: center; gap: 14px; }
.orderitem__info { flex: 1; min-width: 0; }
.orderitem .d-price { min-width: 54px; text-align: right; }
.stepper { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 100px; padding: 3px; background: var(--paper); }
.stepper__btn {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); font-size: 19px; line-height: 1;
  cursor: pointer; font-family: var(--sans);
  transition: background .25s var(--e1), color .25s var(--e1);
}
.stepper__btn:hover { background: var(--olive); color: var(--cream); }
.stepper__qty { min-width: 26px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.orderitem.in-cart .stepper { border-color: var(--olive); }
.orderitem.in-cart .stepper__qty { color: var(--olive); }

/* mandje = kort overzicht (regels + totaal + knop): sticky, past altijd binnen het venster.
   Het formulier zit in een apart checkout-scherm, dus dit blok blijft laag. */
.bestel__cart {
  position: sticky; top: 110px;
  max-height: calc(100dvh - 126px);
  display: flex; flex-direction: column;
}
/* een lange bestelling scrollt binnen de lijst; totaal + knop blijven staan */
.cart__lines {
  list-style: none; margin: 4px 0 0;
  overflow-y: auto; min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-soft) transparent;
}
.cart__lines::-webkit-scrollbar { width: 8px; }
.cart__lines::-webkit-scrollbar-thumb { background: var(--gold-soft); border-radius: 100px; border: 2px solid var(--paper); }
.cart__next { width: 100%; margin-top: 16px; }
.cart__next:disabled { opacity: .5; cursor: not-allowed; }
.cart__msg:empty { display: none; }
.cart__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.cart__lines .cart__empty { color: var(--ink-soft); border-bottom: 0; font-style: italic; }
.cart__qtyname { color: var(--ink); }
.cart__qtyname b { color: var(--olive); font-weight: 700; margin-right: 6px; font-variant-numeric: tabular-nums; }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; font-weight: 600; }
.cart__total strong { font-family: var(--serif); font-size: 1.5rem; font-variant-numeric: tabular-nums; }

/* formulier */
.fld { display: block; margin-top: 14px; }
.fld span { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 6px; }
.fld span i { font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 400; }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 2px;
  background: #fff; color: var(--ink);
  font-family: var(--sans); font-size: 16px; /* 16px voorkomt iOS-zoom */
}
.fld input:focus-visible, .fld select:focus-visible, .fld textarea:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 1px; }
.fld input.is-invalid, .fld textarea.is-invalid { border-color: var(--rust); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* honeypot */
.cart__submit { width: 100%; margin-top: 20px; }
.cart__submit[disabled] { opacity: .6; pointer-events: none; }
.cart__fine { margin-top: 12px; font-size: .82rem; font-style: italic; color: var(--ink-soft); }
.cart__status { margin-top: 10px; font-size: .95rem; font-weight: 600; }
.cart__status.is-ok { color: var(--olive); }
.cart__status.is-err { color: var(--rust); }

/* melding buiten het bestelvenster (vr t/m ma 15:30–19:30) */
.cart__closed {
  margin: 14px 0 4px; padding: 13px 15px;
  background: rgba(148, 73, 31, .09); border: 1px solid rgba(148, 73, 31, .3); border-radius: 2px;
  font-size: .92rem; line-height: 1.55; color: var(--ink);
}
.cart__closed a { color: var(--rust); font-weight: 700; }

/* geslaagde bestelling */
.cart__done { text-align: center; padding: 12px 0; }
.cart__done h3 { margin-bottom: 12px; }
.cart__done p { color: var(--ink-soft); }
.cart__done .bigline { color: var(--gold-text); margin: 14px auto 4px; }

/* vaste totaalbalk: verschijnt op ELK formaat zodra er items zijn maar de
   bestelknop niet in beeld is (JS meet dat met een IntersectionObserver) —
   zo is de knop altijd óf zichtbaar, óf één tik verwijderd */
.mobilebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--ink); color: var(--cream);
  padding: 12px clamp(16px, 4vw, 24px);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .4s var(--e1);
}
.mobilebar.show { transform: none; }
.mobilebar strong { font-family: var(--serif); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.mobilebar .btn { padding: 12px 20px; }

/* ============================================================
   Stap 2: checkout-scherm (apart, past altijd volledig)
   ============================================================ */
.checkout {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: start center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(24, 21, 16, .6);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transition: opacity .3s var(--e1);
}
.checkout.is-open { opacity: 1; }
.checkout[hidden] { display: none; }
.checkout__panel {
  width: min(560px, 100%); margin: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(22px, 3.5vw, 40px);
  transform: translateY(12px); transition: transform .3s var(--e1);
}
.checkout.is-open .checkout__panel { transform: none; }
.checkout__back {
  background: none; border: 0; cursor: pointer; padding: 0;
  font: 600 .92rem var(--sans); color: var(--gold-text);
  margin-bottom: 14px; display: inline-flex; align-items: center; gap: 6px;
}
.checkout__back:hover { text-decoration: underline; }
.checkout__panel .eyebrow { display: block; margin-bottom: 6px; }
.checkout__panel .sec-title { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 16px; }
.checkout__summary {
  background: var(--cream); border-radius: 4px;
  padding: 12px 16px; margin-bottom: 18px;
}
.checkout__recap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; }
.checkout__recap strong { font-family: var(--serif); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.checkout__det { margin-top: 8px; }
.checkout__det summary { cursor: pointer; font-size: .85rem; color: var(--gold-text); font-weight: 600; }
.checkout__det .cart__lines { max-height: 26vh; overflow-y: auto; margin-top: 6px; }
.checkout .fld { margin-top: 11px; }
.checkout .cart__submit { margin-top: 16px; }

/* twee kolommen naam/telefoon op ruimere schermen */
.fldrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 460px){ .fldrow { grid-template-columns: 1fr; gap: 0; } }

body.co-open { overflow: hidden; }

/* mobiel: notice/mandje onder de lijst */
@media (max-width: 900px){
  .bestelgrid { grid-template-columns: 1fr; }
  .bestel__cart, .bestel__notice { position: static; max-height: none; }
  .cart__lines { max-height: none; }
}
