/*
 * Product page: the top section (product image and photos next to the name, summary and order button).
 * Written with logical properties (inline-start / inline-end), so it works for both directions and has no rtl/ copy.
 */
.product-hero {
  padding-top: 170px;
  padding-bottom: 40px;
}

.product-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  /* the large image sits at the bottom of its column, level with the photos under the text */
  align-items: end;
  gap: clamp(40px, 6vw, 110px);
}

/* ---------- Images: the large product image, and three photos under the text ---------- */
.product-gallery {
  --gallery-radius: 24px;
  min-width: 0;
}

/* Square white frame; the product box is always shown whole, never cropped */
.product-gallery__stage {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--gallery-radius);
  background: #fff;
}

.product-gallery__stage img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 4%;
  object-fit: contain;
}

/* The photo under the cursor grows wider (the template's .flexibly-hover effect) */
.product-gallery__photos {
  gap: 14px;
  height: 210px;
  margin-top: 50px;
}

.product-gallery__photo {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
}

.product-gallery__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Text ---------- */
.product-hero__text {
  min-width: 0;
}

.product-hero__title {
  margin-top: 14px;
  font-size: clamp(44px, 5.2vw, 84px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.product-hero__summary {
  max-width: 520px;
  margin-top: 28px;
  font-size: 17px;
  line-height: 1.85;
}

.product-hero__cta {
  margin-top: 40px;
}

/* ---------- Spec table: the values look like the summary text; the labels keep the template style ---------- */
.product-details .dsn-style-list h4.spec-text {
  font-family: var(--body-font);
  font-weight: var(--font-weight-body);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0;
  color: var(--font-color);
}

/* ---------- Entrance: the text and photos rise in as soon as the page is shown, without scrolling ---------- */
.product-hero__text > *,
.product-gallery__stage {
  animation: product-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.product-gallery__stage { animation-delay: 0.05s; }
.product-hero__text > :nth-child(1) { animation-delay: 0.15s; }
.product-hero__text > :nth-child(2) { animation-delay: 0.25s; }
.product-hero__text > :nth-child(3) { animation-delay: 0.35s; }
.product-hero__text > :nth-child(4) { animation-delay: 0.45s; }
.product-hero__text > :nth-child(5) { animation-delay: 0.55s; }

@keyframes product-rise {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-hero__text > *,
  .product-gallery__stage {
    animation: none;
  }
}

/* ---------- Tablet and phone: gallery on top, text under it ---------- */
@media only screen and (max-width: 991px) {
  .product-hero {
    padding-top: 130px;
  }

  .product-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .product-gallery {
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
  }
}

@media only screen and (max-width: 575px) {
  .product-hero {
    padding-top: 110px;
  }

  .product-gallery {
    --gallery-radius: 18px;
  }

  .product-hero__summary {
    font-size: 16px;
  }
}

@media only screen and (max-width: 767px) {
  /* the template stacks .flexibly-hover items on small screens; keep the three photos in one row */
  .product-gallery__photos {
    flex-direction: row;
    gap: 10px;
    height: 150px;
    margin-top: 36px;
  }
}

@media only screen and (max-width: 575px) {
  .product-gallery__photos {
    height: 110px;
  }

  .product-gallery__photo {
    border-radius: 12px;
  }
}
