/* Spaceland Related Products V3.5 — compact app shelf, preview only */
body.sl-related-v35-preview .related-and-upsells {
  width: min(100%, 1220px) !important;
  max-width: 1220px !important;
  margin: 24px auto 14px !important;
  padding: 0 16px !important;
}

body.sl-related-v35-preview .related-and-upsells .related-products {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.sl-related-v35-preview .sl-rel35-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  direction: rtl;
}

body.sl-related-v35-preview .sl-rel35-copy {
  min-width: 0;
  text-align: right;
}

body.sl-related-v35-preview .sl-rel35-kicker {
  display: block;
  margin: 0 0 2px;
  color: #8a94a6;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

body.sl-related-v35-preview .sl-rel35-title,
body.sl-related-v35-preview .related-products .wd-el-title {
  margin: 0 !important;
  color: #101828 !important;
  font-size: 22px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  text-align: right !important;
  letter-spacing: -.02em;
}

/* Desktop: compact six-card app row instead of oversized shop cards. */
body.sl-related-v35-preview .related-products .products {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.sl-related-v35-preview .related-products .wd-product {
  --wd-col-lg: auto !important;
  --wd-col-md: auto !important;
  --wd-col-sm: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.sl-related-v35-preview .related-products .wd-product-wrapper {
  min-height: 0 !important;
  height: 100%;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
  border: 1px solid #e8edf3 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(16, 24, 40, .04) !important;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

body.sl-related-v35-preview .related-products .wd-product:hover .wd-product-wrapper {
  transform: translateY(-2px);
  border-color: #dce3eb !important;
  box-shadow: 0 9px 22px rgba(16, 24, 40, .07) !important;
}

body.sl-related-v35-preview .related-products .wd-product-thumb {
  position: relative;
  height: 190px !important;
  min-height: 190px !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 10px !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: #f7f8fa !important;
}

body.sl-related-v35-preview .related-products .wd-product-img-link {
  width: 100%;
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

body.sl-related-v35-preview .related-products .wd-product-thumb img {
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 8px;
  transform: none !important;
}

body.sl-related-v35-preview .related-products .wd-product-img-hover,
body.sl-related-v35-preview .related-products .wd-buttons,
body.sl-related-v35-preview .related-products .wd-compare-btn,
body.sl-related-v35-preview .related-products .wd-quick-view-btn,
body.sl-related-v35-preview .related-products .wd-wishlist-btn,
body.sl-related-v35-preview .related-products .added_to_cart,
body.sl-related-v35-preview .related-products a.added_to_cart {
  display: none !important;
}

body.sl-related-v35-preview .related-products .product-labels {
  top: 9px !important;
  inset-inline-start: 9px !important;
  inset-inline-end: auto !important;
  gap: 4px !important;
}

body.sl-related-v35-preview .related-products .product-label {
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 4px 7px !important;
  border-radius: 999px !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
}

body.sl-related-v35-preview .related-products .product-element-bottom {
  position: relative;
  flex: 1;
  min-height: 106px !important;
  padding: 10px 10px 44px !important;
  background: #fff !important;
  direction: rtl;
  text-align: right !important;
}

body.sl-related-v35-preview .related-products .wd-entities-title {
  min-height: 38px !important;
  margin: 0 0 6px !important;
  color: #182230 !important;
  font-size: 12.5px !important;
  font-weight: 750 !important;
  line-height: 1.5 !important;
  text-align: right !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
}

body.sl-related-v35-preview .related-products .wd-entities-title a {
  color: inherit !important;
}

body.sl-related-v35-preview .related-products .price {
  display: block !important;
  margin: 0 !important;
  color: #101828 !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  text-align: right !important;
}

body.sl-related-v35-preview .related-products .price :is(del, del .amount) {
  color: #98a2b3 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

body.sl-related-v35-preview .related-products .wd-add-btn {
  position: absolute !important;
  left: 9px !important;
  right: auto !important;
  bottom: 9px !important;
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  z-index: 3;
}

body.sl-related-v35-preview .related-products .wd-product.outofstock .wd-add-btn,
body.sl-related-v35-preview .related-products .sl-rel35-no-cart .wd-add-btn {
  display: none !important;
}

body.sl-related-v35-preview .related-products .wd-add-btn a {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 11px !important;
  background: #3478f6 !important;
  color: #fff !important;
  box-shadow: 0 6px 14px rgba(52, 120, 246, .18) !important;
  font-size: 0 !important;
  line-height: 1 !important;
  text-transform: none !important;
}

body.sl-related-v35-preview .related-products .wd-add-btn a:hover {
  background: #2368e8 !important;
}

body.sl-related-v35-preview .related-products .wd-add-btn .wd-action-icon,
body.sl-related-v35-preview .related-products .wd-add-btn .wd-action-text {
  display: none !important;
}

body.sl-related-v35-preview .related-products .wd-add-btn a::before {
  content: "+";
  display: block;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

body.sl-related-v35-preview .related-products .wd-add-btn a.added::before {
  content: "✓";
  font-size: 15px;
  font-weight: 800;
  transform: none;
}

@media (max-width: 1180px) and (min-width: 768px) {
  body.sl-related-v35-preview .related-products .products {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Mobile/tablet: true swipe shelf with a peek of the next card. */
@media (max-width: 767px) {
  body.sl-related-v35-preview .related-and-upsells {
    width: 100% !important;
    margin-top: 18px !important;
    padding: 0 !important;
  }

  body.sl-related-v35-preview .sl-rel35-head {
    margin-bottom: 10px;
    padding: 0 16px;
  }

  body.sl-related-v35-preview .sl-rel35-kicker {
    font-size: 10px;
  }

  body.sl-related-v35-preview .sl-rel35-title,
  body.sl-related-v35-preview .related-products .wd-el-title {
    font-size: 19px !important;
  }

  body.sl-related-v35-preview .related-products .products {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 0 16px 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body.sl-related-v35-preview .related-products .products::-webkit-scrollbar {
    display: none;
  }

  body.sl-related-v35-preview .related-products .wd-product {
    flex: 0 0 42vw !important;
    width: 42vw !important;
    min-width: 142px !important;
    max-width: 158px !important;
    scroll-snap-align: start;
  }

  body.sl-related-v35-preview .related-products .wd-product-wrapper {
    border-radius: 16px !important;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .035) !important;
  }

  body.sl-related-v35-preview .related-products .wd-product-thumb {
    height: 168px !important;
    min-height: 168px !important;
    padding: 8px !important;
  }

  body.sl-related-v35-preview .related-products .product-element-bottom {
    min-height: 102px !important;
    padding: 9px 9px 42px !important;
  }

  body.sl-related-v35-preview .related-products .wd-entities-title {
    min-height: 37px !important;
    margin-bottom: 5px !important;
    font-size: 12px !important;
    line-height: 1.48 !important;
  }

  body.sl-related-v35-preview .related-products .price {
    font-size: 13.5px !important;
  }

  body.sl-related-v35-preview .related-products .wd-add-btn,
  body.sl-related-v35-preview .related-products .wd-add-btn a {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
  }

  body.sl-related-v35-preview .related-products .wd-add-btn {
    left: 8px !important;
    bottom: 8px !important;
  }

  body.sl-related-v35-preview .related-products .wd-add-btn a {
    border-radius: 10px !important;
  }

  body.sl-related-v35-preview .related-products .wd-add-btn a::before {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sl-related-v35-preview .related-products .wd-product-wrapper,
  body.sl-related-v35-preview .related-products .wd-add-btn a {
    transition: none !important;
  }
}