/* =========================================================
   CLASSIC CHECKOUT — WIDE + TRUE SIDE-BY-SIDE
   Left: invoice + billing/shipping/notes
   Right: order review + payment
   ========================================================= */

/* Page/container width */
body.woocommerce-checkout .site-main,
body.woocommerce-checkout #content,
body.woocommerce-checkout .page-content,
body.woocommerce-checkout .woocommerce{
  max-width: 1450px !important;
  width: 100% !important;
  padding: 5px !important;
  margin: 0 auto !important;
}

/* Desktop: 2-column grid */
@media (min-width: 992px){
  body.woocommerce-checkout form.checkout.woocommerce-checkout{
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 50%) !important;
    gap: 18px !important;
    align-items: start !important;
    grid-auto-flow: row dense !important;
    grid-auto-rows: min-content !important;
  }

  /* Full-width rows (coupon bar + coupon form) */
  body.woocommerce-checkout .woocommerce-form-coupon-toggle,
  body.woocommerce-checkout form.checkout_coupon{
    grid-column: 1 / -1 !important;
  }

  /* Left column */
  body.woocommerce-checkout #lt-invoice-fields,
  body.woocommerce-checkout #customer_details{
    grid-column: 1 / 2 !important;
    align-self: start !important;
    clear: none !important;
  }

  /* Disable Woo floats inside #customer_details */
  body.woocommerce-checkout #customer_details .col-1,
  body.woocommerce-checkout #customer_details .col-2{
    float: none !important;
    width: 100% !important;
    clear: none !important;
  }

  /* Right column */
  body.woocommerce-checkout #order_review_heading{
    display: none !important;
  }

  body.woocommerce-checkout #order_review{
    grid-column: 2 / 3 !important;
    grid-row: 1 / span 10 !important; 
    align-self: start !important;
    margin: 0 !important;
    min-width: 0 !important;
    clear: none !important;
  }

  /* Themes sometimes add clearfix that breaks grids */
  body.woocommerce-checkout form.checkout.woocommerce-checkout::before,
  body.woocommerce-checkout form.checkout.woocommerce-checkout::after{
    content: none !important;
    display: none !important;
  }
}

/* Mobile: stack + remove Woo floats */
@media (max-width: 991px){
  body.woocommerce-checkout #customer_details .col-1,
  body.woocommerce-checkout #customer_details .col-2{
    float: none !important;
    width: 100% !important;
  }
}

/* “Card” look */
body.woocommerce-checkout #lt-invoice-fields.hm-checkout-card,
body.woocommerce-checkout #customer_details .woocommerce-billing-fields,
body.woocommerce-checkout #customer_details .woocommerce-shipping-fields,
body.woocommerce-checkout #customer_details .woocommerce-additional-fields,
body.woocommerce-checkout #order_review{
  background: #fff !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  padding: 18px !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.12) !important;
  margin-bottom: 18px !important;
}

/* Desktop spacing handled by grid gap */
@media (min-width: 992px){
  body.woocommerce-checkout #lt-invoice-fields.hm-checkout-card,
  body.woocommerce-checkout #customer_details .woocommerce-billing-fields,
  body.woocommerce-checkout #customer_details .woocommerce-shipping-fields,
  body.woocommerce-checkout #customer_details .woocommerce-additional-fields,
  body.woocommerce-checkout #order_review{
    margin-bottom: 0 !important;
  }
}

/* #payment is inside #order_review (avoid nested card look) */
body.woocommerce-checkout #payment.woocommerce-checkout-payment{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 16px !important;
}

/* Optional: coupon bar card */
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info{
  background: #fff !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.12) !important;
}

/* Inputs/labels */
body.woocommerce-checkout form.checkout input[type="text"],
body.woocommerce-checkout form.checkout input[type="email"],
body.woocommerce-checkout form.checkout input[type="tel"],
body.woocommerce-checkout form.checkout input[type="password"],
body.woocommerce-checkout form.checkout input[type="number"],
body.woocommerce-checkout form.checkout textarea,
body.woocommerce-checkout form.checkout select{
  background: #fff !important;
  border: 1px solid rgba(0,0,0,.14) !important;
  color: #111 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.woocommerce-checkout form.checkout label{ color: rgba(0,0,0,.70) !important; }

body.woocommerce-checkout form.checkout input:focus,
body.woocommerce-checkout form.checkout textarea:focus,
body.woocommerce-checkout form.checkout select:focus{
  border-color: rgba(0,0,0,.28) !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08) !important;
  outline: none !important;
}

body.woocommerce-checkout form.checkout label .required,
body.woocommerce-checkout form.checkout label abbr.required{
  color: #ff3b3b !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: 0 !important;
}


 /* Order title inside the card (CSS version)*/
body.woocommerce-checkout .hm-order-title {
  display: block;
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 12px;
}

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

/* Review table: prevent overflow */
body.woocommerce-checkout #order_review{
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table{
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table th,
body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table td{
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

body.woocommerce-checkout #order_review td.product-name{ white-space: normal !important; }

/* Shipping methods (Multiparcels inline styles overridden) */
body.woocommerce-checkout #order_review ul#shipping_method{
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.woocommerce-checkout #order_review ul#shipping_method li{
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  justify-content: flex-start !important;
  margin: 8px 0 !important;
}

body.woocommerce-checkout #order_review ul#shipping_method input.shipping_method{
  margin-top: 4px !important;
}

body.woocommerce-checkout #order_review ul#shipping_method li > label{
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  flex-wrap: wrap !important;
}

/* Carrier icon sizing */
body.woocommerce-checkout #order_review .multiparcels-carrier-icon-image-holder{ margin: 0 !important; }
body.woocommerce-checkout #order_review ul#shipping_method img{
  max-width: 42px !important;
  height: auto !important;
}
/*--------------------------*/
@media (max-width: 600px){

  /* Shipping row: full width block inside the table */
  body.woocommerce-checkout #order_review tr.woocommerce-shipping-totals td{
    width: 100% !important;
    padding: 0 !important;
  }

  /* Section title (uses data-title="Pristatymas") */
  body.woocommerce-checkout #order_review tr.woocommerce-shipping-totals td::before{
    content: attr(data-title);
    display: block;
    padding: 16px 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-top: 1px solid rgba(0,0,0,.14);
    border-bottom: 1px solid rgba(0,0,0,.14);
    background: #fff;
  }

  body.woocommerce-checkout #order_review ul#shipping_method{
    width: 100% !important;
    margin: 0 !important;
    padding: 6px 18px 10px !important;
    list-style: none !important;
    box-sizing: border-box !important;
  }

  body.woocommerce-checkout #order_review ul#shipping_method li{
    width: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 14px 0 !important;
    border-bottom: 1px dashed rgba(0,0,0,.28) !important;
  }
  body.woocommerce-checkout #order_review ul#shipping_method li:last-child{
    border-bottom: 0 !important;
  }

  body.woocommerce-checkout #order_review ul#shipping_method li > label{
    width: 100% !important;
    flex: 1 1 auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
  }

  body.woocommerce-checkout #order_review ul#shipping_method img{
    max-width: 36px !important;
    height: auto !important;
  }
}
/*----------------------------*/
/* Payment methods */
body.woocommerce-checkout ul.wc_payment_methods{
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
body.woocommerce-checkout ul.wc_payment_methods li.wc_payment_method{
  padding: 12px !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  background: #fff !important;
  margin-bottom: 10px !important;
}
body.woocommerce-checkout .payment_box{
  color: rgba(0,0,0,.70) !important;
  background: rgba(0,0,0,.02) !important;
  border: 1px solid rgba(0,0,0,.10) !important;
}

/* Place order button */
body.woocommerce-checkout #place_order{
  background: #2190c2 !important;
  border: 1px solid var(--hm-accent) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 14px 16px !important;
  width: 100% !important;
}
body.woocommerce-checkout #place_order:hover{ filter: brightness(.92) !important; }

/* Company-only fields toggle */
body.woocommerce-checkout .lt-invoice-company-only{ display: none !important; }
body.woocommerce-checkout.lt-invoice-company .lt-invoice-company-only{ display: block !important; }

/*-------------------------------*/
/* Required field red highlight (Woo wrapper) */
body.woocommerce-checkout .hm-field-error{
  border: 2px solid #d63638 !important;
  background: rgba(214,54,56,.06) !important;
  border-radius: 6px !important;
  padding: 10px !important;
}

body.woocommerce-checkout .hm-field-error input,
body.woocommerce-checkout .hm-field-error select,
body.woocommerce-checkout .hm-field-error textarea{
  border-color: #d63638 !important;
}