/* =========================================================
   Afrekenen (/bestellen) + bedankpagina — v2 "FLOW refined"
   ---------------------------------------------------------
   Alleen tokens uit site.css. Structuur:
     1. Kop + gesloten-melding
     2. Layout (formulier links, bonnetje rechts; mobiel: compact
        overzicht bovenaan + sticky CTA onderaan)
     3. Stappen (FLOW Step wizard, verticaal)
     4. Keuzekaarten, content switcher, tijdslot, leveradres
     5. Kortingscode
     6. Besteloverzicht (bonnetje) + CTA
     7. Leeg mandje
     8. Adres-suggesties
     9. Bedankpagina
   ====================================================== */

/* Kleine icoontjes als mask, zodat ze currentColor volgen */
:root {
    --co-i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E");
    --co-i-check-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8.5 12 2.5 2.5 4.5-5'/%3E%3C/svg%3E");
    --co-i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v4.5M12 16h.01'/%3E%3C/svg%3E");
    --co-i-spark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4.5A1.5 1.5 0 0 1 4.5 3H12l9 9-9 9-9-9Z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.5'/%3E%3C/svg%3E");
    --co-i-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
    --co-i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E");
}

/* =========================================================
   1. Kop
   ====================================================== */
.co-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
    margin-bottom: var(--s-10);
}
.co-back {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    margin-left: -6px;
    padding: 6px 10px 6px 6px;
    border-radius: var(--r-pill);
    color: var(--text-2);
    font-size: var(--fs-small);
    line-height: 20px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.co-back svg { width: 18px; height: 18px; transition: transform var(--dur-2) var(--ease); }
.co-back:hover { background: var(--n-150); color: var(--text); }
.co-back:hover svg { transform: translateX(-2px); }
.co-head__title {
    font-size: var(--fs-h2);
    line-height: 1.05;
    letter-spacing: var(--track-display);
}
.co-head__lead { max-width: 52ch; color: var(--text-2); font-size: var(--fs-body); }

.co-closed { align-items: flex-start; margin-bottom: var(--s-8); }
.co-closed__icon { width: 22px; height: 22px; flex-shrink: 0; margin-top: 1px; }

/* =========================================================
   2. Layout
   ====================================================== */
.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: var(--s-16);
    align-items: start;
}
.checkout__main { min-width: 0; }
.checkout__aside {
    position: sticky;
    top: calc(var(--header-h) + var(--s-6) + var(--ontwerp-balk-h, 0px)); /* ontwerpbalk */
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}

@media (max-width: 1140px) {
    .checkout { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-10); }
}

/* De toggle doet enkel iets op mobiel; op desktop niet focusbaar */
.co-summary-toggle { visibility: hidden; }

/* =========================================================
   3. Stappen (verticale step wizard)
   ====================================================== */
.co-step {
    --co-num: 40px;
    --co-indent: calc(var(--co-num) + var(--s-5));
    position: relative;
    padding-bottom: var(--s-12);
}
.co-step:last-child { padding-bottom: 0; }

/* verbindingslijn tussen de nummers */
.co-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: calc(var(--co-num) / 2 - .5px);
    top: calc(var(--co-num) + var(--s-2));
    bottom: var(--s-2);
    width: 1px;
    background: var(--border);
}

.co-step__head {
    display: flex;
    align-items: center;
    gap: var(--s-5);
}
.co-step__num {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--co-num);
    height: var(--co-num);
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--border-strong);
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.co-step__check {
    position: absolute;
    width: 18px;
    height: 18px;
    opacity: 0;
    transform: scale(.4);
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease-out);
}
.co-step__digit { transition: opacity var(--dur-1) var(--ease); }

/* actief: stap waar de focus zit */
.co-step:focus-within .co-step__num {
    background: var(--n-1000);
    color: var(--n-0);
    box-shadow: none;
}
/* voltooid: stap 1 met geldige gegevens */
.co-step--details:has(#name:valid):has(#phone:valid):has(#email:valid) .co-step__num {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: none;
}
.co-step--details:has(#name:valid):has(#phone:valid):has(#email:valid) .co-step__digit { opacity: 0; }
.co-step--details:has(#name:valid):has(#phone:valid):has(#email:valid) .co-step__check { opacity: 1; transform: none; }

.co-step__title {
    font-size: var(--fs-h4);
    line-height: 28px;
    letter-spacing: -0.02em;
}
.co-step__sub { margin-top: 2px; color: var(--text-3); font-size: var(--fs-small); line-height: 20px; }

.co-step__body {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
    margin-top: var(--s-6);
    padding-left: var(--co-indent);
}

.co-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-5) var(--s-4);
}
.co-grid__full { grid-column: 1 / -1; }

.co-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.co-label {
    display: block;
    margin: 0 0 var(--s-2);
    padding: 0;
    font-size: var(--fs-small);
    line-height: 20px;
    font-weight: 600;
    color: var(--text);
}
.co-optional { margin-left: 6px; font-weight: 400; color: var(--text-3); }

/* Nieuwsbrief: brede keuzekaart */
.co-optin {
    display: flex;
    width: 100%;
    padding: var(--s-4);
    box-shadow: none;
    border-color: var(--border);
    background: var(--bg-subtle);
}
.co-optin:hover { background: var(--surface); }
.co-optin:has(input:checked) { background: var(--accent-soft); }
.co-optin > span { display: flex; flex-direction: column; gap: 2px; }
.co-optin__title { font-weight: 500; color: var(--text); }
.co-optin__sub { font-size: var(--fs-small); line-height: 20px; color: var(--text-3); }

/* =========================================================
   4. Keuzekaarten (bestelwijze, betaling)
   ====================================================== */
.co-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
}
.co-methods--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.co-method {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-4);
    min-height: 100%;
    padding: var(--s-5);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-control);
    background: var(--surface);
    box-shadow: var(--e-1);
    font-weight: 400;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition:
        border-color var(--dur-1) var(--ease),
        box-shadow var(--dur-2) var(--ease),
        background-color var(--dur-2) var(--ease),
        transform var(--dur-1) var(--ease);
}
.co-method:hover { border-color: var(--n-400); box-shadow: var(--e-2); }
.co-method:active { transform: scale(.985); }

.co-method input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: inherit;
    opacity: 0;
    cursor: pointer;
    appearance: none;
}

.co-method__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--r-control);
    background: var(--n-150);
    color: var(--text);
    transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.co-method__icon svg { width: 22px; height: 22px; }

.co-method__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-method__title { font-size: var(--fs-body); line-height: 22px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.co-method__sub { font-size: var(--fs-small); line-height: 20px; color: var(--text-3); }

.co-method__deal { position: absolute; top: var(--s-5); right: calc(var(--s-5) + 30px); }

.co-method__tick {
    position: absolute;
    top: var(--s-5);
    right: var(--s-5);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px var(--n-300);
    transition: background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.co-method__tick::after {
    content: "";
    position: absolute;
    inset: 4px;
    background: var(--accent-ink);
    -webkit-mask: var(--co-i-check) center / contain no-repeat;
    mask: var(--co-i-check) center / contain no-repeat;
    transform: scale(0);
    transition: transform var(--dur-3) var(--ease-out);
}

/* geselecteerd */
.co-method:has(input:checked) {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent), var(--e-2);
}
.co-method:has(input:checked) .co-method__icon { background: var(--accent-soft); color: var(--accent-text); }
.co-method:has(input:checked) .co-method__tick { background: var(--accent); box-shadow: none; }
.co-method:has(input:checked) .co-method__tick::after { transform: scale(1); }
.co-method:has(input:focus-visible) { box-shadow: inset 0 0 0 1px var(--accent), var(--ring); }
.co-method:has(input:disabled) { opacity: .5; cursor: not-allowed; box-shadow: none; }
.co-method:has(input:disabled) input { cursor: not-allowed; }

/* rij-variant (betaling, mobiel) */
.co-method--row {
    flex-direction: row;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-4) var(--s-5) var(--s-4) var(--s-4);
    padding-right: calc(var(--s-5) + 34px);
}
.co-method--row .co-method__tick { top: 50%; margin-top: -11px; }
.co-pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }

/* ---------- Content switcher (afhaalmoment) ---------- */
.co-slot { display: flex; flex-direction: column; }
.co-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-1);
    max-width: 480px;
    padding: var(--s-1);
    border-radius: var(--r-control);
    background: var(--n-150);
}
.co-switch__opt {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px var(--s-4);
    border-radius: var(--r-small);
    color: var(--text-2);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-2) var(--ease), color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.co-switch__opt:hover { color: var(--text); }
.co-switch__opt input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    appearance: none;
}
.co-switch__meta { color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.co-switch__opt:has(input:checked) {
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    box-shadow: var(--e-2);
}
.co-switch__opt:has(input:focus-visible) { box-shadow: var(--ring); }

.co-slot__picker { margin-top: var(--s-3); max-width: 480px; }
.co-select { position: relative; --sk-field-x: 44px; }
.co-select__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    color: var(--text-3);
    pointer-events: none;
}
.co-select select { padding-left: 44px; font-variant-numeric: tabular-nums; }

/* ---------- Leveradres ---------- */
.co-address {
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
    padding: var(--s-6);
    border-radius: var(--r-default);
    background: var(--bg-subtle);
    box-shadow: inset 0 0 0 1px var(--border);
}
.co-address__head { display: flex; align-items: center; gap: var(--s-3); }
.co-address__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--e-0);
    color: var(--accent-text);
}
.co-address__icon svg { width: 20px; height: 20px; }
.co-address__title { font-size: var(--fs-body); line-height: 22px; letter-spacing: -0.01em; }
.co-address__sub { font-size: var(--fs-small); line-height: 20px; color: var(--text-3); }

/* Zachte reveal: loopt telkens wanneer JS display:none weghaalt */
.co-reveal { animation: co-reveal var(--dur-3) var(--ease-out); }
@keyframes co-reveal {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

/* =========================================================
   5. Kortingscode
   ====================================================== */
.co-discount__group {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--s-1);
    min-height: 48px;
    padding: 5px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-control);
    background: var(--surface);
    box-shadow: var(--e-1);
    transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.co-discount__group:hover { border-color: var(--n-400); }
.co-discount__group:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.co-discount__icon {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    color: var(--text-3);
    pointer-events: none;
}
.co-discount__group input,
.co-discount__group input:hover,
.co-discount__group input:focus,
.co-discount__group input:focus-visible {
    flex: 1;
    min-width: 0;
    min-height: 36px;
    padding: 6px 8px 6px 38px;
    border: 0;
    border-radius: var(--r-small);
    background: transparent;
    box-shadow: none;
    letter-spacing: .02em;
}
.co-discount__group input::placeholder { letter-spacing: 0; }
.co-discount__group .btn { flex-shrink: 0; }
.co-discount__group .btn:focus-visible { box-shadow: var(--ring); }
.co-discount__group:has(input:disabled) { background: var(--bg-subtle); box-shadow: none; border-color: var(--border); }
.co-discount__group:has(input:disabled) .co-discount__icon { color: var(--n-400); }
.co-discount__group:has(input:disabled) .btn[data-apply-discount] { display: none; }

/* melding: fout (standaard), succes (code actief), info (dagkorting) */
.co-discount__msg {
    display: flex;
    align-items: flex-start;
    gap: var(--s-2);
    margin-top: var(--s-1);
    font-size: var(--fs-small);
    line-height: 20px;
    font-weight: 500;
    color: var(--danger-600);
    animation: co-reveal var(--dur-2) var(--ease-out);
}
.co-discount__msg:empty { display: none; }
.co-discount__msg::before {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    background: currentColor;
    -webkit-mask: var(--co-i-alert) center / contain no-repeat;
    mask: var(--co-i-alert) center / contain no-repeat;
}
.co-discount:has([data-clear-discount]:not([hidden])) .co-discount__msg { color: var(--success-800); }
.co-discount:has([data-clear-discount]:not([hidden])) .co-discount__msg::before {
    background: var(--success-600);
    -webkit-mask-image: var(--co-i-check-circle);
    mask-image: var(--co-i-check-circle);
}
.co-discount:has([data-clear-discount]:not([hidden])) .co-discount__group { border-color: var(--success-600); }
.co-discount:has(#discount_code:disabled) .co-discount__msg { color: var(--accent-text); }
.co-discount:has(#discount_code:disabled) .co-discount__msg::before {
    -webkit-mask-image: var(--co-i-spark);
    mask-image: var(--co-i-spark);
}

/* =========================================================
   6. Besteloverzicht (bonnetje)
   ====================================================== */
.co-summary {
    position: relative;
    padding: var(--s-6);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--e-0), var(--e-3);
}
.co-summary__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    cursor: default;
}
.co-summary__title { display: inline-flex; align-items: center; gap: var(--s-2); font-size: 18px; line-height: 24px; letter-spacing: -0.015em; }
.co-summary__title svg { width: 20px; height: 20px; color: var(--text-3); }
.co-summary__count {
    font-size: var(--fs-small);
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.co-summary__count::before { content: "·"; margin-right: var(--s-2); color: var(--n-400); }

/* actieve bestelwijze als chip (volgt de radio's via :has) */
.co-summary__method {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    background: var(--n-150);
    font-size: var(--fs-tiny);
    line-height: 16px;
    font-weight: 600;
    color: var(--text-2);
}
.co-summary__method [data-co-m] { display: none; }
.checkout:has(input[name="method"][value="afhalen"]:checked) [data-co-m="afhalen"],
.checkout:has(input[name="method"][value="ter_plaatse"]:checked) [data-co-m="ter_plaatse"],
.checkout:has(input[name="method"][value="delivery"]:checked) [data-co-m="delivery"] { display: inline; }

.co-summary__toggle { display: none; }

/* --- tabel als bonnetje --- */
.co-receipt { display: block; width: 100%; border-collapse: collapse; }
.co-receipt tbody, .co-receipt tfoot { display: block; }

.co-receipt__items {
    max-height: min(46vh, 440px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.co-receipt__items tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name price" "qty qty";
    column-gap: var(--s-4);
    padding: var(--s-4) 0;
    border-bottom: 1px solid var(--border);
}
.co-receipt__items tr:last-child { border-bottom: 0; }
.co-receipt__items td { display: block; padding: 0; }
.co-receipt__items td:first-child {
    grid-area: name;
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}
.co-receipt__items td:first-child .muted {
    margin-top: 2px;
    font-size: var(--fs-small) !important;
    line-height: 20px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--text-3);
}
.co-receipt__items td:first-child .muted strong { font-weight: 500; color: var(--text-2); }
.co-receipt__items td:last-child {
    grid-area: price;
    text-align: right;
    font-size: 15px;
    line-height: 22px;
    white-space: nowrap;
}
.co-receipt__items .price-stack { flex-direction: column; align-items: flex-end; gap: 0; }
.co-receipt__items .price-old { font-size: 13px; line-height: 18px; order: 2; }

/* aantal-stepper */
.co-receipt__items td.qty {
    grid-area: qty;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    margin-top: var(--s-3);
    padding: 2px;
    border-radius: var(--r-pill);
    box-shadow: inset 0 0 0 1px var(--border-strong);
}
.co-receipt__items td.qty span {
    min-width: 28px;
    font-size: var(--fs-small);
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
button.q {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    font-size: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
button.q::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: var(--co-i-plus) center / contain no-repeat;
    mask: var(--co-i-plus) center / contain no-repeat;
}
button.q[data-d="-1"]::before { -webkit-mask-image: var(--co-i-minus); mask-image: var(--co-i-minus); }
button.q::after { content: ""; position: absolute; inset: -6px; } /* groter tapdoel */
button.q:hover { background: var(--n-150); }
button.q:active { transform: scale(.9); background: var(--n-200); }
button.q:focus-visible { box-shadow: var(--ring); border-radius: 50%; }

/* --- totalen --- */
.co-receipt__totals { margin-top: var(--s-2); padding-top: var(--s-4); border-top: 1px dashed var(--border-strong); }
.co-receipt__totals tr {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--s-4);
    padding: 3px 0;
    color: var(--text-2);
    font-size: 15px;
    line-height: 22px;
}
.co-receipt__totals td { padding: 0; }
.co-receipt__totals .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.co-receipt__total {
    margin-top: var(--s-3);
    padding-top: var(--s-4) !important;
    border-top: 1px solid var(--border);
    color: var(--text) !important;
    font-weight: 600;
}
.co-receipt__total td:first-child { font-size: var(--fs-body); }
.co-receipt__vat { margin-left: 4px; font-size: var(--fs-tiny); font-weight: 400; color: var(--text-3); }
.co-receipt__total .num strong {
    font-size: 24px;
    line-height: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* --- CTA --- */
.co-cta { display: flex; flex-direction: column; gap: var(--s-3); }
.co-cta__btn { min-height: 56px; font-size: 16px; }
.co-cta__note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: var(--fs-tiny);
    line-height: 16px;
    color: var(--text-3);
    text-align: center;
}
.co-cta__note svg { width: 14px; height: 14px; flex-shrink: 0; }
.co-cta__note a { color: var(--text-2); }
.co-cta__note a:hover { color: var(--text); }

/* =========================================================
   7. Leeg mandje — de hele checkout maakt plaats voor één rustige staat
   ====================================================== */
.co-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-6) 0 var(--s-2);
    text-align: center;
}
.co-empty__art {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: var(--s-2);
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-text);
}
.co-empty__art svg { width: 32px; height: 32px; }
.co-empty__title { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: var(--track-heading); }
.co-empty__text { max-width: 36ch; color: var(--text-2); }
.co-empty .btn { margin-top: var(--s-3); }

main:has([data-cart-empty]:not([hidden])) .co-head { display: none; }
.checkout:has([data-cart-empty]:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
    margin: var(--s-10) auto 0;
}
.checkout:has([data-cart-empty]:not([hidden])) .checkout__main,
.checkout:has([data-cart-empty]:not([hidden])) .co-cta,
.checkout:has([data-cart-empty]:not([hidden])) .co-summary__head,
.checkout:has([data-cart-empty]:not([hidden])) .co-summary__body { display: none; }
.checkout:has([data-cart-empty]:not([hidden])) .checkout__aside { position: static; }
.checkout:has([data-cart-empty]:not([hidden])) .co-summary { padding: var(--s-12) var(--s-8); box-shadow: var(--e-0), var(--e-2); }

/* =========================================================
   Responsief
   ====================================================== */
@media (max-width: 960px) {
    .co-head { margin-bottom: var(--s-6); }

    .checkout {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--s-8);
    }
    /* aside lost op: overzicht bovenaan, CTA sticky onderaan het formulier */
    .checkout__aside { display: contents; }
    .co-summary { order: -1; padding: var(--s-4) var(--s-5); box-shadow: var(--e-0), var(--e-1); }
    .co-cta {
        position: sticky;
        bottom: 0;
        z-index: 800;
        gap: var(--s-2);
        margin-inline: calc(-1 * var(--gutter));
        padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom));
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border);
    }

    /* inklapbaar overzicht */
    .co-summary-toggle { visibility: visible; }
    .co-summary__head { cursor: pointer; padding-bottom: 0; border-bottom: 0; -webkit-tap-highlight-color: transparent; }
    .co-summary__head { min-height: 44px; }
    .co-summary__method { margin-left: 0; }
    .co-summary__title { margin-right: auto; }
    .co-summary__toggle {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        font-size: var(--fs-small);
        font-weight: 500;
        color: var(--text-2);
    }
    .co-summary__toggle svg { width: 18px; height: 18px; transition: transform var(--dur-2) var(--ease); }
    .co-summary__toggle-hide { display: none; }
    .co-summary__title { white-space: nowrap; min-width: 0; }
    .co-summary-toggle:focus-visible ~ .checkout .co-summary { box-shadow: var(--e-0), var(--ring); }

    .co-receipt__items, .co-receipt__sub, .co-receipt__disc { display: none !important; }
    .co-receipt__totals { margin-top: var(--s-2); padding-top: 0; border-top: 0; }
    .co-receipt__total { margin-top: 0; padding-top: var(--s-3) !important; }
    .co-receipt__total .num strong { font-size: 20px; }

    .co-summary-toggle:checked ~ .checkout .co-summary__head { padding-bottom: var(--s-3); border-bottom: 1px solid var(--border); }
    .co-summary-toggle:checked ~ .checkout .co-receipt__items { display: block !important; max-height: none; }
    .co-summary-toggle:checked ~ .checkout .co-receipt__sub,
    .co-summary-toggle:checked ~ .checkout .co-receipt__disc:not([hidden]) { display: flex !important; }
    .co-summary-toggle:checked ~ .checkout .co-receipt__totals { padding-top: var(--s-3); border-top: 1px dashed var(--border-strong); }
    .co-summary-toggle:checked ~ .checkout .co-receipt__total { margin-top: var(--s-2); }
    .co-summary-toggle:checked ~ .checkout .co-summary__toggle svg { transform: rotate(180deg); }
    .co-summary-toggle:checked ~ .checkout .co-summary__toggle-show { display: none; }
    .co-summary-toggle:checked ~ .checkout .co-summary__toggle-hide { display: inline; }

    .checkout:has([data-cart-empty]:not([hidden])) { margin-top: var(--s-4); }
    .checkout:has([data-cart-empty]:not([hidden])) .co-summary { padding: var(--s-10) var(--s-6); }
}

@media (max-width: 768px) {
    /* boven de mobiele tabbalk (~64px) blijven */
    .co-cta {
        bottom: calc(64px + env(safe-area-inset-bottom));
        padding-bottom: var(--s-3);
        margin-bottom: 0;
    }
}

@media (max-width: 640px) {
    .co-head__title { font-size: 36px; }

    .co-step { --co-num: 32px; padding-bottom: var(--s-10); }
    .co-step::before { display: none; }
    .co-step__head { gap: var(--s-3); align-items: flex-start; }
    .co-step__num { font-size: 14px; margin-top: -2px; }
    .co-step__body { padding-left: 0; margin-top: var(--s-5); gap: var(--s-5); }
    .co-step + .co-step { padding-top: var(--s-8); border-top: 1px solid var(--border); }

    .co-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }

    .co-methods, .co-methods--3, .co-pay { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); }
    .co-method {
        flex-direction: row;
        align-items: center;
        gap: var(--s-4);
        padding: var(--s-3) calc(var(--s-4) + 34px) var(--s-3) var(--s-3);
    }
    .co-method__icon { width: 44px; height: 44px; }
    .co-method__tick { top: 50%; right: var(--s-4); margin-top: -11px; }
    .co-method__deal { position: static; margin-left: auto; }

    .co-switch { max-width: none; }
    .co-switch__opt { flex-direction: column; gap: 0; padding: 8px var(--s-2); line-height: 20px; font-size: var(--fs-small); }
    .co-switch__opt > span { display: flex; flex-direction: column; }
    .co-slot__picker { max-width: none; }

    .co-address { padding: var(--s-5) var(--s-4); }

    .co-discount__group .btn { padding: 0 12px; }
}

/* =========================================================
   8. Adres-suggesties (autocomplete)
   ====================================================== */
.address-field { position: relative; }
.address-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 260px;
    overflow-y: auto;
    padding: var(--s-1);
    border-radius: var(--r-control);
    background: var(--surface);
    box-shadow: var(--e-0), var(--e-4);
}
.address-suggestions:empty { display: none; }
.address-suggestion {
    display: block;
    width: 100%;
    padding: var(--s-3);
    border: 0;
    border-radius: var(--r-small);
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}
.address-suggestion:hover, .address-suggestion.is-active, .address-suggestion:focus-visible { background: var(--n-150); outline: none; box-shadow: none; }
.address-suggestion small { display: block; color: var(--text-3); }

/* =========================================================
   9. Bedankpagina
   ====================================================== */
.ty {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 640px;
    margin: var(--s-6) auto 0;
}

.ty-hero { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); text-align: center; }
.ty-hero__title { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: var(--track-display); }
.ty-hero__lead { max-width: 46ch; color: var(--text-2); font-size: var(--fs-lead); line-height: 1.55; }

/* succes-icoon: ring + pop + getekend vinkje */
.ty-check {
    position: relative;
    display: grid;
    place-items: center;
    width: 80px;
    height: 80px;
    margin-bottom: var(--s-2);
    border-radius: 50%;
    background: var(--success-600);
    color: var(--n-0);
    box-shadow: 0 0 0 8px var(--success-100);
    animation: ty-pop 560ms var(--ease-out) both;
}
.ty-check::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--success-200);
    opacity: 0;
    animation: ty-ring 1200ms var(--ease-out) 360ms both;
}
.ty-check svg { width: 38px; height: 38px; }
.ty-check path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: ty-draw 420ms var(--ease-out) 260ms forwards;
}
@keyframes ty-pop {
    0% { transform: scale(.5); opacity: 0; }
    60% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); }
}
@keyframes ty-draw { to { stroke-dashoffset: 0; } }
@keyframes ty-ring {
    0% { opacity: .9; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.5); }
}
@media (prefers-reduced-motion: reduce) {
    .ty-check path { stroke-dashoffset: 0; }
}

/* ticket */
.ty-ticket {
    width: 100%;
    margin-top: var(--s-10);
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--e-0), var(--e-3);
    overflow: hidden;
    animation: co-reveal 600ms var(--ease-out) 200ms both;
}
.ty-ticket__top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ty-stat { display: flex; flex-direction: column; gap: var(--s-1); padding: var(--s-6) var(--s-8); }
.ty-stat + .ty-stat { border-left: 1px solid var(--border); }
.ty-stat__label {
    font-size: var(--fs-tiny);
    line-height: 16px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
}
.ty-stat__value {
    font-size: clamp(36px, 5vw, 48px);
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: var(--track-display);
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.ty-stat__value small { font-size: .5em; letter-spacing: -0.01em; font-weight: 600; color: var(--text-2); }
.ty-stat__meta { font-size: var(--fs-small); line-height: 20px; color: var(--text-3); }
.ty-stat--accent .ty-stat__value { color: var(--accent-text); }

/* perforatie tussen ticket-delen */
.ty-perf {
    position: relative;
    height: 0;
    border-top: 1px dashed var(--border-strong);
    margin: 0 var(--s-6);
}
.ty-perf::before, .ty-perf::after {
    content: "";
    position: absolute;
    top: -12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--border);
}
.ty-perf::before { left: calc(-1 * var(--s-6) - 12px); }
.ty-perf::after { right: calc(-1 * var(--s-6) - 12px); }

.ty-section { padding: var(--s-6) var(--s-8); }
.ty-section + .ty-section { border-top: 1px solid var(--border); }

/* betaalstatus */
.ty-status { display: flex; align-items: flex-start; gap: var(--s-3); color: var(--text-2); }
.ty-status__icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--n-150);
    color: var(--text);
}
.ty-status__icon svg { width: 18px; height: 18px; }
.ty-status--paid .ty-status__icon { background: var(--success-100); color: var(--success-800); box-shadow: inset 0 0 0 1px var(--success-200); }
.ty-status--pending .ty-status__icon { background: var(--warning-100); color: var(--warning-800); box-shadow: inset 0 0 0 1px var(--warning-200); }
.ty-status p { padding-top: 5px; }
.ty-status strong { color: var(--text); font-weight: 600; }

/* volgende stappen */
.ty-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-2);
    margin: 0;
    padding: 0;
    list-style: none;
}
.ty-steps li { display: flex; flex-direction: column; gap: var(--s-2); }
.ty-steps__bar { height: 4px; border-radius: var(--r-pill); background: var(--n-200); overflow: hidden; }
.ty-steps li.is-done .ty-steps__bar { background: var(--success-600); }
.ty-steps li.is-current .ty-steps__bar { position: relative; }
.ty-steps li.is-current .ty-steps__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 40%;
    border-radius: inherit;
    background: var(--accent);
    animation: ty-progress 1.8s var(--ease) infinite;
}
@keyframes ty-progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(260%); }
}
.ty-steps__label { font-size: var(--fs-small); line-height: 20px; font-weight: 600; color: var(--text); }
.ty-steps li:not(.is-done):not(.is-current) .ty-steps__label { color: var(--text-3); font-weight: 500; }
.ty-steps__sub { margin-top: -6px; font-size: var(--fs-tiny); line-height: 16px; color: var(--text-3); }

/* ---------- Live status (order-status.js) ---------- */
.ty-live__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.ty-live__head .ty-h { margin-bottom: 0; }
.ty-live__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: var(--r-pill);
    background: var(--success-100);
    box-shadow: inset 0 0 0 1px var(--success-200);
    color: var(--success-800);
    font-size: var(--fs-tiny);
    line-height: 16px;
    font-weight: 600;
}
.ty-live__pulse { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--success-600); }
.ty-live__pulse::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--success-600);
    animation: pulse 2s var(--ease) infinite;
}
.ty-live__badge[data-state="offline"] { background: var(--warning-100); box-shadow: inset 0 0 0 1px var(--warning-200); color: var(--warning-800); }
.ty-live__badge[data-state="offline"] .ty-live__pulse { background: var(--warning-600); }
.ty-live__badge[data-state="done"] { background: var(--n-150); box-shadow: none; color: var(--text-3); }
.ty-live__badge[data-state="offline"] .ty-live__pulse::after,
.ty-live__badge[data-state="done"] .ty-live__pulse::after { display: none; }
.ty-live__badge[data-state="done"] .ty-live__pulse { background: var(--n-400); }
/* verbinden (eerste ophaling loopt nog): neutraal + zachte skeleton-sweep, daarna vloeiend naar groen */
.ty-live__badge { transition: background-color var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease), color var(--dur-3) var(--ease); }
.ty-live__badge[data-state="connecting"] {
    background-color: var(--skeleton-base);
    background-image: linear-gradient(100deg, transparent 38%, var(--skeleton-shine) 50%, transparent 62%);
    background-size: 100vw 100vh;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: -100vw 0;
    box-shadow: inset 0 0 0 1px var(--border);
    color: var(--text-2);
    cursor: progress;
    animation: sk-sweep var(--skeleton-dur) var(--ease) infinite;
}
.ty-live__badge[data-state="connecting"] .ty-live__pulse,
.ty-live__badge[data-state="connecting"] .ty-live__pulse::after { background: var(--n-400); }

.ty-live__now {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    margin-bottom: var(--s-5);
    padding: var(--s-4);
    border-radius: var(--r-default);
    background: var(--bg-subtle);
    transition: background-color var(--dur-3) var(--ease), box-shadow var(--dur-3) var(--ease);
}
.ty-live__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    box-shadow: var(--e-0), var(--e-1);
    transition: background-color var(--dur-3) var(--ease), color var(--dur-3) var(--ease);
}
.ty-live__i { display: none; width: 22px; height: 22px; }
.ty-live[data-status="not_started"] .ty-live__i--wait,
.ty-live[data-status="in_progress"] .ty-live__i--cook,
.ty-live[data-status="out_for_delivery"] .ty-live__i--road,
.ty-live[data-status="ready"][data-method="levering"] .ty-live__i--road,
.ty-live[data-status="ready"]:not([data-method="levering"]) .ty-live__i--done,
.ty-live[data-status="completed"] .ty-live__i--done { display: block; }
.ty-live[data-status="in_progress"] .ty-live__i--cook { animation: ty-flicker 1.6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes ty-flicker { 50% { transform: scale(1.08) rotate(-3deg); } }

.ty-live__title { font-size: var(--fs-h4); line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.ty-live__sub { margin-top: 2px; font-size: var(--fs-small); line-height: 20px; color: var(--text-2); }

/* klaar: groen en feestelijk */
.ty-live.is-ready .ty-live__now { background: var(--success-100); box-shadow: inset 0 0 0 1px var(--success-200); }
.ty-live.is-ready .ty-live__icon { background: var(--success-600); color: var(--n-0); box-shadow: 0 0 0 6px color-mix(in srgb, var(--success-600) 18%, transparent); }
.ty-live.is-ready .ty-live__title { color: var(--success-800); }

/* bij een wijziging: zachte pop */
.ty-live.is-changed .ty-live__now { animation: ty-live-pop 520ms var(--ease-out); }
.ty-live.is-changed .ty-live__icon { animation: ty-live-icon 620ms var(--ease-out); }
@keyframes ty-live-pop { 0% { transform: translateY(6px); opacity: .4; } 100% { transform: none; opacity: 1; } }
@keyframes ty-live-icon { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* balk vult vloeiend bij is-done */
.ty-steps__bar { position: relative; }
.ty-steps__bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--success-600);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 600ms var(--ease-out);
}
.ty-steps li.is-done .ty-steps__bar { background: var(--n-200); }
.ty-steps li.is-done .ty-steps__bar::before { transform: scaleX(1); }
.ty-steps__label, .ty-steps__sub { transition: color var(--dur-3) var(--ease); }

/* levering: 4 stappen (Ontvangen · In bereiding · Klaar · Onderweg) */
.ty-steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* onderweg: info-tint (zelfde kleur als "Onderweg" in het beheer) + rijdend busje */
.ty-live.is-transit .ty-live__now { background: var(--info-100); box-shadow: inset 0 0 0 1px var(--info-200); }
.ty-live.is-transit .ty-live__icon { color: var(--info-800); }
.ty-live.is-transit .ty-live__title { color: var(--info-800); }
.ty-live.is-transit .ty-live__i--road { animation: ty-drive 1.4s var(--ease) infinite; }
@keyframes ty-drive { 0%, 100% { transform: translateX(-1.5px); } 50% { transform: translateX(1.5px); } }

@media (prefers-reduced-motion: reduce) {
    .ty-live.is-transit .ty-live__i--road,
    .ty-live[data-status="in_progress"] .ty-live__i--cook,
    .ty-steps li.is-current .ty-steps__bar::after { animation: none; }
}

/* samenvatting */
.ty-h { margin-bottom: var(--s-4); font-size: var(--fs-tiny); line-height: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ty-lines { margin: 0; padding: 0; list-style: none; }
.ty-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--s-3);
    align-items: baseline;
    padding: var(--s-3) 0;
}
.ty-line + .ty-line { border-top: 1px solid var(--border); }
.ty-line__qty { min-width: 28px; color: var(--text-3); font-size: var(--fs-small); font-weight: 600; font-variant-numeric: tabular-nums; }
.ty-line__name { font-weight: 600; font-size: 15px; line-height: 22px; letter-spacing: -0.01em; }
.ty-line__opts { margin-top: 2px; font-size: var(--fs-small); line-height: 20px; color: var(--text-3); font-weight: 400; letter-spacing: 0; }
.ty-line__price { font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }

.ty-totals { margin: var(--s-3) 0 0; padding: var(--s-4) 0 0; border-top: 1px dashed var(--border-strong); }
.ty-totals div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 3px 0; font-size: 15px; line-height: 22px; color: var(--text-2); }
.ty-totals dt, .ty-totals dd { margin: 0; }
.ty-totals dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ty-totals .ty-totals__disc dd { color: var(--success-800); }
.ty-totals .ty-totals__total { margin-top: var(--s-2); padding-top: var(--s-3); border-top: 1px solid var(--border); color: var(--text); font-weight: 600; }
.ty-totals .ty-totals__total dd { font-size: 20px; letter-spacing: -0.02em; }

/* gegevens */
.ty-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-5) var(--s-6);
    margin: 0;
}
.ty-meta div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ty-meta dt { font-size: var(--fs-small); line-height: 20px; color: var(--text-3); }
.ty-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ty-meta .ty-meta__full { grid-column: 1 / -1; }
.ty-ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .02em; }

.ty-help { margin-top: var(--s-6); font-size: var(--fs-small); line-height: 20px; color: var(--text-3); text-align: center; text-wrap: balance; }

.ty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--s-3);
    margin-top: var(--s-8);
}

@media (max-width: 640px) {
    .ty { margin-top: 0; }
    .ty-hero__title { font-size: 36px; }
    .ty-check { width: 68px; height: 68px; }
    .ty-check svg { width: 32px; height: 32px; }
    .ty-ticket { margin-top: var(--s-8); }
    .ty-stat { padding: var(--s-5) var(--s-4) var(--s-5) var(--s-5); }
    .ty-stat__value { font-size: 34px; }
    .ty-steps__sub { display: none; }
    .ty-steps--4 { gap: 6px; }
    .ty-steps--4 .ty-steps__label { font-size: var(--fs-tiny); line-height: 16px; }
    .ty-section { padding: var(--s-5); }
    .ty-perf { margin: 0 var(--s-5); }
    .ty-perf::before { left: calc(-1 * var(--s-5) - 12px); }
    .ty-perf::after { right: calc(-1 * var(--s-5) - 12px); }
    .ty-meta { grid-template-columns: minmax(0, 1fr); gap: var(--s-4); }
    .ty-actions { flex-direction: column-reverse; align-items: stretch; }
}

/* Kortingscode: verfijning states (ronde 2) */
.co-discount:has([data-clear-discount]:not([hidden])) [data-apply-discount] { display: none; }
.co-discount:has(#discount_code:disabled) .co-discount__msg {
    padding: 10px var(--s-3);
    border-radius: var(--r-small);
    background: var(--accent-soft);
}

/* smalle schermen: kop van het inklapbare overzicht op één regel (chevron volstaat als toggle) */
@media (max-width: 420px) {
    .co-summary__toggle-show, .co-summary-toggle:checked ~ .checkout .co-summary__toggle-hide { display: none; }
}
