@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../fonts/jost-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --blue: #00338d;
  --blue-deep: #00256a;
  --gold: #ebb700;
  --ivory: #fbf7ec;
  --ivory-deep: #f1e9d3;
  --ink: #1b2440;
  --muted: #5a6277;
  --line: #e2d9bf;
  --red-wine: #7a1f33;
  --white-wine: #d9c36a;
  --error: #b3261e;
  --serif: "Bodoni Moda", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 18px/1.55 var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 0 auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--blue); }
a { color: var(--blue); }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 1180px; }
/* Header and footer line up with the content column of each page type. */
.page-narrow .masthead-inner, .page-narrow .site-footer .container { max-width: 820px; }
.page-wide .masthead-inner, .page-wide .site-footer .container { max-width: 1180px; }

/* Masthead */
.masthead { background: var(--blue); color: #fff; border-bottom: 4px solid var(--gold); }
.masthead-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
@media (min-width: 760px) { .masthead-inner { flex-direction: row; align-items: center; gap: 32px; } }
.brand { flex: none; }
.brand { display: inline-block; background: #fff; border-radius: 10px; padding: 8px 14px; line-height: 0; }
.brand img { width: auto; height: 76px; }
@media (min-width: 560px) { .brand img { height: 110px; } }
.hero { min-width: 0; }
.hero h1 { color: #fff; font-size: clamp(2rem, 6vw, 3.1rem); margin: 0 0 6px; }
.hero p { margin: 0; font-size: 1.15rem; line-height: 1.4; }
.hero .deadline { color: var(--gold); font-weight: 500; }

/* Sections */
main { padding-bottom: 48px; }
.section { margin-top: 36px; }
.section > h2 { font-size: 1.75rem; margin: 0 0 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 20px; }
.cause-strip { background: var(--ivory-deep); padding: 16px 0; line-height: 1.45; }
.cause-strip h2 { font-size: 1.5rem; margin: 0 0 6px; }
.cause-strip p { margin: 0; }
.delivery-note { font-weight: 500; font-size: 1.1rem; color: var(--blue); margin: 18px 0 0; }

/* Wines */
#wijnen { margin-top: 22px; }
#wijnen > h2 { font-size: 1.9rem; margin-bottom: 0; }
.wine-columns { display: grid; gap: 0 24px; }
@media (min-width: 860px) { .wine-columns { grid-template-columns: 1fr 1fr; } }
.color-heading { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; margin: 16px 0 10px; }
.color-heading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; }
.color-rood::before { background: var(--red-wine); }
.color-wit::before { background: var(--white-wine); }
.wine-list { display: grid; gap: 12px; }
.wine {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
}
.wine { position: relative; }
.wine-badge { position: absolute; top: -9px; right: 10px; z-index: 1; padding: 3px 12px; border-radius: 999px; background: var(--gold); color: var(--blue-deep); font-size: .85rem; font-weight: 600; transform: rotate(2deg); box-shadow: 0 1px 3px rgba(0, 37, 106, .3); }
.wine.is-selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.wine-image { display: block; width: 78px; height: 225px; object-fit: contain; align-self: center; }
.wine-zoom { display: block; align-self: center; cursor: zoom-in; border-radius: 4px; }
.wine-dialog { position: fixed; border: 0; border-radius: 8px; padding: 18px 28px 12px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); cursor: zoom-out; text-align: center; color: var(--blue); }
.wine-dialog::backdrop { background: rgba(0, 25, 70, .8); }
.wine-dialog img { display: block; max-width: 100%; max-height: min(78dvh, 900px); margin: 0 auto; }
.wine-dialog p { font: 600 1.2rem/1.25 var(--serif); margin: 10px 0 0; }
.wine-dialog-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--blue); font: 400 2rem/1 var(--sans); cursor: pointer; }
.wine-info { display: flex; flex-direction: column; }
.wine h4 { font: 600 1.35rem/1.2 var(--serif); color: var(--blue); margin: 0; }
.wine-origin { color: var(--muted); font-size: .95rem; margin: 3px 0 8px; }
.wine-taste { margin: 0; }
.wine-pairing { margin: 0; color: var(--muted); }
.wine-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: auto; padding-top: 10px; }
.wine-price { font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.wine-price small { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
.stepper { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.stepper button {
  display: none;
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font: 500 1.6rem/1 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
}
.js .stepper button { display: block; }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper input {
  flex: 0 1 56px;
  min-width: 0;
  width: 56px;
  height: 48px;
  text-align: center;
  font: 600 1.15rem var(--sans);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  appearance: textfield;
  -moz-appearance: textfield;
}
.stepper input[readonly] { cursor: default; caret-color: transparent; }
.stepper input[readonly]:focus { outline: none; }
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Form */
.form-columns { display: grid; gap: 0 24px; align-items: start; }
@media (min-width: 860px) { .form-columns { grid-template-columns: 1fr 1fr; } }
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.field { grid-column: span 6; }
.field label { display: block; font-weight: 500; margin-bottom: 4px; }
.field .hint { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #b9b09a;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 400 1.05rem var(--sans);
}
.field textarea { min-height: 88px; resize: vertical; }
:is(input, textarea, button, a):focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.span-house { grid-column: span 3; }
@media (min-width: 560px) {
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-2 { grid-column: span 2; }
}
.field-help { margin: 4px 0 0; font-size: .95rem; color: var(--muted); }
.field-error { color: var(--error); font-size: .95rem; margin: 4px 0 0; }
.has-error input, .has-error textarea { border-color: var(--error); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-weight: 400; }
.check input { width: 26px; height: 26px; min-height: 0; flex: none; margin: 1px 0 0; accent-color: var(--blue); }
.payment-note { margin: 8px 0 0; color: var(--muted); }
.error-summary { background: #fdecea; border: 1px solid var(--error); border-radius: 6px; padding: 14px 18px; margin-top: 24px; }
.error-summary h2 { color: var(--error); font: 600 1.05rem var(--sans); margin: 0 0 6px; }
.error-summary ul { margin: 0; padding-left: 18px; }
.error-summary a { color: var(--error); }

/* Sticky total */
.order-bar { position: sticky; bottom: 0; background: var(--blue); color: #fff; border-top: 3px solid var(--gold); margin-top: 28px; z-index: 5; }
.order-bar-inner { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding-top: 10px; padding-bottom: 10px; }
.order-bar-total { display: none; }
.js .order-bar-total { display: block; text-align: right; }
.order-bar-total strong { display: block; font-size: 1.3rem; line-height: 1.2; }
.order-bar-total span { font-size: .9rem; }

/* Buttons */
.btn {
  display: inline-block;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font: 500 1.05rem var(--sans);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--blue-deep); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--blue-deep); font-weight: 600; }
.btn-gold:hover { background: #d4a500; }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--ivory-deep); }
.btn-small { min-height: 36px; padding: 5px 12px; font-size: .95rem; }

/* Summary */
.summary { width: 100%; border-collapse: collapse; }
.summary th, .summary td { padding: 7px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.summary th { font-weight: 500; color: var(--muted); font-size: .95rem; }
.summary .num { text-align: right; white-space: nowrap; padding-left: 12px; }
.summary tfoot td { font-weight: 600; border-bottom: 0; font-size: 1.1rem; }
.order-number { font-weight: 600; letter-spacing: .03em; }
.admin-note { color: var(--muted); font-size: .95rem; margin: -4px 0 12px; }
.test-label { flex-basis: 100%; margin: 0; padding: 8px 12px; border-radius: 6px; background: #fbe3e0; color: #8a1f17; font-size: .92rem; }
.test-label strong { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: #8a1f17; color: #fff; text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; }
.notice { background: var(--ivory-deep); border-radius: 6px; padding: 14px 16px; margin: 16px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Text pages */
.prose { max-width: 820px; }
.prose h1 { font-size: 2.1rem; margin: 32px 0 14px; }
.prose h2 { font-size: 1.35rem; margin: 28px 0 8px; }
.prose ul { padding-left: 20px; }
.prose dt { font-weight: 500; margin-top: 10px; }
.prose dd { margin: 0; }

/* Footer */
.site-footer { background: var(--blue-deep); color: #dfe6f5; font-size: .95rem; padding: 26px 0 30px; }
.site-footer a { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; }
.site-footer nav a { padding: 6px 0; }
.site-footer p { margin: 0 0 6px; }
.site-footer .version { margin-top: 14px; font-size: .78rem; color: #8f9cc0; }
.site-footer .moderation { color: var(--gold); font-weight: 500; }

/* Admin */
.admin h1 { font-size: 2rem; margin: 28px 0 14px; }
.admin h2 { font-size: 1.35rem; margin: 30px 0 10px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: var(--ivory-deep); font-weight: 500; white-space: nowrap; }
.table .num { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 600; }
.table ul { margin: 0; padding: 0; list-style: none; }
.table .note { color: var(--muted); max-width: 240px; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
