/* Kerstmarkt bestelsite. Mobiel eerst; de meeste bezoekers bestellen via de telefoon.
   Geen externe lettertypes of afbeeldingen: de versiering is CSS en inline SVG. */

:root {
    --groen: #17432f;          /* dennengroen */
    --groen-donker: #0f2e20;
    --groen-licht: #e6efe7;
    --rood: #b3202a;           /* kerstrood */
    --rood-donker: #8e1820;
    --goud: #c9a227;
    --goud-licht: #f6ecc9;
    --tekst: #2a2522;
    --grijs: #6b625b;
    --rand: #e4d9c8;
    --achtergrond: #fbf6ee;    /* crème */
    --kaart: #ffffff;
    --schaduw: 0 2px 10px rgba(60, 35, 10, .08);
    --kopletter: Georgia, "Times New Roman", serif;

    /* Sneeuwvlokjes (stipjes) als patroon */
    --sneeuw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='18' r='2' opacity='.5'/%3E%3Ccircle cx='70' cy='8' r='1.5' opacity='.35'/%3E%3Ccircle cx='118' cy='30' r='2.5' opacity='.45'/%3E%3Ccircle cx='40' cy='62' r='1.5' opacity='.4'/%3E%3Ccircle cx='96' cy='78' r='2' opacity='.5'/%3E%3Ccircle cx='20' cy='110' r='2.5' opacity='.35'/%3E%3Ccircle cx='76' cy='124' r='1.5' opacity='.45'/%3E%3Ccircle cx='130' cy='104' r='1.5' opacity='.3'/%3E%3C/g%3E%3C/svg%3E");
    /* Dennenslinger met kerstballen */
    --slinger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='34'%3E%3Cpath d='M0 3 Q40 28 80 3 Q120 28 160 3' fill='none' stroke='%231f5a3c' stroke-width='9' stroke-linecap='round'/%3E%3Cpath d='M0 3 Q40 28 80 3 Q120 28 160 3' fill='none' stroke='%232e7a50' stroke-width='3' stroke-dasharray='2 5' stroke-linecap='round'/%3E%3Ccircle cx='40' cy='24' r='6' fill='%23b3202a'/%3E%3Ccircle cx='38' cy='22' r='1.8' fill='%23fff' opacity='.6'/%3E%3Ccircle cx='120' cy='24' r='6' fill='%23c9a227'/%3E%3Ccircle cx='118' cy='22' r='1.8' fill='%23fff' opacity='.6'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--tekst);
    background: var(--achtergrond);
}

.breedte { max-width: 980px; margin: 0 auto; padding: 0 16px; }
/* Lopende tekst en het formulier niet over de volle breedte: leest prettiger */
.intro, .velden, .afronden, .melding { max-width: 680px; }

h1, h2 { font-family: var(--kopletter); font-weight: 700; line-height: 1.2; }
h1 { color: var(--rood); font-size: 2rem; margin: 1.6rem 0 .6rem; }
h2 { color: var(--groen); font-size: 1.45rem; margin-top: 2.2rem; display: flex; align-items: center; gap: 10px; }
/* Hulstblaadje voor elke tussenkop */
h2::before {
    content: "";
    flex: none;
    width: 26px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 20'%3E%3Cpath d='M2 12c3-1 4-5 8-4-1-3 2-6 4-6 0 3-1 5 1 7 2-2 5-2 7-1-2 2-3 5-6 5 1 2 0 4-2 5-1-2-3-3-5-2-1-2-4-3-7-4z' fill='%2317432f'/%3E%3Ccircle cx='17' cy='14' r='3' fill='%23b3202a'/%3E%3Ccircle cx='21' cy='16' r='2.5' fill='%23b3202a'/%3E%3C/svg%3E") no-repeat center / contain;
}
a { color: var(--rood); }

/* ---------- Kop met sneeuw en slinger ---------- */
.kop {
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at top, #22573e 0%, var(--groen) 55%, var(--groen-donker) 100%);
    color: #fff;
    padding: 22px 0 20px;
    text-align: center;
}
.kop::before { /* vallende sneeuw */
    content: "";
    position: absolute;
    inset: -140px 0 0;
    background-image: var(--sneeuw);
    animation: sneeuwval 14s linear infinite;
    pointer-events: none;
}
@keyframes sneeuwval { to { transform: translateY(140px); } }
@media (prefers-reduced-motion: reduce) { .kop::before { animation: none; } }

.kop .breedte { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kop-titel {
    color: #fff;
    font-family: var(--kopletter);
    font-size: 2.1rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: .5px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.kop-ster { color: var(--goud); font-size: 1.4rem; line-height: 1; text-shadow: 0 0 12px rgba(201, 162, 39, .8); }
.kop-sub { color: var(--goud-licht); font-size: .95rem; letter-spacing: 2px; text-transform: uppercase; }

.slinger { height: 34px; margin-top: -4px; background: var(--slinger) repeat-x center top; }

/* ---------- Voet ---------- */
.voet {
    margin-top: 3.5rem;
    padding: 26px 0 34px;
    background: var(--groen) var(--sneeuw);
    color: var(--goud-licht);
    font-size: .92rem;
    text-align: center;
    border-top: 4px solid var(--goud);
}
.voet p { margin: .4rem 0; }

/* ---------- Intro en meldingen ---------- */
.intro > p:first-of-type { font-size: 1.08rem; }
.event {
    position: relative;
    background: var(--kaart);
    border: 2px dashed var(--goud);
    border-radius: 12px;
    padding: 14px 16px 14px 62px;
    box-shadow: var(--schaduw);
}
.kalender { /* kalendertje met de datum van de kerstmarkt */
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    padding: 3px 0;
    border-radius: 6px;
    background: var(--rood);
    color: #fff;
    font: 700 .8rem/1.1 var(--kopletter);
    text-align: center;
}

.melding { background: var(--kaart); border-left: 5px solid var(--goud); padding: 12px 16px; border-radius: 8px; box-shadow: var(--schaduw); }
.melding.fout { border-left-color: var(--rood); background: #fdf0f0; }
.veldfout { color: var(--rood); margin: 4px 0 0; font-size: .95rem; }

/* ---------- Producten: raster van kaartjes (telefoon 2 naast elkaar, groter scherm 3–4) ---------- */
.producten {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
}
.product {
    display: flex;
    flex-direction: column;
    background: var(--kaart);
    border: 1px solid var(--rand);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--schaduw);
    transition: border-color .15s, box-shadow .15s;
}
.product.gekozen { border-color: var(--groen); box-shadow: 0 0 0 2px var(--groen), var(--schaduw); background: linear-gradient(#fff, #f3f9f4); }
.product-foto { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--groen-licht); }
.product-foto.leeg { /* geen foto: feestelijk vlak met ster */
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, var(--goud-licht) 0%, var(--groen-licht) 75%);
    color: var(--goud);
    font-size: 2.2rem;
}
.product-info { flex: 1; padding: 10px 12px 4px; }
.product-naam { font-weight: 600; display: block; line-height: 1.3; font-size: .98rem; }
.product-omschrijving { margin: 4px 0 0; color: var(--grijs); font-size: .85rem; line-height: 1.4; }
.product-prijs { margin: 6px 0 0; font-weight: 600; color: var(--groen); }

/* Staffelkorting als cadeaulabel */
.staffel {
    position: relative;
    display: inline-block;
    margin: 4px 0 0 6px;
    padding: 2px 10px 2px 18px;
    background: var(--rood);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    border-radius: 3px 6px 6px 3px;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}
.staffel::before { /* gaatje in het label */
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: #fff;
}

.product-bestel { padding: 6px 10px 10px; text-align: center; }
.regel-bedrag { margin: 4px 0 0; font-size: .8rem; color: var(--groen); font-weight: 600; min-height: 1.3em; line-height: 1.3; }

/* Aantal kiezen: +/- knoppen alleen met JavaScript */
.teller { display: inline-flex; align-items: center; }
.teller input {
    width: 2.8em;
    height: 40px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border: 1px solid var(--rand);
    border-radius: 8px;
    background: #fff;
    -moz-appearance: textfield;
}
.teller input::-webkit-outer-spin-button,
.teller input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.teller-knop {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    background: var(--groen);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
}
.teller-knop:hover { background: #22573e; }
.teller-knop[data-stap="-1"] { background: #fff; color: var(--groen); border: 2px solid var(--groen); }
.js .teller-knop { display: inline-block; }
.js .teller input { margin: 0 4px; }

/* ---------- Ophalen of bezorgen ---------- */
.levering { display: grid; gap: 10px; max-width: 680px; }
@media (min-width: 600px) { .levering { grid-template-columns: 1fr 1fr; } }
.levering-keuze {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--kaart);
    border: 1px solid var(--rand);
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--schaduw);
    cursor: pointer;
    font-size: .95rem;
}
.levering-keuze strong { font-size: 1.05rem; color: var(--groen); }
.levering-keuze input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--groen); flex: none; }
.levering-keuze:has(input:checked) { border-color: var(--groen); box-shadow: 0 0 0 2px var(--groen), var(--schaduw); background: #f3f9f4; }

.bezorgadres { border: 1px dashed var(--goud); border-radius: 10px; padding: 10px 14px 0; margin: 0 0 14px; }
.bezorgadres[hidden] { display: none; }
.bezorgadres legend { font-weight: 600; padding: 0 4px; }

/* ---------- Gegevens ---------- */
.velden { background: var(--kaart); border-radius: 12px; padding: 16px; box-shadow: var(--schaduw); border: 1px solid var(--rand); }
.veld { margin-bottom: 14px; }
.veld label { display: block; font-weight: 600; margin-bottom: 4px; }
.veld input, .veld textarea {
    width: 100%;
    padding: 11px 12px;
    font: inherit;
    border: 1px solid var(--rand);
    border-radius: 8px;
    background: #fffdf9;
}
.veld input:focus, .veld textarea:focus, .teller input:focus { outline: 3px solid var(--goud-licht); border-color: var(--goud); }
.veld.heeft-fout input, .veld.heeft-fout textarea { border-color: var(--rood); }
.optioneel { font-weight: normal; color: var(--grijs); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Afronden ---------- */
.afronden {
    margin-top: 1.5rem;
    padding: 18px 16px;
    background: var(--goud-licht);
    border: 1px solid #e8d79b;
    border-radius: 12px;
}
.totaal { font-family: var(--kopletter); font-size: 1.5rem; margin: 0 0 6px; color: var(--groen); }
.korting { color: var(--rood); font-size: .95rem; font-family: system-ui, sans-serif; }
.totaal .korting { display: block; font-weight: 600; }
.betalen { margin-top: 0; }
.privacy { color: var(--grijs); font-size: .85rem; margin-bottom: 0; }

.knop {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(var(--rood), var(--rood-donker));
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(142, 24, 32, .3);
}
.knop:hover { filter: brightness(1.08); }
.knop:focus-visible { outline: 3px solid var(--goud); outline-offset: 2px; }
.knop.klein { width: auto; padding: 8px 18px; font-size: 1rem; }

/* Totaal onderaan in beeld tijdens het kiezen (mobiel) */
.totaalbalk {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
    padding: 10px 16px;
    background: var(--groen) var(--sneeuw);
    color: #fff;
    border-top: 3px solid var(--goud);
    box-shadow: 0 -3px 10px rgba(0, 0, 0, .2);
}
.totaalbalk strong { color: var(--goud-licht); font-size: 1.15rem; }
.totaalbalk[hidden] { display: none; }

/* ---------- Openingspagina ---------- */
.hero {
    position: relative;
    max-width: 720px;
    margin: 28px auto 0;
    padding: 30px 22px 26px;
    text-align: center;
    background: var(--kaart);
    border: 3px double var(--goud);
    border-radius: 18px;
    box-shadow: var(--schaduw);
}
.hero::before, .hero::after { /* sterretjes in de hoeken */
    content: "✦";
    position: absolute;
    top: 12px;
    color: var(--goud);
    font-size: 1.3rem;
}
.hero::before { left: 16px; }
.hero::after { right: 16px; }
.hero h1 { margin: .2rem 0 .4rem; font-size: 1.7rem; }
@media (min-width: 600px) { .hero h1 { font-size: 2.3rem; } }
.hero-datum { margin: 0; font-family: var(--kopletter); font-size: 1.15rem; color: var(--groen); font-weight: 700; }
.hero-waar { margin: 0 0 1rem; color: var(--grijs); }
.hero-tekst { font-size: 1.08rem; margin: 1rem auto 1.4rem; max-width: 560px; }
.hero-klein { font-size: .9rem; color: var(--grijs); margin: .8rem 0 0; }
.hero .melding { text-align: left; margin: 0 auto; }
.aftellen {
    display: inline-block;
    margin: .2rem 0;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--groen);
    color: var(--goud-licht);
    font-weight: 600;
}
.aftellen span { font-family: var(--kopletter); font-size: 1.3rem; color: #fff; margin-right: 4px; }
.knop.groot { width: auto; padding: 16px 40px; font-size: 1.25rem; }

.stappen ol { list-style: none; counter-reset: stap; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 700px) { .stappen ol { grid-template-columns: repeat(3, 1fr); } }
.stappen li {
    counter-increment: stap;
    position: relative;
    background: var(--kaart);
    border: 1px solid var(--rand);
    border-radius: 12px;
    padding: 18px 16px 16px 64px;
    box-shadow: var(--schaduw);
    font-size: .95rem;
}
.stappen li::before {
    content: counter(stap);
    position: absolute;
    left: 14px;
    top: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rood);
    color: #fff;
    font: 700 1.2rem/36px var(--kopletter);
    text-align: center;
}
.stappen strong { display: block; color: var(--groen); font-size: 1.05rem; margin-bottom: 2px; }

.aanbod ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .aanbod ul { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.aanbod li { background: var(--kaart); border: 1px solid var(--rand); border-radius: 12px; overflow: hidden; box-shadow: var(--schaduw); padding-bottom: 10px; }
.aanbod img, .aanbod .product-foto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.aanbod img { display: block; }
.aanbod-naam { display: block; padding: 8px 10px 0; font-weight: 600; font-size: .9rem; line-height: 1.3; }
.aanbod-prijs { display: inline-block; padding: 4px 0 0 10px; color: var(--groen); font-weight: 600; font-size: .9rem; }
.midden { text-align: center; margin-top: 1.4rem; }

/* ---------- Bedankpagina ---------- */
.bestelnummer {
    font-size: 1.2rem;
    background: var(--kaart);
    border: 2px dashed var(--goud);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
}
.bestelnummer strong { display: block; font-family: var(--kopletter); font-size: 1.8rem; color: var(--rood); letter-spacing: 1px; }
.overzicht { width: 100%; border-collapse: collapse; background: var(--kaart); margin: 1rem 0; border-radius: 12px; overflow: hidden; box-shadow: var(--schaduw); }
.overzicht th { background: var(--groen); color: #fff; font-weight: 600; }
.overzicht th, .overzicht td { padding: 10px; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: top; }
.overzicht .getal { text-align: right; white-space: nowrap; }
.totaalregel td { font-weight: 700; font-size: 1.1rem; border-bottom: 0; background: var(--goud-licht); }

@media (min-width: 600px) {
    .producten { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
    .knop { width: auto; }
    .kop-titel { font-size: 2.6rem; }
    h1 { font-size: 2.3rem; }
}
