/* OmVeda Smart Related Products - compact WooCommerce product teaser */
.ov-smart-related {
  --ov-sr-dark: var(--ov-dark, #184a33);
  --ov-sr-primary: var(--ov-primary, #8CBC4F);
  --ov-sr-primary-dark: var(--ov-primary-dark, #648935);
  --ov-sr-text: var(--ov-text, #194A33);
  --ov-sr-muted: var(--ov-text-secondary, #6B6F6C);
  --ov-sr-bg: #ffffff;
  --ov-sr-soft: #f7faf3;
  padding: clamp(1.4rem, 4vw, 2.25rem) 0;
  background: transparent;
}

.ov-smart-related__container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.ov-smart-related__header {
  text-align: center;
  margin-bottom: 1.1rem;
}

.ov-smart-related__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ov-sr-primary-dark);
}

.ov-smart-related__kicker::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: var(--ov-sr-primary);
}

.ov-smart-related__title {
  margin: 0;
  color: var(--ov-sr-dark);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ov-smart-related__subtitle {
  max-width: 620px;
  margin: 0.55rem auto 0;
  color: var(--ov-sr-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.ov-smart-related__products ul.products,
body.single-product .ov-smart-related__products ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.ov-smart-related__products ul.products::before,
.ov-smart-related__products ul.products::after {
  display: none !important;
  content: none !important;
}

.ov-smart-related__products li.product {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Opal/Teapoz product card normalization */
.ov-smart-related__products li.product .product-block {
  height: 100% !important;
  min-height: 285px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: var(--ov-sr-bg) !important;
  box-shadow: none !important;
}

.ov-smart-related__products li.product .product-transition {
  position: relative !important;
  height: 132px !important;
  min-height: 132px !important;
  max-height: 132px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: var(--ov-sr-soft) !important;
}

.ov-smart-related__products li.product .product-img-wrap,
.ov-smart-related__products li.product .product-img-wrap .inner,
.ov-smart-related__products li.product .product-image {
  width: 100% !important;
  height: 132px !important;
  min-height: 132px !important;
  max-height: 132px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  overflow: hidden !important;
}

.ov-smart-related__products li.product .product-image img,
.ov-smart-related__products li.product img.attachment-woocommerce_thumbnail {
  width: 122px !important;
  max-width: 122px !important;
  height: 122px !important;
  max-height: 122px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 auto !important;
}

.ov-smart-related__products li.product .second-image,
.ov-smart-related__products li.product .group-action,
.ov-smart-related__products li.product .shop-action {
  display: none !important;
}

.ov-smart-related__products li.product .woocommerce-LoopProduct-link,
.ov-smart-related__products li.product .woocommerce-loop-product__link {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  display: block !important;
}

.ov-smart-related__products li.product .onsale {
  position: absolute !important;
  top: 8px !important;
  left: 8px !important;
  right: auto !important;
  z-index: 3 !important;
  min-width: auto !important;
  min-height: auto !important;
  padding: 4px 8px !important;
  border-radius: 7px !important;
  font-size: 0.68rem !important;
  line-height: 1.15 !important;
}

.ov-smart-related__products li.product .product-caption {
  position: relative !important;
  z-index: 4 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0.85rem 0.7rem 0.8rem !important;
  background: var(--ov-sr-bg) !important;
  text-align: center !important;
}

.ov-smart-related__products li.product .woocommerce-loop-product__title {
  display: block !important;
  width: 100% !important;
  min-height: 2.5em !important;
  max-height: 3.8em !important;
  overflow: hidden !important;
  margin: 0 0 0.55rem !important;
  padding: 0 !important;
  font-size: 0.9rem !important;
  line-height: 1.28 !important;
  font-weight: 800 !important;
  color: var(--ov-sr-dark) !important;
  text-align: center !important;
}

.ov-smart-related__products li.product .woocommerce-loop-product__title a {
  color: inherit !important;
  text-decoration: none !important;
}

.ov-smart-related__products li.product .product-action {
  margin-top: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  align-items: stretch !important;
  position: static !important;
}

.ov-smart-related__products li.product .price {
  display: block !important;
  width: 100% !important;
  min-height: 2.4em !important;
  margin: 0 !important;
  color: var(--ov-sr-dark) !important;
  font-size: 0.86rem !important;
  line-height: 1.28 !important;
  text-align: center !important;
}

.ov-smart-related__products li.product .price del,
.ov-smart-related__products li.product .price ins,
.ov-smart-related__products li.product .price .amount {
  font-size: inherit !important;
  line-height: inherit !important;
}

.ov-smart-related__products li.product .opal-add-to-cart-button {
  position: static !important;
  transform: none !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

.ov-smart-related__products li.product .opal-add-to-cart-button a.button,
.ov-smart-related__products li.product a.button.product_type_variable,
.ov-smart-related__products li.product a.add_to_cart_button {
  position: static !important;
  transform: none !important;
  inset: auto !important;
  width: 100% !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 8px 9px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.78rem !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: normal !important;
  z-index: 5 !important;
}

.ov-smart-related__products li.product .opal-add-to-cart-button a.button::before,
.ov-smart-related__products li.product a.add_to_cart_button::before {
  position: static !important;
  transform: none !important;
  margin-right: 5px !important;
}

@media (max-width: 767px) {
  .ov-smart-related {
    padding: 1.15rem 0 !important;
  }

  .ov-smart-related__container {
    padding: 0 0.85rem !important;
  }

  .ov-smart-related__header {
    text-align: left !important;
    margin-bottom: 0.85rem !important;
  }

  .ov-smart-related__kicker {
    font-size: 0.7rem !important;
    letter-spacing: 0.09em !important;
  }

  .ov-smart-related__title {
    font-size: 1.28rem !important;
    line-height: 1.22 !important;
  }

  .ov-smart-related__subtitle {
    margin-top: 0.45rem !important;
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
  }

  .ov-smart-related__products ul.products,
  body.single-product .ov-smart-related__products ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .ov-smart-related__products li.product .product-block {
    min-height: 275px !important;
  }

  .ov-smart-related__products li.product .product-transition,
  .ov-smart-related__products li.product .product-img-wrap,
  .ov-smart-related__products li.product .product-img-wrap .inner,
  .ov-smart-related__products li.product .product-image {
    height: 120px !important;
    min-height: 120px !important;
    max-height: 120px !important;
  }

  .ov-smart-related__products li.product .product-image img,
  .ov-smart-related__products li.product img.attachment-woocommerce_thumbnail {
    width: 112px !important;
    max-width: 112px !important;
    height: 112px !important;
    max-height: 112px !important;
  }

  .ov-smart-related__products li.product .product-caption {
    padding: 0.7rem 0.55rem 0.75rem !important;
  }

  .ov-smart-related__products li.product .woocommerce-loop-product__title {
    font-size: 0.8rem !important;
    line-height: 1.25 !important;
  }

  .ov-smart-related__products li.product .price {
    font-size: 0.78rem !important;
  }

  .ov-smart-related__products li.product .opal-add-to-cart-button a.button,
  .ov-smart-related__products li.product a.button.product_type_variable,
  .ov-smart-related__products li.product a.add_to_cart_button {
    font-size: 0.72rem !important;
    min-height: 38px !important;
  }
}

@media (max-width: 380px) {
  .ov-smart-related__products ul.products,
  body.single-product .ov-smart-related__products ul.products {
    grid-template-columns: 1fr !important;
  }
}
