html {
    color-scheme: light;
}

:root {
    --chiro-blauw: #06235b;
    --chiro-rood: #8f051f;
    --chiro-geel: #ffd400;
    --licht: #f6f7fb;
    --wit: #ffffff;
    --tekst: #111827;
    --grijs: #6b7280;
    --rand: #e5e7eb;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--licht);
    color: var(--tekst);
}

.page {
    max-width: 520px;
    margin: 0 auto;
    height: 100vh;
    background: var(--wit);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.topbar,
.tafelblok,
.tabs {
    flex-shrink: 0;
}

.topbar {
    background: var(--chiro-blauw);
    color: white;
    padding: 18px 16px 16px;
    border-bottom: 5px solid var(--chiro-rood);
}

.topbar h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
}

.topbar p {
    margin: 8px 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.tafelblok {
    padding: 12px 16px;
    background: #fff7d1;
    border-bottom: 1px solid #f1d56b;
}

.tafel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

label {
    font-size: 13px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

input,
select {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--rand);
    border-radius: 10px;
    font-size: 16px;
    background: white;
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--rand);
}

.tab-btn {
    border: 2px solid var(--chiro-blauw);
    background: white;
    color: var(--chiro-blauw);
    padding: 9px 15px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--chiro-blauw);
    color: white;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px var(--bottom-safe, 70px);
}

.categorie-title {
    margin: 0 0 12px;
    font-size: 22px;
    color: var(--chiro-blauw);
}

.producten-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.product-card {
    border: 1px solid var(--rand);
    border-radius: 14px;
    padding: 12px;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.product-name {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--chiro-rood);
}

.product-type {
    font-size: 12px;
    color: var(--grijs);
}

.product-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.cart-floating-btn {
    background: var(--chiro-geel);
    color: var(--chiro-blauw);
    border: 3px solid var(--chiro-blauw);
    border-radius: 999px;
    padding: 13px 18px;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.add-btn {
    width: 100%;
    border: 2px solid var(--chiro-blauw);
    background: white;
    color: var(--tekst);
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 4px;
}

.bottom-actions {
    position: sticky;
    bottom: var(--bottom-safe, 70px);
    margin-top: 20px;
    padding: 14px 0 18px;
    background: linear-gradient(to top, white 70%, rgba(255,255,255,0));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 30;
}

.logo-watermark {
    width: 130px;
    opacity: 0.85;
    pointer-events: none;
}

/* Winkelmand fullscreen */
.cart-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: white;
    z-index: 40;
    align-items: center;
    justify-content: center;
}

.cart-modal-box {
    width: 100%;
    max-width: 520px;
    height: 100dvh;
    background: white;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rand);
}

.cart-modal-header h2 {
    margin: 0;
    color: var(--chiro-blauw);
    font-size: 26px;
}

.cart-modal-header button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--chiro-rood);
    color: white;
    font-size: 26px;
    font-weight: 900;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    border-bottom: 1px solid var(--rand);
}

.cart-footer {
    flex-shrink: 0;
    background: white;
    padding-top: 10px;
}

.cart-empty {
    color: var(--grijs);
    font-size: 14px;
    padding: 8px 0;
}

.cart-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
}

.cart-name {
    font-weight: 700;
    font-size: 15px;
}

.cart-sub {
    color: var(--grijs);
    font-size: 12px;
    margin-top: 2px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-btn,
.trash-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.qty-btn {
    background: var(--chiro-blauw);
    color: white;
}

.trash-btn {
    background: #fee2e2;
    color: var(--chiro-rood);
}

.qty {
    min-width: 22px;
    text-align: center;
    font-weight: 800;
}

.totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

.total-box {
    background: var(--licht);
    border-radius: 12px;
    padding: 10px;
}

.total-label {
    font-size: 12px;
    color: var(--grijs);
    margin-bottom: 3px;
}

.total-value {
    font-size: 18px;
    font-weight: 900;
    color: var(--chiro-blauw);
}

.confirm-btn {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--chiro-rood);
    color: white;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
}

.confirm-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Product popup */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal-box {
    width: 100%;
    max-width: 380px;
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
}

.modal-box h3 {
    margin: 0 0 8px;
    color: var(--chiro-blauw);
    font-size: 22px;
}

.modal-product {
    font-weight: 900;
    margin-bottom: 14px;
}

.modal-qty {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
}

.modal-qty button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: var(--chiro-rood);
    color: white;
    font-size: 24px;
    font-weight: 900;
}

.modal-qty span {
    font-size: 28px;
    font-weight: 900;
    min-width: 36px;
    text-align: center;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
}

.modal-btn {
    border: none;
    border-radius: 12px;
    padding: 13px;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
}

.modal-ok {
    background: var(--chiro-blauw);
    color: white;
}

.modal-cancel {
    background: #e5e7eb;
    color: var(--tekst);
}

.notice {
    display: none;
    margin: 10px 0;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
}

.notice.error {
    display: block;
    background: #fee2e2;
    color: #7f1d1d;
}

@media (max-width: 380px) {
    .topbar h1 {
        font-size: 20px;
    }

    .topbar p {
        font-size: 13px;
    }

    .producten-grid {
        grid-template-columns: 1fr;
    }

    .logo-watermark {
        width: 110px;
    }
}

.bestelnummer-box {
    margin: 18px 0;
    padding: 18px;
    background: var(--chiro-geel);
    color: var(--chiro-blauw);
    border: 3px solid var(--chiro-blauw);
    border-radius: 16px;
    text-align: center;
    font-size: 34px;
    font-weight: 900;
}

.edit-tafel-btn {
    border: none;
    background: var(--chiro-geel);
    color: var(--chiro-blauw);
    border-radius: 8px;
    padding: 4px 7px;
    font-weight: 900;
    margin-left: 6px;
    cursor: pointer;
}

.bonnen-info {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #fff7d1;
    color: var(--chiro-blauw);
    font-weight: 700;
}

.bestelnummer-label {
    text-align: center;
    font-weight: 800;
    color: var(--chiro-blauw);
    margin-top: 10px;
    margin-bottom: 6px;
}

.bestelnummer-box div {
    background: var(--chiro-geel);
    border: 3px solid var(--chiro-blauw);
    border-radius: 16px;
    padding: 12px;
    font-size: 26px;
    font-weight: 900;
    margin-top: 6px;
}

.info-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--chiro-blauw);
    margin-top: 12px;
    margin-bottom: 5px;
}

.info-box {
    background: var(--chiro-geel);
    border: 3px solid var(--chiro-blauw);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    color: var(--chiro-rood);
    margin-top: 4px;
    letter-spacing: 1px;
}

.info-sub {
    text-align: center;
    font-size: 13px;
    color: var(--grijs);
    margin-top: 3px;
}

.succes-lijn {
    height: 2px;
    background: var(--chiro-blauw);
    opacity: 0.25;
    margin: 18px 0;
    border-radius: 999px;
}

.succes-sectie p {
    margin: 8px 0 12px;
}

