@charset "utf-8";
/* 產品大圖燈箱（僅用於產品內頁，不影響全站樣式） */

/* 大圖可點擊的提示 */
.product-single-image-element .product-image-area {
  cursor: zoom-in;
}

.product-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 22, 26, .9);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.product-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.product-lightbox__figure {
  margin: 0;
  padding: 0;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-lightbox__image {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 12px 40px rgba(0, 0, 0, .35);
}

.product-lightbox__btn {
  position: absolute;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background .2s ease;
}

.product-lightbox__btn:hover,
.product-lightbox__btn:focus-visible {
  background: rgba(255, 255, 255, .28);
}

.product-lightbox__close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 26px;
}

.product-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 28px;
}

.product-lightbox__nav--prev { left: 16px; }
.product-lightbox__nav--next { right: 16px; }

.product-lightbox__counter {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, .75);
  font-size: 14px;
  letter-spacing: .05em;
}

@media (max-width: 767px) {
  .product-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .product-lightbox__nav--prev { left: 6px; }
  .product-lightbox__nav--next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-lightbox { transition: none; }
}

/* 大圖上的「點擊放大」提示 */
.product-single-image-element {
  position: relative;
}

.product-single-image-element .product-image-area {
  /* 與既有的 .animateImageIn 淡入共存，只多帶一個縮放過場 */
  transition: opacity .3s ease-out, transform .35s ease;
}

.product-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: #fff;
  color: #0c72c0;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(12, 114, 192, .18);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}

.product-zoom-hint__icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: block;
}

.product-zoom-hint__text {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width .35s ease, opacity .25s ease, margin-left .35s ease;
}

/* 滑鼠裝置：平常只露出一顆放大鏡，滑過去才展開文字並轉為主色實心 */
@media (hover: hover) {
  .product-single-image-element:hover .product-zoom-hint {
    background: #0c72c0;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 10px 24px rgba(12, 114, 192, .38);
  }
  .product-single-image-element:hover .product-zoom-hint__text {
    max-width: 120px;
    opacity: 1;
    margin-left: 7px;
  }
  .product-single-image-element:hover .product-image-area {
    transform: scale(1.03);
  }
}

/* 觸控裝置沒有 hover，直接顯示完整提示 */
@media (hover: none) {
  .product-zoom-hint__text {
    max-width: 120px;
    opacity: 1;
    margin-left: 7px;
  }
}

/* 鍵盤聚焦時同樣給出明確提示 */
.product-image-area:focus-visible + .product-zoom-hint,
.product-image-area:focus + .product-zoom-hint {
  background: #0c72c0;
  color: #fff;
}

.product-image-area:focus-visible + .product-zoom-hint .product-zoom-hint__text,
.product-image-area:focus + .product-zoom-hint .product-zoom-hint__text {
  max-width: 120px;
  opacity: 1;
  margin-left: 7px;
}

@media (max-width: 767px) {
  .product-zoom-hint {
    right: 6px;
    bottom: 6px;
    padding: 8px 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-single-image-element .product-image-area,
  .product-zoom-hint,
  .product-zoom-hint__text {
    transition: none;
  }
  .product-single-image-element:hover .product-image-area {
    transform: none;
  }
}
