:root {
  --brand: #d23d5d;
  --brand-dark: #b52f4d;
  --brand-tint: #fdf2f5;
  --brand-line: #f0c4cf;
  --ink: #1d1d1f;
  --ink-2: #4a4a4f;
  --muted: #707076;
  --line: #dcdce0;
  --line-strong: #c4c4ca;
  --bg: #ffffff;
  --side: #fcf6f5;
  --side-line: #efe3e1;
  --error: #d12d2d;
  --error-bg: #fff4f4;
  --ok: #16794c;
  --radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; }

/* ---------- Layout ---------- */
.page { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.main-inner { max-width: 580px; margin: 0 auto; padding: 20px 16px 32px; }
.side { background: var(--side); border-top: 1px solid var(--side-line); }
.side-inner { padding: 20px 16px 24px; max-width: 580px; margin: 0 auto; }

@media (min-width: 1000px) {
  .page { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
  .main { display: flex; justify-content: flex-end; border-right: 1px solid var(--side-line); }
  .main-inner { width: 100%; max-width: 600px; margin: 0; padding: 28px 56px 40px 40px; }
  .side { border-top: 0; }
  .side-inner { position: sticky; top: 0; max-width: 480px; margin: 0; padding: 48px 40px 40px 44px; }
  .summary-toggle, #mobile-summary-slot { display: none !important; }
}

/* ---------- Header ---------- */
.brand { text-align: center; padding-bottom: 6px; }
.brand picture { display: block; }
.logo { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; user-select: none; pointer-events: none; }
.deal {
  display: inline-block;
  margin: 12px auto 4px;
  padding: 11px 26px;
  border-radius: 12px;
  background: #fff;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(176, 34, 47, .10), 0 1px 3px rgba(0, 0, 0, .06);
}

/* ---------- Mobiele samenvatting ---------- */
.summary-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% + 32px);
  margin: 14px -16px 0;
  padding: 15px 16px;
  border: 0;
  border-top: 1px solid var(--side-line);
  border-bottom: 1px solid var(--side-line);
  background: var(--side);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.summary-toggle-label { display: inline-flex; align-items: center; gap: 8px; color: var(--brand-dark); font-weight: 500; }
.summary-toggle .chev { display: block; flex: none; transform-origin: 50% 50%; transition: transform .2s; }
.summary-toggle[aria-expanded='true'] .chev { transform: rotate(180deg); }
.summary-toggle strong { font-size: 17px; font-weight: 600; }
#mobile-summary-slot { margin: 0 -16px; background: var(--side); }
#mobile-summary-slot .side-inner { border-bottom: 1px solid var(--side-line); }
#mobile-summary-slot .side-title { display: none; }

/* ---------- Secties + velden ---------- */
.form { margin-top: 8px; }
.section { margin-top: 26px; }
.section h2, .side-title { margin: 0 0 12px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { position: relative; margin-bottom: 12px; }
.row .field { margin-bottom: 12px; }
.field input, .field select {
  display: block;
  width: 100%;
  height: 52px;
  padding: 20px 13px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: 400 15px/1.2 var(--font);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.field select { padding-right: 36px; cursor: pointer; }
.field input:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(210, 61, 93, .14); }
.field label {
  position: absolute;
  left: 14px;
  top: 16px;
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
  transition: top .15s, font-size .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 28px);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field label.always { top: 7px; font-size: 11.5px; }
.field input::placeholder { color: transparent; }
.select-chev { position: absolute; right: 14px; top: 20px; color: var(--muted); pointer-events: none; }
.field.invalid input, .field.invalid select { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field-error { display: none; margin: 5px 2px 0; color: var(--error); font-size: 12.5px; }
.field.invalid .field-error:not(:empty) { display: block; }

/* telefoon met landcode */
.field-phone input { padding-right: 112px; }
.dial {
  position: absolute; right: 8px; top: 8px; bottom: 8px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 8px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 14px;
}
.dial:hover { background: #f4f4f6; }
.dial-flag { font-size: 18px; line-height: 1; }
.dial select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }

/* ---------- Verzendopties ---------- */
.rates { display: grid; gap: 8px; }
.rate {
  display: flex; align-items: center; gap: 12px;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate .dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.rate .name { flex: 1; font-size: 14.5px; }
.rate .price { font-weight: 600; font-size: 14px; }
.rate.selected { border-color: var(--brand); background: var(--brand-tint); }
.rate.selected .dot { border-color: var(--brand); }
.rate.selected .dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.rate:focus-within { box-shadow: 0 0 0 3px rgba(210, 61, 93, .14); }
.rates-loading { height: 54px; border-radius: var(--radius); background: linear-gradient(90deg, #f3f3f5, #fafafa, #f3f3f5); background-size: 200% 100%; animation: shimmer 1.2s infinite; }

/* ---------- Checkbox ---------- */
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; user-select: none; }
.check input { position: absolute; opacity: 0; }
.check-box { flex: none; width: 19px; height: 19px; border: 1.5px solid var(--line-strong); border-radius: 5px; display: grid; place-items: center; background: #fff; transition: background .15s, border-color .15s; }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check-box::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 3px rgba(210, 61, 93, .2); }
.billing { margin-top: 14px; }

/* ---------- Betaling ---------- */
.lock { display: flex; align-items: center; gap: 6px; margin: -4px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.payment-box { position: relative; min-height: 120px; }
.payment-status {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 120px; padding: 20px;
  border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); font-size: 14px; text-align: center;
}
.payment-status.error { border-color: #f2c0c0; background: var(--error-bg); color: var(--error); }
.payment-status.error .spinner { display: none; }
.whop-payment:empty { display: none; }
.whop-branding { margin-top: 12px; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 22px;
  border: 0; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; text-decoration: none;
  cursor: pointer; transition: background .15s, opacity .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--brand); color: #fff; height: 52px; padding: 0 20px; }
.btn-secondary:hover { background: var(--brand-dark); }
.btn-secondary:disabled { background: #e7d3d8; color: #fff; cursor: default; }
.btn-pay { width: 100%; margin-top: 22px; height: 58px; font-size: 16.5px; }
.btn-pay:disabled { opacity: .55; cursor: not-allowed; }
.btn .spinner { display: none; }
.btn.busy .spinner { display: inline-block; }
.btn.busy .btn-label { opacity: .85; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(0, 0, 0, .12); border-top-color: var(--brand);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.spinner-light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Meldingen ---------- */
.notice { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }
.notice-error { background: var(--error-bg); color: var(--error); border: 1px solid #f6caca; }

/* ---------- Samenvatting ---------- */
.items { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 14px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--side-line); }
.item:last-child { border-bottom: 0; padding-bottom: 0; }
.item-qty { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: #efe5e3; color: var(--ink-2); font-size: 12px; font-weight: 600; vertical-align: 1px; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; background: #fff; border: 1px solid var(--side-line); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; }
.qty {
  position: absolute; top: -8px; right: -8px;
  min-width: 21px; height: 21px; padding: 0 6px;
  border-radius: 11px; background: rgba(40, 40, 45, .86); color: #fff;
  font-size: 11.5px; font-weight: 600; display: grid; place-items: center;
}
.item-title { font-weight: 500; font-size: 14px; line-height: 1.35; text-transform: uppercase; letter-spacing: .01em; }
.item-variant { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.item-error { color: var(--error); font-size: 12.5px; margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.item-error button { border: 0; background: none; color: var(--ink-2); text-decoration: underline; cursor: pointer; padding: 0; font-size: 12.5px; }
.item-price { text-align: right; font-size: 14px; white-space: nowrap; }
.item-price s { display: block; color: var(--muted); font-size: 12.5px; }
.item.unavailable .item-title { opacity: .55; }

.promo-hint {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 0 0 12px; padding: 11px 14px;
  border: 1.5px dashed var(--brand); border-radius: var(--radius);
  background: #fff; color: var(--brand-dark);
  font-size: 13.5px; font-weight: 700; letter-spacing: .03em; cursor: pointer;
  transition: background .15s, transform .05s;
}
.promo-hint:hover { background: var(--brand-tint); }
.promo-hint:active { transform: translateY(1px); }
.ship-today { display: flex; align-items: center; gap: 8px; margin: 10px 2px 0; color: var(--ok); font-size: 13.5px; font-weight: 600; }
.promo { display: flex; gap: 10px; }
.promo .field { flex: 1; margin: 0; }
.promo-msg { margin: 8px 2px 0; font-size: 13px; color: var(--error); }
.promo-msg.ok { color: var(--ok); }
.promo-tag {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 5px 6px 5px 10px;
  border-radius: 8px; background: #efe5e3; color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
}
.promo-tag button { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted); padding: 0 3px; }

.reward-next { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-tint); border: 1px solid var(--brand-line); color: var(--brand-dark); font-size: 13px; font-weight: 500; }
.totals { margin: 20px 0 0; display: grid; gap: 9px; }
.t-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.t-row dt { margin: 0; color: var(--ink-2); }
.t-row dd { margin: 0; text-align: right; }
.t-row .sub { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #efe5e3; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.t-total { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--side-line); align-items: baseline; }
.t-total dt { color: var(--ink); font-size: 18px; font-weight: 600; }
.t-total dd { display: flex; align-items: baseline; gap: 8px; }
.t-total small { color: var(--muted); font-size: 12px; font-weight: 500; }
.t-total strong { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }

/* ---------- Footer ---------- */
.footer { margin-top: 32px; padding-top: 18px; border-top: 1px solid #ececef; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.policies { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.policies a { color: var(--brand-dark); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }
.lang { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.lang select { border: 0; background: none; color: var(--ink-2); font: inherit; cursor: pointer; padding: 4px 2px; }

/* ---------- Lege winkelwagen / laden ---------- */
.empty { text-align: center; padding: 40px 0; }
.empty p { font-size: 16px; margin: 0 0 16px; }
body.is-loading .form, body.is-loading .side, body.is-loading .summary-toggle, body.is-loading .footer, body.is-loading .deal { visibility: hidden; }

@media (max-width: 420px) {
  .row { gap: 10px; }
  .deal { padding: 10px 18px; font-size: 12.5px; }
  .section h2 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition: none !important; }
}
