/* ==========================================================================
   禮約 GiftYou - 客戶案例實拍牆 雅緻質感旗艦版 (giftyou_cases.css)
   企業文化配色：溫潤陶朱 (#c87451)、深焙沉香木 (#4a2f22 / #3a241a)、象牙暖白 (#fbf7f2)
   去除雜亂圖標，採用純粹宋體美學與高端雜誌圖文版型
   ========================================================================== */

/* 全域頁面背景與字體設定 */
.gy-cases-page {
  padding-bottom: 90px;
  background: var(--gy-canvas, #fbf7f2);
  min-height: 100vh;
  color: var(--gy-ink, #2f211c);
  position: relative;
  overflow-x: hidden;
  font-family: var(--gy-font-sans, "Noto Sans TC", system-ui, sans-serif);
}

/* 0. 頁面背景流動暖光 (Warm Amber Ambient Light) */
.gy-cases-ambient-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 116, 81, 0.1) 0%, rgba(226, 170, 140, 0.05) 50%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
  z-index: 0;
}

/* 1. 頁頭 Hero 橫幅 - 雜誌雙欄圖文排版 */
.gy-cases-hero {
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, #4a2f22 0%, #3a241a 60%, #241711 100%);
  border: 1px solid rgba(226, 170, 140, 0.2);
  border-radius: 24px;
  padding: 44px 40px;
  margin: 16px 0 36px;
  overflow: hidden;
  box-shadow: 0 20px 45px -10px rgba(58, 36, 26, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 1;
  color: #fffdfa;
}

.gy-cases-hero__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.gy-cases-hero__col--text {
  flex: 1.15;
}

.gy-cases-hero__col--visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* 質感生成圖畫框 */
.gy-cases-hero__img-frame {
  position: relative;
  width: 100%;
  max-width: 540px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(226, 170, 140, 0.35);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(200, 116, 81, 0.2);
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gy-cases-hero__img-frame:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
  box-shadow: 0 24px 50px -8px rgba(0, 0, 0, 0.7), 0 0 35px rgba(200, 116, 81, 0.35);
}

.gy-cases-hero__banner-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.gy-cases-hero__img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(36, 23, 17, 0.7) 100%);
  pointer-events: none;
}

/* 品牌純文字徽章 (無 Emoji) */
.gy-cases-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 116, 81, 0.22);
  border: 1px solid rgba(226, 170, 140, 0.55);
  color: #f3dfd2;
  padding: 5px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

/* 標題 - 宋體美學流光 */
.gy-cases-hero__title {
  font-family: var(--gy-font-serif, "Noto Serif TC", serif);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #ffffff 20%, #f3dfd2 55%, #e2aa8c 80%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gyTitleShine 7s linear infinite;
}

@keyframes gyTitleShine {
  to { background-position: 200% center; }
}

.gy-cases-hero__subtitle {
  font-size: 15px;
  color: #d8c9bf;
  line-height: 1.7;
  max-width: 580px;
  margin: 0 0 28px;
}

/* 數據卡 */
.gy-cases-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.gy-cases-stat-box {
  background: rgba(36, 23, 17, 0.65);
  border: 1px solid rgba(226, 170, 140, 0.2);
  backdrop-filter: blur(14px);
  padding: 10px 18px;
  border-radius: 12px;
  min-width: 110px;
  text-align: left;
  transition: all 0.25s ease;
}

.gy-cases-stat-box:hover {
  transform: translateY(-3px);
  border-color: rgba(200, 116, 81, 0.5);
  background: rgba(58, 36, 26, 0.85);
}

.gy-cases-stat-box__num {
  font-size: 26px;
  font-weight: 900;
  color: #e2aa8c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.gy-cases-stat-box__lbl {
  font-size: 11.5px;
  color: #f3dfd2;
  margin-top: 2px;
}

@media (max-width: 960px) {
  .gy-cases-hero { padding: 32px 20px; }
  .gy-cases-hero__grid { flex-direction: column; gap: 28px; text-align: center; }
  .gy-cases-hero__subtitle { margin: 0 auto 24px; }
  .gy-cases-stats { justify-content: center; }
  .gy-cases-stat-box { text-align: center; }
  .gy-cases-hero__title { font-size: 30px; }
}

/* 2. 控制列：純淨即時搜尋與分類篩選 */
.gy-cases-controls {
  position: sticky;
  top: 15px;
  z-index: 50;
  margin-bottom: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gy-cases-search-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
}

.gy-cases-search-input {
  width: 100%;
  padding: 11px 22px;
  border-radius: 9999px;
  border: 1px solid var(--gy-line-strong, #d7bbaa);
  background: rgba(255, 253, 250, 0.95);
  color: var(--gy-ink, #2f211c);
  font-size: 14px;
  backdrop-filter: blur(16px);
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(70, 42, 29, 0.08);
  text-align: center;
}

.gy-cases-search-input:focus {
  border-color: var(--gy-brand, #c87451);
  box-shadow: 0 0 0 3px rgba(200, 116, 81, 0.2), 0 8px 22px rgba(70, 42, 29, 0.12);
  background: #ffffff;
  text-align: left;
  padding-left: 24px;
}

.gy-cases-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(255, 253, 250, 0.95);
  backdrop-filter: blur(20px);
  padding: 7px 12px;
  border-radius: 9999px;
  border: 1px solid var(--gy-line, #e8d9ce);
  box-shadow: 0 8px 24px rgba(70, 42, 29, 0.08);
  max-width: 100%;
}

.gy-cases-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gy-ink-2, #54423a);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.gy-cases-filter-btn:hover {
  color: var(--gy-primary, #9a4b32);
  background: var(--gy-soft, #f6ede6);
}

.gy-cases-filter-btn.is-active {
  background: linear-gradient(135deg, var(--gy-brand, #c87451), var(--gy-primary, #9a4b32));
  color: #ffffff;
  font-weight: 700;
  border-color: var(--gy-primary, #9a4b32);
  box-shadow: 0 4px 14px rgba(154, 75, 50, 0.35);
}

.gy-cases-filter-btn__count {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 11px;
  background: var(--gy-soft, #f6ede6);
  color: var(--gy-muted, #76645b);
  font-weight: 700;
}

.gy-cases-filter-btn.is-active .gy-cases-filter-btn__count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* 3. 瀑布流網格排版 (Masonry Grid) */
.gy-cases-grid {
  column-count: 4;
  column-gap: 22px;
  width: 100%;
  position: relative;
  z-index: 1;
}

@media (max-width: 1200px) {
  .gy-cases-grid { column-count: 3; column-gap: 18px; }
}

@media (max-width: 768px) {
  .gy-cases-grid { column-count: 2; column-gap: 14px; }
  .gy-cases-filter-bar { border-radius: 18px; padding: 6px; }
  .gy-cases-filter-btn { padding: 5px 11px; font-size: 12px; }
}

@media (max-width: 480px) {
  .gy-cases-grid { column-count: 1; }
}

/* 4. 酷炫 3D 視差卡片 (Brand 3D Parallax Tilt Card - 純文字無 Icon) */
.gy-case-card {
  break-inside: avoid;
  margin-bottom: 22px;
  position: relative;
  border-radius: 18px;
  background: var(--gy-paper, #fffdfa);
  border: 1px solid var(--gy-line, #e8d9ce);
  overflow: hidden;
  cursor: pointer;
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  box-shadow: 0 4px 18px rgba(70, 42, 29, 0.05);
}

.gy-case-card.is-hidden {
  display: none !important;
}

.gy-case-card:hover {
  border-color: rgba(200, 116, 81, 0.6);
  box-shadow: 0 20px 42px -10px rgba(74, 47, 34, 0.18), 0 0 20px rgba(200, 116, 81, 0.12);
  z-index: 10;
}

.gy-case-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

.gy-case-card__media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f1eae2;
  display: block;
}

.gy-case-card__img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1), filter 0.5s ease;
}

.gy-case-card:hover .gy-case-card__img {
  transform: scale(1.06);
}

/* 純淨實拍徽章 (無 Icon) */
.gy-case-card__stamp {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(58, 36, 26, 0.9);
  color: #f3dfd2;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 170, 140, 0.45);
  box-shadow: 0 4px 12px rgba(47, 33, 28, 0.3);
  z-index: 4;
  transform: translateZ(24px);
  letter-spacing: 0.04em;
}

/* 工法標籤 */
.gy-case-card__craft {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 253, 250, 0.94);
  color: var(--gy-primary, #9a4b32);
  box-shadow: 0 4px 12px rgba(70, 42, 29, 0.15);
  border: 1px solid rgba(232, 217, 206, 0.6);
  z-index: 4;
  transform: translateZ(24px);
}

/* 多圖照片計數標籤 (無 Icon) */
.gy-case-card__count-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(47, 33, 28, 0.88);
  color: #f3dfd2;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(200, 116, 81, 0.45);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  z-index: 4;
  transform: translateZ(20px);
  transition: all 0.2s ease;
}

.gy-case-card:hover .gy-case-card__count-badge {
  background: var(--gy-brand, #c87451);
  color: #ffffff;
  border-color: var(--gy-brand, #c87451);
  transform: translateZ(28px) scale(1.05);
}

/* 懸停動態光澤反射層 */
.gy-case-card__glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-radius: 18px;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.45) 0%, transparent 60%);
  mix-blend-mode: overlay;
}

.gy-case-card:hover .gy-case-card__glare {
  opacity: 1;
}

/* 卡片資訊欄 */
.gy-case-card__body {
  padding: 16px 18px 18px;
  background: var(--gy-paper, #fffdfa);
  border-top: 1px solid var(--gy-line, #e8d9ce);
  transform: translateZ(15px);
}

.gy-case-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.gy-case-card__cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--gy-brand, #c87451);
  letter-spacing: 0.02em;
}

.gy-case-card__model {
  font-size: 11px;
  font-weight: 700;
  color: var(--gy-muted, #76645b);
  font-family: ui-monospace, monospace;
}

.gy-case-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gy-ink, #2f211c);
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.gy-case-card:hover .gy-case-card__title {
  color: var(--gy-primary, #9a4b32);
}

/* 5. 沉浸式全螢幕燈箱 (Artisan Detail Lightbox Modal) */
.gy-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

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

.gy-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 23, 17, 0.88);
  backdrop-filter: blur(20px);
}

.gy-lightbox__dialog {
  position: relative;
  width: 92vw;
  max-width: 1100px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--gy-paper, #fffdfa);
  border: 1px solid var(--gy-line-strong, #d7bbaa);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(47, 33, 28, 0.6);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

.gy-lightbox.is-open .gy-lightbox__dialog {
  transform: scale(1) translateY(0);
}

.gy-lightbox__content {
  display: flex;
  flex-direction: row;
  max-height: 84vh;
}

@media (max-width: 880px) {
  .gy-lightbox__content {
    flex-direction: column;
    max-height: 88vh;
    overflow-y: auto;
  }
}

.gy-lightbox__img-wrap {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1f140f;
  padding: 30px;
  overflow: hidden;
  position: relative;
}

.gy-lightbox__img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.gy-lightbox__img.is-zoomed {
  transform: scale(1.6);
  cursor: zoom-out;
}

.gy-lightbox__thumbs {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  max-width: 90%;
  overflow-x: auto;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(12px);
}

.gy-lb-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid transparent;
  opacity: 0.55;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gy-lb-thumb:hover, .gy-lb-thumb.is-active {
  border-color: var(--gy-brand, #c87451);
  opacity: 1;
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(200, 116, 81, 0.6);
}

.gy-lightbox__info {
  flex: 1;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--gy-paper, #fffdfa);
  border-left: 1px solid var(--gy-line, #e8d9ce);
}

@media (max-width: 880px) {
  .gy-lightbox__info {
    padding: 24px;
    border-left: none;
    border-top: 1px solid var(--gy-line, #e8d9ce);
  }
}

.gy-lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(47, 33, 28, 0.08);
  color: var(--gy-ink, #2f211c);
  border: 1px solid var(--gy-line, #e8d9ce);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.gy-lightbox__close:hover {
  background: var(--gy-brand, #c87451);
  color: #ffffff;
  border-color: var(--gy-brand, #c87451);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 16px rgba(200, 116, 81, 0.4);
}

.gy-lightbox__btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gy-brand, #c87451), var(--gy-primary, #9a4b32));
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  margin-top: 24px;
  transition: all 0.25s ease;
  box-shadow: 0 8px 24px rgba(154, 75, 50, 0.3);
}

.gy-lightbox__btn-cta:hover {
  background: linear-gradient(135deg, var(--gy-primary, #9a4b32), var(--gy-primary-hover, #7d3c28));
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(154, 75, 50, 0.45);
  color: #ffffff;
}

.gy-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(47, 33, 28, 0.7);
  color: #ffffff;
  border: 1px solid rgba(226, 170, 140, 0.3);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(12px);
  z-index: 5;
}

.gy-lightbox__nav:hover {
  background: var(--gy-brand, #c87451);
  color: #ffffff;
  border-color: var(--gy-brand, #c87451);
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 0 20px rgba(200, 116, 81, 0.5);
}

.gy-lightbox__nav--prev { left: 24px; }
.gy-lightbox__nav--next { right: 24px; }
