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;
	margin: 0;
    font-family: Arial, sans-serif;
    background: var(--licht);
    color: var(--tekst);
}

body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

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

.topbar,
.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 {
    display: none;
}

.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 100px;
}

.categorie-title {
    display: none;
}

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

.product-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--rand);
    border-radius: 14px;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    gap: 8px;
}

.product-info {
    flex: 1;
    min-width: 0; /* voorkomt overflow bij lange namen */
}

.product-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.add-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    background: white;
    color: var(--chiro-blauw);
    border: 2px solid var(--chiro-blauw);
    font-size: 22px;
    font-weight: 900;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-floating-btn {
	position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    z-index: 35;
    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);
    
    /* Chrome Mobile fixes */
    position: fixed;
    z-index: 99999;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    
    /* Voorkom double-tap zoom op iOS */
    -webkit-user-select: none;
    user-select: none;
    
    /* Zorg dat het button element clickable is */
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.bottom-actions {
    position: sticky;
    bottom: 0;
    margin-top: 20px;
    padding: 14px 0 calc(18px + env(safe-area-inset-bottom, 0px));
    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);
}

.modal-box label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
}

.modal-box input,
.modal-box select {
    margin-bottom: 10px;
}

.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;
    }

    .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;
}

#controleTekst {
    margin-bottom: 8px;
}

.tafel-info {
    margin-top: 8px;
    font-weight: 700;
}

.tafel-waarde {
    color: var(--chiro-rood);
	background: #fff7d1;
    font-weight: 900;
    font-size: 18px;
    margin: 0 2px;
	padding: 3px 8px;
    border-radius: 8px;
}
.notice.info,
.notice.warning {
    display: block;
}

.notice.info {
    background: #fff1f2;
    color: var(--chiro-rood);
    border-color: #fecdd3;
}

.notice.warning {
    background: #fff1f2;
    color: var(--chiro-rood);
    border-color: #fecdd3;
}

.product-stock {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 800;
    color: var(--chiro-rood);
}

.product-card.uitverkocht {
    opacity: 0.55;
    background: #f3f4f6;
}

.product-card.uitverkocht .product-stock {
    color: var(--rood);
}

.add-btn:disabled,
.qty-btn:disabled,
.modal-qty button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.stock-modal-melding {
    min-height: 18px;
    margin-top: -6px;
    font-size: 13px;
    font-weight: 800;
    color: var(--chiro-rood);
    text-align: center;
}

/* Klantgegevens in betaalmodal */
.klant-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 14px 0 10px;
}

.klant-grid label {
    color: var(--chiro-blauw);
}

.verplicht {
    color: var(--chiro-rood);
}

.optioneel {
    color: var(--grijs);
    font-size: 12px;
    font-weight: 700;
}

/* Gegevens- en betaalflow */
.controle-gegevens {
    margin: 12px 0 14px;
    display: grid;
    gap: 8px;
}

.controle-regel {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-weight: 800;
}

.mail-copy-box {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--rand);
}

.mail-copy-box h4 {
    text-align: center;
    color: var(--chiro-blauw);
    margin: 18px 0 14px;
    font-size: 20px;
    line-height: 1.15;
    white-space: nowrap;
}

.mail-copy-box input {
    margin-bottom: 8px;
}

.mail-privacy {
    margin: 6px 0 12px;
    font-size: 12px;
    color: var(--grijs);
    line-height: 1.35;
}

.mail-copy-box .mail-input-wrap {
    position: relative;
    margin: 24px 0 12px;
}

.mail-copy-box .mail-input-wrap label {
    display: inline-block;
    position: absolute;
    top: -22px;
    left: 22px;
    z-index: 3;

    background: white;
    border: 1px solid var(--chiro-blauw);
    border-radius: 8px;

    padding: 2px 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--chiro-blauw);
    line-height: 1.1;
}

.mail-copy-box .mail-input-wrap input[type="email"] {
    width: 100%;
    border: 2px solid var(--chiro-blauw);
    border-radius: 16px;
    background: white;
    color: var(--tekst);

    padding: 18px 14px 14px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    margin: 0;
}

.mail-copy-box .mail-input-wrap input[type="email"]::placeholder {
    color: #6b7280;
    font-weight: 400;
}


#succesModalBox.cash-succes-modal {
    text-align: center;
}

#succesModalBox.cash-succes-modal h3 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 10px;
}

.succes-intro {
    text-align: center;
    font-size: 18px;
    color: var(--tekst);
    margin: 6px 0 18px;
}

.succes-kader-wrap {
    position: relative;
    margin: 22px 0 18px;
}

.succes-kader-label {
    display: inline-block;
    position: absolute;
    top: -11px;
    left: 22px;
    transform: none;
    background: var(--chiro-geel);
    border: 1px solid var(--chiro-blauw);
    border-radius: 8px;
    padding: 2px 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--chiro-blauw);
    line-height: 1.1;
}

.succes-kader {
    border: 3px solid var(--chiro-blauw);
    border-radius: 16px;
    background: var(--chiro-geel);
    color: var(--chiro-rood);
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 14px;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.succes-kader-totaal {
    flex-direction: column;
    gap: 4px;
}

.succes-totaal-prijs {
    font-size: 34px;
    font-weight: 900;
    line-height: 1.05;
}

.succes-totaal-bonnen {
    font-size: 17px;
    font-weight: 800;
    color: var(--chiro-blauw);
}

#succesExtra {
    text-align: center;
    font-size: 14px;
    color: var(--grijs);
    margin-top: 8px;
    margin-bottom: 14px;
}

@media (max-width: 420px) {
    .succes-kader {
        font-size: 28px;
        min-height: 76px;
    }

    .succes-totaal-prijs {
        font-size: 30px;
    }
}

.content {
    position: relative;
    z-index: 1;
}

.bottom-actions {
    pointer-events: auto;
}

.logo-watermark {
    pointer-events: none;
}

.cart-modal,
.modal-overlay {
    z-index: 100000;
}

/* iOS/Safari harde fix voor symbolen in ronde/vierkante knoppen */
.modal-qty button,
.qty-btn,
.cart-modal-header button {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    padding: 0 !important;
    overflow: hidden;
    line-height: 1 !important;
    font-size: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Productkeuze popup: min/plus */
.modal-qty button::before,
.qty-btn::before,
.cart-modal-header button::before {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    transform: translateY(-1px);
}

/* Productkeuze popup */
.modal-qty button:first-child::before {
    content: "−";
}

.modal-qty button:last-child::before {
    content: "+";
}

/* Winkelmand plus/min */
.qty-btn:first-child::before {
    content: "−";
}

.qty-btn:nth-of-type(2)::before {
    content: "+";
}

/* Sluitknop winkelmand */
.cart-modal-header button::before {
    content: "×";
    font-size: 32px;
    transform: translateY(-2px);
}

/* Vuilbak niet kapotmaken */
.trash-btn {
    -webkit-appearance: none;
    appearance: none;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
}