.noyona-pdp-related {
  --noyona-pdp-related-cta-h: clamp(44px, 5vw, 56px);
  margin-top: clamp(2rem, 4vw, 3rem);
  margin-bottom: clamp(8rem, 12vw, 10rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.noyona-pdp-related__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.noyona-pdp-related__title {
  margin: 0;
  font-family: var(--wp--preset--font-family--poppins);
  font-size: var(--wp--preset--font-size--h-2);
  font-weight: var(--noyona-font-weight-bold);
  line-height: normal;
}

.noyona-pdp-related__subtitle {
  margin: 0.35rem 0 0;
  font-size: var(--wp--preset--font-size--body);
  font-weight: var( --noyona-font-weight-regular);
  color: #6f7785;
}

.noyona-pdp-related__view-all {
  margin-top: 0.6rem;
  color: #d8a8b2;
  font-size: var(--wp--preset--font-size--nav-button);
  text-decoration: none;
  white-space: nowrap;
}

.noyona-pdp-related__grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.7vw, 1.25rem);
}

.noyona-pdp-related__card {
  grid-column: span 2;
  border: 1px solid #ececec;
  border-radius: var(--noyona-radius-cta);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  /* min-height: 100%; */
}

.noyona-pdp-related__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  /* 16px bottom keeps the rating off the card edge and matches the L/R gutter. */
  padding: 0 16px 16px;
}

.noyona-pdp-related__image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.34;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  margin-bottom: 0.65rem;
  text-decoration: none;
  background: var(--noyona-color-pink-muted-rose);
}

.noyona-pdp-related__image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.noyona-pdp-related__item-title {
  margin: 0 0 0.4rem;
  font-size: var(--wp--preset--font-size--h-5);
  line-height: normal;
  font-weight: var(--noyona-font-weight-bold);
}

.noyona-pdp-related__item-title a {
  color: #000000;
  text-decoration: none;
}

.noyona-pdp-related__tag {
  display: inline-flex;
  align-self: flex-start;
  width: -moz-fit-content;
  width: fit-content;
  max-width: max-content;
  align-items: center;
  justify-content: center;
  min-height: 1.25rem;
  padding: 0.12rem 0.62rem;
  border-radius: 999px;
  background: var(--noyona-color-pink-accent);
  color: #fff;
  font-size: 0.84rem;
  font-weight: var( --noyona-font-weight-bold);
  margin-bottom: 0.45rem;
}

.noyona-pdp-related__desc {
  margin: 0 0 0.55rem;
  color: #5d646e;
  font-size: clamp(0.86rem, 1.05vw, 1rem);
  line-height: normal;
}

.noyona-pdp-related .noyona-product-card-price,
.noyona-pdp-related__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0;
  /* Baseline price typography so the "–" range separator and any bare
     amounts match the standard current-price look (700 / consistent size). */
  font-size: clamp(1.05rem, 1.3vw, 1.45rem);
  font-weight: var(--noyona-font-weight-bold);
  color: #111;
}

.noyona-pdp-related .noyona-product-card-price__badge {
  order: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.25rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--noyona-color-pink-accent);
  color: #fff;
  font-size: var(--wp--preset--font-size--caption);
  font-weight: var(--noyona-font-weight-bold);
  line-height: 1.2;
  text-decoration: none;
}

.single-product .noyona-pdp-related .noyona-product-card-price__old,
.single-product .noyona-pdp-related .noyona-product-card-price del,
.noyona-pdp-related .noyona-product-card-price__old,
.noyona-pdp-related .noyona-product-card-price del,
.noyona-pdp-related__price del {
  order: 1;
  margin: 0;
  color: #999;
  font-size: var(--wp--preset--font-size--caption);
  font-weight: var( --noyona-font-weight-regular);
  text-decoration: line-through;
  opacity: 1;
}

.noyona-pdp-related .noyona-product-card-price__old .woocommerce-Price-amount,
.noyona-pdp-related .noyona-product-card-price del .woocommerce-Price-amount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.single-product .noyona-pdp-related .noyona-product-card-price__current,
.single-product .noyona-pdp-related .noyona-product-card-price ins,
.noyona-pdp-related .noyona-product-card-price__current,
.noyona-pdp-related .noyona-product-card-price ins {
  order: 2;
  margin: 0;
  color: #111;
  font-size: clamp(1.05rem, 1.3vw, 1.45rem);
  font-weight: var(--noyona-font-weight-bold);
  text-decoration: none;
}

.noyona-pdp-related .noyona-product-card-price__current .woocommerce-Price-amount,
.noyona-pdp-related .noyona-product-card-price ins .woocommerce-Price-amount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

/* Variable-product price ranges (e.g. ₱209.00 – ₱366.00) render as bare
   <span class="woocommerce-Price-amount"> siblings with no __current / ins
   wrapper. The direct-child combinator targets ONLY those range amounts
   (discount/single-price amounts are nested in del/ins and never matched),
   inheriting the bold/sized container styling above. */
.noyona-pdp-related .noyona-product-card-price > .woocommerce-Price-amount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.noyona-pdp-related__price {
  font-size: clamp(1.05rem, 1.3vw, 1.45rem);
  font-weight: var(--noyona-font-weight-bold);
  color: #111;
}

.noyona-pdp-related__rating {
  margin-top: 0;
  padding-top: 0.35rem;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.noyona-pdp-related__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.noyona-pdp-related__meta {
  flex: 1 1 auto;
  min-width: 0;
}

.noyona-pdp-related__stars {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.noyona-pdp-related__stars .star-rating {
  overflow: hidden;
  position: relative;
  display: inline-block;
  height: 1.618em;
  line-height: 1.618;
  width: 5.4em;
  font-family: star;
  font-size: var(--wp--preset--font-size--caption);
  margin: 0;
}

.noyona-pdp-related__stars .star-rating::before {
  content: "sssss";
  color: #d3ced2;
  float: left;
  top: 0;
  left: 0;
  position: absolute;
}

.noyona-pdp-related__stars .star-rating span {
  overflow: hidden;
  float: left;
  top: 0;
  left: 0;
  position: absolute;
  padding-top: 1.5em;
}

.noyona-pdp-related__stars .star-rating span::before {
  content: "SSSSS";
  top: 0;
  position: absolute;
  left: 0;
  color: #f6c343;
}

.noyona-pdp-related__rating-text {
  font-size: 0.76rem;
  color: #2c3138;
}

.noyona-pdp-related .ps-btn-cart {
  width: var(--noyona-pdp-related-cta-h);
  height: var(--noyona-pdp-related-cta-h);
  flex: 0 0 var(--noyona-pdp-related-cta-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--noyona-cta-secondary-bg);
  color: var(--noyona-cta-secondary-text);
  border-radius: 16px;
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  outline: none;
  border: 1px solid var(--noyona-cta-secondary-border);
  cursor: pointer;
}

.noyona-pdp-related .ps-btn-cart:hover,
.noyona-pdp-related .ps-btn-cart:focus-visible {
  background: var(--noyona-cta-secondary-hover-bg) !important;
  color: var(--noyona-cta-secondary-hover-text) !important;
  border: 1px solid var(--noyona-cta-secondary-hover-border);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(227, 11, 93, 0.25);
}

.noyona-pdp-related .added_to_cart.wc-forward {
  display: none !important;
}

@media (max-width: 1399px) {
  .noyona-pdp-related__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1399px) and (min-width: 901px) {
  /* Center incomplete last row (3-column layout). */
  .noyona-pdp-related__grid > .noyona-pdp-related__card:last-child:nth-child(3n + 1) {
    grid-column: 3 / span 2;
  }

  .noyona-pdp-related__grid > .noyona-pdp-related__card:nth-last-child(2):nth-child(3n + 1) {
    grid-column: 2 / span 2;
  }

  .noyona-pdp-related__grid > .noyona-pdp-related__card:last-child:nth-child(3n + 2) {
    grid-column: 4 / span 2;
  }
}

@media (max-width: 900px) {
  .noyona-pdp-related__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) and (min-width: 641px) {
  /* Center incomplete last row (2-column layout). */
  .noyona-pdp-related__grid > .noyona-pdp-related__card:last-child:nth-child(2n + 1) {
    grid-column: 2 / span 2;
  }
}

@media (max-width: 700px) {
  .noyona-pdp-related__head {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .noyona-pdp-related__grid {
    grid-template-columns: 1fr;
  }

  .noyona-pdp-related__grid > .noyona-pdp-related__card {
    grid-column: 1 / -1;
  }
}
