/* Bahamoot matrix v12: polished storefront and one working cart button. */
/* Other custom/theme scripts may inject an outdated second Add All button.
   Hide it before JS removes it to avoid a visible flash. */
.woocommerce div.product .bahamoot-mg-matrix-wrap .custom-add-all-to-cart-wrap,
.bahamoot-mg-matrix-wrap .custom-add-all-to-cart-wrap {
  display: none !important;
}
.woocommerce div.product .bahamoot-mg-matrix-wrap,
.bahamoot-mg-matrix-wrap {
  margin: 14px 0 26px !important;
  color: #17253e !important;
  font-family: inherit !important;
}
.woocommerce div.product .bahamoot-mg-matrix-wrap .bahamoot-mg-matrix-scroll,
.bahamoot-mg-matrix-wrap .bahamoot-mg-matrix-scroll {
  border: 1px solid #dce5f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 3px 14px rgba(11, 45, 83, .05) !important;
  background: white !important;
  overflow: hidden !important;
}
.woocommerce div.product table.bahamoot-mg-matrix,
table.bahamoot-mg-matrix {
  border: 0 !important;
  border-radius: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}
.woocommerce div.product table.bahamoot-mg-matrix thead th,
table.bahamoot-mg-matrix thead th {
  background: #0c4381 !important;
  color: #fff !important;
  padding: 12px 5px !important;
  border-color: #0c4381 !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  letter-spacing: .01em !important;
}
.woocommerce div.product table.bahamoot-mg-matrix tbody tr:nth-child(2n) th,
.woocommerce div.product table.bahamoot-mg-matrix tbody tr:nth-child(2n) td,
table.bahamoot-mg-matrix tbody tr:nth-child(2n) th,
table.bahamoot-mg-matrix tbody tr:nth-child(2n) td {
  background: #f7faff !important;
}
.woocommerce div.product table.bahamoot-mg-matrix tbody tr:hover th,
.woocommerce div.product table.bahamoot-mg-matrix tbody tr:hover td,
table.bahamoot-mg-matrix tbody tr:hover th,
table.bahamoot-mg-matrix tbody tr:hover td {
  background: #eff6ff !important;
}
.woocommerce div.product table.bahamoot-mg-matrix tbody th,
table.bahamoot-mg-matrix tbody th {
  color: #142c4f !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  overflow-wrap: anywhere !important;
}
.woocommerce div.product table.bahamoot-mg-matrix .bahamoot-mg-stepper,
table.bahamoot-mg-matrix .bahamoot-mg-stepper {
  border-color: #cdd9e7 !important;
  box-shadow: 0 1px 2px rgba(4, 35, 74, .04) !important;
}
.woocommerce div.product table.bahamoot-mg-matrix .bahamoot-mg-stepper button.bahamoot-mg-step,
table.bahamoot-mg-matrix .bahamoot-mg-stepper button.bahamoot-mg-step {
  background: #e9f2fd !important;
  color: #0a4a8b !important;
}
.woocommerce div.product table.bahamoot-mg-matrix .bahamoot-mg-stepper button.bahamoot-mg-step:hover,
table.bahamoot-mg-matrix .bahamoot-mg-stepper button.bahamoot-mg-step:hover {
  background: #d1e5fa !important;
}
.woocommerce div.product .bahamoot-mg-matrix-wrap .bahamoot-mg-matrix-actions,
.bahamoot-mg-matrix-wrap .bahamoot-mg-matrix-actions {
  display: flex !important;
  position: static !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 18px 0 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.woocommerce div.product .bahamoot-mg-matrix-wrap button.bahamoot-mg-add-to-cart,
.bahamoot-mg-matrix-wrap button.bahamoot-mg-add-to-cart {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  min-height: 44px !important;
  min-width: 196px !important;
  padding: 12px 24px !important;
  background: #0c4381 !important;
  color: #fff !important;
  border: 1px solid #0c4381 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
  font-weight: 750 !important;
  box-shadow: 0 4px 12px rgba(12, 67, 129, .15) !important;
  transition: background .15s ease, box-shadow .15s ease !important;
}
.woocommerce div.product .bahamoot-mg-matrix-wrap button.bahamoot-mg-add-to-cart:hover,
.bahamoot-mg-matrix-wrap button.bahamoot-mg-add-to-cart:hover {
  background: #083361 !important;
  box-shadow: 0 5px 15px rgba(12, 67, 129, .2) !important;
}
.bahamoot-mg-matrix-wrap .bahamoot-mg-feedback {
  flex: 1 1 180px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}
.bahamoot-mg-matrix-wrap .bahamoot-mg-feedback.is-success { color: #136248 !important; }
.bahamoot-mg-matrix-wrap .bahamoot-mg-feedback.is-error { color: #b02a36 !important; }
@media (max-width: 650px) {
  .woocommerce div.product table.bahamoot-mg-matrix thead th,
  table.bahamoot-mg-matrix thead th { font-size: 11px !important; padding: 10px 2px !important; }
  .woocommerce div.product table.bahamoot-mg-matrix tbody th,
  table.bahamoot-mg-matrix tbody th { font-size: 12px !important; }
  .woocommerce div.product .bahamoot-mg-matrix-wrap .bahamoot-mg-matrix-actions,
  .bahamoot-mg-matrix-wrap .bahamoot-mg-matrix-actions {
    padding: 12px 0 0 !important;
    gap: 8px !important;
    align-items: stretch !important;
  }
  .woocommerce div.product .bahamoot-mg-matrix-wrap button.bahamoot-mg-add-to-cart,
  .bahamoot-mg-matrix-wrap button.bahamoot-mg-add-to-cart {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
  }
  .bahamoot-mg-matrix-wrap .bahamoot-mg-feedback { flex-basis: 100% !important; text-align: center !important; }
}
