.related-products {
  padding-top: 20px;
  padding-bottom: 88px;
}

.related-products-heading {
  align-items: end;
  margin-bottom: 34px;
}

.related-products-heading h2 {
  margin-bottom: 0;
  font-size: 42px;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.related-product-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.related-product-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  margin: -18px -18px 18px;
  padding: 22px;
  overflow: hidden;
  background: #f5faf7;
  border-radius: 20px 20px 0 0;
}

.related-product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .2s ease;
}

.related-product-card:hover .related-product-media img {
  transform: scale(1.04);
}

.related-product-category {
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.related-product-card h3 {
  margin: 8px 0 18px;
  font-size: 19px;
  line-height: 1.25;
}

.related-product-card h3 a:hover {
  color: var(--green);
}

.related-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.related-product-footer strong {
  color: var(--green-dark);
  font-size: 20px;
  white-space: nowrap;
}

.related-product-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.related-product-cta span {
  color: var(--coral);
}

.product-sticky-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 25px rgba(8, 63, 56, .13);
  opacity: 0;
  pointer-events: none;
  transform: translateY(110%);
  transition: transform .25s ease, opacity .25s ease;
}

.product-sticky-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.product-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 80px;
}

.product-sticky-product {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--green-dark);
  font-weight: 700;
}

.product-sticky-product img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5faf7;
}

.product-sticky-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-sticky-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.product-sticky-price {
  color: var(--green-dark);
  font-size: 20px;
  white-space: nowrap;
}

.product-sticky-cta {
  white-space: nowrap;
}

.product-sticky-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.product-sticky-close:hover {
  background: var(--line);
}

@media (max-width: 900px) {
  .related-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .related-products {
    padding-top: 0;
    padding-bottom: 60px;
  }

  .related-products-heading {
    align-items: start;
    gap: 12px;
  }

  .related-products-heading h2 {
    font-size: 34px;
  }

  .related-products-grid {
    gap: 12px;
  }

  .related-product-card {
    padding: 14px;
    border-radius: 16px;
  }

  .related-product-media {
    margin: -14px -14px 14px;
    padding: 14px;
    border-radius: 16px 16px 0 0;
  }

  .related-product-card h3 {
    margin-bottom: 14px;
    font-size: 16px;
  }

  .related-product-footer {
    display: block;
  }

  .related-product-footer strong {
    display: block;
    margin-bottom: 8px;
  }

  .product-sticky-inner {
    min-height: 68px;
    gap: 8px;
  }

  .product-sticky-product {
    gap: 8px;
  }

  .product-sticky-product img {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .product-sticky-name {
    max-width: 32vw;
    font-size: 13px;
  }

  .product-sticky-actions {
    gap: 8px;
  }

  .product-sticky-price {
    font-size: 16px;
  }

  .product-sticky-cta {
    padding: 10px 12px;
    font-size: 12px;
  }

  .product-sticky-cta span {
    display: none;
  }

  .product-sticky-close {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
}
