/* Last-load compatibility fixes for classic and block-based WooCommerce titles. */
html body.single-product main h1,
html body.single-product main h1.product_title,
html body.single-product main h1.wp-block-post-title,
html body.single-product .summary.entry-summary h1,
html body.single-product .wp-block-woocommerce-product-summary h1 {
  display: block !important;
  margin: 0 0 16px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  text-shadow: none !important;
  font-size: clamp(2.3rem, 4.4vw, 4.2rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.05em !important;
  line-height: 0.98 !important;
}

html body.single-product .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
  display: none !important;
}

html body.single-product .woocommerce-product-gallery__image img {
  object-fit: contain !important;
  object-position: center !important;
}

html body.single-product .woocommerce-product-details__short-description .ecp-pdp-meta {
  display: block !important;
  margin: 18px 0 0 !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(83, 166, 255, 0.24) !important;
  border-radius: 4px !important;
  color: #cbd7e7 !important;
  background: rgba(47, 121, 255, 0.065) !important;
  font-size: 0.78rem !important;
  font-weight: 750 !important;
  letter-spacing: 0.025em !important;
  line-height: 1.5 !important;
}

/* Neutralize legacy WooCommerce percentage widths in related-product layouts. */
html body.single-product .related.products,
html body.single-product .wp-block-woocommerce-related-products {
  width: min(1240px, 100%) !important;
  max-width: 1240px !important;
}

html body.single-product .related.products ul.products,
html body.single-product .wp-block-woocommerce-related-products ul.products,
html body.single-product .wp-block-woocommerce-related-products .wc-block-product-template,
html body.single-product .related.products .wc-block-product-template {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.single-product .related.products ul.products::before,
html body.single-product .related.products ul.products::after,
html body.single-product .wp-block-woocommerce-related-products ul.products::before,
html body.single-product .wp-block-woocommerce-related-products ul.products::after {
  display: none !important;
}

html body.single-product .related.products ul.products li.product,
html body.single-product .wp-block-woocommerce-related-products ul.products li.product,
html body.single-product .wp-block-woocommerce-related-products .wc-block-product-template > li,
html body.single-product .related.products .wc-block-product-template > li {
  box-sizing: border-box !important;
  display: flex !important;
  float: none !important;
  flex-direction: column !important;
  grid-column: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body.single-product .related.products li.product > a:first-child,
html body.single-product .wp-block-woocommerce-related-products li.product > a:first-child,
html body.single-product .wc-block-product-template > li > a,
html body.single-product .wc-block-product-template > li > .wp-block-group,
html body.single-product .wc-block-product-template > li > .wp-block-group > * {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
}

html body.single-product .related.products .woocommerce-loop-product__title,
html body.single-product .wp-block-woocommerce-related-products .woocommerce-loop-product__title,
html body.single-product .wc-block-product-template .wp-block-post-title,
html body.single-product .wc-block-product-template .wc-block-components-product-name,
html body.single-product .wc-block-product-template .wp-block-post-title a,
html body.single-product .wc-block-product-template .wc-block-components-product-name a {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  writing-mode: horizontal-tb !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

html body.single-product .related.products li.product .button,
html body.single-product .wp-block-woocommerce-related-products li.product .button,
html body.single-product .wc-block-product-template .wp-block-button,
html body.single-product .wc-block-product-template .wp-block-woocommerce-product-button {
  box-sizing: border-box !important;
  display: block !important;
  width: calc(100% - 36px) !important;
  max-width: none !important;
  margin: 18px !important;
}

html body.single-product .related.products li.product .button,
html body.single-product .wp-block-woocommerce-related-products li.product .button,
html body.single-product .wc-block-product-template .wp-block-button__link,
html body.single-product .wc-block-product-template .wp-block-woocommerce-product-button .wp-element-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  white-space: normal !important;
  writing-mode: horizontal-tb !important;
}

@media (max-width: 782px) {
  html body.single-product main h1,
  html body.single-product main h1.product_title,
  html body.single-product main h1.wp-block-post-title,
  html body.single-product .summary.entry-summary h1,
  html body.single-product .wp-block-woocommerce-product-summary h1 {
    font-size: clamp(2.35rem, 12vw, 3.4rem) !important;
  }

  html body.single-product .related.products ul.products,
  html body.single-product .wp-block-woocommerce-related-products ul.products,
  html body.single-product .wp-block-woocommerce-related-products .wc-block-product-template,
  html body.single-product .related.products .wc-block-product-template {
    grid-template-columns: 1fr !important;
  }
}
