.product-detail__main {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media screen and (min-width: 900px) {
  .product-detail__grid {
    grid-template-columns: 21rem 1fr;
    gap: 3rem;
    align-items: start;
  }
}

.product-detail__gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-detail__image-main-wrapper {
  position: relative;
  background-color: white;
  border-radius: 0.5rem;
  border: 1px solid #d9d9d9;
  padding: 0.5rem;
}

.product-detail__image-main {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1;
  border-radius: 0.5rem;
}

.product-detail__thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-detail__expand-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background-color: white;
  border-radius: 0.25rem;
  padding: 0.875rem;
  display: flex;
  color: var(--color-primary-700);
}

.product-detail__expand-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.product-detail__thumb-item {
  background-color: white;
  border-radius: 0.5rem;
  border: 1px solid #d9d9d9;
  padding: 0.5rem;

  width: 5.5rem;
  height: 5.5rem;
  cursor: pointer;
  transition: border-color 0.2s;
  border-radius: 6px;
  box-sizing: border-box;
}

.product-detail__thumb-item img {
  border-radius: 0.25rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail__thumb-item.is-selected {
  border-color: var(--color-primary-700);
}

.product-detail__info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

@media screen and (min-width: 900px) {
  .product-detail__info {
    margin-top: 0;
  }
}

.composite-data-set {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-detail__back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  color: black;

  svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

@media screen and (max-width: 900px) {
  .product-detail__back-link {
    order: 2;
  }
}

.product-detail__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-detail__title {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.75rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin: 0;
}

.product-detail__subtitle {
  font-size: 1.25rem;
  font-style: normal;
  font-weight: 700;
  line-height: 150%;
}

.product-detail__price {
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: 150%;
}

.product-detail__description {
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
}

.product-detail__description p:not(:last-child) {
  margin-bottom: 1rem;
}

.product-detail__description a {
  color: var(--color-primary-700);
  text-decoration: underline !important;
}

@media screen and (max-width: 900px) {
  .product-detail__actions .btn-primary {
    width: 100%;
  }
}

.related-products-block {
  width: 100%;
  max-width: 100%;
  margin-top: 6rem;
}

.related-products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.related-products-header .header-title h3 {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: 150%;
}

.related-products-header .header-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.related-products-header .slider-controls {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.related-products-header .slider-arrow {
  padding: 0.75rem;
  border-radius: 50%;
  background-color: var(--color-tetriary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease-out;

  svg {
    color: var(--color-primary-700);
    width: 1.5rem;
    height: 1.5rem;
  }
}

.related-products-header .slider-arrow:hover {
  background-color: var(--color-secondary);
}

.related-products-viewport {
  width: 100%;
  position: relative;
}

.related-products-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;

  padding: 0.5rem;
  margin: -0.5rem;
  scroll-padding: 0.5rem;

  -ms-overflow-style: none;
  scrollbar-width: none;
}

.related-products-track::-webkit-scrollbar {
  display: none;
}

.related-product-card {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  flex: 0 0 calc(33.333% - 1rem);
  min-width: 250px;
  display: flex;
  flex-direction: column;
}

.related-product-card .product-category__item-link {
  height: 100%;
}

.related-product-card .product-category__item-inner {
  height: 100%;
  width: 100%;
}

@media screen and (max-width: 900px) {
  .related-products-block {
    margin-top: 3rem;
  }

  .related-products-header .header-content {
    display: none;
  }

  .related-products-viewport {
    overflow: visible;
  }

  .related-products-track {
    gap: 0.5rem;
  }

  .related-product-card {
    flex: 0 0 calc(40% - 1rem);
    min-width: 10rem;
  }
}
