/*
 * Product detail page.
 * The gallery uses explicit size containment to prevent Swiper/image feedback loops.
 */

.product-detail-intro {
  padding: 82px 0 110px;
  background: var(--paper);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.72fr);
  gap: clamp(55px, 6vw, 110px);
  align-items: start;
}

.product-gallery,
.product-gallery-main,
.product-gallery-main .swiper-wrapper,
.product-gallery-main .swiper-slide {
  min-width: 0;
  max-width: 100%;
}

.product-gallery {
  width: 100%;
  overflow: hidden;
}

.product-gallery-main {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f7f3ed;
  contain: layout paint;
}

.product-gallery-main .swiper-wrapper {
  align-items: stretch;
}

.product-gallery-main .swiper-slide {
  width: 100%;
  height: auto;
}

.product-gallery-frame {
  display: grid;
  width: 100%;
  max-width: 100%;
  height: clamp(460px, 45vw, 680px);
  place-items: center;
  overflow: hidden;
  padding: clamp(24px, 4vw, 64px);
  background: #f7f3ed;
}

.product-gallery-frame img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-gallery-frame--empty {
  color: var(--muted);
}

.product-gallery-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(56, 48, 46, 0.2);
  border-radius: 50%;
  background: rgba(255, 253, 252, 0.92);
  color: var(--ink);
  place-items: center;
  transform: translateY(-50%);
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease;
}

.product-gallery-arrow:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.product-gallery-arrow--prev {
  left: 18px;
}

.product-gallery-arrow--next {
  right: 18px;
}

.product-gallery-pagination {
  position: absolute;
  z-index: 5;
  right: 24px;
  bottom: 20px;
  left: auto;
  width: auto;
  color: var(--ink);
  font-size: 12px;
}

.product-gallery-thumbs {
  width: 100%;
  min-width: 0;
  margin-top: 14px;
  overflow: hidden;
}

.product-gallery-thumbs .swiper-slide {
  width: 104px;
  opacity: 0.48;
  transition: opacity 0.25s ease;
}

.product-gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
}

.product-gallery-thumb {
  display: block;
  width: 104px;
  height: 92px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid transparent;
  background: #f7f3ed;
  cursor: pointer;
}

.swiper-slide-thumb-active .product-gallery-thumb {
  border-color: var(--accent);
}

.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-detail-summary {
  position: sticky;
  top: 110px;
  min-width: 0;
  padding-top: 18px;
}

.product-detail-category {
  display: inline-block;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-detail-summary h1 {
  margin: 24px 0 24px;
  font: 500 clamp(48px, 4.6vw, 68px) / 0.98 var(--display);
  letter-spacing: -0.035em;
}

.product-detail-summary__intro {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.product-detail-summary__intro p {
  margin: 0;
}

.product-detail-highlights {
  margin: 32px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.product-detail-highlights li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.product-detail-highlights li > span:first-child {
  color: var(--accent);
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 36px 0;
}

.product-detail-actions .button-outline {
  border-color: var(--line);
}

.product-detail-email {
  padding: 12px 0;
  color: var(--accent);
  font-size: 12px;
}

.product-detail-meta {
  margin: 0;
  border-top: 1px solid var(--line);
}

.product-detail-meta > div {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.product-detail-meta dt {
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
}

.product-detail-meta dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.product-detail-section {
  padding: 110px 0;
}

.product-detail-overview {
  background: #f3ede3;
}

.product-detail-section__grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1fr);
  gap: 100px;
}

.product-detail-section h2,
.product-inquiry h2 {
  margin: 10px 0 0;
  font: 500 clamp(42px, 4vw, 58px) / 1 var(--display);
}

.product-detail-copy {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.product-detail-copy > *:first-child {
  margin-top: 0;
}

.product-detail-copy img {
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 35px 0;
}

.product-detail-information {
  background: var(--paper);
}

.product-detail-section__head {
  max-width: 780px;
  margin-bottom: 60px;
}

.product-detail-section__head--split {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
}

.product-information-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.55fr);
  gap: 90px;
}

.product-information-grid h3 {
  margin: 0 0 25px;
  font: 500 30px var(--display);
}

.product-specifications table {
  width: 100%;
  border-collapse: collapse;
}

.product-specifications th,
.product-specifications td {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.product-specifications th {
  width: 42%;
  color: var(--muted);
  font-weight: 400;
}

.product-downloads a {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.product-downloads a:hover {
  color: var(--accent);
}

.product-related {
  background: #f8f5ef;
}

.product-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.product-related-media {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper);
}

.product-related-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.4s ease;
}

.product-related article:hover .product-related-media img {
  transform: scale(1.025);
}

.product-related h3 {
  margin: 18px 0 8px;
  font: 500 26px/1.05 var(--display);
}

.product-related p {
  color: var(--muted);
  font-size: 12px;
}

.product-inquiry {
  padding: 100px 0;
  background: var(--ink);
  color: #fff;
}

.product-inquiry__inner {
  display: flex;
  gap: 60px;
  align-items: center;
  justify-content: space-between;
}

.product-inquiry__inner > div {
  max-width: 850px;
}

.product-inquiry p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 1100px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-summary {
    position: static;
  }

  .product-gallery-frame {
    height: min(680px, 75vw);
  }

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

@media (max-width: 700px) {
  .product-detail-intro {
    padding: 45px 0 75px;
  }

  .product-detail-layout {
    gap: 48px;
  }

  .product-gallery-frame {
    height: min(430px, 105vw);
    padding: 20px;
  }

  .product-gallery-arrow {
    width: 42px;
    height: 42px;
  }

  .product-gallery-arrow--prev {
    left: 10px;
  }

  .product-gallery-arrow--next {
    right: 10px;
  }

  .product-gallery-thumbs .swiper-slide,
  .product-gallery-thumb {
    width: 82px;
  }

  .product-gallery-thumb {
    height: 72px;
  }

  .product-detail-summary h1 {
    font-size: 46px;
  }

  .product-detail-section {
    padding: 80px 0;
  }

  .product-detail-section__grid,
  .product-information-grid {
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .product-detail-section__head--split,
  .product-inquiry__inner {
    display: block;
  }

  .product-detail-section__head--split .text-link {
    margin-top: 25px;
  }

  .product-related-grid {
    grid-template-columns: 1fr;
  }

  .product-inquiry__inner .button {
    margin-top: 25px;
  }
}
