/* MANYA V15.4 — checkout row alignment + direct theme branding support.
   Scope: WooCommerce checkout/order only. Keeps the rest of the theme unchanged. */

body.woocommerce-checkout,
body.woocommerce-order-received,
body.woocommerce-cart{
  overflow-y:auto!important;
  height:auto!important;
  min-height:100%!important;
}

/* Checkout: force customer details and order/payment to start on the same row */
body.woocommerce-checkout .entry-content{
  width:min(1240px,calc(100% - 48px))!important;
  margin:44px auto 96px!important;
  padding:32px!important;
  background:#f8faf7!important;
  border:1px solid rgba(6,70,54,.12)!important;
  border-radius:32px!important;
  box-shadow:0 30px 90px rgba(0,0,0,.18)!important;
}

body.woocommerce-checkout form.checkout{
  display:grid!important;
  grid-template-columns:minmax(0,1.05fr) minmax(380px,.72fr)!important;
  grid-template-areas:"customer review"!important;
  gap:30px!important;
  align-items:start!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}

body.woocommerce-checkout #customer_details{
  grid-area:customer!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  align-self:start!important;
}

body.woocommerce-checkout #order_review_heading{
  display:none!important;
}

body.woocommerce-checkout #order_review,
body.woocommerce-checkout .woocommerce-checkout-review-order{
  grid-area:review!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  align-self:start!important;
  position:static!important;
  top:auto!important;
}

body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #order_review,
body.woocommerce-checkout .woocommerce-checkout-review-order,
body.woocommerce-checkout #payment{
  background:#fff!important;
  color:#102018!important;
  -webkit-text-fill-color:initial!important;
  border:1px solid rgba(6,70,54,.14)!important;
  border-radius:26px!important;
  box-shadow:0 18px 55px rgba(6,70,54,.08)!important;
}

body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #order_review{
  padding:26px!important;
}

body.woocommerce-checkout #payment{
  margin-top:18px!important;
  padding:18px!important;
  overflow:hidden!important;
}

body.woocommerce-checkout .col2-set,
body.woocommerce-checkout .col2-set .col-1,
body.woocommerce-checkout .col2-set .col-2{
  float:none!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  display:block!important;
}

/* Woo blocks checkout: same row without plugin */
body.woocommerce-checkout .wp-block-woocommerce-checkout,
body.woocommerce-checkout .wc-block-checkout,
body.woocommerce-checkout .wc-block-components-sidebar-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1.05fr) minmax(380px,.72fr)!important;
  gap:30px!important;
  align-items:start!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
}
body.woocommerce-checkout .wc-block-components-main{
  grid-column:1!important;
  width:100%!important;
  max-width:none!important;
}
body.woocommerce-checkout .wc-block-components-sidebar{
  grid-column:2!important;
  width:100%!important;
  max-width:none!important;
  position:static!important;
  top:auto!important;
}

/* Readable tables, order details and payment methods in both modes */
body.woocommerce-checkout table.shop_table,
body.woocommerce-order-received table.shop_table,
body.woocommerce-checkout .woocommerce-table,
body.woocommerce-order-received .woocommerce-table{
  width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  overflow:hidden!important;
  border-radius:20px!important;
  background:#fff!important;
  color:#102018!important;
}
body.woocommerce-checkout table.shop_table th,
body.woocommerce-checkout table.shop_table td,
body.woocommerce-order-received table.shop_table th,
body.woocommerce-order-received table.shop_table td,
body.woocommerce-order-received table.shop_table td *,
body.woocommerce-checkout table.shop_table td *{
  color:#102018!important;
  -webkit-text-fill-color:#102018!important;
  opacity:1!important;
  filter:none!important;
  text-shadow:none!important;
}
body.woocommerce-checkout table.shop_table thead th,
body.woocommerce-order-received table.shop_table thead th{
  background:#edf5f1!important;
  font-weight:900!important;
}
body.woocommerce-checkout #payment ul.payment_methods{
  display:grid!important;
  gap:12px!important;
  list-style:none!important;
  margin:0!important;
  padding:0!important;
}
body.woocommerce-checkout #payment ul.payment_methods li{
  display:block!important;
  padding:16px!important;
  border:1px solid rgba(6,70,54,.16)!important;
  border-radius:18px!important;
  background:#f8fbf9!important;
  color:#102018!important;
}
body.woocommerce-checkout #payment ul.payment_methods li label,
body.woocommerce-checkout #payment ul.payment_methods li label *,
body.woocommerce-checkout #payment .payment_box,
body.woocommerce-checkout #payment .payment_box *{
  color:#102018!important;
  -webkit-text-fill-color:#102018!important;
  opacity:1!important;
}
body.woocommerce-checkout #payment .payment_box{
  background:#fff!important;
  border:1px solid rgba(6,70,54,.12)!important;
  border-radius:16px!important;
  margin:12px 0 0!important;
  padding:14px!important;
}
body.woocommerce-checkout #place_order{
  width:100%!important;
  min-height:54px!important;
  margin-top:16px!important;
  border-radius:999px!important;
  background:#0b5d46!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font-weight:900!important;
}

/* Thank-you page: white, readable order section in dark mode */
body.woocommerce-order-received .woocommerce-order-details,
body.woocommerce-order-received .woocommerce-customer-details,
body.woocommerce-order-received .woocommerce-order-overview,
body.woocommerce-order-received .woocommerce-order-details *,
body.woocommerce-order-received .woocommerce-customer-details *,
body.woocommerce-order-received .woocommerce-order-overview *{
  color:#102018!important;
  -webkit-text-fill-color:#102018!important;
  opacity:1!important;
  filter:none!important;
  text-shadow:none!important;
}
body.woocommerce-order-received .woocommerce-order-details,
body.woocommerce-order-received .woocommerce-customer-details,
body.woocommerce-order-received .woocommerce-order-overview{
  background:#fff!important;
  border:1px solid rgba(6,70,54,.14)!important;
  border-radius:26px!important;
  padding:26px!important;
}

@media(max-width:980px){
  body.woocommerce-checkout .entry-content{width:min(100% - 22px,1240px)!important;padding:18px!important;margin:26px auto 72px!important;border-radius:24px!important;}
  body.woocommerce-checkout form.checkout,
  body.woocommerce-checkout .wp-block-woocommerce-checkout,
  body.woocommerce-checkout .wc-block-checkout,
  body.woocommerce-checkout .wc-block-components-sidebar-layout{
    display:block!important;
  }
  body.woocommerce-checkout #customer_details,
  body.woocommerce-checkout #order_review,
  body.woocommerce-checkout .woocommerce-checkout-review-order,
  body.woocommerce-checkout .wc-block-components-main,
  body.woocommerce-checkout .wc-block-components-sidebar{
    width:100%!important;
    max-width:none!important;
    margin:0 0 18px!important;
    position:static!important;
  }
}
