/* Millertech Product Card Formatting v1.2.5
 * Text-only insets. Product photographs and card gutters remain unchanged.
 * JS marks a verified Uncode/WooCommerce product card with .mtpc-card.
 */

.tmb-woocommerce .t-entry { text-align: left; }

/* The title is 18px / 800 for ALL recognized product cards. */
.mtpc-card .t-entry-title,
.mtpc-card .woocommerce-loop-product__title,
.mtpc-card .wc-block-grid__product-title,
.mtpc-card .wp-block-post-title,
.mtpc-card .wc-block-components-product-name {
  box-sizing: border-box;
  padding-left: 16px !important;
  padding-right: 16px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #2a2a30;
}

/* Uncode heading link weights can otherwise override their parent heading. */
.mtpc-card .t-entry-title a,
.mtpc-card .woocommerce-loop-product__title a,
.mtpc-card .wc-block-grid__product-title a,
.mtpc-card .wp-block-post-title a,
.mtpc-card .wc-block-components-product-name a,
.mtpc-card .mt-title-bold {
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: inherit;
  letter-spacing: inherit;
}

/* Battery-only secondary line. Non-battery titles retain their exact wording. */
.mtpc-card .mt-title-light,
.mtpc-card .t-entry-title .mt-title-light,
.mtpc-card .woocommerce-loop-product__title .mt-title-light,
.mtpc-card .wc-block-grid__product-title .mt-title-light {
  display: block;
  font-weight: 500 !important;
  font-size: 14px !important;
  line-height: 1.3;
  color: #4a4a55;
  margin-top: 2px;
  letter-spacing: normal;
}

/* Excerpts/descriptions should share the TITLE's 16px text insets. */
.mtpc-card .t-entry-excerpt,
.mtpc-card .woocommerce-loop-product__description,
.mtpc-card .wc-block-grid__product-excerpt,
.mtpc-card .wp-block-post-excerpt,
.mtpc-card .wc-block-components-product-summary {
  box-sizing: border-box;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* Keep price row full width but its content and divider inset 16px.
 * Using a pseudo-element for the divider works even when theme borders
 * are independently set on .price or surrounding markup. */
.mtpc-card .mt-price-row {
  position: relative;
  box-sizing: border-box !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  width: 100% !important;
  max-width: 100% !important;
  margin: 6px 0 0 !important;
  padding: 6px 16px 0 !important;
  border: 0 !important;
}
.mtpc-card .mt-price-row::before {
  content: '';
  display: block;
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: #e2e2e7;
  pointer-events: none;
}
.mtpc-card .mt-price-row .price {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}
.mtpc-card .mt-price-row .price ins,
.mtpc-card .mt-price-row .price .amount {
  font-size: inherit;
  font-weight: 700;
  color: #121212;
  text-decoration: none;
}
.mtpc-card .mt-price-row .wiser_review,
.mtpc-card .mt-price-row .star-rating {
  margin: 0 !important;
  flex: 0 0 auto;
}
.mtpc-card .mt-price-row .wiser_review.mt-no-reviews {
  display: none !important;
}
.mtpc-card .mtpc-standalone-rating {
  margin-left: 16px !important;
  margin-right: 16px !important;
}

/* React-managed WooCommerce block templates: style in place, no reparenting. */
.mtpc-card.wc-block-grid__product .wc-block-grid__product-price,
.mtpc-card.wc-block-product .wc-block-components-product-price {
  box-sizing: border-box;
  padding-left: 16px;
  padding-right: 16px;
  font-size: 18px;
  font-weight: 700;
}
.mtpc-card.wc-block-grid__product .wc-block-grid__product-rating,
.mtpc-card.wc-block-product .wc-block-components-product-rating {
  box-sizing: border-box;
  padding-left: 16px;
  padding-right: 16px;
}

/* v1.2.5: Uncode's .font-weight-500 utility contains descendant
 * !important selectors. The script also removes that utility from matched
 * titles and sets an inline important weight on heading and title links.
 * These selectors provide a CSS-side fallback for any non-JS moment. */
.mtpc-card .t-entry-title.mtpc-formatted-title,
.mtpc-card .t-entry-title.mtpc-formatted-title > a,
.mtpc-card .t-entry-title.mtpc-formatted-title > a.mtpc-title-link,
.mtpc-card .woocommerce-loop-product__title.mtpc-formatted-title,
.mtpc-card .woocommerce-loop-product__title.mtpc-formatted-title > a,
.mtpc-card .wc-block-grid__product-title.mtpc-formatted-title,
.mtpc-card .wc-block-grid__product-title.mtpc-formatted-title > a {
  font-weight: 800 !important;
}

/* Uncode product-card action buttons: give the whole control the same
 * 16px side inset as the title, price, rating and excerpt. This does not
 * change a button's internal padding, font, height, or vertical spacing. */
.mtpc-card .t-entry-text .t-entry .btn,
.mtpc-card .t-entry-text .t-entry a.button,
.mtpc-card .t-entry-text .t-entry button.button,
.mtpc-card .t-entry-text .t-entry .t-entry-readmore > a,
.mtpc-card .t-entry-text .t-entry .t-entry-button > a {
  margin-left: 16px !important;
  margin-right: 16px !important;
  max-width: calc(100% - 32px);
  box-sizing: border-box;
}
