/* Metaliom WooCommerce refinements — intentionally scoped to cart/checkout. */

/* --------------------------------------------------------------------------
 * Cart layout / containment
 * ----------------------------------------------------------------------- */
.mentorx-cart-wrapper,
.mentorx-cart-wrapper *,
.mentorx-cart-wrapper *::before,
.mentorx-cart-wrapper *::after,
form.woocommerce-checkout,
form.woocommerce-checkout *,
form.woocommerce-checkout *::before,
form.woocommerce-checkout *::after {
  box-sizing: border-box;
}

.payment-header {
  width: min(calc(100% - 32px), 1100px) !important;
  max-width: 1100px !important;
  min-width: 0;
  box-sizing: border-box;
}
.payment-header hr { min-width: 0; }

.mentorx-cart-wrapper {
  display: grid !important;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 24px !important;
  width: min(calc(100% - 32px), 1280px) !important;
  max-width: 1280px !important;
  margin-inline: auto !important;
  align-items: start;
}
.mentorx-cart-wrapper > *,
.mentorx-cart-wrapper .mentorx-cart-form-wrapper,
.mentorx-cart-wrapper .mentorx-cart-collaterals,
.mentorx-cart-wrapper .woocommerce-cart-form,
.mentorx-cart-wrapper .mentorx-cart-contents {
  min-width: 0 !important;
  max-width: 100%;
}
.mentorx-cart-wrapper .mentorx-cart-form-wrapper,
.mentorx-cart-wrapper .mentorx-cart-collaterals {
  width: 100% !important;
  box-sizing: border-box;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto max-content 32px;
  gap: 14px 18px !important;
  align-items: center !important;
  width: 100%;
  min-width: 0;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name {
  display: grid !important;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name .product-thumbnail,
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name .product-name {
  min-width: 0;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name img {
  display: block;
  width: 92px !important;
  max-width: 100% !important;
  height: 68px !important;
  object-fit: contain;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name .product-name,
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name .product-name a {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-quantity,
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-price,
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-remove {
  min-width: 0;
  margin: 0 !important;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-price {
  white-space: nowrap;
  text-align: center;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-remove {
  position: static !important;
  width: 32px;
  justify-self: end;
  text-align: center;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-remove a.remove {
  display: inline-grid !important;
  place-items: center;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-decoration: none !important;
}

/* Extra services */
.woocommerce-cart-form .extra-services {
  width: 100%;
  min-width: 0;
  margin-top: 14px;
}
.woocommerce-cart-form .extra-services .extra-service-note {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  margin: 0;
}
.woocommerce-cart-form .extra-services .extra-service-note strong {
  color: #34363d;
  font-size: 12px;
  line-height: 1.7;
}
.woocommerce-cart-form .extra-services .extra-service-note textarea {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 68px;
  margin: 0;
  padding: 10px 12px;
  resize: vertical;
  color: #34363d;
  font: inherit;
  font-size: 12px;
  line-height: 1.8;
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 9px;
  box-shadow: none;
}
.woocommerce-cart-form .extra-services .extra-service-note textarea::placeholder {
  color: #b2b6bd;
  opacity: 1;
}
.woocommerce-cart-form .extra-services .extra-service-note textarea:focus {
  border-color: #c8ccd2;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 35, 40, .05);
}

@media (max-width: 1024px) {
  .mentorx-cart-wrapper {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
    grid-template-columns: minmax(0, 1fr) max-content 32px !important;
    gap: 12px 14px !important;
    align-items: center !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name {
    grid-column: 1 / -1;
    grid-template-columns: 84px minmax(0, 1fr) !important;
    align-items: center !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name img {
    width: 84px !important;
    height: 64px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-quantity {
    justify-self: start;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-price {
    justify-self: end;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-remove {
    justify-self: end;
  }
}

@media (max-width: 560px) {
  .mentorx-cart-wrapper {
    width: min(calc(100% - 20px), 1280px) !important;
    gap: 14px !important;
  }
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper,
  .mentorx-cart-wrapper .mentorx-cart-collaterals {
    padding: 12px !important;
    border-radius: 16px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item {
    padding: 12px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
    grid-template-columns: 104px minmax(0, 1fr) 30px !important;
    gap: 10px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    gap: 9px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name img {
    width: 72px !important;
    height: 56px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name .product-name,
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data .image-and-name .product-name a {
    font-size: 13px !important;
    line-height: 1.8 !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-price bdi {
    font-size: 16px !important;
    line-height: 24px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-price bdi .woocommerce-Price-currencySymbol {
    font-size: 12px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-remove,
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-remove a.remove {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
  }
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions {
    width: 100%;
    align-items: stretch !important;
  }
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions > *,
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions button[name="update_cart"] {
    width: 100% !important;
    max-width: 100%;
  }
}


/* Checkout auth gate uses the existing Elementor Pro popup (ID 2587). */
.proceed-to-checkout .metaliom-checkout-login-trigger { width: 100%; cursor: pointer; }

/* WooCommerce/theme scripts may inject this after an AJAX add-to-cart event. */
a.added_to_cart.wc-forward { display: none !important; }

/* Tax is intentionally excluded from the proforma shown during purchase. */
.mentorx-cart-wrapper .metaliom-checkout-tax-note,
form.woocommerce-checkout .metaliom-checkout-tax-note {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 4px 0 14px;
  padding: 10px 12px;
  box-sizing: border-box;
  color: #7d292d;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.9;
  text-align: right;
  overflow-wrap: anywhere;
  background: #fff6f6;
  border: 1px solid #f1d7d9;
  border-right: 4px solid #ed1c24;
  border-radius: 10px;
}

/* --------------------------------------------------------------------------
 * Checkout: overflow-safe shell and exact two-column field alignment
 * ----------------------------------------------------------------------- */
form.woocommerce-checkout {
  display: grid !important;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
  gap: 24px !important;
  align-items: start;
  width: min(calc(100% - 32px), 1280px) !important;
  max-width: 1280px !important;
  margin-inline: auto !important;
  overflow: visible;
}
form.woocommerce-checkout > *,
form.woocommerce-checkout .mentorx-checkout-form,
form.woocommerce-checkout .mentorx-checkout-order-review,
form.woocommerce-checkout .woocommerce-checkout-review-order,
form.woocommerce-checkout .woocommerce-billing-fields,
form.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  min-width: 0 !important;
  max-width: 100%;
}
form.woocommerce-checkout .woocommerce-NoticeGroup,
form.woocommerce-checkout .woocommerce-notices-wrapper {
  grid-column: 1 / -1;
  width: 100% !important;
}
form.woocommerce-checkout .mentorx-checkout-form,
form.woocommerce-checkout .mentorx-checkout-order-review {
  width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box;
}
form.woocommerce-checkout .mentorx-checkout-order-review .woocommerce-checkout-review-order {
  width: 100% !important;
  box-sizing: border-box;
}

form.woocommerce-checkout .checkout-section-1,
form.woocommerce-checkout .checkout-section-2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px !important;
  align-items: start;
  width: 100%;
  min-width: 0;
}
form.woocommerce-checkout .checkout-section-1 > .form-row,
form.woocommerce-checkout .checkout-section-2 > .form-row {
  float: none !important;
  clear: none !important;
  grid-column: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* Hidden country is required for WooCommerce internals but must not occupy a grid cell. */
form.woocommerce-checkout #billing_country_field {
  display: none !important;
}
form.woocommerce-checkout .checkout-section-2 > .form-row.notes,
form.woocommerce-checkout .checkout-section-2 > #order_comments_field {
  grid-column: 1 / -1 !important;
}
form.woocommerce-checkout .form-row label {
  display: block;
  margin: 0 0 6px;
  line-height: 1.7;
}
form.woocommerce-checkout .woocommerce-input-wrapper {
  display: block !important;
  width: 100% !important;
  min-width: 0;
}
form.woocommerce-checkout .form-row input.input-text,
form.woocommerce-checkout .form-row select,
form.woocommerce-checkout .select2-container,
form.woocommerce-checkout .select2-container .selection,
form.woocommerce-checkout .select2-container .select2-selection--single {
  width: 100% !important;
  max-width: 100% !important;
}
form.woocommerce-checkout .form-row input.input-text,
form.woocommerce-checkout .form-row select,
form.woocommerce-checkout .select2-container .select2-selection--single {
  display: block !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 9px 13px !important;
  color: #34363d !important;
  font: inherit !important;
  font-size: 13px !important;
  line-height: 28px !important;
  text-align: right !important;
  background-color: #fff !important;
  background-image: none !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
form.woocommerce-checkout .select2-container .select2-selection--single {
  padding-inline: 13px 42px !important;
}
form.woocommerce-checkout .select2-container .select2-selection__rendered {
  display: block !important;
  width: 100%;
  min-width: 0;
  height: 46px !important;
  padding: 0 !important;
  color: #34363d !important;
  line-height: 46px !important;
  text-align: right !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
form.woocommerce-checkout .select2-container .select2-selection__arrow {
  top: 1px !important;
  left: 10px !important;
  right: auto !important;
  width: 28px !important;
  height: 46px !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
form.woocommerce-checkout .select2-container .select2-selection__arrow b {
  display: none !important;
}
form.woocommerce-checkout .form-row textarea.input-text {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 112px !important;
  margin: 0 !important;
  padding: 11px 13px !important;
  resize: vertical;
  color: #34363d !important;
  font: inherit !important;
  font-size: 13px !important;
  line-height: 1.9 !important;
  text-align: right !important;
  background: #fff !important;
  border: 1px solid #e1e4e8 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
form.woocommerce-checkout .form-row input.input-text:focus,
form.woocommerce-checkout .form-row select:focus,
form.woocommerce-checkout .form-row textarea.input-text:focus,
form.woocommerce-checkout .select2-container--focus .select2-selection--single,
form.woocommerce-checkout .select2-container--open .select2-selection--single {
  border-color: #b8bdc5 !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 35, 40, .05) !important;
}

@media (max-width: 1024px) {
  form.woocommerce-checkout {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  form.woocommerce-checkout .mentorx-checkout-form,
  form.woocommerce-checkout .mentorx-checkout-order-review {
    width: 100% !important;
  }
}

@media (max-width: 767px) {
  form.woocommerce-checkout {
    width: min(calc(100% - 20px), 1280px) !important;
    gap: 14px !important;
  }
  form.woocommerce-checkout .mentorx-checkout-form,
  form.woocommerce-checkout .mentorx-checkout-order-review .woocommerce-checkout-review-order {
    padding: 13px !important;
    border-radius: 16px !important;
  }
  form.woocommerce-checkout .checkout-section-1,
  form.woocommerce-checkout .checkout-section-2 {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 11px !important;
  }
  form.woocommerce-checkout .checkout-section-2 > .form-row.notes,
  form.woocommerce-checkout .checkout-section-2 > #order_comments_field {
    grid-column: auto !important;
  }
  form.woocommerce-checkout .form-row input.input-text,
  form.woocommerce-checkout .form-row select,
  form.woocommerce-checkout .select2-container .select2-selection--single {
    height: 46px !important;
    min-height: 46px !important;
  }
  form.woocommerce-checkout .select2-container .select2-selection__rendered,
  form.woocommerce-checkout .select2-container .select2-selection__arrow {
    height: 44px !important;
    line-height: 44px !important;
  }
}

/* --------------------------------------------------------------------------
 * 2.9.8 cart presentation: CSS-only styling over native [woocommerce_cart]
 * ----------------------------------------------------------------------- */
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
  grid-template-columns: minmax(0, 1fr) 150px minmax(120px, max-content) 36px !important;
  grid-template-areas: "product quantity price remove" !important;
  column-gap: 20px !important;
  row-gap: 12px !important;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .image-and-name {
  grid-area: product !important;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-quantity {
  grid-area: quantity !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 150px !important;
  min-width: 0 !important;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-price {
  grid-area: price !important;
  justify-self: center !important;
}
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-remove {
  grid-area: remove !important;
  align-self: center !important;
}

/* Native WooCommerce quantity markup remains untouched. This block only
   normalizes its presentation, including theme-provided +/- buttons when they
   exist. No click/change/update behavior is implemented by Metaliom. */
.mentorx-cart-wrapper .product-quantity .quantity {
  float: none !important;
  display: inline-flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: auto !important;
  max-width: 100% !important;
  min-width: 66px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  direction: ltr !important;
  background: #fff !important;
  border: 1px solid #dfe2e6 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.mentorx-cart-wrapper .product-quantity .quantity input.qty {
  display: block !important;
  float: none !important;
  width: 66px !important;
  min-width: 54px !important;
  max-width: 74px !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  color: #25272c !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 42px !important;
  text-align: center !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}
.mentorx-cart-wrapper .product-quantity .quantity input.qty {
  -moz-appearance: textfield !important;
}
.mentorx-cart-wrapper .product-quantity .quantity input.qty::-webkit-outer-spin-button,
.mentorx-cart-wrapper .product-quantity .quantity input.qty::-webkit-inner-spin-button {
  margin: 0 !important;
  -webkit-appearance: none !important;
}
.mentorx-cart-wrapper .product-quantity .quantity input.qty:focus {
  box-shadow: inset 0 0 0 2px rgba(0, 176, 240, .18) !important;
}
.mentorx-cart-wrapper .product-quantity .quantity .plus,
.mentorx-cart-wrapper .product-quantity .quantity .minus,
.mentorx-cart-wrapper .product-quantity .quantity [data-quantity-plus],
.mentorx-cart-wrapper .product-quantity .quantity [data-quantity-minus],
.mentorx-cart-wrapper .product-quantity .quantity .mtl-qty__btn {
  appearance: none !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #34363d !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  background: #f7f8f9 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.mentorx-cart-wrapper .product-quantity .quantity .minus,
.mentorx-cart-wrapper .product-quantity .quantity [data-quantity-minus],
.mentorx-cart-wrapper .product-quantity .quantity .mtl-qty__btn[data-mtl-qty-step="-1"] {
  border-right: 1px solid #e8eaed !important;
}
.mentorx-cart-wrapper .product-quantity .quantity .plus,
.mentorx-cart-wrapper .product-quantity .quantity [data-quantity-plus],
.mentorx-cart-wrapper .product-quantity .quantity .mtl-qty__btn[data-mtl-qty-step="1"] {
  border-left: 1px solid #e8eaed !important;
}
.mentorx-cart-wrapper .product-quantity .quantity .mtl-qty__btn:hover:not(:disabled),
.mentorx-cart-wrapper .product-quantity .quantity .plus:hover:not(:disabled),
.mentorx-cart-wrapper .product-quantity .quantity .minus:hover:not(:disabled) {
  color: #e30613 !important;
  background: #fff4f5 !important;
}
.mentorx-cart-wrapper .product-quantity .quantity button:disabled {
  opacity: .42 !important;
  cursor: not-allowed !important;
}

/* Cart actions are presentation-only. WooCommerce owns disabled/enabled state,
   submission, quantity validation, AJAX refresh and notices. */
.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px 18px !important;
  width: 100% !important;
  min-width: 0 !important;
}
.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions .shipping-request {
  flex: 1 1 320px !important;
  min-width: 0 !important;
  margin: 0 !important;
}
.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions .shipping-request label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: fit-content !important;
  max-width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  background: #fff !important;
  border: 1px solid #e3e5e8 !important;
  border-radius: 10px !important;
  cursor: pointer !important;
}
.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions .shipping-request input[type="checkbox"] {
  flex: 0 0 auto !important;
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  accent-color: #e30613;
}
.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions button[name="update_cart"] {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 176px !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 18px !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-align: center !important;
  background: #e30613 !important;
  border: 1px solid #e30613 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions button[name="update_cart"]:hover:not(:disabled),
.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions button[name="update_cart"]:focus-visible:not(:disabled) {
  color: #fff !important;
  background: #c9000b !important;
  border-color: #c9000b !important;
}
.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions button[name="update_cart"]:disabled {
  color: #9a9da3 !important;
  background: #f5f6f7 !important;
  border-color: #dadde1 !important;
  opacity: 1 !important;
  cursor: default !important;
}

@media (max-width: 1024px) {
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
    grid-template-columns: 136px minmax(0, 1fr) 36px !important;
    grid-template-areas:
      "product product product"
      "quantity price remove" !important;
    gap: 14px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-quantity {
    justify-self: start !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-price {
    justify-self: end !important;
  }
}

@media (max-width: 560px) {
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
    grid-template-columns: minmax(94px, auto) minmax(0, 1fr) 30px !important;
    grid-template-areas:
      "product product remove"
      "quantity price price" !important;
    gap: 12px 10px !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-quantity {
    width: auto !important;
    min-width: 0 !important;
    justify-self: start !important;
  }
  .mentorx-cart-wrapper .product-quantity .quantity {
    min-height: 38px !important;
  }
  .mentorx-cart-wrapper .product-quantity .quantity input.qty {
    width: 58px !important;
    min-width: 50px !important;
    height: 38px !important;
    min-height: 38px !important;
    line-height: 38px !important;
    font-size: 13px !important;
  }
  .mentorx-cart-wrapper .product-quantity .quantity .plus,
  .mentorx-cart-wrapper .product-quantity .quantity .minus,
  .mentorx-cart-wrapper .product-quantity .quantity [data-quantity-plus],
  .mentorx-cart-wrapper .product-quantity .quantity [data-quantity-minus],
  .mentorx-cart-wrapper .product-quantity .quantity .mtl-qty__btn {
    flex-basis: 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 38px !important;
    min-height: 38px !important;
    font-size: 16px !important;
  }
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions .shipping-request,
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions .shipping-request label,
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions button[name="update_cart"] {
    width: 100% !important;
    min-width: 0 !important;
  }
  .mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions .shipping-request {
    flex: 0 0 auto !important;
  }
}

/* 2.9.9 — live REST cart updates */
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item.is-cart-updating {
  opacity: .72;
}

.mentorx-cart-wrapper .woocommerce-cart-form__cart-item.is-cart-updating .quantity {
  cursor: wait;
}

.mentorx-cart-wrapper .quantity .mtl-qty__btn:disabled,
.mentorx-cart-wrapper .quantity input.qty:disabled {
  cursor: wait;
}

.mentorx-cart-wrapper .mentorx-cart-form-wrapper .actions button[name="update_cart"] {
  display: none !important;
}

.metaliom-cart-live-status {
  position: fixed;
  inset-inline-start: 24px;
  bottom: 24px;
  z-index: 100000;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 10px;
  background: #20242a;
  color: #fff;
  font-size: 13px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.metaliom-cart-live-status.is-visible { opacity: 1; transform: translateY(0); }
.metaliom-cart-live-status.is-error { background: #b42318; }

/* --------------------------------------------------------------------------
 * 2.9.14 checkout hardening: parent-based containment + calm typography
 * ----------------------------------------------------------------------- */
body.woocommerce-checkout {
  max-inline-size: 100%;
  overflow-x: clip;
}

body.woocommerce-checkout .site,
body.woocommerce-checkout .site-main,
body.woocommerce-checkout main,
body.woocommerce-checkout .entry-content,
body.woocommerce-checkout .woocommerce,
body.woocommerce-checkout .elementor-widget-container,
body.woocommerce-checkout .elementor-widget-shortcode,
body.woocommerce-checkout .elementor-widget-woocommerce-checkout-page,
body.woocommerce-checkout .elementor-shortcode {
  min-inline-size: 0;
  max-inline-size: 100%;
}

body.woocommerce-checkout .payment-header {
  inline-size: calc(100% - 32px) !important;
  max-inline-size: 1100px !important;
  min-inline-size: 0 !important;
  gap: clamp(12px, 2.35vw, 30px) !important;
}

body.woocommerce-checkout .payment-header .item {
  min-inline-size: 0;
  flex: 0 1 auto;
}

body.woocommerce-checkout .payment-header hr {
  flex: 1 1 80px;
  inline-size: auto !important;
  min-inline-size: 24px;
  max-inline-size: 220px;
}

body.woocommerce-checkout form.woocommerce-checkout {
  inline-size: calc(100% - 32px) !important;
  max-inline-size: 1280px !important;
  min-inline-size: 0 !important;
  margin: 0 auto 40px !important;
  overflow: visible;
}

body.woocommerce-checkout form.woocommerce-checkout > *,
body.woocommerce-checkout form.woocommerce-checkout #customer_details,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-billing-fields,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
body.woocommerce-checkout form.woocommerce-checkout .checkout-section-1,
body.woocommerce-checkout form.woocommerce-checkout .checkout-section-2,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-checkout-form,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-checkout-order-review,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-checkout-review-order,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-checkout-wrapper,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals,
body.woocommerce-checkout form.woocommerce-checkout .cart-items-summary,
body.woocommerce-checkout form.woocommerce-checkout .cart-item-summary {
  inline-size: 100% !important;
  max-inline-size: 100% !important;
  min-inline-size: 0 !important;
  box-sizing: border-box !important;
}

body.woocommerce-checkout form.woocommerce-checkout .mentorx-checkout-form,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-checkout-review-order {
  overflow: visible;
  border-color: #e7eaed !important;
  border-radius: 18px !important;
  box-shadow: 0 6px 22px rgba(32, 36, 40, .035);
}

body.woocommerce-checkout form.woocommerce-checkout .woocommerce-checkout-payment,
body.woocommerce-checkout form.woocommerce-checkout .wc_payment_methods,
body.woocommerce-checkout form.woocommerce-checkout .wc_payment_method,
body.woocommerce-checkout form.woocommerce-checkout .payment_box,
body.woocommerce-checkout form.woocommerce-checkout .place-order,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}

body.woocommerce-checkout form.woocommerce-checkout .wc_payment_methods {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.woocommerce-checkout form.woocommerce-checkout .wc_payment_method label,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-privacy-policy-text,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-terms-and-conditions-checkbox-text {
  white-space: normal;
}

body.woocommerce-checkout form.woocommerce-checkout .checkout-section-1 > *,
body.woocommerce-checkout form.woocommerce-checkout .checkout-section-2 > *,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-input-wrapper,
body.woocommerce-checkout form.woocommerce-checkout .select2-container,
body.woocommerce-checkout form.woocommerce-checkout .select2-container .selection,
body.woocommerce-checkout form.woocommerce-checkout .select2-selection,
body.woocommerce-checkout form.woocommerce-checkout .select2-selection__rendered {
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
}

body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .item-header,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .item-subtotal,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .shipping-notice,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .cart-total {
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  gap: 8px;
}

body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .item-header > *,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .item-subtotal > *,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .shipping-notice > *,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .cart-total > *,
body.woocommerce-checkout form.woocommerce-checkout .privacy-policy-notice {
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .product-price,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .collateral-price,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .woocommerce-Price-amount {
  white-space: normal !important;
}

/* Select2 can receive an inline pixel width from WooCommerce. Keep it inside
   its grid cell even after checkout fragments or address fields are refreshed. */
body.woocommerce-checkout form.woocommerce-checkout .select2-container {
  width: 100% !important;
}
body.woocommerce-checkout .select2-dropdown {
  max-width: calc(100vw - 20px) !important;
  box-sizing: border-box;
}

/* Elementor/theme heading rules must not enlarge the OTP title in the cart
   authentication flow. */
body.woocommerce-cart .metaliom-otp__heading h3,
body.woocommerce-checkout .metaliom-otp__heading h3 {
  font-size: 16px !important;
}

/* Checkout typography is deliberately scoped: headings retain hierarchy,
   while labels, values and helper text no longer inherit heavy theme weights. */
body.woocommerce-checkout form.woocommerce-checkout {
  color: #394047;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
}

body.woocommerce-checkout form.woocommerce-checkout .order-details-title,
body.woocommerce-checkout form.woocommerce-checkout .address-title,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals h2 {
  margin: 0 0 14px !important;
  color: #202428 !important;
  font-family: inherit !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
}

body.woocommerce-checkout form.woocommerce-checkout .form-row label,
body.woocommerce-checkout form.woocommerce-checkout .wc_payment_method > label {
  color: #394047 !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

body.woocommerce-checkout form.woocommerce-checkout input,
body.woocommerce-checkout form.woocommerce-checkout select,
body.woocommerce-checkout form.woocommerce-checkout textarea,
body.woocommerce-checkout form.woocommerce-checkout .select2-selection__rendered,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals,
body.woocommerce-checkout form.woocommerce-checkout .payment_box,
body.woocommerce-checkout form.woocommerce-checkout .privacy-policy-notice,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-privacy-policy-text,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  font-family: inherit !important;
  font-weight: 400 !important;
}

body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .item-header,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .item-subtotal,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .shipping-notice,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .cart-total,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .fee,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .cart-discount,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .show-taxes {
  color: #4b535a !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.75 !important;
}

body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .product-name,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .product-quantity,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .woocommerce-Price-amount,
body.woocommerce-checkout form.woocommerce-checkout .mentorx-cart-collaterals .collateral-price,
body.woocommerce-checkout form.woocommerce-checkout .wc_payment_method > label,
body.woocommerce-checkout form.woocommerce-checkout #place_order {
  font-weight: 600 !important;
}

body.woocommerce-checkout form.woocommerce-checkout .privacy-policy-notice,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-privacy-policy-text,
body.woocommerce-checkout form.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper,
body.woocommerce-checkout form.woocommerce-checkout .payment_box {
  color: #687180 !important;
  font-size: 12.5px !important;
  line-height: 1.9 !important;
}

body.woocommerce-checkout form.woocommerce-checkout .required {
  color: #ed1c24 !important;
  font-weight: 500 !important;
}

@media (max-width: 767px) {
  body.woocommerce-checkout form.woocommerce-checkout {
    inline-size: calc(100% - 20px) !important;
    max-inline-size: 1280px !important;
  }

  body.woocommerce-checkout form.woocommerce-checkout .mentorx-checkout-form,
  body.woocommerce-checkout form.woocommerce-checkout .woocommerce-checkout-review-order {
    border-radius: 14px !important;
  }
}

/* --------------------------------------------------------------------------
 * 2.11.0 — product price card + cart subtotal column
 * ----------------------------------------------------------------------- */
.metaliom-price-card {
  width: 100%;
  max-width: 420px;
  margin: 0 0 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6e9ec;
  border-radius: 14px;
}

.metaliom-price-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  background: #f5f6f7;
}

.metaliom-price-card__head-label span {
  display: block;
  color: #6b7280;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.9;
}

.metaliom-price-card__head-label em {
  display: block;
  color: #e30613;
  font-size: 12px;
  font-style: normal;
  line-height: 1.9;
}

.metaliom-price-card__head-value {
  color: #34363d;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
  direction: rtl;
}

.metaliom-price-card__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid #eef1f3;
}

.metaliom-price-card__field label {
  color: #34363d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
}

.metaliom-price-card__field input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  color: #25272c;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: #fff;
  border: 1px solid #dfe2e6;
  border-radius: 10px;
  direction: ltr;
}

.metaliom-price-card__field input:focus {
  outline: 0;
  border-color: #00b0f0;
  box-shadow: 0 0 0 3px rgba(0, 176, 240, .14);
}

.metaliom-price-card__calc {
  padding: 10px 16px;
  border-bottom: 1px solid #eef1f3;
}

.metaliom-price-card__calc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.metaliom-price-card__calc-row span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.9;
}

.metaliom-price-card__calc-row strong {
  color: #34363d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.metaliom-price-card__calc-row.is-total strong {
  color: #e30613;
  font-size: 16px;
}

.metaliom-price-card__unit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 12px 16px;
}

.metaliom-price-card__unit span {
  color: #34363d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.metaliom-price-card__unit strong {
  color: #0d6efd;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
  direction: rtl;
}

/* Cart: per-unit price under the price, and the subtotal column.
   The subtotal column is capped rather than max-content: its tax note is a long
   string, and max-content would let it squeeze the product title into a sliver. */
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
  grid-template-columns: minmax(0, 1fr) 150px minmax(104px, 132px) minmax(116px, 164px) 36px !important;
  grid-template-areas: "product quantity price subtotal remove" !important;
  column-gap: 16px !important;
}

.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .image-and-name,
.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-name {
  min-width: 0 !important;
}

.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-name a {
  overflow-wrap: anywhere;
}

.mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-subtotal {
  grid-area: subtotal !important;
  justify-self: center !important;
  align-self: center !important;
  text-align: center !important;
}

.mentorx-cart-wrapper .product-price .metaliom-unit-price,
.mentorx-cart-wrapper .product-subtotal .metaliom-tax-note {
  display: block;
  margin-top: 3px;
  color: #9aa1a9;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.8;
}

.mentorx-cart-wrapper .product-subtotal .metaliom-subtotal-amount {
  display: block;
  color: #e07a15;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

.mentorx-cart-wrapper .mentorx-cart-contents .cart-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(104px, 132px) minmax(116px, 164px) 36px;
  column-gap: 16px;
  padding: 0 0 10px;
  border-bottom: 1px solid #eef1f3;
  margin-bottom: 12px;
}

.mentorx-cart-wrapper .mentorx-cart-contents .cart-header span {
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
}

.mentorx-cart-wrapper .mentorx-cart-contents .cart-header span:first-child {
  text-align: start;
}

@media (max-width: 1024px) {
  .mentorx-cart-wrapper .mentorx-cart-contents .cart-header {
    display: none;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
    grid-template-columns: 136px minmax(0, 1fr) 36px !important;
    grid-template-areas:
      "product product product"
      "quantity price remove"
      "subtotal subtotal subtotal" !important;
  }
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .product-subtotal {
    justify-self: stretch !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 10px !important;
    border-top: 1px solid #eef1f3 !important;
    text-align: start !important;
  }
}

@media (max-width: 560px) {
  .mentorx-cart-wrapper .woocommerce-cart-form__cart-item .item-data {
    grid-template-areas:
      "product product remove"
      "quantity price price"
      "subtotal subtotal subtotal" !important;
  }
}
