/* Checkout follows the active Ben Hofland theme colors and typography. */
.bh-shop .bh-checkout { max-width:1120px; margin:0 auto; }
.bh-checkout-heading { margin:12px 0 28px; }
.bh-checkout-eyebrow { color:var(--bh-green); font-size:var(--bh-label-size); font-weight:700; letter-spacing:.12em; text-transform:uppercase; margin:0 0 8px; }
.bh-shop .bh-checkout-heading h1 { font-size:var(--bh-h1-size); margin:0 0 10px; line-height:1.15; }
.bh-checkout-heading>p:last-child { margin:0; }
.bh-shop #content .bh-checkout h2 { font-size:22px; font-weight:700; line-height:1.4; margin:0 0 20px; }
.bh-checkout-card,.bh-checkout-cart,.bh-checkout-choices { border:1px solid color-mix(in srgb,var(--bh-ink) 16%,var(--bh-paper)); border-radius:6px; padding:28px; background:var(--bh-paper); }
.bh-checkout-cart { margin-bottom:24px; }
.bh-checkout-cart>.row { margin:0; }
.bh-checkout-cart #render_cart_here { padding:0; }
.bh-checkout-cart #render_cart_here>.row { display:grid; grid-template-columns:96px minmax(0,1fr); gap:20px; margin:0; padding:18px 0; border-top:1px solid var(--bh-selection); }
.bh-checkout-cart #render_cart_here>.row:first-child { border-top:0; padding-top:0; }
.bh-checkout-cart #render_cart_here>.row:last-child { padding-bottom:0; }
.bh-checkout-cart .checkout_article_img,.bh-checkout-cart #render_cart_here>.row>.col-8 { width:auto; max-width:none; padding:0; }
.bh-checkout-cart .checkout_article_img img { width:96px; height:96px; object-fit:contain; }
.bh-checkout-cart .sw_checkout_line { margin:0; align-items:start; font-weight:600; gap:12px; }
.bh-checkout-cart .sw_checkout_line>.col-6 { flex:1; max-width:none; padding:0; }
.bh-checkout-cart .sw_checkout_line>.col-3 { flex:none; max-width:none; width:auto; padding:0; white-space:nowrap; }
.bh-checkout-cart [data-od-id][data-stockinfo] { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:0; margin-top:14px; }
.bh-shop .bh-checkout-cart input.shopping-cart { width:64px; flex:none; max-width:none; height:40px; padding:8px; text-align:center; background:var(--bh-selection); border-radius:4px; font-weight:400; }
.bh-checkout-cart [data-direction] { width:40px; height:40px; border:1px solid var(--bh-selection); background:var(--bh-paper); border-radius:4px; color:var(--bh-ink); }
.bh-checkout-cart [data-direction]:hover { background:var(--bh-selection); }
.bh-checkout-choices { margin:0 15px; max-width:calc(100% - 30px); }
.bh-checkout-choices>p { margin:0 0 22px; }
.bh-shop #checkout_options_total_line { margin:0 0 24px; padding:0 0 18px; border-bottom:1px solid var(--bh-selection); }
.bh-shop #checkout_options_total_line>div { padding:0; }
.bh-shop #checkout_options_total_line h3 { margin:0; font-size:20px; }
.bh-checkout-choice-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:stretch; }
.bh-checkout-account-choices { display:grid; gap:10px; }
.bh-shop .bh-checkout .webshop_select_option { position:relative; border:1px solid color-mix(in srgb,var(--bh-ink) 20%,var(--bh-paper)); border-radius:4px; margin:0 0 12px; padding:16px 44px 16px 18px; min-height:54px; font-weight:500; cursor:pointer; line-height:1.5; }
.bh-shop .bh-checkout .webshop_select_option:hover { border-color:var(--bh-green); background:var(--bh-selection); }
.bh-shop .bh-checkout #checkout_guest { display:flex; flex-direction:column; justify-content:center; gap:8px; background:var(--bh-green); border-color:var(--bh-green); color:var(--bh-paper); margin:0; padding:22px; }
.bh-checkout-guest strong { font-size:20px; }
.bh-checkout-guest span { font-size:var(--bh-small-size); }
.bh-checkout-account-choices .webshop_select_option { margin-bottom:0; }
.bh-shop #checkout_one_page:not(.hide) { display:grid; grid-template-columns:minmax(0,1fr) 360px; grid-template-areas:"back back" "codes codes" "address summary" "delivery summary"; gap:24px; margin-top:24px; align-items:start; }
.bh-checkout-back { grid-area:back; padding:0; }
.bh-checkout-back button { border:0; background:transparent; padding:4px 0; color:var(--bh-ink); font-size:var(--bh-small-size); }
.bh-checkout-back i { margin-right:8px; }
.bh-checkout-codes { grid-area:codes; margin:0; padding:0; width:100%; }
.bh-checkout-codes:not(:has(> :not(.hide))) { display:none; }
.bh-checkout-address { grid-area:address; }
.bh-checkout-delivery { grid-area:delivery; }
.bh-checkout-summary { grid-area:summary; background:var(--bh-selection); position:sticky; top:min(calc(var(--bh-sticky-nav-height,167px) + 20px),calc(100dvh - var(--bh-checkout-summary-height,0px) - 20px)); }
.bh-checkout-step { display:inline-flex; width:30px; height:30px; align-items:center; justify-content:center; margin-right:8px; font-size:15px; background:var(--bh-green); color:var(--bh-paper); border-radius:50%; vertical-align:middle; }
.bh-checkout-hint { font-size:var(--bh-small-size); margin:-8px 0 20px; }
.bh-checkout-address .row,.bh-checkout-delivery>.row { margin:0; }
.bh-checkout-address .col-12,.bh-checkout-delivery .col-12,.bh-checkout-summary>.col-12 { padding:0; }
.bh-checkout-label { display:block; margin:18px 0 7px; font-size:14px; font-weight:600; line-height:1.5; }
.bh-checkout-address .bh-checkout-label:first-child { margin-top:0; }
.bh-shop .bh-checkout :is(input:not([type=checkbox]),select,textarea).form-control { width:100%; max-width:100%; min-height:48px; height:auto; padding:11px 13px; font-family:inherit; font-size:var(--bh-text-size); font-weight:400; line-height:1.5; color:var(--bh-ink); background:var(--bh-selection); border:1px solid color-mix(in srgb,var(--bh-ink) 20%,var(--bh-paper)); border-radius:4px; box-shadow:none; }
.bh-shop .bh-checkout .bh-checkout-summary textarea.form-control { background:var(--bh-paper); min-height:96px; resize:vertical; }
.bh-checkout-address :is(#sw-form-invoice_address,#sw-form-delivery_address)>div:has(>.col-8) { display:flex; gap:12px; padding:0; margin-top:18px; }
.bh-checkout-address :is(#sw-form-invoice_address,#sw-form-delivery_address)>div:has(>.col-8)>div { padding:0; }
.bh-checkout-address :is(#sw-form-invoice_address,#sw-form-delivery_address)>div>.col-8 { flex:1; max-width:none; }
.bh-checkout-address :is(#sw-form-invoice_address,#sw-form-delivery_address)>div>.col-4 { flex:0 0 120px; max-width:none; }
.bh-checkout-check { display:flex; align-items:center; gap:10px; margin:18px 0 0; font-weight:400; cursor:pointer; }
.bh-shop .bh-checkout input[type=checkbox].form-control { width:19px; height:19px; min-height:19px; flex:0 0 19px; padding:0; margin:0; accent-color:var(--bh-green); }
.bh-checkout-payment-title { margin-top:28px !important; }
.bh-checkout .webshop_select_send_option::after,.bh-checkout .webshop_select_payment_option::after { content:""; position:absolute; right:16px; top:20px; width:17px; height:17px; border:1px solid var(--bh-ink); border-radius:50%; background:var(--bh-paper); }
.bh-shop .bh-checkout .webshop_select_option[is_selected="1"] { border-color:var(--bh-green); background:color-mix(in srgb,var(--bh-green) 7%,var(--bh-paper)); }
.bh-checkout .webshop_select_option[is_selected="1"]::after { background:var(--bh-green); box-shadow:inset 0 0 0 4px var(--bh-paper); }
.bh-checkout #payment_methods_webshop img { width:30px; height:24px; object-fit:contain; margin-right:10px; }
.bh-checkout-summary>.col-12>.row { margin:0 0 12px; font-size:var(--bh-text-size); }
.bh-checkout-summary>.col-12>.row>div { padding:0; }
.bh-checkout-summary .checkout_total_block { border-top:1px solid color-mix(in srgb,var(--bh-ink) 20%,var(--bh-paper)); padding-top:18px; margin-top:18px !important; }
.bh-checkout-summary .checkout_total_block h3 { font-size:23px; margin:0; font-weight:700; }
.bh-checkout-terms { display:flex; flex-direction:row-reverse; justify-content:flex-end; gap:10px; margin:22px 0 0; font-size:var(--bh-small-size); font-weight:400; cursor:pointer; }
.bh-checkout-terms>.col-10 { padding:0; flex:1; max-width:none; }
.bh-checkout-terms>.col-2 { padding:2px 0 0; flex:0 0 19px; }
.bh-checkout-summary #sw_finish_cart { display:block; width:100%; min-height:54px; margin-top:22px; padding:14px 20px; border:0; border-radius:4px; background:var(--bh-rust); color:var(--bh-paper); font-size:16px; font-weight:700; }
.bh-checkout-summary>.col-12>.row:last-child>.col-6:first-child { display:none; }
.bh-checkout-summary>.col-12>.row:last-child>.col-6:last-child { flex:0 0 100%; max-width:100%; }
.bh-checkout :is(input,select,textarea,button,[role=button],[role=radio]):focus-visible { outline:2px solid var(--bh-green); outline-offset:3px; }
.bh-checkout .has_error { border-color:var(--bh-rust) !important; }
.bh-checkout .form-error { margin:8px 0; color:var(--bh-rust); font-size:var(--bh-small-size); }
.bh-checkout #alt_delivery_form { margin-top:26px; padding-top:22px; border-top:1px solid var(--bh-selection); }
@media(max-width:991px) {
 .bh-shop #checkout_one_page:not(.hide) { grid-template-columns:minmax(0,1fr); grid-template-areas:"back" "codes" "address" "delivery" "summary"; gap:20px; }
 .bh-checkout-summary { position:static; }
}
@media(max-width:575px) {
 .bh-checkout-heading { margin:8px 0 22px; }
 .bh-shop .bh-checkout-heading h1 { font-size:32px; }
 .bh-checkout-card,.bh-checkout-cart,.bh-checkout-choices { padding:20px; }
 .bh-checkout-choice-grid { grid-template-columns:minmax(0,1fr); }
 .bh-checkout-account-choices { grid-template-columns:1fr 1fr; }
 .bh-checkout-account-choices .webshop_select_option { padding:13px; text-align:center; font-size:14px; }
 .bh-checkout-cart #render_cart_here>.row { grid-template-columns:64px minmax(0,1fr); gap:12px; }
 .bh-checkout-cart .checkout_article_img img { width:64px; height:74px; }
 .bh-checkout-cart .sw_checkout_line { display:block; }
 .bh-checkout-cart .sw_checkout_line .pull-right { float:none; margin-top:4px; }
 .bh-shop #content .bh-checkout h2 { font-size:20px; }
 .bh-checkout-address :is(#sw-form-invoice_address,#sw-form-delivery_address)>div>.col-4 { flex-basis:100px; }
}

/* These checkboxes stay direct children for the existing checkout behavior. */
.bh-checkout :is(#account_create,#alt_delivery,#checkout_newsletter_subscribe):not(.hide) { display:flex; align-items:center; gap:10px; margin-top:18px; }
.bh-checkout :is(#account_create,#alt_delivery,#checkout_newsletter_subscribe) .bh-checkout-check { margin:0; }
.bh-shop .bh-checkout .bh-checkout-cart input.shopping-cart.form-control { width:64px; height:40px; min-height:40px; padding:8px; flex:0 0 64px; }

/* Keep the guest action and cart visible together before entering the form. */
@media(min-width:992px) {
 .bh-checkout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
 .bh-checkout>.bh-checkout-heading { grid-column:1/-1; margin-bottom:4px; }
 .bh-checkout>.bh-checkout-cart { grid-column:1; margin-bottom:0; }
 .bh-checkout>.row:has(#customer_checkout_options) { grid-column:2; margin:0; }
 .bh-checkout>.row:has(#customer_checkout_options)>.bh-checkout-choices { margin:0; max-width:100%; }
 .bh-checkout .bh-checkout-choice-grid { grid-template-columns:minmax(0,1fr); }
 .bh-checkout .bh-checkout-account-choices { grid-template-columns:1fr 1fr; }
 .bh-checkout .bh-checkout-account-choices .webshop_select_option { padding:14px; text-align:center; }
 .bh-checkout>.row:has(#wishlist_cart) { grid-column:1/-1; }
 .bh-checkout>.row:has(#wishlist_cart.hide),
 .bh-checkout>.row:has(#customer_checkout_options.hide) { display:none; }
 .bh-checkout:has(#customer_checkout_options.hide)>.bh-checkout-cart { grid-column:1/-1; }
 .bh-checkout>#checkout_one_page { grid-column:1/-1; width:100%; margin-top:0; }
}

.bh-checkout-discount {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--bh-selection);
}
.bh-checkout-discount .bh-checkout-label { margin-top: 0; }
.bh-checkout-discount-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
    align-items: end;
    max-width: 420px;
}
.bh-shop .bh-checkout-discount-fields .sw-form-submit {
    min-height: 48px;
    margin: 0;
    padding: 8px 14px;
    border-radius: 4px;
}
.bh-checkout-discount-fields .form-error { grid-column: 1 / -1; }
.bh-checkout-discount-status { margin: 8px 0 0; }
.bh-checkout-discount-status:empty { margin: 0; }
