/* ==========================================================================
   吳卿金雕 — work-detail.css（作品詳情頁，搭配 home.css 的共用質感）
   1. 頁首
   2. 圖庫（主圖、切換、縮圖）
   3. 作品資訊
   4. 相關作品
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 頁首
   -------------------------------------------------------------------------- */
.detail-hero { min-height: min(78svh, 720px); }
.detail-hero .page-hero__bg img { object-position: 60% 40%; }
.detail-hero .page-hero__title { font-size: clamp(3.4rem, 2rem + 6vw, 7rem); letter-spacing: 0.2em; }
.detail-hero .feature-hero__sub {
  font-family: var(--font-en);
  font-style: italic;
  letter-spacing: 0.14em;
}
.detail-hero .page-hero__desc { max-width: 40ch; }
@media (max-width: 980px) {
  .detail-hero .page-hero__bg img { opacity: 0.55; }
}

/* --------------------------------------------------------------------------
   2. 圖庫
   -------------------------------------------------------------------------- */
/* 頂部大圖已移除：作品介紹即為首屏 */
.detail-section {
  padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 3rem));
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(214, 180, 108, 0.08), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 60%, rgba(214, 180, 108, 0.05), transparent 70%);
}
.detail-section .breadcrumb { margin-bottom: clamp(1.25rem, 3vw, 2.25rem); }
.detail-section .work-info__title { margin-top: 0.2rem; }
@media (max-width: 980px) {
  .detail-section .gallery { margin-bottom: 0.5rem; }
}
.detail-section .work-detail {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 5rem);
}
@media (max-width: 980px) { .detail-section .work-detail { grid-template-columns: minmax(0, 1fr); } }

.gallery__main {
  border: 0;
  border-radius: 2px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(214, 180, 108, 0.1), transparent 70%),
    linear-gradient(180deg, #121215, #0a0a0c);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
/* 博物館式內框 */
.gallery__main::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(242, 229, 196, 0.16);
  pointer-events: none;
  transition: inset 0.7s var(--ease), border-color 0.7s var(--ease);
}
.gallery__main:hover::after { inset: 20px; border-color: rgba(242, 229, 196, 0.3); }
.gallery__main img { padding: clamp(0.75rem, 2vw, 1.5rem); transition: transform 1.2s var(--ease-out), opacity 0.45s var(--ease); }
.gallery__main:hover img { transform: scale(1.03); }

.gallery__hint {
  z-index: 2;
  right: 1.4rem;
  bottom: 1.4rem;
  padding: 0.7rem 1.2rem;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: #171208;
  background: linear-gradient(135deg, #f2e5c4 0%, #d6b46c 45%, #a8823f 100%);
  border: 0;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}
.gallery__hint:hover { background: linear-gradient(135deg, #fff4d6, #e4c98c 50%, #c8a45c); color: #171208; transform: translateY(-2px); }
.gallery__hint svg { width: 16px; height: 16px; }

.gallery__nav {
  z-index: 2;
  width: 48px;
  height: 48px;
  opacity: 0;
  transition: opacity 0.4s var(--ease), background-color 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.gallery__main:hover .gallery__nav,
.gallery__nav:focus-visible { opacity: 1; }
.gallery__nav--prev { left: 1.4rem; }
.gallery__nav--next { right: 1.4rem; }
@media (hover: none) { .gallery__nav { opacity: 0.9; } }

.gallery__thumbs {
  grid-template-columns: repeat(auto-fill, minmax(88px, 110px));
  gap: 0.8rem;
  margin-top: 1rem;
}
.gallery__thumb {
  border-color: rgba(214, 180, 108, 0.14);
  border-radius: 2px;
  background: #0d0d10;
  opacity: 0.6;
  transition: opacity 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.gallery__thumb:hover { opacity: 0.9; }
.gallery__thumb[aria-pressed="true"] { opacity: 1; border-color: var(--gold-300); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45); }
.gallery__thumb[aria-pressed="true"]::after { border-color: var(--gold-300); }

/* --------------------------------------------------------------------------
   3. 作品資訊
   -------------------------------------------------------------------------- */
.detail-section .work-info { position: sticky; top: calc(var(--header-h) + 2rem); }
@media (max-width: 980px) { .detail-section .work-info { position: static; } }

.work-info__category {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--gold-300);
}
.work-info__category::before { content: ""; width: 2rem; height: 1px; background: var(--gold-500); }
.work-info__title {
  font-size: clamp(2.6rem, 1.8rem + 3vw, 4rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.15;
  background: var(--gold-grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: goldSheen 9s ease-in-out infinite;
}
.work-info__title-en { font-size: 1.15rem; color: var(--gold-600); }
.work-info__lead {
  position: relative;
  padding: 1.4rem 1.5rem 1.4rem 1.6rem;
  border-left: 0;
  background: linear-gradient(150deg, rgba(214, 180, 108, 0.08), transparent 70%);
  border-top: 1px solid rgba(214, 180, 108, 0.2);
  border-bottom: 1px solid rgba(214, 180, 108, 0.2);
  font-size: 1.02rem;
  line-height: 2.05;
  color: var(--gold-200);
}
.work-info__lead::before {
  content: "\201C";
  position: absolute;
  left: 0.6rem;
  top: -0.4rem;
  font-family: var(--font-en);
  font-size: 3.2rem;
  line-height: 1;
  color: rgba(214, 180, 108, 0.4);
}

/* 規格表：兩欄小卡 */
.detail-section .spec-table {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(214, 180, 108, 0.14);
  border: 1px solid rgba(214, 180, 108, 0.14);
}
.detail-section .spec-table__row {
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding: 1rem 1.15rem;
  background: #111114;
  border: 0;
  transition: background-color 0.4s var(--ease);
}
.detail-section .spec-table__row:hover { background: #17171b; }
.detail-section .spec-table__key { font-size: 0.7rem; letter-spacing: 0.22em; color: var(--gold-600); }
.detail-section .spec-table__val { font-size: 1rem; letter-spacing: 0.06em; }
@media (max-width: 420px) {
  .detail-section .spec-table { grid-template-columns: minmax(0, 1fr); }
}

.work-info__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 2rem;
}
.work-info__actions .btn { width: 100%; padding-inline: 0.8em; letter-spacing: 0.08em; }
@media (max-width: 420px) { .work-info__actions { grid-template-columns: minmax(0, 1fr); } }
.work-info__actions .btn--gold { grid-column: 1 / -1; padding-block: 1.05em; font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   4. 相關作品
   -------------------------------------------------------------------------- */
.related-works { gap: clamp(1.25rem, 2.4vw, 2.25rem); }
.related-works .work-card__media img { transition: transform 1.1s var(--ease-out), filter 0.6s var(--ease); }
