/* ============================================================================
   BESTE KUMPELS - Custom Checkout
   ----------------------------------------------------------------------------
   Uebertraegt die Designsprache des Checkout-Prototyps auf den NOVA-Checkout.
   Der JTL-Bestellvorgang bleibt dreistufig (Adresse / Versand+Zahlung /
   Uebersicht); jede Stufe wird als Sektionszeile mit Nummernkreis dargestellt,
   erledigte Stufen klappen zu einer Zusammenfassung mit "Aendern" zusammen.

   Alles ist unter #checkout bzw. .bk-co- gescoped und wirkt daher nur auf der
   Bestellvorgangsseite, obwohl die Datei ueber <Minify> global gebuendelt wird.

   Ladereihenfolge (template.xml): BesteKumpels.css -> custom.css ->
   eigenes.css -> bk-base.css -> cart.css -> checkout.css. Diese Datei gewinnt
   also. Aenderungen brauchen nur einen Template-/Objektcache-Leerlauf, kein
   SCSS-Recompile. Die Farb-Tokens (--bk-*) kommen aus bk-base.css.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1. Tokens
   Die Marken-Palette steht in bk-base.css (:root) - sie wird auch vom
   seitlichen Warenkorb benutzt. Hier nur noch, was allein die Kasse braucht.
   Die Schrift bleibt bewusst die Theme-Schrift (Inter): Header und Footer der
   Seite werden nicht mitgestylt, ein eigener Font nur im Mittelteil wuerde
   sichtbar brechen.
   ------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   2. Rahmen und Grundlayout
   ------------------------------------------------------------------------- */
#checkout {
    color: var(--bk-text);
    font-size: 15px;
    line-height: 1.6;
    max-width: 1260px;
    padding-bottom: 70px;
}

#checkout .bk-co {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, .9fr);
    gap: 46px;
    align-items: start;
}

#checkout .bk-co-title {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    font-size: 28px;
    font-weight: 800;
    color: var(--bk-teal);
    letter-spacing: -.02em;
    text-transform: none;
}

#checkout .bk-co-main {
    min-width: 0;
}

/* Die Schritt-Templates bringen jeweils ihre eigene h1 mit ("Neukunde",
   "Rechnungs- und Lieferadresse", ...). Die Sektionszeile fuehrt denselben
   Titel schon als h2 - die h1 im Inhalt entfaellt damit ersatzlos.
   Gliederung der Seite: h1 "Kasse" > h2 je Schritt. */
#checkout .bk-co-secb h1 { display: none; }

@keyframes bkCoRise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
@keyframes bkCoUp {
    from { transform: translateY(110%); }
}
@keyframes bkCoShake {
    0%, 100% { transform: none; }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
    #checkout *,
    .bk-co-sheet,
    .bk-co-mbar,
    .bk-co-toasts * {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-delay: 0ms !important;
    }
}

/* ---------------------------------------------------------------------------
   3. Sektionszeilen (ersetzen den NOVA-Stepper)
   ------------------------------------------------------------------------- */
#checkout .bk-co-secs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#checkout .bk-co-sec {
    border-bottom: 1px solid var(--bk-line);
    padding-bottom: 16px;
    scroll-margin-top: 110px;
    animation: bkCoRise .5s var(--bk-ease) backwards;
}
#checkout .bk-co-sec:nth-child(2) { animation-delay: .06s; }
#checkout .bk-co-sec:nth-child(3) { animation-delay: .12s; }
#checkout .bk-co-sec:last-child { border-bottom: 0; }

#checkout .bk-co-sechd {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    text-align: left;
    color: inherit;
    text-decoration: none;
}
#checkout a.bk-co-sechd:hover { text-decoration: none; }
#checkout a.bk-co-sechd:hover .bk-co-edit { color: var(--bk-teal-h); }

/* Nummernkreis */
#checkout .bk-co-bn {
    position: relative;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dedede;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    transition: background .35s var(--bk-ease);
}
#checkout .bk-co-sec[data-open="true"] .bk-co-bn { background: var(--bk-coral); }
#checkout .bk-co-sec[data-done="true"] .bk-co-bn { background: var(--bk-ok); }
#checkout .bk-co-bn i { font-style: normal; transition: opacity .2s ease; }
#checkout .bk-co-sec[data-done="true"] .bk-co-bn i { opacity: 0; }
#checkout .bk-co-bn svg {
    position: absolute;
    inset: 0;
    margin: auto;
    opacity: 0;
    transition: opacity .15s ease;
}
#checkout .bk-co-bn svg path {
    stroke-dasharray: 26;
    stroke-dashoffset: 26;
    transition: stroke-dashoffset .5s var(--bk-ease) .08s;
}
#checkout .bk-co-sec[data-done="true"] .bk-co-bn svg { opacity: 1; }
#checkout .bk-co-sec[data-done="true"] .bk-co-bn svg path { stroke-dashoffset: 0; }

#checkout .bk-co-sect {
    flex: 1;
    min-width: 0;
}
#checkout .bk-co-sect h2 {
    display: block;
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--bk-teal);
    letter-spacing: -.015em;
    text-transform: none;
    line-height: 1.3;
}
#checkout .bk-co-sec[data-open="false"][data-done="false"] .bk-co-sect h2 { color: var(--bk-faint); }
#checkout .bk-co-sect small {
    display: block;
    font-size: 13.5px;
    color: var(--bk-muted);
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#checkout .bk-co-sec[data-open="true"] .bk-co-sect small { display: none; }

#checkout .bk-co-edit {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--bk-teal);
    text-decoration: underline;
    text-underline-offset: 3px;
    flex: 0 0 auto;
}
#checkout .bk-co-sec[data-done="true"][data-open="false"] .bk-co-edit { display: flex; }

#checkout .bk-co-secb {
    padding: 12px 0 4px 43px;
    animation: bkCoRise .45s var(--bk-ease) .1s backwards;
}
@media (max-width: 640px) {
    #checkout .bk-co-secb { padding: 12px 0 4px; }
    #checkout .bk-co-sect h2 { font-size: 18px; }
}

/* Die Schritt-Templates rechnen mit der vollen Seitenbreite und setzen ihren
   Inhalt in eine 9er-Spalte. In der schmalen linken Spalte ist das verschenkt. */
#checkout .bk-co-secb > .row > .col-lg-9,
#checkout .bk-co-secb > .row > .col-lg-8 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Der Bestellkommentar sitzt im NOVA-Markup in einer halbbreiten Spalte.
   Als aufklappbare Notiz gehoert er ueber die volle Breite. */
#checkout .checkout-confirmation .row > [class*="col-"]:has(> .bk-co-note-wrap) {
    flex: 0 0 100%;
    max-width: 100%;
    margin-top: 4px;
}
/* Das Kuponfeld ist in die Bestelluebersicht gewandert; die Spalte, in der es
   im Bestaetigungsschritt stand, bleibt leer zurueck. */
#checkout .checkout-confirmation .row > [class*="col-"]:not(:has(*)) { display: none; }

/* NOVA-Abstaende innerhalb der Sektion entschaerfen */
#checkout .bk-co-secb hr { border-color: var(--bk-line-s); margin: 18px 0; }
#checkout .bk-co-secb fieldset { margin-bottom: 0; }
#checkout .bk-co-secb .h2 {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--bk-ink);
    letter-spacing: 0;
    margin: 0 0 12px;
}
#checkout .bk-co-secb .h3 {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--bk-ink);
    margin: 8px 0 0;
}
#checkout .bk-co-secb .required-info {
    font-size: 13px;
    color: var(--bk-muted);
    margin: 0 0 16px;
}
#checkout .bk-co-secb .required-info .required-star,
#checkout .bk-co-secb .col-form-label::after { color: var(--bk-star); }

/* ---------------------------------------------------------------------------
   4. Formularfelder - NOVA "label-slide" auf den Prototyp-Stil umbiegen
   NOVA setzt das Label auf die Rahmenkante. Der Prototyp legt es in das
   gefuellte Feld hinein.
   ------------------------------------------------------------------------- */
#checkout .form-control,
#checkout .custom-select {
    height: 60px;
    padding: 26px 22px 9px;
    background: var(--bk-field);
    border: 1px solid transparent;
    border-radius: var(--bk-radius);
    font-size: 15px;
    line-height: 1.4;
    color: var(--bk-ink);
    box-shadow: none;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
#checkout textarea.form-control {
    height: auto;
    min-height: 116px;
    padding: 31px 22px 14px;
    line-height: 1.55;
    resize: vertical;
}
#checkout .custom-select {
    padding-right: 48px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%237C7C7C' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 22px center;
    cursor: pointer;
}
#checkout .form-control:focus,
#checkout .custom-select:focus {
    background: #fff;
    border-color: var(--bk-teal);
    box-shadow: 0 0 0 3px var(--bk-teal-s);
    outline: 0;
}
@media (max-width: 640px) {
    /* unter 16px zoomt iOS beim Fokus in das Feld hinein */
    #checkout .form-control,
    #checkout .custom-select { font-size: 16px; }
}

#checkout .label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) label,
#checkout .label-slide .form-group:not(.exclude-from-label-slide):not(.checkbox) .col-form-label {
    top: 11px;
    left: 23px;
    transform: none;
    background: none;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--bk-muted);
    max-width: calc(100% - 46px);
}
#checkout .label-slide .form-group label::after { background: none; }

/* Leeres, unfokussiertes Feld: Label sitzt mittig als Platzhalter */
#checkout .label-slide .form-group .form-control:placeholder-shown:not(:focus) ~ label,
#checkout .label-slide .form-group .form-control:placeholder-shown:not(:focus) ~ .col-form-label,
#checkout .label-slide .form-group.typeahead-required label:not(.focused) {
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--bk-muted);
}
#checkout .label-slide .form-group textarea.form-control:placeholder-shown:not(:focus) ~ label {
    top: 29px;
}

/* PLZ- und Ortsfeld haengen im Shop in einem Typeahead-Wrapper. Der schiebt
   sich zwischen Label und Feld - deshalb arbeitet NOVA dort mit der Klasse
   .focused am Label (siehe Regel oben) statt mit :placeholder-shown. */
#checkout .twitter-typeahead {
    display: block !important;
    width: 100%;
}
#checkout .twitter-typeahead .tt-menu {
    width: 100%;
    background: #fff;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-box);
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .2);
    padding: 6px 0;
    z-index: 20;
}
#checkout .twitter-typeahead .tt-suggestion {
    padding: 8px 20px;
    font-size: 14px;
    cursor: pointer;
}
#checkout .twitter-typeahead .tt-suggestion:hover,
#checkout .twitter-typeahead .tt-suggestion.tt-cursor { background: var(--bk-teal-s); }

/* Fehlerzustand */
#checkout .form-group.has-error .form-control,
#checkout .form-group.has-error .custom-select {
    background: var(--bk-coral-s);
    border-color: var(--bk-coral-h);
}
#checkout .form-error-msg {
    font-size: 12.5px;
    color: var(--bk-coral-h);
    font-weight: 700;
    padding: 6px 22px 0;
}
#checkout .form-error-msg i { margin-right: 5px; }
#checkout .bk-co-shake { animation: bkCoShake .38s var(--bk-ease); }

/* Feldgruppen mit Ueberschrift links (NOVA: h3 + formrow) */
#checkout .bk-co-secb .row + .row { margin-top: 0; }
#checkout .form-group { margin-bottom: 11px; }

/* Checkboxen */
#checkout .custom-control.custom-checkbox { padding-left: 30px; }
#checkout .custom-checkbox .custom-control-label {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--bk-text);
    font-weight: 400;
}
#checkout .custom-checkbox .custom-control-label::before {
    width: 19px;
    height: 19px;
    left: -30px;
    top: 2px;
    border: 1.5px solid #c4c4c4;
    border-radius: 3px;
    background: #fff;
    transition: all .2s var(--bk-ease);
}
#checkout .custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
    background: var(--bk-coral);
    border-color: var(--bk-coral);
}
#checkout .custom-checkbox .custom-control-label::after {
    width: 19px;
    height: 19px;
    left: -30px;
    top: 2px;
}
#checkout .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px var(--bk-teal-s);
}

/* ---------------------------------------------------------------------------
   5. Options-Karten fuer Versandart und Zahlungsart
   NOVA rendert Bootstrap-custom-radios; hier werden sie zur Karte.
   ------------------------------------------------------------------------- */
#checkout .checkout-shipping-form-options .custom-control,
#checkout .checkout-payment-method .custom-control {
    display: block;
    width: 100%;
    padding: 0 0 0 0;
    margin: 0 0 9px;
    border: 1.5px solid var(--bk-line);
    border-radius: var(--bk-box);
    background: #fff;
    transition: border-color .24s var(--bk-ease), background .24s var(--bk-ease);
}
#checkout .checkout-shipping-form-options .custom-control:hover,
#checkout .checkout-payment-method .custom-control:hover { border-color: #d0d0d0; }

#checkout .checkout-shipping-form-options .custom-control-label,
#checkout .checkout-payment-method .custom-control-label {
    display: block;
    width: 100%;
    padding: 15px 17px 15px 52px;
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    color: var(--bk-ink);
}
/* NOVA setzt bei :checked global font-weight bold - hier stoert das */
#checkout .checkout-shipping-form-options .custom-control-input:checked ~ .custom-control-label,
#checkout .checkout-payment-method .custom-control-input:checked ~ .custom-control-label {
    font-weight: 400;
}

/* aktive Karte */
#checkout .checkout-shipping-form-options .custom-control:has(.custom-control-input:checked),
#checkout .checkout-payment-method .custom-control:has(.custom-control-input:checked),
#checkout .checkout-shipping-form-options .custom-control.bk-co-on,
#checkout .checkout-payment-method .custom-control.bk-co-on {
    border-color: var(--bk-coral);
    background: #fefaf9;
}

/* Radiopunkt */
#checkout .checkout-shipping-form-options .custom-control-label::before,
#checkout .checkout-payment-method .custom-control-label::before {
    width: 18px;
    height: 18px;
    left: 18px;
    top: 17px;
    border: 1.5px solid #c4c4c4;
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
    transition: border-color .2s var(--bk-ease);
}
#checkout .checkout-shipping-form-options .custom-control-input:checked ~ .custom-control-label::before,
#checkout .checkout-payment-method .custom-control-input:checked ~ .custom-control-label::before {
    background: #fff;
    border-color: var(--bk-coral);
}
#checkout .checkout-shipping-form-options .custom-control-label::after,
#checkout .checkout-payment-method .custom-control-label::after {
    width: 9px;
    height: 9px;
    left: 22.5px;
    top: 21.5px;
    border-radius: 50%;
    background: var(--bk-coral);
    background-image: none;
    transform: scale(0);
    transition: transform .3s var(--bk-spring);
}
#checkout .checkout-shipping-form-options .custom-control-input:checked ~ .custom-control-label::after,
#checkout .checkout-payment-method .custom-control-input:checked ~ .custom-control-label::after {
    transform: scale(1);
}

/* Inhalt der Versandkarte: Name / Laufzeit / Preis */
#checkout .checkout-shipping-form-options .custom-control-label .row.content {
    display: flex;
    align-items: center;
    margin: 0;
    gap: 6px 0;
}
#checkout .checkout-shipping-form-options .custom-control-label .row.content > [class*="col"] {
    padding-left: 0;
    padding-right: 0;
}
#checkout .checkout-shipping-form-options .custom-control-label .title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--bk-ink);
}
#checkout .checkout-shipping-form-options .custom-control-label .title small {
    display: block;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--bk-muted);
    margin-top: 2px;
}
#checkout .checkout-shipping-form-options .custom-control-label .desc {
    font-size: 13.5px;
    color: var(--bk-muted);
}
#checkout .checkout-shipping-form-options .custom-control-label .price-col,
#checkout .checkout-payment-method .checkout-payment-method-badge {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--bk-ink);
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
#checkout .checkout-payment-method .checkout-payment-method-badge {
    float: right;
    margin-left: 12px;
}
#checkout .checkout-payment-method .title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--bk-ink);
}
#checkout .checkout-payment-method .checkout-payment-method-note {
    display: block;
    font-size: 13.5px;
    color: var(--bk-muted);
    margin-top: 2px;
}
#checkout .checkout-payment-method img { max-height: 26px; width: auto; }

#checkout .checkout-shipping-form-options-specific-cost {
    display: block;
    width: 100%;
    font-size: 13px;
    color: var(--bk-muted);
    margin-top: 6px;
}
#checkout .checkout-shipping-form-options-specific-cost ul { padding-left: 0; list-style: none; margin: 0; }

/* Verpackungsarten als flachere Variante derselben Karte */
#checkout .checkout-shipping-form-packaging .custom-control {
    display: block;
    width: 100%;
    padding-left: 44px;
    margin-bottom: 9px;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-box);
}
#checkout .checkout-shipping-form-packaging .custom-control-label {
    display: block;
    padding: 13px 15px 13px 0;
    cursor: pointer;
}
#checkout .checkout-shipping-form-packaging-title { font-weight: 700; color: var(--bk-ink); }
#checkout .checkout-shipping-form-packaging-desc { color: var(--bk-muted); }

/* Lieferadresszeile ueber den Versandarten */
#checkout .checkout-shipping-form-change {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--bk-text);
    margin: 0 0 14px;
}
#checkout .checkout-shipping-form-change .btn-link {
    padding: 0;
    color: var(--bk-teal);
    font-size: 14px;
}

/* Zahlungsmodul-Formulare (Plugins) unterhalb der gewaehlten Karte */
#checkout .payment-method-inner,
#checkout .checkout-additional-payment {
    padding: 0 17px 15px 52px;
    font-size: 13.5px;
    color: var(--bk-muted);
}
@media (max-width: 560px) {
    #checkout .checkout-shipping-form-options .custom-control-label,
    #checkout .checkout-payment-method .custom-control-label { padding: 14px 13px 14px 46px; }
    #checkout .checkout-shipping-form-options .custom-control-label::before,
    #checkout .checkout-payment-method .custom-control-label::before { left: 14px; top: 16px; }
    #checkout .checkout-shipping-form-options .custom-control-label::after,
    #checkout .checkout-payment-method .custom-control-label::after { left: 18.5px; top: 20.5px; }
    #checkout .payment-method-inner,
    #checkout .checkout-additional-payment { padding: 0 13px 14px; }
}

/* ---------------------------------------------------------------------------
   6. Buttons
   ------------------------------------------------------------------------- */
#checkout .btn {
    border-radius: var(--bk-radius);
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
#checkout .btn-primary {
    min-height: 52px;
    padding: 12px 34px;
    background: var(--bk-coral);
    border-color: var(--bk-coral);
    color: #fff;
    font-size: 15.5px;
    transition: background .2s var(--bk-ease), transform .12s var(--bk-ease);
}
#checkout .btn-primary:hover,
#checkout .btn-primary:focus {
    background: var(--bk-coral-h);
    border-color: var(--bk-coral-h);
}
#checkout .btn-primary:active { transform: scale(.985); }
#checkout .btn-outline-primary {
    min-height: 52px;
    padding: 12px 24px;
    background: #fff;
    color: var(--bk-coral-h);
    border: 1.5px solid var(--bk-coral);
    font-size: 15px;
}
#checkout .btn-outline-primary:hover {
    background: var(--bk-coral-s);
    color: var(--bk-coral-h);
    border-color: var(--bk-coral);
}
#checkout .checkout-button-row { margin-top: 22px; }

/* ---------------------------------------------------------------------------
   7. Aufklapper (Kundenlogin, weitere Angaben, Bestellkommentar)
   ------------------------------------------------------------------------- */
#checkout .bk-co-coll {
    border: 1.5px dashed var(--bk-line);
    border-radius: var(--bk-box);
    margin: 0 0 20px;
    transition: border-color .25s var(--bk-ease), background .25s var(--bk-ease);
}
#checkout .bk-co-coll.bk-co-filled {
    border-style: solid;
    background: var(--bk-field);
    border-color: transparent;
}
#checkout .bk-co-coll[data-open="true"] {
    border-style: solid;
    border-color: var(--bk-teal);
    background: #fcfefe;
}
#checkout .bk-co-collt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 15px 17px;
    background: none;
    border: 0;
    text-align: left;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--bk-ink);
    cursor: pointer;
}
#checkout .bk-co-collt > span {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}
#checkout .bk-co-collt small,
#checkout .bk-co-collt em {
    font-style: normal;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bk-muted);
}
#checkout .bk-co-collt .bk-co-arr { transition: transform .32s var(--bk-ease); flex: 0 0 auto; }
#checkout .bk-co-coll[data-open="true"] .bk-co-arr { transform: rotate(180deg); }
#checkout .bk-co-collb {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .38s var(--bk-ease);
}
#checkout .bk-co-coll[data-open="true"] .bk-co-collb { grid-template-rows: 1fr; }
#checkout .bk-co-collb > div { overflow: hidden; min-height: 0; }
#checkout .bk-co-collb .bk-co-collin { padding: 2px 17px 17px; }
#checkout .bk-co-coll.bk-co-filled .form-control { background: #fff; }

#checkout .bk-co-orl {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 4px 0 20px;
    color: var(--bk-faint);
}
#checkout .bk-co-orl::before,
#checkout .bk-co-orl::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--bk-line);
}
#checkout .bk-co-orl span {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

#checkout .bk-co-eyebrow {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bk-muted);
    margin: 0 0 11px;
}

/* Slot fuer Express-Zahlarten. Das PayPal-Plugin fuellt #lpxPPExpress erst per
   JavaScript; solange der Container leer bleibt, darf der Slot keinen Platz
   einnehmen (sonst steht ueber dem Login eine leere Luecke). */
#checkout .bk-co-express { margin: 0 0 6px; }
#checkout .bk-co-express:has(> div:empty) { display: none; }
#checkout .bk-co-express > div:empty { display: none; }

/* E-Mail-Tippfehlervorschlag */
#checkout .bk-co-sugg {
    display: none;
    margin: 6px 0 0 12px;
    padding: 7px 14px;
    border: 1px solid var(--bk-teal);
    border-radius: var(--bk-radius);
    background: var(--bk-teal-s);
    font-size: 13px;
    font-weight: 700;
    color: var(--bk-teal);
    cursor: pointer;
    animation: bkCoRise .3s var(--bk-ease);
}
#checkout .bk-co-sugg[data-on="true"] { display: inline-block; }

/* ---------------------------------------------------------------------------
   8. Bestelluebersicht (Aside)
   ------------------------------------------------------------------------- */
#checkout .bk-co-aside {
    position: sticky;
    top: 92px;
    min-width: 0;
    animation: bkCoRise .55s var(--bk-ease) .18s backwards;
}

.bk-co-card {
    background: #fff;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-box);
    overflow: hidden;
}
.bk-co-card-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--bk-line);
}
.bk-co-card-hd h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--bk-teal);
    text-transform: none;
    letter-spacing: 0;
}
.bk-co-card-hd em {
    font-style: normal;
    font-size: 13.5px;
    color: var(--bk-muted);
}

.bk-co-items { padding: 0 20px; }
.bk-co-it {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid var(--bk-line-s);
}
.bk-co-it:last-child { border-bottom: 0; }
.bk-co-ph {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: var(--bk-box);
    background: var(--bk-field);
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--bk-faint);
}
.bk-co-ph picture,
.bk-co-ph a {
    display: block;
    width: 100%;
    height: 100%;
}
.bk-co-ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
}
.bk-co-it-n {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--bk-ink);
    line-height: 1.35;
}
.bk-co-it-n a { color: inherit; text-decoration: none; }
.bk-co-it-n a:hover { color: var(--bk-teal); }
.bk-co-it-s {
    font-size: 12.5px;
    color: var(--bk-muted);
    margin-top: 3px;
}
.bk-co-it-p {
    font-size: 15px;
    font-weight: 800;
    color: var(--bk-ink);
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.bk-co-more {
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-top: 1px solid var(--bk-line-s);
    background: none;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--bk-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
}
.bk-co-more svg { transition: transform .3s var(--bk-ease); }
.bk-co-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.bk-co-items[data-collapsed="true"] .bk-co-it[data-extra="true"] { display: none; }

/* Fortschritt zur Versandkostenfreiheit */
.bk-co-prog {
    padding: 15px 20px;
    background: var(--bk-field);
    border-top: 1px solid var(--bk-line);
    transition: background .5s var(--bk-ease);
}
.bk-co-prog-t {
    display: flex;
    gap: 9px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--bk-text);
    margin: 0;
}
.bk-co-prog-t b { color: var(--bk-ink); font-weight: 800; }
.bk-co-prog-t svg { flex: 0 0 auto; margin-top: 3px; color: var(--bk-muted); }
.bk-co-prog-bar {
    height: 8px;
    border-radius: 4px;
    background: #e2e2e2;
    overflow: hidden;
    margin-top: 10px;
}
.bk-co-prog-f {
    height: 100%;
    border-radius: 4px;
    background: var(--bk-coral);
    transition: width .6s var(--bk-ease), background .5s var(--bk-ease);
}
.bk-co-prog.bk-co-done { background: var(--bk-ok-s); }
.bk-co-prog.bk-co-done .bk-co-prog-f { background: var(--bk-ok); }
.bk-co-prog.bk-co-done .bk-co-prog-t b,
.bk-co-prog.bk-co-done .bk-co-prog-t svg { color: var(--bk-ok); }

/* Coupon */
.bk-co-cp { border-top: 1px solid var(--bk-line); }
.bk-co-cp .bk-co-collt { padding: 14px 20px; font-weight: 400; font-size: 14.5px; color: var(--bk-text); }
.bk-co-cp .bk-co-collin { padding: 0 20px 16px; }
.bk-co-cp .input-group { flex-wrap: nowrap; }
.bk-co-cp .form-control { border-radius: var(--bk-radius) 0 0 var(--bk-radius); }
.bk-co-cp .input-group-append .btn { border-radius: 0 var(--bk-radius) var(--bk-radius) 0; min-height: 60px; }
.bk-co-cp .credit-description { font-size: 12.5px; color: var(--bk-muted); margin-bottom: 10px; }

/* Summenblock */
.bk-co-sums { padding: 16px 20px 6px; border-top: 1px solid var(--bk-line); }
.bk-co-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    font-size: 14.5px;
}
.bk-co-row span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bk-co-row.bk-co-sm { font-size: 12.5px; color: var(--bk-muted); }
.bk-co-row.bk-co-gr {
    margin-top: 11px;
    padding: 14px 0 5px;
    border-top: 1px solid var(--bk-line);
    font-size: 18px;
    font-weight: 800;
    color: var(--bk-ink);
    align-items: baseline;
}
.bk-co-row.bk-co-gr b {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.025em;
    font-variant-numeric: tabular-nums;
}
.bk-co-vat[data-open="false"] .bk-co-vat-x { display: none; }
.bk-co-vat-t {
    font-size: 12.5px;
    color: var(--bk-muted);
    padding: 4px 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    cursor: pointer;
}
.bk-co-vat-t svg { transition: transform .3s var(--bk-ease); }
.bk-co-vat[data-open="true"] .bk-co-vat-t svg { transform: rotate(180deg); }

/* Abschluss */
.bk-co-pay { padding: 16px 20px 20px; }
.bk-co-cta {
    width: 100%;
    min-height: 58px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--bk-radius);
    background: var(--bk-coral);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 0 3px 12px -3px rgba(232, 135, 124, .55);
    transition: background .3s var(--bk-ease), transform .12s var(--bk-ease), opacity .2s;
}
.bk-co-cta:hover { background: var(--bk-coral-h); color: #fff; }
.bk-co-cta:active { transform: scale(.99); }
.bk-co-cta small { font-size: 12.5px; font-weight: 600; opacity: .92; }
.bk-co-cta[data-busy="true"] { opacity: .75; pointer-events: none; }
.bk-co-legal {
    margin: 12px 0 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--bk-muted);
    text-align: center;
}
.bk-co-legal p { margin: 0; }
.bk-co-legal a { color: var(--bk-teal); }
.bk-co-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px 18px;
    padding: 0 20px 20px;
}
.bk-co-trust div {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: var(--bk-muted);
}
.bk-co-trust svg { color: var(--bk-teal); flex: 0 0 auto; }

/* ---------------------------------------------------------------------------
   9. Bestaetigungsschritt
   ------------------------------------------------------------------------- */
#checkout .checkout-confirmation .card {
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-box);
    box-shadow: none;
}
#checkout .checkout-confirmation .card-header {
    background: #fff;
    border-bottom: 1px solid var(--bk-line-s);
    padding: 13px 17px;
}
#checkout .checkout-confirmation .card-body { padding: 15px 17px; }
#checkout .checkout-confirmation-heading {
    font-size: 15px;
    font-weight: 800;
    color: var(--bk-ink);
    text-transform: none;
}
#checkout .checkout-confirmation .title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bk-muted);
}
#checkout .checkout-confirmation-change { color: var(--bk-teal); text-decoration: underline; text-underline-offset: 3px; }
#checkout .checkout-confirmation-legal-notice {
    font-size: 12.5px;
    color: var(--bk-muted);
    line-height: 1.55;
}
/* Der Artikelblock des Bestaetigungsschritts ist im Aside schon vorhanden */
#checkout .checkout-confirmation .card-products { display: none; }
/* Der eigene Absende-Button der Seite: der CTA im Aside uebernimmt */
#checkout .bk-co-hide-submit { display: none; }

/* ---------------------------------------------------------------------------
   10. Mobile: Kopfleiste, Bestellleiste, Sheet
   ------------------------------------------------------------------------- */
.bk-co-mtop,
.bk-co-mbar { display: none; }

@media (max-width: 991.98px) {
    #checkout {
        padding-bottom: 132px;
    }
    #checkout .bk-co {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    #checkout .bk-co-title { font-size: 23px; }
    #checkout .bk-co-sec { scroll-margin-top: 132px; }
    #checkout .bk-co-aside { position: static; animation: none; }
    #checkout .bk-co-aside > .bk-co-card { display: none; }

    .bk-co-mtop {
        display: block;
        position: sticky;
        top: 0;
        z-index: 30;
        background: rgba(255, 255, 255, .97);
        border-bottom: 1px solid var(--bk-line);
        margin: 0 -15px 4px;
        padding: 10px 15px;
    }
    .bk-co-mtop .bk-co-mtop-r {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .bk-co-mtop .bk-co-lb {
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .07em;
        text-transform: uppercase;
        color: var(--bk-muted);
    }
    .bk-co-mtop b {
        display: block;
        font-size: 20px;
        font-weight: 900;
        color: var(--bk-ink);
        letter-spacing: -.025em;
        font-variant-numeric: tabular-nums;
    }
    .bk-co-mtop small { display: block; font-size: 11.5px; color: var(--bk-muted); font-weight: 700; }
    .bk-co-mtop small.bk-co-free { color: var(--bk-ok); }
    .bk-co-mtop button {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 13.5px;
        font-weight: 700;
        color: var(--bk-teal);
        background: none;
        border: 1.5px solid var(--bk-line);
        border-radius: var(--bk-radius);
        padding: 9px 14px;
        flex: 0 0 auto;
        cursor: pointer;
    }

    .bk-co-mbar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 35;
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--bk-line);
        padding: 10px 16px calc(11px + env(safe-area-inset-bottom));
        animation: bkCoUp .5s var(--bk-ease) .3s backwards;
    }
    .bk-co-mbar .bk-co-cta { min-height: 54px; }

    /* Die App-Bottombar des Shops wuerde sich mit der Bestellleiste stapeln */
    body.bk-co-page .bk-mobile-bottombar { display: none !important; }
}

.bk-co-ov {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s var(--bk-ease);
}
.bk-co-ov[data-on="true"] { opacity: 1; pointer-events: auto; }
.bk-co-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1041;
    max-height: 87vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    transform: translateY(101%);
    transition: transform .46s var(--bk-ease);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
}
.bk-co-sheet[data-on="true"] { transform: translateY(0); }
.bk-co-grab {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #dadada;
    margin: 10px auto 2px;
    flex: 0 0 auto;
}
.bk-co-sheet-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 12px;
    border-bottom: 1px solid var(--bk-line);
    flex: 0 0 auto;
}
.bk-co-sheet-hd h2 { margin: 0; font-size: 18px; font-weight: 800; color: var(--bk-teal); text-transform: none; }
.bk-co-sheet-hd button { color: var(--bk-muted); padding: 4px; background: none; border: 0; cursor: pointer; }
.bk-co-sheet-sc {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
/* Das Sheet bekommt eine Kopie der Uebersichtskarte. checkout.js entfernt
   dabei Bestellbutton, Guetezeichen, Kopfzeile und Kuponformular aus der
   Kopie; die Regeln hier sind nur der Gurt zum Hosentraeger. */
.bk-co-sheet-sc .bk-co-card { border: 0; border-radius: 0; }
.bk-co-sheet-sc .bk-co-pay,
.bk-co-sheet-sc .bk-co-trust,
.bk-co-sheet-sc .bk-co-cp,
.bk-co-sheet-sc .bk-co-more,
.bk-co-sheet-sc .bk-co-card-hd { display: none; }

/* ---------------------------------------------------------------------------
   11. Toasts
   ------------------------------------------------------------------------- */
.bk-co-toasts {
    position: fixed;
    z-index: 1080;
    right: 22px;
    bottom: 22px;
    display: flex;
    flex-direction: column-reverse;
    gap: 9px;
    pointer-events: none;
}
@media (max-width: 991.98px) {
    .bk-co-toasts { left: 14px; right: 14px; bottom: calc(96px + env(safe-area-inset-bottom)); }
}
.bk-co-tst {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: var(--bk-ink);
    color: #f2f2f2;
    padding: 14px 17px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    max-width: 380px;
    box-shadow: 0 8px 28px -8px rgba(0, 0, 0, .45);
    transform: translateY(14px) scale(.96);
    opacity: 0;
    transition: transform .44s var(--bk-spring), opacity .3s var(--bk-ease);
}
.bk-co-tst[data-on="true"] { transform: translateY(0) scale(1); opacity: 1; }
.bk-co-tst svg { flex: 0 0 auto; margin-top: 1px; }
.bk-co-tst.bk-co-tst-ok svg { color: #74d6a0; }
.bk-co-tst.bk-co-tst-err svg { color: #f0a093; }

/* ---------------------------------------------------------------------------
   12. Ladezustand beim AJAX-Wechsel der Versandart
   ------------------------------------------------------------------------- */
#result-wrapper.loading { opacity: .55; transition: opacity .2s ease; }
