/* ==========================================================================
   VGL Niel kledijshop. Pas de clubkleuren aan in :root.
   ========================================================================== */
:root {
    --brand: #0b4f8a;          /* hoofdkleur (knoppen, accenten) */
    --brand-dark: #083a66;
    --brand-soft: #e6f0fa;
    --accent: #f2b705;         /* tweede clubkleur */
    --text: #1f2933;
    --muted: #5f6b7a;
    --border: #d9e0e8;
    --bg: #f5f7fa;
    --card: #ffffff;
    --ok: #1f8a4c;
    --ok-soft: #e5f5ec;
    --warn: #b54708;
    --error: #b42318;
    --error-soft: #fdecea;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; font-size: 16px; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1:focus { outline: none; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Layout ---------- */
.topbar { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow); }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand-mark { background: var(--accent); color: var(--brand-dark); font-weight: 800; border-radius: 8px; padding: 6px 8px; font-size: 14px; letter-spacing: .5px; }
.brand-text { display: flex; flex-direction: column; font-weight: 600; line-height: 1.1; }
.brand-text small { font-weight: 400; opacity: .8; font-size: 12px; }
.topnav { display: flex; align-items: center; gap: 8px; }
.topnav-link { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; }
.topnav-link.active, .topnav-link:hover { background: rgba(255, 255, 255, .15); }
.cart-button { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-dark); background: #fff; text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.badge { background: var(--accent); color: var(--brand-dark); border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 12px; padding: 0 6px; }
.page { max-width: 1120px; margin: 0 auto; padding: 20px 16px 120px; }
.page-title { font-size: 1.6rem; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer { max-width: 1120px; margin: 0 auto; padding: 24px 16px; color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.footer a { color: var(--muted); }

/* ---------- Stappen ---------- */
.steps { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: s; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; position: relative; padding-bottom: 8px; border-bottom: 3px solid var(--border); }
.step-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--border); color: var(--muted); font-weight: 700; font-size: 13px; }
.step.current { color: var(--text); font-weight: 600; border-color: var(--brand); }
.step.current .step-dot { background: var(--brand); color: #fff; }
.step.done { border-color: var(--ok); }
.step.done .step-dot { background: var(--ok); color: #fff; }
@media (max-width: 640px) {
    .step-label { display: none; }
    .step.current .step-label { display: inline; }
}

/* ---------- Intro ---------- */
.intro { position: relative; background: linear-gradient(135deg, var(--brand-soft), #fff); border: 1px solid var(--border); border-left: 5px solid var(--brand); border-radius: var(--radius); padding: 20px 20px 12px; margin-bottom: 24px; box-shadow: var(--shadow); }
.intro h1 { font-size: 1.5rem; padding-right: 32px; }
.intro-close { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.intro-close:hover { background: rgba(0, 0, 0, .05); }
.intro-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; padding: 0; margin: 12px 0; list-style: none; counter-reset: i; }
.intro-steps li { counter-increment: i; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 12px 12px 48px; position: relative; display: flex; flex-direction: column; font-size: 14px; }
.intro-steps li::before { content: counter(i); position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.intro-steps li span { color: var(--muted); }
.intro-period { margin: 4px 0 8px; }
.link-button { border: 0; background: none; color: var(--brand); cursor: pointer; font-size: .9rem; text-decoration: underline; padding: 0; }

/* ---------- Producten ---------- */
.category-title { margin-top: 24px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.product-image { aspect-ratio: 4 / 3; background: #eef2f6; display: grid; place-items: center; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.product-image-placeholder { color: var(--muted); font-size: 14px; }
.product-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-name { font-size: 1.1rem; margin: 0; }
.product-description { margin: 0; color: var(--muted); font-size: 14px; }
.product-price { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--brand-dark); }
.product-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: auto; }
.product-actions .field:only-child { grid-column: 1 / -1; }
.added-note { margin: 0; color: var(--ok); font-weight: 600; font-size: 14px; }

/* ---------- Formulieren ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.product-actions .field { margin-bottom: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.field-error, .validation-message { color: var(--error); font-size: 13px; margin: 0; }
.hint { color: var(--muted); font-size: 12px; }
.input { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); min-height: 42px; }
.input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.input.invalid, .input.modified.invalid { border-color: var(--error); }
.input-small { min-height: 34px; padding: 5px 8px; font-size: 14px; width: auto; }
.input-narrow { width: 80px; flex: none; }
textarea.input { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; height: 42px; }
.qty-btn { border: 0; background: #f1f5f9; width: 38px; height: 100%; font-size: 18px; cursor: pointer; color: var(--text); }
.qty-btn:hover:not(:disabled) { background: var(--brand-soft); }
.qty-btn:disabled { opacity: .4; cursor: default; }
.qty-input { border: 0; width: 48px; text-align: center; border-radius: 0; min-height: 0; height: 100%; padding: 0; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-small { height: 36px; }
.qty-value { min-width: 36px; text-align: center; font-weight: 600; }
.form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.form-card h2 { font-size: 1.15rem; }
.form-card h3 { font-size: 1rem; margin-top: 16px; }
.form-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Knoppen ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text); text-decoration: none; cursor: pointer; min-height: 42px; }
.btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); color: #fff; }
.btn-danger { color: var(--error); }
.btn-danger:hover:not(:disabled) { border-color: var(--error); color: var(--error); background: var(--error-soft); }
.btn-small { padding: 5px 10px; min-height: 34px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 16px; padding: 6px 8px; border-radius: 6px; }
.icon-btn:hover { background: #f1f5f9; }
.link { font-size: 14px; }

/* ---------- Mandje & overzicht ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cart-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: grid; grid-template-columns: 64px 1fr auto auto auto; gap: 12px; align-items: center; }
.cart-thumb { width: 64px; height: 64px; border-radius: 8px; background: #eef2f6; overflow: hidden; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { display: flex; flex-direction: column; min-width: 0; }
.cart-info .muted { font-size: 14px; }
.cart-subtotal { min-width: 80px; text-align: right; }
@media (max-width: 560px) {
    .cart-item { grid-template-columns: 56px 1fr auto; }
    .cart-thumb { width: 56px; height: 56px; }
    .cart-item .qty { grid-column: 2; justify-self: start; }
    .cart-subtotal { grid-column: 3; grid-row: 2; }
    .cart-item .icon-btn { grid-column: 3; grid-row: 1; justify-self: end; }
}
.summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: sticky; top: 80px; display: flex; flex-direction: column; gap: 10px; }
.summary h2 { font-size: 1.15rem; margin: 0; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; }
.summary-row.small { font-size: 14px; }
.summary-row.total { border-top: 1px solid var(--border); padding-top: 10px; font-size: 1.2rem; font-weight: 700; }
.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(16, 24, 40, .08); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; z-index: 15; }
@media (min-width: 900px) { .cart-bar { left: auto; right: 24px; bottom: 24px; border-radius: 999px; border: 1px solid var(--border); padding: 8px 8px 8px 20px; } }
.empty { text-align: center; padding: 48px 16px; background: var(--card); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- Bevestiging ---------- */
.confirm { max-width: 760px; }
.confirm-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.confirm-head h1 { font-size: 1.5rem; }
.confirm-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.pay-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-bottom: 16px; }
@media (max-width: 600px) { .pay-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.pay-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pay-qr img { image-rendering: pixelated; border: 1px solid var(--border); border-radius: 8px; }
.pay-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.pay-details dt { color: var(--muted); }
.pay-details dd { margin: 0; font-weight: 600; word-break: break-word; }
.ogm { font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; color: var(--brand-dark); }
@media (max-width: 600px) { .pay-details { grid-template-columns: 1fr; } .pay-details dd { margin-bottom: 6px; } }

/* ---------- Meldingen ---------- */
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; border: 1px solid; }
.alert p { margin: 4px 0 0; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-info { background: var(--brand-soft); border-color: #bcd5ee; }
.alert-error { background: var(--error-soft); border-color: #f5c2bd; color: #7a1a12; }
.alert-success { background: var(--ok-soft); border-color: #b5e2c6; color: #14532d; }
.loading { display: flex; align-items: center; gap: 12px; padding: 24px 0; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-family: var(--font); }

/* ---------- Beheer ---------- */
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.admin-nav a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; }
.admin-nav a.active { color: var(--brand); border-color: var(--brand); }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.admin-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.admin-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.admin-card h2 { font-size: 1.1rem; }
.admin-form { max-width: 860px; }
.admin-photo { max-width: 260px; border-radius: 8px; border: 1px solid var(--border); display: block; margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 180px; }
.filters .grow { flex: 1; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; }
.form-card .table-wrap { border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: #f8fafc; font-weight: 600; color: var(--muted); white-space: nowrap; }
.table tbody tr:hover { background: #fafcff; }
.table .num { text-align: right; white-space: nowrap; }
.table-compact td { padding: 6px; }
.thumb-cell img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-green { background: var(--ok-soft); color: var(--ok); }
.pill-grey { background: #eef2f6; color: var(--muted); }
.pill-red { background: var(--error-soft); color: var(--error); margin-left: 4px; }
.check-list { list-style: none; padding: 0; margin: 8px 0; columns: 2 260px; }
.check-list .check { margin: 4px 0; }
.edit-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.edit-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.edit-list li > .input:first-child { flex: 1; min-width: 160px; }
.edit-list .check { margin: 0; }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-word; }

/* ---------- Blazor-foutbalk ---------- */
#blazor-error-ui { background: #fff4e5; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---------- Systeemcontrole ---------- */
.check-results { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.check-result { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-left: 5px solid var(--ok); border-radius: var(--radius); padding: 12px 14px; }
.check-result.fail { border-left-color: var(--error); background: var(--error-soft); }
.check-result p { margin: 2px 0 0; font-size: 14px; word-break: break-word; }
.check-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--ok); font-weight: 700; }
.check-result.fail .check-icon { background: var(--error); }
