@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #faf8f5;
  --ink: #1f1d1a;
  --ink-2: #4a4540;
  --ink-3: #6b6560;
  --line: #e8e2d9;
  --line-2: #d9d1c5;
  --accent: #a3262c;
  --accent-hover: #8a1f24;
  --accent-soft: #f8ecec;
  --ok: #2f6b3a;
  --ok-soft: #e9f3eb;
  --warn: #8a5a00;
  --warn-soft: #fff4dd;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(31, 29, 26, 0.06), 0 4px 16px rgba(31, 29, 26, 0.05);
  --serif: Georgia, 'Times New Roman', serif;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'tnum' 0;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.boot { padding: 48px 16px; text-align: center; color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- knoppen en velden ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); font-weight: 600; text-decoration: none; color: var(--ink);
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(31, 29, 26, 0.05); }
.btn.block { width: 100%; }
.btn.lg { min-height: 52px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field > small { font-size: 12.5px; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 16px; /* 16px: iPhone zoomt dan niet in */
}
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input[aria-invalid='true'] { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg button {
  text-align: left; padding: 14px 16px; border-radius: var(--radius); border: 1.5px solid var(--line-2); background: var(--surface);
}
.seg button b { display: block; font-size: 15px; }
.seg button span { font-size: 13px; color: var(--ink-3); }
.seg button[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); }

.notice { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.notice.warn { background: var(--warn-soft); border-color: #f1d9a6; color: #5b3d00; }
.notice.ok { background: var(--ok-soft); border-color: #cfe3d3; color: #1f4a28; }
.notice.err { background: var(--accent-soft); border-color: #ecc9ca; color: #6e1a1e; }

/* ---------- kop ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1240px; margin: 0 auto; height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { height: 36px; width: auto; }
.brand img.sligro { height: 32px; }
.brand .x, .login-card .logos .x { color: var(--ink-3); font-size: 15px; line-height: 1; margin: 0 -2px; }
.brand .tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); border-left: 1px solid var(--line-2); padding-left: 12px; white-space: nowrap; }
.top .spacer { flex: 1; }
.top nav { display: flex; gap: 4px; align-items: center; }
.top nav .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
.top nav .btn[aria-current='page'] { background: var(--accent-soft); color: var(--accent); }

/* ---------- inloggen ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 32px 28px; border: 1px solid var(--line); }
.login-card .logos { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
/* Op een smal scherm krimpen beide logo's naar verhouding mee */
.login-card .logos img { min-width: 0; height: auto; }
.login-card .logo { flex: 0 1 160px; width: 160px; }
.login-card .logo-sligro { flex: 0 1 84px; width: 84px; }
.login-card h1 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 6px; line-height: 1.25; }
.login-card p { margin: 0 0 18px; color: var(--ink-2); }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.code-input { letter-spacing: .5em; font-size: 24px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.login-foot { margin-top: 20px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* ---------- opbouw ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 20px 16px 120px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
/* De kolom rechts loopt mee tot onderaan, zodat het mandje erin kan blijven staan (sticky) */
.layout > aside { align-self: stretch; }
.steps { display: flex; gap: 6px; margin: 4px 0 22px; padding: 0; list-style: none; }
.steps li { flex: 1; }
.steps button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 0; background: transparent; text-align: left; color: var(--ink-3); font-weight: 600; font-size: 14px;
  border-top: 3px solid var(--line);
}
.steps button .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink-2); font-size: 12px; flex: none; }
.steps button[aria-current='step'] { color: var(--ink); border-top-color: var(--accent); }
.steps button[aria-current='step'] .n { background: var(--accent); color: #fff; }
.steps button.done { color: var(--ink-2); border-top-color: var(--ink-3); }
.steps button.done .n { background: var(--ink); color: #fff; }
.steps button[disabled] { cursor: default; }

h1.page { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; margin: 0 0 6px; }
.lead { color: var(--ink-2); margin: 0 0 22px; max-width: 62ch; }
h2.sec { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 30px 0 12px; font-weight: 700; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 14px; }
.card h3 { margin: 0 0 14px; font-size: 17px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Sligro-glaswerk ---------- */
.hero-glass { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.glass {
  display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px 10px;
  position: relative; overflow: hidden;
}
.glass.in { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.glass img { width: 112px; height: 112px; }
.glass .badge { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.glass h3 { margin: 2px 0 2px; font-size: 18px; }
.glass .price { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; }
.glass .eq { font-size: 13px; color: var(--ink-3); margin-top: 6px; min-height: 1.5em; }

/* ---------- artikelen ---------- */
.toolbar { position: sticky; top: var(--header-h); z-index: 10; background: var(--bg); padding: 10px 0 12px; margin: 0 0 6px; }
.search { position: relative; margin-bottom: 10px; }
.search input { padding-left: 42px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.cats::-webkit-scrollbar { display: none; }

.group-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 10px; }
.group-title h3 { margin: 0; font-size: 18px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.product {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .15s, box-shadow .15s;
}
.product.in { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.product .ph { aspect-ratio: 1 / 1; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); position: relative; }
.product .ph img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.product .ph .qtybadge { position: absolute; top: 8px; right: 8px; background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: 13px; font-weight: 700; }
.product .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product .name { font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 2.6em; }
.product .price { font-size: 14px; }
.product .price small { color: var(--ink-3); font-size: 12px; }
.product .variants { display: flex; flex-wrap: wrap; gap: 6px; }
.product .variants .chip { min-height: 32px; padding: 0 10px; font-size: 12.5px; }
.product .act { margin-top: auto; padding-top: 4px; }
.empty { padding: 40px 16px; text-align: center; color: var(--ink-3); }

.stepper { display: inline-grid; grid-template-columns: 40px minmax(48px, 1fr) 40px; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); height: 42px; width: 100%; max-width: 180px; }
.stepper button { height: 40px; border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--ink-2); border-radius: 999px; }
.stepper button:hover { background: rgba(31, 29, 26, .05); }
.stepper input { width: 100%; height: 40px; border: 0; text-align: center; font-weight: 700; font-size: 16px; background: transparent; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.stepper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.add { width: 100%; min-height: 42px; }

/* ---------- winkelmand ---------- */
.cart { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 32px); }
.cart header { padding: 16px 18px 10px; border-bottom: 1px solid var(--line); }
.cart header h2 { margin: 0; font-size: 16px; }
.cart header p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.cart .lines { overflow-y: auto; padding: 4px 18px; flex: 1; min-height: 60px; }
.cart .line { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart .line:last-child { border-bottom: 0; }
.cart .line .nm { font-weight: 500; }
.cart .line .sub { grid-column: 1; font-size: 12.5px; color: var(--ink-3); }
.cart .line .amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart .line .rm { grid-column: 2; justify-self: end; font-size: 12.5px; }
.cart .empty { padding: 24px 0; font-size: 14px; }
.cart footer { border-top: 1px solid var(--line); padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14px; }
.totals .k { color: var(--ink-2); }
.totals .v { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.totals .grand { font-weight: 700; font-size: 16px; color: var(--ink); padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.totals .hint { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-3); }

/* onderbalk op de telefoon */
.bar { display: none; }

/* ---------- controleren ---------- */
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0; font-size: 14.5px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; }
.review-lines { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.review-lines td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.review-lines td.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; }
.review-lines tr.cost td { color: var(--ink-2); }
.edit-link { float: right; font-size: 13px; }

.nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }

/* ---------- klaar / mijn bestellingen ---------- */
.done-card { max-width: 640px; margin: 24px auto; text-align: center; }
.done-card .check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.done-card h1 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 8px; }
.done-card .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

.orders { display: flex; flex-direction: column; gap: 12px; }
.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.order .head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.order .head b { font-size: 16px; }
.order .meta { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.order details { margin-top: 10px; font-size: 14px; }
.order details summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.order ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.order .row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- locatie kiezen ---------- */
.picker { position: relative; }
.picker-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 15; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; padding: 4px;
}
.picker-list button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 6px; }
.picker-list button:hover, .picker-list button.hl { background: var(--accent-soft); }
.picker-list button b { display: block; font-size: 14.5px; font-weight: 600; }
.picker-list button span { font-size: 13px; color: var(--ink-3); }
.chosen { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); }
.chosen b { display: block; }
.chosen span { font-size: 13.5px; color: var(--ink-2); }

.time-row { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: start; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.err { background: var(--accent); }

/* ---------- kleinere schermen ---------- */
@media (max-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > aside { display: none; }
  .bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 12px; align-items: center;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(31, 29, 26, .06);
  }
  .bar .sum { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); line-height: 1.3; }
  .bar .sum b { display: block; color: var(--ink); font-size: 16px; }
  .bar .btn { flex: none; }
}
@media (max-width: 700px) {
  :root { --header-h: 56px; }
  .brand { gap: 9px; }
  .brand img { height: 30px; }
  .brand img.sligro { height: 26px; }
  .brand .tag { display: none; }
  .top nav .label { display: none; }
  h1.page { font-size: 25px; }
  .hero-glass { grid-template-columns: 1fr; }
  .glass { grid-template-columns: 88px 1fr; }
  .glass img { width: 88px; height: 88px; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product .name { font-size: 13.5px; }
  .grid2, .grid3, .seg, .time-row { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .steps button { padding: 8px 4px; font-size: 12.5px; gap: 6px; }
  .steps button .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card { padding: 16px; }
  .stepper { max-width: none; }
}
