/*
 * 제품 사진 갤러리 전용 스타일
 * 메인 이미지 1장 + 가로형 소형 썸네일(기본 4장 노출) 구조를 강제합니다.
 */
.product-stage {
  row-gap:32px;
}

.product-stage .product-gallery {
  width:100%;
  max-width:760px;
  min-width:0;
  margin:0 auto;
  align-self:end;
}

.product-stage .product-image {
  position:relative;
  display:grid;
  place-items:center;
  width:100%;
  min-height:420px;
  overflow:hidden;
}

.product-stage button.product-main-button {
  appearance:none;
  display:grid;
  place-items:center;
  position:relative;
  width:100%;
  min-width:0;
  min-height:420px;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  background:transparent;
  color:inherit;
  cursor:zoom-in;
}

.product-stage button.product-main-button > img {
  display:block;
  width:auto;
  height:auto;
  max-width:90%;
  max-height:430px;
  margin:auto;
  object-fit:contain;
  filter:drop-shadow(0 35px 40px rgba(0,0,0,.16));
}

.product-stage .product-thumbnails {
  display:flex;
  flex-flow:row nowrap;
  align-items:center;
  gap:10px;
  width:420px;
  max-width:100%;
  margin:14px auto 0;
  padding:3px 3px 11px;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  scrollbar-color:var(--muted) transparent;
}

.product-stage .product-thumbnails::-webkit-scrollbar {
  height:6px;
}

.product-stage .product-thumbnails::-webkit-scrollbar-thumb {
  border-radius:999px;
  background:var(--muted);
}

.product-stage .product-thumbnails.is-short {
  justify-content:center;
}

.product-stage .product-thumbnails > button.product-thumbnail {
  appearance:none;
  display:block;
  flex:0 0 96px;
  width:96px;
  min-width:96px;
  max-width:96px;
  height:72px;
  min-height:72px;
  max-height:72px;
  margin:0;
  padding:4px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:2px;
  background:#fff;
  opacity:.64;
  cursor:pointer;
  box-shadow:none;
  transform:none;
}

.product-stage .product-thumbnails > button.product-thumbnail:hover,
.product-stage .product-thumbnails > button.product-thumbnail.active {
  border:2px solid var(--red);
  padding:3px;
  opacity:1;
  transform:none;
}

.product-stage .product-thumbnails > button.product-thumbnail > img {
  display:block;
  width:100%;
  min-width:0;
  max-width:none;
  height:100%;
  min-height:0;
  max-height:none;
  margin:0;
  padding:0;
  object-fit:cover;
  filter:none;
  transform:none;
}

@media(max-width:780px) {
  .product-stage {
    row-gap:22px;
  }

  .product-stage .product-image,
  .product-stage button.product-main-button {
    min-height:300px;
  }

  .product-stage button.product-main-button > img {
    max-width:100%;
    max-height:310px;
  }

  .product-stage .product-thumbnails {
    gap:8px;
    width:286px;
    margin-top:12px;
  }

  .product-stage .product-thumbnails > button.product-thumbnail {
    flex-basis:64px;
    width:64px;
    min-width:64px;
    max-width:64px;
    height:48px;
    min-height:48px;
    max-height:48px;
  }
}
