/* Scoped to WooCommerce cart and checkout; native inputs and checkout logic stay intact. */
body.woocommerce-checkout,
body.woocommerce-cart {
  --hb-checkout-accent: var(--mfn-woo-bg-themecolor, #e93227);
  --hb-checkout-border: #e5e5e5;
}
body.woocommerce-checkout #Subheader { padding: 32px 0; }
body.woocommerce-checkout #Subheader .title { font-size: 36px; line-height: 1.2; }
body.woocommerce-checkout #Content .section_wrapper { max-width: 1240px; }
body.woocommerce-checkout .mfn-checkout-steps { margin-bottom: 24px !important; }
body.woocommerce-checkout .mcb-item-0126e3545 .mcb-column-inner { margin-bottom: 0; }
body.woocommerce-checkout .mcb-item-7b33lotn { display: none; }

/* Compact replacement for the oversized bank image and warning. */
.hb-bank-transfer-note {
  box-sizing: border-box; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 18px; align-items: center; padding: 22px 24px; margin: 0 0 28px;
  border: 1px solid var(--hb-checkout-border, #e5e5e5); border-left: 4px solid var(--hb-checkout-accent, #e93227);
  border-radius: 12px; background: #fafafa; color: #555; text-align: left;
}
.hb-bank-transfer-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: #fff0ee; color: var(--hb-checkout-accent, #e93227); }
.hb-bank-transfer-note .hb-bank-transfer-copy h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.3; font-weight: 650; color: #292929; }
.hb-bank-transfer-note .hb-bank-transfer-copy p { margin: 0; font-size: 14px; line-height: 1.65; }
.hb-bank-transfer-deadline { white-space: nowrap; border: 1px solid #f1d5d1; border-radius: 30px; padding: 7px 12px; color: #b42b23; background: #fff; font-size: 12px; font-weight: 650; }

/* Stable two-column checkout, independent of theme floats and field-clearing rules. */
body.woocommerce-checkout .woocommerce form.checkout {
  display: grid !important; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 32px; align-items: start; margin-top: 12px;
}
body.woocommerce-checkout form.checkout::before,
body.woocommerce-checkout form.checkout::after { display: none; }
body.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup,
body.woocommerce-checkout form.checkout > .woocommerce-NoticeGroup-checkout { grid-column: 1 / -1; max-width: 100%; }
body.woocommerce-checkout .woocommerce form.checkout #customer_details,
body.woocommerce-checkout .woocommerce form.checkout #order_review {
  box-sizing: border-box; float: none; width: 100%; min-width: 0; max-width: 100% !important; margin: 0;
}
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 { float: none; width: 100%; }
body.woocommerce-checkout #customer_details .col-2 { margin-top: 26px; }
body.woocommerce-checkout #customer_details h3 { font-size: 25px; line-height: 1.3; margin: 0 0 24px; }
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 20px; }
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper::before,
body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper::after,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper::before,
body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper::after { display: none; }
body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper > .form-row,
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields__field-wrapper > .form-row { grid-column: 1 / -1; width: auto !important; min-width: 0; float: none; clear: none; margin: 0; padding: 0; }
body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper > .form-row-first,
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields__field-wrapper > .form-row-first { grid-column: 1; }
body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper > .form-row-last,
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields__field-wrapper > .form-row-last { grid-column: 2; }
body.woocommerce-checkout #customer_details #billing_phone_field { grid-column: 1; }
body.woocommerce-checkout #customer_details #billing_email_field { grid-column: 2; }
body.woocommerce-checkout #customer_details .form-row > label { font-size: 14px; line-height: 1.5; font-weight: 550; color: #444; margin-bottom: 7px; }
body.woocommerce-checkout #customer_details .input-text,
body.woocommerce-checkout #customer_details select,
body.woocommerce-checkout #customer_details .select2-selection--single {
  box-sizing: border-box; width: 100%; min-height: 48px; margin-bottom: 0; border: 1px solid #d4d4d4;
  border-radius: 8px; background: #fff; box-shadow: none; color: #252525; font-size: 15px;
}
body.woocommerce-checkout #customer_details .input-text { padding: 11px 13px; }
body.woocommerce-checkout #customer_details textarea.input-text { min-height: 104px; resize: vertical; }
body.woocommerce-checkout #customer_details .input-text:focus,
body.woocommerce-checkout #customer_details select:focus { border-color: var(--hb-checkout-accent); outline: 2px solid #fbe1de; outline-offset: 1px; }
body.woocommerce-checkout #customer_details .select2-selection__rendered { line-height: 46px; padding-left: 13px; }
body.woocommerce-checkout #customer_details .select2-selection__arrow { height: 46px; }
body.woocommerce-checkout #customer_details input[type="checkbox"] { width: 17px; height: 17px; vertical-align: middle; margin-right: 8px; accent-color: var(--hb-checkout-accent); }
body.woocommerce-checkout #customer_details #billing_company_check_field { padding: 12px 14px; background: #fafafa; border: 1px solid var(--hb-checkout-border); border-radius: 8px; }
body.woocommerce-checkout #customer_details #billing_company_check_field label { margin-bottom: 0; }
body.woocommerce-checkout #ship-to-different-address { margin: 0 0 20px; padding: 15px; background: #fafafa; border: 1px solid var(--hb-checkout-border); border-radius: 10px; font-size: 16px; }
body.woocommerce-checkout #ship-to-different-address label { margin: 0; font-weight: 550; }
body.woocommerce-checkout .woocommerce-additional-fields h3 { font-size: 22px !important; }

/* Order summary and cart totals: aligned prices, shipping choices on their own full-width row. */
body.woocommerce-checkout .woocommerce #order_review { padding: 26px; border: 1px solid var(--hb-checkout-border); border-radius: 14px; background: #f8f8f8; }
body.woocommerce-checkout #order_review > h4 { margin: 0 0 20px; text-align: left; font-size: 23px; line-height: 1.3; }
body.woocommerce-checkout #order_review .shop_table,
body.woocommerce-cart .cart_totals .shop_table { display: block; width: 100%; border: 0; margin: 0 0 24px; table-layout: auto; }
body.woocommerce-checkout #order_review .shop_table > thead,
body.woocommerce-checkout #order_review .shop_table > tbody,
body.woocommerce-checkout #order_review .shop_table > tfoot,
body.woocommerce-cart .cart_totals .shop_table > tbody { display: block; width: 100%; }
body.woocommerce-checkout #order_review .shop_table tr,
body.woocommerce-cart .cart_totals .shop_table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; border-bottom: 1px solid #e5e5e5; }
body.woocommerce-checkout #order_review .shop_table th,
body.woocommerce-checkout #order_review .shop_table td,
body.woocommerce-cart .cart_totals .shop_table th,
body.woocommerce-cart .cart_totals .shop_table td { display: block; box-sizing: border-box; width: auto; min-width: 0; border: 0; padding: 16px 0; font-size: 14px; line-height: 1.55; text-align: left; }
body.woocommerce-checkout #order_review .shop_table .product-total,
body.woocommerce-checkout #order_review .shop_table tr:not(.shipping) > td:last-child,
body.woocommerce-cart .cart_totals .shop_table tr:not(.shipping) > td:last-child { text-align: right; }
body.woocommerce-checkout #order_review .shop_table .woocommerce-Price-amount,
body.woocommerce-cart .cart_totals .shop_table .woocommerce-Price-amount { white-space: nowrap; }
body.woocommerce-checkout #order_review .shop_table .product-name { font-weight: 550; color: #333; }
body.woocommerce-checkout #order_review .shop_table .product-quantity { display: inline-block; margin-left: 6px; color: #666; font-size: 13px; }
body.woocommerce-checkout #order_review .shop_table tr.shipping,
body.woocommerce-cart .cart_totals .shop_table tr.shipping { display: block; }
body.woocommerce-checkout #order_review .shop_table tr.shipping > th,
body.woocommerce-cart .cart_totals .shop_table tr.shipping > th { padding-bottom: 8px; font-weight: 600; }
body.woocommerce-checkout #order_review .shop_table tr.shipping > td,
body.woocommerce-cart .cart_totals .shop_table tr.shipping > td { padding-top: 0; }
body.woocommerce-checkout #order_review .shop_table .order-total,
body.woocommerce-cart .cart_totals .shop_table .order-total { border-bottom: 0; }
body.woocommerce-checkout #order_review .shop_table .order-total strong,
body.woocommerce-cart .cart_totals .shop_table .order-total strong { color: #292929; font-size: 23px; }
body.woocommerce-checkout #order_review .shop_table small,
body.woocommerce-cart .cart_totals .shop_table small { display: block; font-size: 12px; color: #777; font-weight: 400; }
body.woocommerce-checkout #order_review ul#shipping_method,
body.woocommerce-cart .cart_totals ul#shipping_method { margin: 0; padding: 0; list-style: none; }
body.woocommerce-checkout #order_review ul#shipping_method li,
body.woocommerce-cart .cart_totals ul#shipping_method li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; margin: 8px 0; padding: 12px; background: #fff; border: 1px solid #dedede; border-radius: 9px; text-align: left; }
body.woocommerce-checkout #order_review ul#shipping_method li:has(input:checked),
body.woocommerce-cart .cart_totals ul#shipping_method li:has(input:checked) { border-color: var(--hb-checkout-accent); background: #fff8f7; }
body.woocommerce-checkout #order_review ul#shipping_method input,
body.woocommerce-cart .cart_totals ul#shipping_method input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--hb-checkout-accent); }
body.woocommerce-checkout #order_review ul#shipping_method label,
body.woocommerce-cart .cart_totals ul#shipping_method label { display: block; min-width: 0; margin: 0; font-size: 14px; font-weight: 450; line-height: 1.55; text-align: left; cursor: pointer; }
body.woocommerce-checkout #order_review ul#shipping_method label .amount,
body.woocommerce-cart .cart_totals ul#shipping_method label .amount { display: inline-block; margin-left: 5px; font-weight: 650; white-space: nowrap; }
body.woocommerce-cart .cart_totals .woocommerce-shipping-destination { margin: 14px 0 0; font-size: 13px; text-align: left; }

/* Payment cards retain WooCommerce's real radios and descriptions. */
body.woocommerce-checkout #payment { padding: 0; }
body.woocommerce-checkout #payment ul.payment_methods { margin: 0 0 20px; padding: 0; }
body.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method { display: block; padding: 0; border: 1px solid #dedede; border-radius: 10px; margin: 0 0 12px; background: #fff; }
body.woocommerce-checkout #payment ul.payment_methods > li.active-payment,
body.woocommerce-checkout #payment ul.payment_methods > li:has(> input:checked) { border-color: var(--hb-checkout-accent); }
body.woocommerce-checkout #payment ul.payment_methods > li > input.input-radio { position: absolute; left: 15px; top: 18px; z-index: 1; opacity: 1; width: 17px; height: 17px; margin: 0; accent-color: var(--hb-checkout-accent); }
body.woocommerce-checkout #payment ul.payment_methods > li > label { display: block; box-sizing: border-box; width: 100%; padding: 15px 16px 15px 44px; font-size: 15px; line-height: 1.5; font-weight: 600; }
body.woocommerce-checkout #payment .mfn-payment-check { display: none !important; }
body.woocommerce-checkout #payment .payment_box { box-sizing: border-box; width: auto; margin: 0 16px 16px; padding: 0; background: transparent; color: #626262; border: 0; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
body.woocommerce-checkout #payment .payment_box::before { display: none; }
body.woocommerce-checkout #payment .payment_box p:last-child { margin-bottom: 0; }
body.woocommerce-checkout #payment .place-order { margin: 0; padding: 0; }
body.woocommerce-checkout #payment .woocommerce-privacy-policy-text,
body.woocommerce-checkout #payment .woocommerce-terms-and-conditions-wrapper { margin-bottom: 16px; font-size: 12px; line-height: 1.7; color: #777; }
body.woocommerce-checkout #payment #place_order { width: 100%; min-height: 50px; margin: 8px 0 0; padding: 14px 20px; border-radius: 9px; font-size: 16px; font-weight: 600; }
body.woocommerce-checkout #payment .woocommerce-invalid .woocommerce-form__label { color: #b3261e; }

@media (max-width: 959px) {
  body.woocommerce-checkout .woocommerce form.checkout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  body.woocommerce-checkout #customer_details,
  body.woocommerce-checkout #order_review { grid-column: 1; }
  .hb-bank-transfer-note { grid-template-columns: 42px minmax(0, 1fr); padding: 18px; gap: 14px; }
  .hb-bank-transfer-icon { width: 42px; height: 42px; }
  .hb-bank-transfer-deadline { grid-column: 2; justify-self: start; padding: 4px 10px; }
}
@media (max-width: 599px) {
  body.woocommerce-checkout #Subheader { padding: 24px 0; }
  body.woocommerce-checkout #Subheader .title { font-size: 30px; }
  body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
  body.woocommerce-checkout .woocommerce-shipping-fields__field-wrapper { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  body.woocommerce-checkout #customer_details .woocommerce-billing-fields__field-wrapper > .form-row,
  body.woocommerce-checkout #customer_details .woocommerce-shipping-fields__field-wrapper > .form-row,
  body.woocommerce-checkout #customer_details #billing_phone_field,
  body.woocommerce-checkout #customer_details #billing_email_field { grid-column: 1 / -1; }
  body.woocommerce-checkout .woocommerce #order_review { padding: 20px 16px; }
  body.woocommerce-checkout #order_review > h4,
  body.woocommerce-checkout #customer_details h3 { font-size: 22px; }
  .hb-bank-transfer-note .hb-bank-transfer-copy h3 { font-size: 18px; }
  .hb-bank-transfer-note { margin-bottom: 20px; padding: 16px; gap: 12px; }
  .hb-bank-transfer-deadline { font-size: 11px; }
}
/* Readable bank instructions and the actual selected payment state. */
body.woocommerce-checkout .woocommerce #order_review_heading { margin: 0 0 20px; font-size: 23px; line-height: 1.3; text-align: left; }
body.woocommerce-checkout #payment ul.payment_methods > li:not(:has(> input:checked)) { border-color: #dedede; }
body.woocommerce-checkout #payment .hb-transfer-instructions { font-size: 14px; line-height: 1.65; }
body.woocommerce-checkout #payment .hb-transfer-instructions b { font-weight: 550; }
body.woocommerce-checkout #payment .hb-transfer-details { padding: 12px; margin: 14px 0 0; border-radius: 8px; background: #f7f7f7; }
body.woocommerce-checkout #payment .hb-transfer-details > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; margin: 0 0 8px; }
body.woocommerce-checkout #payment .hb-transfer-details > div:last-child { margin-bottom: 0; }
body.woocommerce-checkout #payment .hb-transfer-details dt { margin: 0; color: #737373; font-size: 12px; font-weight: 450; }
body.woocommerce-checkout #payment .hb-transfer-details dd { min-width: 0; margin: 0; color: #333; font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 599px) {
  body.woocommerce-checkout #payment .hb-transfer-details > div { grid-template-columns: minmax(0, 1fr); gap: 1px; margin-bottom: 10px; }
}

/* Consistent checkbox cards and spacing across the billing/shipping wrappers. */
body.woocommerce-checkout #customer_details #billing_company_check_field,
body.woocommerce-checkout #customer_details .mailchimp-newsletter,
body.woocommerce-checkout #customer_details p.create-account,
body.woocommerce-checkout #customer_details #ship-to-different-address {
    box-sizing: border-box;
    width: 100%;
    padding: 14px 16px !important;
    margin: 0 !important;
    border: 1px solid var(--hb-checkout-border);
    border-radius: 10px;
    background: #fafafa;
}
body.woocommerce-checkout #customer_details #billing_company_check_field label,
body.woocommerce-checkout #customer_details .mailchimp-newsletter label,
body.woocommerce-checkout #customer_details p.create-account label,
body.woocommerce-checkout #customer_details #ship-to-different-address label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0 !important;
    padding: 0;
    color: #444;
    font-size: 14px;
    font-weight: 550;
    line-height: 22px;
    text-align: left;
    cursor: pointer;
}
body.woocommerce-checkout #customer_details input[type="checkbox"] {
    box-sizing: border-box;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0 !important;
    padding: 0;
    float: none;
    position: static;
}
body.woocommerce-checkout #customer_details #billing_company_check_field label > span:not(.optional),
body.woocommerce-checkout #customer_details .mailchimp-newsletter label > span,
body.woocommerce-checkout #customer_details p.create-account label > span,
body.woocommerce-checkout #customer_details #ship-to-different-address label > span {
    flex: 1 1 auto;
    min-width: 0;
}
body.woocommerce-checkout #customer_details .mailchimp-newsletter { margin-top: 18px !important; }
body.woocommerce-checkout #customer_details .woocommerce-account-fields { margin-top: 12px; }
body.woocommerce-checkout #customer_details .woocommerce-account-fields > div.create-account { margin-top: 18px; }
body.woocommerce-checkout #customer_details .col-2 { margin-top: 12px; }
body.woocommerce-checkout #customer_details #ship-to-different-address { margin-bottom: 18px !important; }

/* Keep the address toggle aligned despite the parent theme's ID-specific margin. */
body.woocommerce-checkout #customer_details #ship-to-different-address input[type="checkbox"] { margin: 2px 0 0 !important; }
