/* Bezorgen (/bezorgen), volgpagina en testbetaling.
   Indeling 1-op-1 als het Thuisbezorgd-menu van Snacks & Sips: banner met logo, naam en kosten, actiekaartjes,
   zoekbalk, categorietegels, categoriepagina met productkaarten (foto boven, + rechtsboven), mandje als vaste
   kolom rechts, op mobiel een knop "Bekijk winkelmandje". Uiterlijk in de Shop-stijl (tokens in shop-style.css). */
:root {
  --accent: var(--ss-violet);
  --accent-dark: var(--ss-violet-dark);
  --accent-soft: var(--ss-violet-soft);
  --ink: var(--ss-ink);
  --muted: var(--ss-muted);
  --line: var(--ss-line);
  --bg: var(--ss-canvas);
  --card: var(--ss-surface);
  --ok: var(--ss-ok);
  --radius: var(--ss-radius-card);
  --top-h: 61px;
  --basket-w: 360px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ss-font); letter-spacing: -.02em; -webkit-font-smoothing: antialiased; color: var(--ink); background: var(--bg); font-size: 15px; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.04em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
b, strong { font-weight: 600; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.err { color: var(--ss-err); font-size: 14px; margin: 8px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 500; text-decoration: none; box-shadow: var(--ss-shadow-violet); }
.btn:hover { background: var(--accent-dark); }
.btn:disabled { background: var(--ss-stone); color: #fff; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--ss-shadow-sm); }
.btn.ghost:hover { background: var(--bg); }
.btn.block { width: 100%; }
.btn.big { padding: 15px 22px; font-size: 16px; }

/* Kopbalk */
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-in { height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 10px; }
.back-link { text-decoration: none; font-size: 30px; line-height: 1; padding: 0 6px 4px 0; color: var(--accent); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.04em; white-space: nowrap; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.addr { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 500; white-space: nowrap; box-shadow: var(--ss-shadow-sm); }
.addr:hover { border-color: var(--ink); }
.back { border: 0; background: none; font-weight: 500; padding: 6px 0; color: var(--accent); font-size: 16px; }

/* Postcode */
.start { min-height: calc(100vh - var(--top-h)); display: grid; place-items: center; padding: 24px 16px; }
.start-card { background: #fff; border-radius: var(--radius); padding: 32px 26px; max-width: 460px; width: 100%; text-align: center; box-shadow: var(--ss-shadow-lg); }
.start-card img { object-fit: contain; }
.start-card h2 { font-size: 24px; margin: 6px 0; }
.pc { display: flex; gap: 6px; border: 1px solid rgba(5, 41, 77, .1); border-radius: 999px; padding: 4px; margin-top: 18px; background: #fff; }
.pc:focus-within { border-color: var(--accent); }
.pc input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 8px 16px; font-size: 16px; text-transform: uppercase; background: transparent; }
.pc input::placeholder { text-transform: none; }

/* Pagina: menu links, mandje als vaste kolom rechts */
.page { display: grid; grid-template-columns: minmax(0, 1fr) var(--basket-w); align-items: start; }
.main { min-width: 0; padding: 0 24px 120px; max-width: 980px; width: 100%; margin: 0 auto; }

/* Restaurantkop */
.hero { padding-top: 16px; }
.banner { position: relative; height: 280px; border-radius: var(--radius); background: url(/img/hero.jpg) center / cover; }
.rest-logo { position: absolute; left: 16px; bottom: 16px; width: 84px; height: 84px; border-radius: 18px; background: #fff; object-fit: contain; padding: 6px; box-shadow: var(--ss-shadow-lg); }
.rest-head { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.rest-head h1 { margin: 0; font-size: 30px; line-height: 1.15; flex: 1; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--ss-shadow-sm); font-weight: 600; font-size: 17px; font-family: Georgia, serif; }
.rest-sub { margin: 4px 0 6px; font-size: 14px; }
.rest-meta { margin: 0; font-size: 14px; line-height: 1.6; }
.rest-meta .dot { margin: 0 6px; color: var(--muted); }
.rest-meta .mi { white-space: nowrap; }
.rest-meta .open { color: var(--ok); font-weight: 500; }
.rest-meta .shut { color: var(--ss-err); font-weight: 500; }
.closed { margin: 12px 0 0; background: #fff; box-shadow: var(--ss-shadow-sm); padding: 11px 16px; border-radius: 16px; font-size: 14px; color: var(--ss-err); }
.deals { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 16px -24px 0; padding: 2px 24px 4px; scroll-snap-type: x mandatory; }
.deals::-webkit-scrollbar { display: none; }
.deal { flex: 0 0 auto; max-width: 420px; display: flex; gap: 10px; align-items: center; background: var(--accent-soft); border-radius: 18px; padding: 14px 16px; font-weight: 500; font-size: 14px; scroll-snap-align: start; }
.deal i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.mode { display: flex; background: var(--bg); border-radius: 999px; padding: 4px; }
.mode span { flex: 1; text-align: center; padding: 7px 8px; border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1.25; }
.mode small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.mode .on { background: #fff; box-shadow: var(--ss-shadow-sm); }
.mode .off { color: var(--ss-stone); }
.mode .off small { color: var(--ss-stone); }
.mode-mobile { display: none; }

/* Zoekbalk + categoriepillen (plakt bovenaan) */
.sticky-bar { position: sticky; top: var(--top-h); z-index: 20; background: rgba(242, 244, 245, .96); backdrop-filter: blur(10px); margin: 20px -24px 0; padding: 12px 24px; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid rgba(5, 41, 77, .12); border-radius: 999px; padding: 10px 18px; }
.search:focus-within { border-color: var(--ink); }
.search span { font-size: 20px; line-height: 1; color: var(--accent); transform: scaleX(-1); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.catnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 10px; }
.catnav::-webkit-scrollbar { display: none; }
.catnav button { flex: 0 0 auto; white-space: nowrap; border: 0; background: transparent; padding: 8px 14px; font-size: 14px; font-weight: 500; border-radius: 999px; }
.catnav button:hover { background: #fff; }
.catnav button.active { background: var(--ink); color: #fff; }

/* Startscherm: categorietegels */
.catalog h2 { font-size: 22px; letter-spacing: -.05em; margin: 22px 0 14px; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cat-head span { color: var(--muted); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: #fff; border: 0; border-radius: 20px; padding: 12px 12px 16px; box-shadow: var(--ss-shadow-card); text-align: center; transition: box-shadow .15s; }
.tile:hover { box-shadow: var(--ss-shadow-lg); }
.tile img, .tile .tile-ico { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; }
.tile .tile-ico { display: grid; place-items: center; font-size: 40px; background: var(--accent-soft); }
.tile span { display: block; margin-top: 10px; font-size: 14px; font-weight: 500; line-height: 1.3; }

/* Categoriepagina: productkaarten */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pcard { position: relative; display: flex; flex-direction: column; text-align: left; background: #fff; border: 0; border-radius: 20px; padding: 8px 8px 14px;
  box-shadow: var(--ss-shadow-card); transition: box-shadow .15s; min-width: 0; }
.pcard:hover { box-shadow: var(--ss-shadow-lg); }
.pcard .ph { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 14px; display: block; }
.pcard .ph-empty { width: 100%; aspect-ratio: 1; border-radius: 14px; background: var(--bg); display: grid; place-items: center; font-size: 40px; }
.pcard .nm { margin: 10px 6px 0; font-weight: 600; font-size: 15px; letter-spacing: -.03em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .pr { margin: auto 6px 0; padding-top: 10px; font-size: 15px; }
.pcard .pr s { color: var(--muted); font-size: 13px; margin-right: 4px; }
.pcard .plus { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  color: var(--accent); font-size: 26px; font-weight: 400; line-height: 1; box-shadow: var(--ss-shadow-lg); }
.pcard:hover .plus { background: var(--accent); color: #fff; box-shadow: var(--ss-shadow-violet); }
.pcard .qty-badge { position: absolute; left: 14px; top: 14px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; display: grid; place-items: center; }
.pcard.soldout { opacity: .5; cursor: not-allowed; }
.pcard.soldout .plus { display: none; }
.tag18 { font-size: 11px; font-weight: 500; background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.empty-search { padding: 40px 0; text-align: center; }

/* Mandje (vaste kolom rechts) */
.basket-col { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); background: #fff; border-left: 1px solid var(--line); }
.basket { height: 100%; overflow: auto; padding: 22px 20px; display: flex; flex-direction: column; }
.basket h3 { margin: 0 0 14px; font-size: 22px; text-align: center; letter-spacing: -.05em; }
.basket .mode { margin-bottom: 8px; }
.bempty { text-align: center; padding: 40px 0 26px; border-bottom: 1px solid var(--line); }
.bempty .ico { font-size: 34px; }
.bempty b { display: block; font-size: 20px; letter-spacing: -.04em; margin: 8px 0 4px; }
.bempty span { color: var(--muted); font-size: 14px; }
.blines { margin-top: 8px; }
.bline { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bline .q { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bline .q button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; line-height: 1; padding: 0; font-size: 16px; }
.bline .q button:hover { border-color: var(--ink); }
.bline .q b { min-width: 14px; text-align: center; font-weight: 600; }
.bline .n { flex: 1; min-width: 0; }
.sums { margin-top: 12px; }
.sum { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.sum.total { font-weight: 600; font-size: 16px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.sum.disc { color: var(--ok); }
.minbar { background: var(--bg); border-radius: 16px; padding: 11px 14px; font-size: 13px; margin: 12px 0; }
.minbar .track { height: 6px; background: var(--ss-violet-wash); border-radius: 6px; margin-top: 7px; overflow: hidden; }
.minbar .fill { height: 100%; background: var(--accent); }
.basket-foot { margin-top: auto; padding-top: 14px; }
.mobile-cart { display: none; }

/* Modals */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .4); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; }
.modal { position: relative; background: #fff; border-radius: var(--radius); width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; padding: 26px; box-shadow: var(--ss-shadow-lg); }
.modal.center { text-align: center; }
.modal.center img { object-fit: contain; }
.modal h2 { margin: 8px 0; }
.modal .bigicon { font-size: 46px; }
.modal .actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .actions > * { flex: 1; }
.x { position: absolute; right: 14px; top: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; font-size: 24px; line-height: 1; box-shadow: var(--ss-shadow-lg); }
.modal.item { padding: 0; max-width: 520px; display: flex; flex-direction: column; overflow: hidden; }
.item-scroll { overflow: auto; }
.item-img { width: calc(100% - 16px); margin: 8px; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: 20px; display: block; }
.item-in { padding: 8px 24px 4px; }
.item-in h2 { margin: 0; font-size: 24px; }
.item-in .price { margin: 4px 0 10px; font-size: 16px; }
.item-in .desc { color: var(--muted); font-size: 14px; line-height: 1.5; }
.opts { margin-top: 18px; }
.opts h4 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 6px; font-size: 17px; }
.opts h4 small { font-size: 12px; font-weight: 500; background: var(--bg); padding: 3px 10px; border-radius: 999px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt input { accent-color: var(--accent); width: 20px; height: 20px; }
.opt span { flex: 1; }
.item-foot { background: #fff; display: flex; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 20px; line-height: 1; }
.stepper b { min-width: 18px; text-align: center; }
.item-foot .btn { flex: 1; }
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin: 14px 0 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }

/* Afrekenen */
.checkout { background: var(--bg); min-height: 100vh; }
body.co-open > .top, body.co-open #shop, body.co-open #start, body.co-open .wa-float { display: none !important; }
.co { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--ss-shadow-card); padding: 24px; margin-bottom: 16px; }
.card h2 { margin: 0 0 16px; font-size: 20px; letter-spacing: -.05em; }
.co-side { position: sticky; top: 80px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .full { grid-column: 1 / -1; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
label.f input, label.f textarea { border: 1px solid rgba(5, 41, 77, .12); border-radius: 16px; padding: 12px 14px; font-size: 16px; background: #fff; }
label.f input:focus, label.f textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
label.f input[readonly] { background: var(--bg); }
.when { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 20px; padding: 14px 16px; }
.when b { display: block; }
.pay { display: grid; gap: 8px; }
.pay label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 13px 18px; cursor: pointer; font-weight: 500; }
.pay label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pay input { accent-color: var(--accent); }
.disc { display: flex; gap: 8px; margin: 12px 0; }
.disc input { flex: 1; min-width: 0; border: 1px solid rgba(5, 41, 77, .12); border-radius: 999px; padding: 9px 16px; text-transform: uppercase; font-size: 16px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 14px 0; }
.check input { accent-color: var(--accent); }

/* Volgpagina */
.track-wrap { max-width: 680px; margin: 0 auto; padding: 24px 16px 80px; }
.track-card { background: #fff; border-radius: var(--radius); box-shadow: var(--ss-shadow-card); padding: 26px; margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 500; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; }
.steps li { display: flex; gap: 14px; padding-bottom: 18px; position: relative; color: var(--muted); }
.steps li::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--line); flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 14px; z-index: 1; }
.steps li.done { color: var(--ink); }
.steps li.done .dot { background: var(--ink); }
.steps li.current { color: var(--ink); font-weight: 500; }
.steps li.current .dot { background: var(--accent); box-shadow: 0 0 0 6px var(--ss-violet-wash); }
.line { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.line .n { flex: 1; }
.btn.wa { background: #25d366; box-shadow: none; }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: var(--ss-shadow-lg); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; max-width: calc(100% - 32px); }

/* Smaller scherm: mandje als knop onderaan */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .page { grid-template-columns: 1fr; }
  .basket-col { display: none; }
  .main { padding: 0 16px 120px; }
  .deals { margin: 14px -16px 0; padding: 2px 16px 4px; }
  .sticky-bar { margin: 16px -16px 0; padding: 10px 16px; }
  .mode-mobile { display: flex; margin-top: 14px; }
  .mobile-cart { display: flex; justify-content: space-between; align-items: center; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 15px 22px; font-weight: 500; font-size: 16px; box-shadow: var(--ss-shadow-violet); }
  body.has-cart .wa-float { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .co { grid-template-columns: 1fr; }
  .co-side { position: static; }
  .sheet { align-items: end; padding: 0; }
  .sheet .modal { max-width: none; border-radius: var(--radius) var(--radius) 0 0; max-height: 90vh; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
}
@media (max-width: 680px) {
  .brand span { display: none; }
  .banner { height: 170px; border-radius: 22px; }
  .rest-logo { width: 64px; height: 64px; border-radius: 14px; left: 12px; bottom: 12px; }
  .rest-head h1 { font-size: 24px; }
  .deal { max-width: 82vw; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 8px 8px 12px; border-radius: 18px; }
  .tile img, .tile .tile-ico { aspect-ratio: 1; border-radius: 12px; }
  .tile span { font-size: 13px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard { border-radius: 18px; }
  .pcard .nm { font-size: 14px; }
  .pcard .plus { width: 34px; height: 34px; font-size: 24px; right: 12px; top: 12px; }
  .grid2 { grid-template-columns: 1fr; }
  .overlay:has(.modal.item) { padding: 0; align-items: end; }
  .modal.item { max-width: none; border-radius: var(--radius) var(--radius) 0 0; max-height: 94vh; }
  .item-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}
/* WhatsApp-knop naast de mandjekolom, niet eroverheen */
@media (min-width: 1001px) {
  body:has(#shop:not(.hidden)) .wa-float { right: calc(var(--basket-w) + 18px); }
}
/* Pop-ups: knopbalk altijd zichtbaar, middenstuk scrollt, echte schermhoogte op iOS (dvh), pagina erachter staat stil */
.modal { max-height: 92dvh; }
.modal.item { max-height: 92dvh; }
.item-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.item-foot { flex-shrink: 0; }
.overlay { overscroll-behavior: contain; }
html.lock, html.lock body { overflow: hidden; }
@media (max-width: 680px) {
  .modal.item { max-height: 90dvh; }
  .item-img { aspect-ratio: auto; height: 34dvh; max-height: 260px; }
  .sheet .modal { max-height: 88dvh; }
}
#itemBody { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
@media (max-width: 1000px) { .toast { bottom: auto; top: calc(12px + env(safe-area-inset-top)); } }
