/* Keep payment-provider nodes out of the address/order grid. */
body.woocommerce-checkout:not(.woocommerce-order-received) .wp-block-post-title { display: none !important; }
.cvf-commerce-heading { margin: 0 0 28px; }
.cvf-commerce-heading h1 { margin: 0 0 12px; font-size: clamp(34px, 4vw, 48px); line-height: 1.15; }
.cvf-commerce-heading p { margin: 0; color: var(--cvf-muted); font-size: 16px; }
body.woocommerce-cart .entry-content,
body.woocommerce-checkout .entry-content { margin-top: 24px !important; }
body.woocommerce-cart .wp-block-post-title { max-width: var(--cvf-max); box-sizing: border-box; padding: 0 var(--cvf-margin); margin-bottom: 24px !important; font-size: clamp(34px, 4vw, 48px) !important; }
body.woocommerce-checkout form.cvf-commerce-checkout { display: block !important; margin: 24px 0 56px; }
.cvf-checkout-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); align-items: start; gap: 32px; }
.cvf-checkout-details, .cvf-checkout-summary { min-width: 0; }
body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout #payment { box-sizing: border-box; grid-column: auto; grid-row: auto; width: 100%; margin: 0; padding: 0 !important; border: 0 !important; background: transparent !important; }
body.woocommerce-checkout #customer_details .col-1,
body.woocommerce-checkout #customer_details .col-2 { float: none !important; width: 100% !important; min-width: 0; margin: 0; }
body.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout .woocommerce-additional-fields { border: 0; background: transparent; padding: 0; }
body.woocommerce-checkout #customer_details,
body.woocommerce-checkout .cvf-checkout-summary,
body.woocommerce-cart .cart-collaterals .cart_totals { border: 1px solid var(--cvf-outline-soft) !important; border-radius: 16px; padding: 28px !important; background: var(--cvf-surface-low) !important; }
body.woocommerce-checkout #customer_details .col-2 { margin-top: 28px; }
body.woocommerce-checkout #order_review_heading { margin: 0 0 20px; font-size: 30px; line-height: 1.2; }
body.woocommerce-checkout .woocommerce-billing-fields h3,
body.woocommerce-checkout .woocommerce-additional-fields h3 { margin: 0 0 24px; font-size: 28px; line-height: 1.2; }
body.woocommerce-checkout form .form-row { box-sizing: border-box; padding: 0; margin: 0 0 18px; }
body.woocommerce-checkout form .form-row label { display: block; margin: 0 0 8px; font-size: 12px; line-height: 1.5; letter-spacing: .06em; }
body.woocommerce-checkout form .form-row input.input-text,
body.woocommerce-checkout form .form-row textarea,
body.woocommerce-checkout form .form-row select,
body.woocommerce-cart .coupon input.input-text { box-sizing: border-box; width: 100%; min-height: 48px; border: 1px solid var(--cvf-outline-soft) !important; border-radius: 8px !important; padding: 12px 14px !important; background: #24231f !important; color: var(--cvf-ivory) !important; font-size: 16px !important; line-height: 1.5; }
body.woocommerce-checkout form .form-row textarea { min-height: 100px; resize: vertical; }
body.woocommerce-checkout .select2-container .select2-selection--single { height: 48px; padding: 0 !important; border: 1px solid var(--cvf-outline-soft); border-radius: 8px; background: #24231f; }
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__rendered { box-sizing: border-box; height: 46px; color: var(--cvf-ivory); padding: 0 36px 0 14px !important; line-height: 46px; font-size: 16px; }
body.woocommerce-checkout .select2-dropdown { background: #302e29; color: var(--cvf-ivory); border-color: var(--cvf-outline-soft); font-size: 16px; }
body.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; right: 10px; }
body.woocommerce-checkout input::placeholder,
body.woocommerce-checkout textarea::placeholder { color: #bfb9ae; opacity: 1; }
body.woocommerce-checkout input:focus-visible,
body.woocommerce-checkout textarea:focus-visible,
body.woocommerce-checkout select:focus-visible,
body.woocommerce-cart input:focus-visible,
body.woocommerce-cart a:focus-visible,
body.woocommerce-cart button:focus-visible { outline: 2px solid var(--cvf-primary); outline-offset: 3px; }
body.woocommerce-checkout #payment ul.payment_methods { margin: 20px 0; }
body.woocommerce-checkout #payment div.payment_box { box-sizing: border-box; width: 100%; margin: 12px 0; padding: 16px; border-radius: 8px; }
body.woocommerce-checkout #payment .place-order { margin: 0; }
body.woocommerce-checkout #payment .place-order label { font-size: 13px; letter-spacing: 0; text-transform: none; }
body.woocommerce-checkout #place_order,
body.woocommerce-cart .checkout-button { box-sizing: border-box; display: block; width: 100%; min-height: 52px; margin: 20px 0 0 !important; border-radius: 999px !important; padding: 16px !important; font-size: 15px; white-space: normal; }
body.woocommerce-checkout #wc-stripe-express-checkout-element { min-height: 48px; align-items: flex-start; margin: 16px 0 !important; padding: 0 !important; }
/* Each provider button is 48px plus the iframe's two 4px shadow gutters. */
body.woocommerce-checkout #wc-stripe-express-checkout-element > .StripeElement { min-height: 48px; border: 0 !important; border-radius: 6px; overflow: hidden; isolation: isolate; outline: none; box-shadow: none !important; }
body.woocommerce-checkout #wc-stripe-express-checkout-element > .StripeElement:focus-within { outline: 2px solid var(--cvf-primary); outline-offset: 3px; }
body.woocommerce-checkout #wc-stripe-express-checkout-element > .StripeElement iframe { min-height: 56px !important; }
body.woocommerce-checkout #wc-stripe-express-checkout-button-separator { margin: 18px 0 24px !important; line-height: 1.5; }
body.woocommerce-checkout .woocommerce-info,
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-message { box-sizing: border-box; margin: 0 0 16px; border-radius: 8px; font-size: 14px; line-height: 1.6; }
body.woocommerce-checkout .woocommerce-form-login-toggle .woocommerce-info,
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info { background: var(--cvf-surface-low); color: var(--cvf-ivory); border: 1px solid var(--cvf-outline-soft); }
body.woocommerce-checkout .woocommerce-info a { color: var(--cvf-primary); }
body.woocommerce-checkout form.checkout_coupon,
body.woocommerce-checkout form.login { padding: 20px; border-radius: 12px; }
body.woocommerce-checkout table.shop_table { width: 100%; margin: 0; border: 0; border-collapse: collapse; table-layout: fixed; }
body.woocommerce-checkout table.shop_table th,
body.woocommerce-checkout table.shop_table td { padding: 14px 8px !important; overflow-wrap: anywhere; }
body.woocommerce-checkout table.shop_table th:last-child,
body.woocommerce-checkout table.shop_table td:last-child { width: 32%; text-align: right; }
body.woocommerce-checkout table.shop_table .order-total { font-size: 20px; }
body.woocommerce-checkout table.shop_table .amount { white-space: nowrap; overflow-wrap: normal; }
body.woocommerce-checkout #payment fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
body.woocommerce-cart .woocommerce { padding-bottom: 56px; }
body.woocommerce-cart .woocommerce-cart-form { margin-bottom: 28px; }
body.woocommerce-cart table.shop_table { border: 1px solid var(--cvf-outline-soft); border-radius: 12px; border-spacing: 0; }
body.woocommerce-cart table.shop_table th,
body.woocommerce-cart table.shop_table td { padding: 18px 14px !important; }
body.woocommerce-cart table.shop_table .product-name { overflow-wrap: anywhere; }
body.woocommerce-cart table.shop_table .product-name a { font-family: inherit; font-size: 16px; }
body.woocommerce-cart table.shop_table img { width: 84px; height: 84px; border-radius: 8px; object-fit: contain; }
body.woocommerce-cart .quantity .qty { box-sizing: border-box; width: 80px; min-height: 46px; padding: 8px; border: 1px solid var(--cvf-outline-soft); border-radius: 8px; color: var(--cvf-ivory); background: #24231f; font-size: 16px; }
body.woocommerce-cart .coupon { display: flex; gap: 10px; align-items: center; }
body.woocommerce-cart .coupon input.input-text { width: 180px !important; margin: 0 !important; }
body.woocommerce-cart .cart-collaterals .cart_totals { width: min(100%, 480px); }
body.woocommerce-cart .quantity .qty { border: 1px solid var(--cvf-outline-soft) !important; border-radius: 8px !important; background: #24231f !important; }
body.woocommerce-checkout #place_order,
body.woocommerce-cart .checkout-button { background: var(--cvf-primary) !important; color: #211f1a !important; border: 1px solid var(--cvf-primary) !important; }
body.woocommerce-cart .cart_totals .shop_table td { text-align: right; }
body.woocommerce-checkout .wc-block-components-notice-banner,
body.woocommerce-cart .wc-block-components-notice-banner { box-sizing: border-box; margin: 0 0 16px; border-radius: 8px; padding: 16px !important; font-family: inherit !important; font-size: 14px !important; line-height: 1.6; }
body.woocommerce-checkout .wc-block-components-notice-banner.is-info,
body.woocommerce-cart .wc-block-components-notice-banner.is-info { background: var(--cvf-surface-low) !important; color: var(--cvf-ivory) !important; border: 1px solid var(--cvf-outline-soft) !important; }
body.woocommerce-checkout .wc-block-components-notice-banner.is-info > svg,
body.woocommerce-cart .wc-block-components-notice-banner.is-info > svg { background: var(--cvf-primary) !important; fill: #211f1a !important; }
body.woocommerce-checkout .wc-block-components-notice-banner a,
body.woocommerce-cart .wc-block-components-notice-banner a { color: inherit !important; text-underline-offset: 3px; }
body.woocommerce-cart .cart_totals h2 { margin: 0 0 20px; }
body.woocommerce-cart .cart_totals .shop_table { border: 0; }
body.woocommerce-cart .cart-empty { padding: 24px 24px 24px 56px; }
@media (max-width: 900px) {
 .cvf-checkout-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
 body.woocommerce-checkout #customer_details,
 body.woocommerce-checkout .cvf-checkout-summary,
 body.woocommerce-cart .cart-collaterals .cart_totals { padding: 20px !important; }
}
@media (max-width: 600px) {
 body.woocommerce-checkout table.shop_table .order-total { font-size: 18px; }
 body.woocommerce-checkout form .form-row-first,
 body.woocommerce-checkout form .form-row-last { float: none; width: 100%; }
 body.woocommerce-checkout #customer_details,
 body.woocommerce-checkout .cvf-checkout-summary { padding: 18px !important; }
 body.woocommerce-checkout .woocommerce-message .button,
 body.woocommerce-cart .woocommerce-message .button { float: none; display: block; margin: 8px 0 0; }
 body.woocommerce-cart .coupon { float: none !important; width: 100%; margin-bottom: 14px; flex-wrap: wrap; }
 body.woocommerce-cart .coupon input.input-text { flex: 1; width: 140px !important; }
 body.woocommerce-cart .coupon button { flex: 1; }
 body.woocommerce-cart .actions > button { width: 100%; }
 body.woocommerce-cart table.shop_table th,
 body.woocommerce-cart table.shop_table td { padding: 14px 10px !important; }
 body.woocommerce-cart .cart-collaterals .cart_totals { float: none; width: 100%; }
}

body.woocommerce-checkout .cvf-address-help { color: var(--cvf-text-muted, #c7c1ad); font-size: 14px; line-height: 1.6; margin: -12px 0 22px; }
body.woocommerce-checkout #cvf-billing-different { width: 18px; height: 18px; min-height: 18px; vertical-align: middle; margin: 4px 8px 4px 0; accent-color: var(--cvf-primary); }
body.woocommerce-checkout .cvf-billing-toggle { display: inline; font-size: 14px; letter-spacing: normal; text-transform: none; cursor: pointer; line-height: 1.7; }
body.woocommerce-checkout #cvf-billing-different:not(:checked) ~ #cvf-billing-address { display: none; }
body.woocommerce-checkout #cvf-billing-address { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(244, 207, 80, .22); }
body.woocommerce-checkout #ship-to-different-address[hidden] { display: none; }

body.woocommerce-checkout .cvf-shipping-first > h3 { margin: 0 0 24px; font-size: 28px; }

/* Split native review and payment panels so mobile can follow the purchase sequence. */
.cvf-checkout-layout { grid-template-areas: "details order" "details payment"; grid-template-rows: min-content 1fr; }
.cvf-checkout-details { grid-area: details; }
body.woocommerce-checkout .cvf-checkout-summary,
body.woocommerce-checkout #order_review { display: contents; }
.cvf-checkout-order-card { grid-area: order; min-width: 0; }
.cvf-checkout-payment-card { grid-area: payment; min-width: 0; }
body.woocommerce-checkout .cvf-checkout-order-card,
body.woocommerce-checkout .cvf-checkout-payment-card { box-sizing: border-box; border: 1px solid var(--cvf-outline-soft); border-radius: 16px; padding: 28px; background: var(--cvf-surface-low); }
body.woocommerce-checkout .cvf-checkout-item-image { float: left; width: 64px; height: 64px; max-width: 64px; margin: 0 12px 8px 0; border-radius: 8px; object-fit: contain; background: #efede7; }
@media (max-width: 900px) {
 body.woocommerce-checkout form.cvf-commerce-checkout { display: flex !important; flex-direction: column; align-items: stretch; gap: 24px; }
 .cvf-checkout-layout { display: contents; }
 .cvf-checkout-details { order: 1; }
 .cvf-checkout-order-card { order: -3; }
 .cvf-checkout-payment-card { order: 2; }
 body.woocommerce-checkout .cvf-checkout-order-card,
 body.woocommerce-checkout .cvf-checkout-payment-card { padding: 20px; }
 body.woocommerce-checkout #wc-stripe-express-checkout-element { order: -2; margin: 0 !important; }
 body.woocommerce-checkout #wc-stripe-express-checkout-button-separator { order: -1; margin: -8px 0 0 !important; }
 body.woocommerce-checkout .woocommerce-message a.wc-forward,
 body.woocommerce-checkout .wc-block-components-notice-banner a.wc-forward,
 body.woocommerce-checkout .wc-block-components-notice-banner a.button { display: none !important; }
}
@media (max-width: 600px) {
 body.woocommerce-checkout .cvf-checkout-order-card,
 body.woocommerce-checkout .cvf-checkout-payment-card { padding: 18px; }
 body.woocommerce-checkout .cvf-checkout-item-image { width: 56px; height: 56px; max-width: 56px; margin-right: 10px; }
}
