/* Product-detail corrections for the active modular production release. */
@media (min-width: 768px) {
  body.template-14.type-product .p-detail-inner {
    box-sizing: border-box !important;
    width: calc(100% - 48px) !important;
    max-width: 1600px !important;
    margin-inline: auto !important;
  }
}

@media (min-width: 1280px) {
  body.template-14.type-product .p-detail-inner {
    width: calc(100% - 64px) !important;
  }
}

@media (min-width: 1664px) {
  body.template-14.type-product .p-detail-inner {
    width: 1600px !important;
    max-width: calc(100vw - 64px) !important;
    margin-inline: auto !important;
  }
}

/* The design keeps sizing links in the help content, not below the gallery. */
body.template-14.type-product .p-detail-inner > .sh-product-guides {
  display: none !important;
}

/* Keep the custom help link; remove only Shoptet's extra standalone row. */
body.template-14.type-product #product-detail-form > .detail-parameters > a.shipping-options {
  display: none !important;
}

/* Figma's right-hand help column is 383 px inside the 735 px data column. */
@media (min-width: 1664px) {
  body.template-14.type-product .sh-product-help {
    grid-template-columns: minmax(0, 287fr) minmax(0, 383fr) !important;
    column-gap: 0 !important;
  }

  body.template-14.type-product .sh-product-help-contacts {
    box-sizing: border-box;
    min-width: 0 !important;
    padding-inline: 0 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 16px !important;
  }

  body.template-14.type-product .sh-product-help-contacts > *,
  body.template-14.type-product .sh-product-help-contacts .sh-contact-link {
    min-width: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

/* Restore the catalogue's related products that the legacy JK stylesheet hid. */
body.template-14.type-product .products-related-header {
  display: block !important;
  box-sizing: border-box;
  width: calc(100% - 64px);
  max-width: 1600px;
  margin: 64px auto 24px !important;
  color: var(--sh-ink, #20231c);
  font-size: 32px;
  line-height: 1.2;
}

body.template-14.type-product .products-related-wrapper.products-wrapper.product-slider-holder.has-navigation {
  position: relative;
  display: block !important;
  box-sizing: border-box;
  width: calc(100% - 64px);
  max-width: 1600px;
  margin: 0 auto 64px !important;
  padding: 0 !important;
  overflow: visible !important;
  scroll-margin-top: 100px;
}

body.template-14.type-product .products-related-wrapper .products {
  width: 100% !important;
  overflow: visible !important;
}

body.template-14.type-product .products-related-wrapper .products-block {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 30px;
  transform: none !important;
}

body.template-14.type-product .products-related-wrapper .products-block::-webkit-scrollbar {
  display: none;
}

body.template-14.type-product .products-related-wrapper .products-block > .product {
  display: block !important;
  box-sizing: border-box;
  flex: 0 0 calc((100% - 90px) / 4);
  flex-shrink: 0;
  min-width: 0;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  scroll-snap-align: start;
}

body.template-14.type-product .products-related-wrapper .product[data-sh-related-duplicate="true"] {
  display: none !important;
}

@media (min-width: 768px) and (max-width: 1439px) {
  body.template-14.type-product .products-related-header,
  body.template-14.type-product .products-related-wrapper.products-wrapper.product-slider-holder.has-navigation {
    width: calc(100% - 48px);
  }

  body.template-14.type-product .products-related-wrapper .products-block {
    gap: 16px;
  }

  body.template-14.type-product .products-related-wrapper .products-block > .product {
    flex-basis: calc((100% - 16px) / 2);
  }
}

body.template-14.type-product .products-related-wrapper .product-slider-pagination {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 24px auto 0;
}

body.template-14.type-product .products-related-wrapper .product-slider-pagination .sh-related-page {
  display: block;
  width: 40px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e9e5e1;
  cursor: pointer;
}

body.template-14.type-product .products-related-wrapper .product-slider-pagination .sh-related-page[aria-current="true"] {
  background: var(--sh-brand, #dd6e42);
}

body.template-14.type-product .products-related-wrapper .product-slider-navigation {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid !important;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid var(--sh-line, #eaecf0);
  border-radius: 50%;
  background: #fff;
  color: var(--sh-ink, #20231c);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

body.template-14.type-product .products-related-wrapper .product-slider-navigation:disabled {
  opacity: .35;
  cursor: default;
}

body.template-14.type-product .products-related-wrapper .navigation-prev {
  left: -20px;
}

body.template-14.type-product .products-related-wrapper .navigation-next {
  right: -20px;
}

@media (max-width: 767px) {
  body.template-14.type-product .products-related-header {
    width: calc(100% - 32px);
    margin: 32px auto 16px !important;
    font-size: 24px;
  }

  body.template-14.type-product .products-related-wrapper.products-wrapper.product-slider-holder.has-navigation {
    width: calc(100% - 32px);
    margin-bottom: 32px !important;
  }

  body.template-14.type-product .products-related-wrapper .products-block {
    gap: 12px;
  }

  body.template-14.type-product .products-related-wrapper .products-block > .product {
    flex-basis: calc((100% - 12px) / 2);
  }

  body.template-14.type-product .products-related-wrapper .product-slider-navigation {
    display: none !important;
  }
}
