/* Cart and checkout only; preserve WooCommerce forms, calculations and gateways. */
html body:is(.woocommerce-cart,.woocommerce-checkout) { --btn-bgcolor:#020f30; --btn-color:#fff; --wd-form-brd-color:#e1e5eb; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .site-content { padding-top:28px !important; padding-bottom:48px !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .page-title { margin-bottom:0 !important; padding-block:32px !important; min-height:0 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .site-content > .woocommerce { width:100% !important; max-width:1240px !important; margin-inline:auto !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce :is(form.woocommerce-cart-form,.cart-collaterals,.cart_totals,.woocommerce-billing-fields,.woocommerce-shipping-fields,.woocommerce-additional-fields,.woocommerce-checkout-review-order,.checkout-order-review) { box-sizing:border-box !important; min-width:0 !important; box-shadow:none !important; }
html body.woocommerce-cart .woocommerce form.woocommerce-cart-form { margin:0 0 24px !important; padding:24px !important; border:1px solid #e1e5eb !important; border-radius:10px !important; background:#fff !important; }
html body.woocommerce-cart .woocommerce .cart-collaterals { width:100% !important; max-width:100% !important; float:none !important; margin:0 !important; display:block !important; }
html body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals { width:100% !important; max-width:100% !important; float:none !important; padding:24px !important; margin:0 !important; border:1px solid #e1e5eb !important; border-radius:10px !important; background:#fff !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce :is(h2,h3,#order_review_heading) { font-size:22px !important; line-height:1.35 !important; font-weight:600 !important; text-transform:none !important; letter-spacing:0 !important; margin:0 0 20px !important; color:#1f2937 !important; }
html body.woocommerce-cart .woocommerce table.shop_table { width:100% !important; table-layout:auto !important; border-collapse:collapse !important; background:#fff !important; margin:0 !important; }
html body.woocommerce-cart .woocommerce table.shop_table :is(th,td) { padding:16px 12px !important; border:0 !important; border-bottom:1px solid #e9edf2 !important; vertical-align:middle !important; color:#374151; }
html body.woocommerce-cart .woocommerce table.shop_table th { font-size:13px !important; font-weight:600 !important; text-transform:none !important; }
html body.woocommerce-cart .woocommerce table.shop_table .product-thumbnail { width:80px !important; }
html body.woocommerce-cart .woocommerce table.shop_table .product-thumbnail img { width:72px !important; height:72px !important; object-fit:contain !important; border:1px solid #e9edf2 !important; border-radius:6px !important; }
html body.woocommerce-cart .woocommerce table.shop_table .product-name a { font-size:15px !important; line-height:1.5 !important; font-weight:500 !important; color:#263244 !important; }
html body.woocommerce-cart .woocommerce table.shop_table td.actions { padding:20px 0 0 !important; border:0 !important; }
html body.woocommerce-cart .woocommerce .coupon { display:flex !important; flex-wrap:wrap !important; gap:10px !important; align-items:center !important; }
html body.woocommerce-cart .woocommerce .coupon input { width:220px !important; max-width:100% !important; margin:0 !important; }
html body.woocommerce-cart .woocommerce .cart_totals :is(table,tbody) { display:block !important; width:100% !important; }
html body.woocommerce-cart .woocommerce .cart_totals tr { display:grid !important; grid-template-columns:minmax(120px,1fr) minmax(0,2fr) !important; gap:16px !important; width:100% !important; padding:16px 0 !important; border-bottom:1px solid #e9edf2 !important; }
html body.woocommerce-cart .woocommerce .cart_totals tr :is(th,td) { display:block !important; width:auto !important; min-width:0 !important; padding:0 !important; border:0 !important; text-align:left !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce ul#shipping_method { display:flex !important; flex-direction:column !important; gap:10px !important; width:100% !important; min-width:0 !important; margin:0 !important; padding:0 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce ul#shipping_method li { display:flex !important; align-items:flex-start !important; gap:10px !important; width:100% !important; min-width:0 !important; box-sizing:border-box !important; margin:0 !important; padding:12px !important; border:1px solid #e1e5eb !important; border-radius:6px !important; background:#fff !important; text-align:left !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce ul#shipping_method input { flex:0 0 auto !important; margin:4px 0 0 !important; order:0 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce ul#shipping_method label { flex:1 !important; min-width:0 !important; margin:0 !important; font-size:14px !important; line-height:1.5 !important; overflow-wrap:anywhere; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce .shipping-calculator-form { width:100% !important; padding:16px !important; border:1px solid #e1e5eb !important; background:#fff !important; box-sizing:border-box !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce :is(input.input-text,textarea,select,.select2-selection--single) { background:#fff !important; color:#374151 !important; border:1px solid #dfe3e8 !important; border-radius:6px !important; box-shadow:none !important; min-height:46px; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce .form-row { margin-bottom:16px !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce .form-row label { color:#374151 !important; font-size:14px !important; margin-bottom:6px !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce :is(button.button,a.button,input.button,.checkout-button,#place_order) { background:#020f30 !important; color:#fff !important; border:1px solid #020f30 !important; border-radius:6px !important; box-shadow:none !important; font-size:14px !important; font-weight:600 !important; text-transform:none !important; padding:13px 20px !important; line-height:1.4 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce button:disabled { opacity:.5 !important; }
html body.woocommerce-cart .woocommerce .wc-proceed-to-checkout { padding:20px 0 0 !important; margin:0 !important; }
html body.woocommerce-cart .woocommerce .checkout-button { display:block !important; text-align:center !important; margin:0 !important; }
html body.woocommerce-checkout .woocommerce form.checkout { margin-top:24px !important; }
html body.woocommerce-checkout .woocommerce :is(.woocommerce-billing-fields,.woocommerce-additional-fields,.checkout-order-review) { padding:24px !important; border:1px solid #e1e5eb !important; border-radius:10px !important; background:#fff !important; margin-bottom:24px !important; }
html body.woocommerce-checkout .woocommerce .checkout-order-review:before,html body.woocommerce-checkout .woocommerce .checkout-order-review:after { display:none !important; }
html body.woocommerce-checkout .woocommerce .woocommerce-checkout-review-order { background:#fff !important; padding:0 !important; }
html body.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table { width:100% !important; background:#fff !important; border:0 !important; table-layout:auto !important; }
html body.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table :is(th,td) { padding:14px 8px !important; border-bottom:1px solid #e9edf2 !important; color:#374151 !important; font-size:14px !important; vertical-align:top !important; }
html body.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table .product-name { width:65% !important; }
html body.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table .woocommerce-shipping-totals :is(th,td) { display:block !important; width:100% !important; box-sizing:border-box !important; }
html body.woocommerce-checkout .woocommerce #payment { background:#fff !important; border-top:1px solid #e1e5eb !important; padding-top:20px !important; }
html body.woocommerce-checkout .woocommerce #payment .payment_box { background:#f6f7f9 !important; border:1px solid #e1e5eb !important; border-radius:6px !important; box-shadow:none !important; }
html body.woocommerce-checkout .woocommerce #payment #place_order { width:100% !important; }
/* Third-party rewards retain their controls, with the same neutral presentation. */
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce :is([class*="spar-"],[class*="spar_"])[class*="container"] { background:#fff !important; border:1px solid #e1e5eb !important; border-radius:8px !important; padding:16px !important; box-shadow:none !important; max-width:100% !important; box-sizing:border-box !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce :is([class*="spar-"],[class*="spar_"]) :is(button,.button) { background:#020f30 !important; color:#fff !important; border-radius:6px !important; }
@media(max-width:768px){
html body:is(.woocommerce-cart,.woocommerce-checkout) .site-content { padding-top:20px !important; }
html body.woocommerce-cart .woocommerce form.woocommerce-cart-form,html body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals,html body.woocommerce-checkout .woocommerce :is(.woocommerce-billing-fields,.woocommerce-additional-fields,.checkout-order-review) { padding:16px !important; }
html body.woocommerce-cart .woocommerce .cart_totals tr { grid-template-columns:1fr !important; gap:10px !important; }
html body.woocommerce-cart .woocommerce .coupon { float:none !important; margin-bottom:12px !important; }
html body.woocommerce-cart .woocommerce .coupon input { flex:1 !important; min-width:100px !important; }
html body.woocommerce-checkout .woocommerce form.checkout :is(.col2-set,.col-1,.col-2,.wd-col) { width:100% !important; max-width:100% !important; float:none !important; }
html body.woocommerce-checkout .woocommerce form.checkout .row { flex-direction:column !important; }
}
html body.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table :is(thead,tbody,tfoot) { display:block !important; width:100% !important; }
html body.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table tr { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; width:100% !important; }
html body.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table .product-name { width:auto !important; }
html body.woocommerce-checkout .woocommerce table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals { grid-template-columns:minmax(0,1fr) !important; }
html body.woocommerce-checkout .woocommerce .form-row label { display:block; }
html body.woocommerce-checkout .woocommerce .form-row :is(input.input-text,textarea,select) { width:100% !important; }

/* WoodMart may place totals directly in its own grid column, outside cart-collaterals. */
html body.woocommerce-cart .woocommerce .cart_totals,
html body.woocommerce-cart .woocommerce .cart-totals-section,
html body.woocommerce-cart .woocommerce :is(.wd-col,.col-12,.col-lg-5,.col-lg-6,.col-md-6):has(.cart_totals) {
 width:100% !important; max-width:100% !important; min-width:0 !important; flex:0 0 100% !important; grid-column:1 / -1 !important; float:none !important; margin-inline:0 !important; box-sizing:border-box !important;
}
html body.woocommerce-cart .woocommerce .cart_totals { padding:24px !important; border:1px solid #e1e5eb !important; border-radius:10px !important; background:#fff !important; box-shadow:none !important; }
html body.woocommerce-cart .woocommerce .cart-totals-inner { width:100% !important; max-width:100% !important; padding:0 !important; border:0 !important; box-shadow:none !important; }
html body.woocommerce-cart .woocommerce .cart_totals :is(ul#shipping_method,.woocommerce-shipping-methods) { display:flex !important; flex-direction:column !important; flex-wrap:nowrap !important; gap:10px !important; width:100% !important; min-width:0 !important; }
html body.woocommerce-cart .woocommerce .cart_totals :is(ul#shipping_method,.woocommerce-shipping-methods) li { width:100% !important; min-width:0 !important; max-width:100% !important; flex:0 0 auto !important; }

/* Align third-party loyalty columns without replacing redemption controls. */
html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto !important; align-items:center !important; gap:16px !important; padding:20px !important; background:#fff !important; border:1px solid #e1e5eb !important; border-radius:10px !important; box-shadow:none !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned .olune-rewards-layout-wrapper { display:contents !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned :is(h2,h3,h4) { grid-column:1 / -1 !important; margin:0 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned [data-olune-points-kind] { background:#b4a99f !important; background-image:none !important; color:#020f30 !important; margin:0 !important; padding:12px 16px !important; min-height:48px !important; height:100% !important; width:100% !important; max-width:none !important; font-size:14px !important; font-weight:500 !important; border:0 !important; border-radius:6px !important; box-sizing:border-box !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned [data-olune-points-kind="earned"] { grid-column:1 !important; grid-row:2 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned [data-olune-points-kind="balance"] { grid-column:2 !important; grid-row:2 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned .olune-redeem-action { grid-column:3 !important; grid-row:2 !important; background:#020f30 !important; color:#fff !important; border:0 !important; outline:none !important; box-shadow:none !important; margin:0 !important; min-height:48px !important; border-radius:6px !important; padding:12px 20px !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned .olune-redeem-action:focus-visible { outline:2px solid #b4a99f !important; outline-offset:3px !important; }
@media(max-width:768px){html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned { grid-template-columns:minmax(0,1fr) !important; gap:12px !important; }html body:is(.woocommerce-cart,.woocommerce-checkout) .olune-rewards-aligned :is([data-olune-points-kind],.olune-redeem-action) { grid-column:1 !important; grid-row:auto !important; }}

/* Keep checkout and express wallets in normal flow with deliberate separation. */
html body.woocommerce-cart .woocommerce .cart_totals .wc-proceed-to-checkout { display:flex !important; flex-direction:column !important; align-items:stretch !important; gap:16px !important; overflow:visible !important; }
html body.woocommerce-cart .woocommerce .cart_totals .wc-proceed-to-checkout > * { position:relative !important; top:auto !important; bottom:auto !important; float:none !important; clear:both !important; margin:0 !important; flex-shrink:0 !important; }
html body.woocommerce-cart .woocommerce .cart_totals :is(#wc-stripe-payment-request-wrapper,#wc-stripe-express-checkout-element,#wcpay-express-checkout-element,.wc-stripe-payment-request-wrapper,.wcpay-payment-request-wrapper) { position:relative !important; top:auto !important; transform:none !important; clear:both !important; width:100% !important; max-width:100% !important; margin:16px 0 0 !important; padding:0 !important; box-sizing:border-box !important; }
html body.woocommerce-cart .woocommerce .cart_totals .wc-proceed-to-checkout :is(#wc-stripe-payment-request-wrapper,#wc-stripe-express-checkout-element,#wcpay-express-checkout-element,.wc-stripe-payment-request-wrapper,.wcpay-payment-request-wrapper) { margin:0 !important; }

/* SPAR balance includes an interactive tooltip, so retain its original child nodes. */
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto !important; align-items:center !important; gap:16px !important; padding:20px !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header :is(.spar-cart-rewards-title-section,.spar-cart-rewards-summary,.spar-cart-rewards-actions) { display:contents !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-title { grid-column:1 / -1 !important; grid-row:1 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header .spar-cart-earning-message { grid-column:1 !important; grid-row:2 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header .spar-cart-rewards-points { grid-column:2 !important; grid-row:2 !important; display:flex !important; flex-wrap:wrap !important; align-items:center !important; justify-content:center !important; gap:4px !important; background:#b4a99f !important; color:#020f30 !important; padding:12px 16px !important; min-height:48px !important; height:100% !important; border:0 !important; border-radius:6px !important; margin:0 !important; box-sizing:border-box !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-points::before { content:"Your available balance:"; font-size:14px; color:#020f30; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-points :is(.spar-cart-points-number,.spar-cart-points-label) { color:#020f30 !important; opacity:1 !important; font-size:14px !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header .spar-redeem-toggle-btn { grid-column:3 !important; grid-row:2 !important; border:0 !important; outline:none !important; box-shadow:none !important; transform:none !important; background:#020f30 !important; color:#fff !important; margin:0 !important; min-height:48px !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header::before { display:none !important; }
@media(max-width:768px){html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header { grid-template-columns:minmax(0,1fr) !important; }html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header :is(.spar-cart-rewards-title,.spar-cart-earning-message,.spar-cart-rewards-points,.spar-redeem-toggle-btn) { grid-column:1 !important; grid-row:auto !important; }}

html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-header :is(.spar-cart-earning-message,.spar-cart-rewards-points,.spar-redeem-toggle-btn) { align-self:stretch !important; height:auto !important; }

/* Redemption dropdown stays outside the summary grid. */
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-box { display:block !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-dropdown { width:100% !important; box-sizing:border-box !important; padding:20px !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-dropdown:not(.active) { display:none !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-dropdown.active { display:block !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-dropdown :is(.spar-dropdown-tabs,[role="tablist"]) { display:flex !important; flex-wrap:wrap !important; gap:12px !important; margin:0 0 20px !important; padding:0 !important; border:0 !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-dropdown .spar-dropdown-tab { flex:1 1 220px !important; margin:0 !important; padding:12px 18px !important; min-height:46px !important; border:0 !important; border-radius:6px !important; box-shadow:none !important; background:#020f30 !important; color:#fff !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-dropdown :is(.spar-rewards-grid,.spar-reward-grid) { display:grid !important; grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr)) !important; gap:16px !important; align-items:stretch !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-dropdown .spar-reward-item { display:flex !important; flex-direction:column !important; gap:12px !important; padding:16px !important; min-width:0 !important; box-sizing:border-box !important; }
html body:is(.woocommerce-cart,.woocommerce-checkout) .spar-cart-rewards-dropdown .spar-redeem-btn { margin-top:auto !important; min-height:46px !important; width:100% !important; }
/* Match checkout summary bars to the two redemption tabs below. */
@media(min-width:769px){
html body.woocommerce-checkout .spar-cart-rewards-box .spar-cart-rewards-header { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
html body.woocommerce-checkout .spar-cart-rewards-box .spar-cart-rewards-header .spar-redeem-toggle-btn { grid-column:2 !important; grid-row:3 !important; justify-self:end !important; width:auto !important; }
html body.woocommerce-checkout .spar-cart-rewards-box .spar-dropdown-tabs { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
html body.woocommerce-checkout .spar-cart-rewards-box .spar-dropdown-tab { width:100% !important; min-width:0 !important; box-sizing:border-box !important; }
}
/* Expanded cart rewards form one consistent full-width vertical sequence. */
html body.woocommerce-cart .spar-cart-rewards-box .spar-cart-rewards-dropdown :is(.spar-dropdown-tabs,[role="tablist"],.spar-rewards-grid,.spar-reward-grid) { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:12px !important; width:100% !important; }
html body.woocommerce-cart .spar-cart-rewards-box .spar-cart-rewards-dropdown :is(.spar-dropdown-tab,.spar-reward-item) { width:100% !important; max-width:100% !important; min-width:0 !important; margin-inline:0 !important; box-sizing:border-box !important; }
/* Cart matches checkout: equal summary and rewards-tab columns. */
@media(min-width:769px){
html body.woocommerce-cart .spar-cart-rewards-box .spar-cart-rewards-header { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
html body.woocommerce-cart .spar-cart-rewards-box .spar-cart-rewards-header .spar-redeem-toggle-btn { grid-column:2 !important; grid-row:3 !important; justify-self:end !important; width:auto !important; }
html body.woocommerce-cart .spar-cart-rewards-box .spar-cart-rewards-dropdown :is(.spar-dropdown-tabs,[role="tablist"]) { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
html body.woocommerce-cart .spar-cart-rewards-box .spar-cart-rewards-dropdown .spar-dropdown-tab { width:100% !important; min-width:0 !important; box-sizing:border-box !important; }
}
