.product-page {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 4rem 5rem;
  align-items: start;
  margin-block: 3rem 6rem;
}

/* Gallery */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.product-gallery__main {
  position: relative;
  width: 100%;
  overflow: hidden;
  transition: height 300ms ease;
}

.product-gallery__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  box-sizing: border-box;
}

.product-gallery__image,
.product-gallery__slide img {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 36rem);
  width: auto;
  height: auto;
  object-fit: contain;
}

.product-gallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--gray-100);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  translate: 0 -50%;
  transition:
    color 200ms,
    border-color 200ms,
    opacity 200ms,
    background-color 200ms;
}

.product-gallery__nav--prev {
  left: 1rem;
}

.product-gallery__nav--next {
  right: 1rem;
}

.product-gallery__main:not(:hover) .product-gallery__nav {
  opacity: 0;
  pointer-events: none;
}

@media (hover: hover) {
  .product-gallery__nav:hover {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
  }
}

.product-gallery__thumbs {
  width: 100%;
  overflow: hidden;
}

.product-gallery__thumb {
  width: 5.5rem;
  height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  box-sizing: border-box;
  border: 1px solid transparent;
  background: var(--gray-bg);
  cursor: pointer;
  opacity: 0.55;
  overflow: hidden;
  transition:
    opacity 200ms,
    border-color 200ms;
}

.product-gallery__thumb.swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--text);
}

.product-gallery__thumb-image,
.product-gallery__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

/* Summary */
.product-summary {
  min-width: 0;
  padding-top: 0.5rem;
}

.product-summary__title {
  margin: 0 0 1.25rem;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.product-summary__excerpt {
  margin-bottom: 2rem;
}

.product-summary__sizes {
  margin: 0 0 2rem;
}

.product-summary__sizes-label {
  margin: 0 0 0.75rem;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
  opacity: 0.8;
}

.product-summary__sizes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.product-summary__size {
  min-width: 5.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--gray-100);
  background: #fff;
  color: var(--text);
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition:
    color 200ms,
    border-color 200ms,
    background-color 200ms;
}

.product-summary__size.is-active,
.product-summary__size[aria-pressed="true"] {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

@media (hover: hover) {
  .product-summary__size:hover {
    border-color: var(--text);
  }
}

.product-summary__excerpt p {
  margin: 0;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
}

.product-summary__excerpt p + p {
  margin-top: 0.75rem;
}

.product-summary__attrs {
  margin: 0 0 2.5rem;
  padding: 0;
}

.product-summary__attr {
  display: grid;
  grid-template-columns: minmax(9.5rem, 11.5rem) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: baseline;
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--gray-100);
}

.product-summary__attr:last-child {
  border-bottom: 1px solid var(--gray-100);
}

.product-summary__attr-label,
.product-summary__attr-value {
  margin: 0;
  min-width: 0;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.3;
  color: var(--text);
}

.product-summary__attr-label {
  font-weight: 400;
}

.product-summary__attr-value {
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

.product-summary__composition-title {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.product-summary__composition-text p {
  margin: 0;
  font-family: "PPNeueMontreal", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--text);
}

.product-summary__composition-text p + p {
  margin-top: 0.75rem;
}

.product-summary__excerpt,
.product-summary__attrs,
.product-summary__composition {
  opacity: 0.8;
}

@media (max-width: 1100px) {
  .product-page {
    gap: 3rem;
  }

  .product-summary__title {
    font-size: 2.25rem;
  }
}

@media (max-width: 900px) {
  .product-page {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    margin-block: 2rem 4rem;
  }

  .product-gallery__slide {
    padding: 1.75rem;
  }

  .product-gallery__image,
  .product-gallery__slide img {
    max-height: min(70vh, 32rem);
  }

  .product-gallery__main:not(:hover) .product-gallery__nav,
  .product-gallery__nav {
    opacity: 1;
    pointer-events: auto;
  }

  .product-summary {
    padding-top: 0;
  }

  .product-summary__title {
    font-size: 2rem;
  }
}

@media (max-width: 520px) {
  .product-gallery__thumb {
    width: 4.5rem;
    height: 4.5rem;
  }

  .product-summary__title {
    font-size: 1.75rem;
  }

  .product-summary__attr {
    padding: 0.85rem 0;
  }
}

@media (hover: none) {
  .product-gallery__nav {
    opacity: 1;
    pointer-events: auto;
  }
}
