.product-page {
  padding: 4rem 0;
}

.product-page__title {
  margin: 0 0 2rem;
}

.product-page__hero-grid {
  display: grid;
  gap: 2rem;
}

.product-gallery {
  --gallery-frame-color: #d9dde5;
  display: grid;
  gap: 1rem;
}

.product-gallery:not(.is-multiple) .product-gallery__thumbs-wrap {
  display: none;
}

.product-gallery__thumbs-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.product-gallery__thumbs-scroll {
  flex: 1;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-gallery__thumbs-scroll::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.product-gallery__thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-gallery__thumb-item + .product-gallery__thumb-item {
  margin-top: 1rem;
}

.product-gallery__thumb-btn {
  align-items: center;
  background: transparent;
  border: 1px solid var(--gallery-frame-color);
  border-radius: 0.75rem;
  cursor: pointer;
  display: flex;
  height: 260px;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
  transition: border-color 0.2s ease;
  width: 170px;
}

.product-gallery__thumb-btn.is-active {
  border-color: var(--color-primary);
}

.product-gallery__thumb-btn img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.product-gallery__thumbs-next {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px 0 #00000040;
  cursor: pointer;
  display: flex;
  height: 2.75rem;
  justify-content: center;
  left: 50%;
  position: absolute;
  padding: 0;
  bottom: 20px;
  transform: translateX(-50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
  width: 2.75rem;
  z-index: 2;
}

.product-gallery__thumbs-next img {
  display: block;
  height: 1.25rem;
  width: 1.25rem;
}

.product-gallery__thumbs-next.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.product-gallery__main {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.product-gallery__main-item {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: transparent;
  border: 1px solid var(--gallery-frame-color);
  border-radius: 0.75rem;
  display: none;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
}

.product-gallery__main-item.is-active {
  display: flex;
}

.product-gallery__main-item img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.product-gallery:not(.is-multiple) .product-gallery__main-item {
  display: flex;
}

.product-gallery__dots {
  align-items: center;
  display: none;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.product-gallery__dot {
  background: var(--color-gray-light-3);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 0.5rem;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
  width: 0.5rem;
}

.product-gallery__dot.is-active {
  background: var(--color-primary);
  transform: scale(1.15);
}

.product-page__specs-short-title {
  margin: 0 0 1rem;
}

.product-specs-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-specs-list__item {
  border-bottom: 1px solid var(--color-gray-light-3);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.625rem 0;
}

.product-specs-list__name {
  color: var(--color-gray);
}

.product-specs-list__value {
  font-weight: 600;
  text-align: right;
}

.product-page__all-specs-link {
  display: inline-block;
  margin-top: 1rem;
}

.product-order-card {
  background: var(--color-white);
  border-radius: 1rem;
  box-shadow: 0 4px 20px 0 #00000040;
  margin-top: 1.25rem;
  padding: 1.25rem;
}

.product-order-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.product-order-card .button-primary {
  width: 100%;
}

.product-order-card__note {
  color: var(--color-gray);
  font-size: 0.875rem;
  line-height: 1.5rem;
  margin-top: 0.75rem;
}

.product-page__description,
.product-page__specs-all,
.product-page__advantages,
.product-page__related {
  margin-top: 3rem;
}

.product-page__advantages {
  margin-bottom: 3rem;
}

.product-page__description-title,
.product-page__specs-all-title,
.product-page__advantages-title,
.product-page__related-title {
  margin: 0 0 1.25rem;
}

.product-page__description-content p {
  margin: 0 0 1rem;
}

.product-page__description-content p:last-child {
  margin-bottom: 0;
}

.product-specs-list--all {
  column-gap: 2rem;
  display: grid;
}

.product-advantages-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-advantages-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  position: relative;
}

.product-advantages-list li:last-child {
  margin-bottom: 0;
}

.product-advantages-list li::before {
  background: var(--color-primary);
  border-radius: 50%;
  content: "";
  height: 0.4375rem;
  left: 0;
  position: absolute;
  top: 0.5625rem;
  width: 0.4375rem;
}

.product-page__related-grid {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

@media screen and (min-width: 768px) {
  .product-page {
    padding-bottom: 5rem;
  }

  .product-page__hero-grid {
    gap: 2.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .product-gallery {
    align-items: stretch;
    column-gap: 24px;
    height: 500px;
    max-height: 500px;
    grid-template-columns: 94px minmax(0, 1fr);
    overflow: hidden;
  }

  .product-gallery:not(.is-multiple) {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-gallery__thumbs-wrap {
    height: 100%;
    min-height: 0;
  }

  .product-gallery__main-wrap,
  .product-gallery__main,
  .product-gallery__main-item {
    height: 100%;
    min-height: 0;
  }

  .product-gallery__main-item {
    aspect-ratio: auto;
  }

  .product-gallery__thumb-btn {
    height: 112px;
    width: 94px;
  }

  .product-specs-list--all {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-page__related-grid {
    flex-direction: row;
  }
}

@media screen and (min-width: 1330px) {
  .product-gallery {
    column-gap: 24px;
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .product-gallery:not(.is-multiple) {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-gallery__thumb-btn {
    height: 260px;
    width: 170px;
  }

}

@media screen and (max-width: 767px) {
  .product-gallery .product-gallery__thumbs-wrap {
    display: none;
  }

  .product-gallery.is-multiple .product-gallery__dots {
    display: flex;
  }

  .product-gallery.is-multiple .product-gallery__main {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .product-gallery.is-multiple .product-gallery__main::-webkit-scrollbar {
    display: none;
  }

  .product-gallery.is-multiple .product-gallery__main-item {
    display: flex;
    flex: 0 0 100%;
    scroll-snap-align: start;
  }
}
