﻿.gallery-wrapper {
  background: #f2f2f2;
  padding: 20px;
  border-radius: 12px;
  max-width: 1280px;
  margin: 0 auto;
}

/* 檢視視窗 */
.viewport {
  position: relative;
  width: 100%;
  height: 450px;
  background-color: #020617;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  pointer-events: none; /* 確保點擊事件穿透到 viewport */
}

/* 放大縮小按鈕工具列 */
.controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  padding: 6px 12px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.controls .btn {
  background: #334155;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.controls .btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.zoom-text {
  color: #cbd5e1;
  font-size: 13px;
  min-width: 42px;
  text-align: center;
}

/* 縮圖區域 */
.thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.thumb-item .thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.thumb-item .thumb:hover {
  opacity: 0.8;
}

.thumb-item .thumb.active {
  opacity: 1;
  border-color: #38bdf8;
}