/* 商品の実写の横スクロール（[sabage_gallery]・scripts/render_gallery.py・2026-11-09）
   参考 https://my-best.com/108 ＝大きい画像1枚の下にサムネイルの列・選んでいる1枚に色の枠 */
.spg { max-width: 700px; margin: 0 auto 20px; }
.spg ul { list-style: none; margin: 0; padding: 0; }
.spg-main { position: relative; }
.spg-track {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  border-radius: 6px; background: #f3f3f3;
}
.spg-track::-webkit-scrollbar { display: none; }
.spg-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; margin: 0 !important; }
.spg-slide img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; }
.spg-count {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; line-height: 1.6; pointer-events: none;
}
.spg-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .85); color: #333; font-size: 24px; line-height: 34px; padding: 0; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.spg-prev { left: 8px; }
.spg-next { right: 8px; }
.spg-nav[disabled] { opacity: .3; cursor: default; }
@media (hover: none) { .spg-nav { display: none; } }
.spg-thumbs { display: flex; gap: 6px; margin-top: 8px !important; overflow-x: auto; scrollbar-width: none; }
.spg-thumbs::-webkit-scrollbar { display: none; }
.spg-thumbs li { flex: 0 0 calc((100% - 30px) / 6); min-width: 48px; margin: 0 !important; }
.spg-thumb { display: block; border: 2px solid #ddd; border-radius: 4px; overflow: hidden; }
.spg-thumb[aria-current="true"] { border-color: #3F51B5; }
.spg-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; margin: 0; }
