/* ==========================================================================
   星彩傢飾 Colors Home Decor - Header & RWD Navigation Style
   ========================================================================== */

/* 基礎重置與字型設定 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --header-bg: #181818;
  --header-height: 72px;
  --nav-divider: rgba(255, 255, 255, 0.2);
  --text-en-color: #d1d1d1;
  --text-zh-color: #ffffff;
  --hover-accent: #e2c082;
  --body-bg: #eaeaea;
}

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--body-bg);
  /* 模擬截圖中細緻淺灰紙質/布料紋理 */
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  min-height: 100vh;
  color: #222222;
  overflow-x: hidden;
}

/* ==========================================================================
   頂部黑色導覽列 (Site Header)
   ========================================================================== */
.site-header {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--header-bg);
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  /* Logo 底緣與黑條底緣切齊對齊 */
  justify-content: center;
  /* 截圖中 Logo 與選單整體置中 */
  position: relative;
}

/* 品牌 Logo 圖片 */
.header-brand {
  position: relative;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  z-index: 10;
  margin-right: 18px;
  flex-shrink: 0;
  height: 100%;
}

.brand-logo-img {
  height: 72px;
  /* 貼合原圖高度比例 */
  width: auto;
  max-height: 100%;
  display: block;
  object-fit: contain;
  cursor: pointer;
  transform-origin: bottom center;
}

/* 桌面版導覽列 (Desktop Navigation) */
.main-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.nav-list {
  display: flex;
  align-items: stretch;
  height: 100%;
  list-style: none;
  border-left: 1px solid var(--nav-divider);
  /* 第一個項目左側的分隔線 */
}

.nav-item {
  border-right: 1px solid var(--nav-divider);
  /* 每個項目右側的分隔線 */
  display: flex;
  align-items: stretch;
  height: 100%;
}

.nav-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 20px;
  height: 100%;
  text-decoration: none;
  position: relative;
  background-color: transparent;
  transition: background-color 0.25s ease;
  white-space: nowrap;
}

/* 上方英文：斜體襯線字 (Playfair Display / Georgia) */
.nav-en {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-en-color);
  letter-spacing: 0.6px;
  line-height: 1.2;
  transition: color 0.25s ease;
}

/* 下方繁中：純白精緻黑體 */
.nav-zh {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-zh-color);
  letter-spacing: 1.2px;
  line-height: 1.35;
  margin-top: 3px;
  transition: color 0.25s ease;
}

/* 頂部金色微光邊條與 Hover 樣式 */
.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--hover-accent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-link:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

.nav-link:hover .nav-en {
  color: var(--hover-accent);
}

.nav-link:hover .nav-zh {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   手機版漢堡按鈕 (Mobile Hamburger Button)
   ========================================================================== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 1250;
  /* 始終浮於頂層 */
}

.mobile-toggle .bar {
  display: block;
  width: 26px;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  will-change: transform, opacity;
}

/* ==========================================================================
   手機版抽屜選單 (Mobile Drawer Menu)
   ========================================================================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #050505;
  z-index: 2000; /* 最頂層全螢幕覆蓋 */
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  padding: 0 20px 40px;
  overflow-y: auto;
}

.mobile-menu.is-active {
  pointer-events: auto;
}

/* 抽屜頂部工具列 (Logo + 關閉按鈕) */
.mobile-menu-topbar {
  width: 100%;
  max-width: 440px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 0;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

/* 手機版頂部明顯的關閉按鈕 */
.mobile-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 24px;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.25s ease;
}

.mobile-close-btn .close-icon {
  font-size: 20px;
  line-height: 1;
  font-weight: 300;
}

.mobile-close-btn .close-label {
  font-size: 13px;
  letter-spacing: 1px;
}

.mobile-close-btn:hover,
.mobile-close-btn:active {
  background: var(--hover-accent);
  color: #000000;
  border-color: var(--hover-accent);
  transform: scale(1.05);
}

.mobile-nav-list {
  list-style: none;
  width: 84%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
}

.mobile-nav-link {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 0;
}

.mobile-nav-link .nav-en {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--hover-accent);
}

.mobile-nav-link .nav-zh {
  font-size: 17px;
  font-weight: 500;
  color: #ffffff;
  margin-top: 3px;
  letter-spacing: 1px;
}

/* ==========================================================================
   主內容示範區域 (Showcase Section)
   ========================================================================== */
.hero-preview {
  max-width: 1200px;
  margin: 70px auto 40px;
  padding: 0 24px;
  text-align: center;
}

.hero-preview h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.3rem;
  letter-spacing: 1.5px;
  color: #111111;
  margin-bottom: 12px;
}

.hero-preview p {
  color: #555555;
  font-size: 1.02rem;
  line-height: 1.8;
  max-width: 620px;
  margin: 0 auto 36px;
}

.gallery-block {
  text-align: left;
  margin-top: 8px;
}

.gallery-heading {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #111;
  margin-bottom: 14px;
}

.category-scroller {
  position: relative;
}

.category-scroller::before,
.category-scroller::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s;
}

.category-scroller::before {
  left: 0;
  background: linear-gradient(to right, var(--body-bg), transparent);
}

.category-scroller::after {
  right: 0;
  background: linear-gradient(to left, var(--body-bg), transparent);
}

.category-scroller.can-left::before,
.category-scroller.can-right::after {
  opacity: 1;
}

.category-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-bar.is-dragging {
  cursor: grabbing;
}

.category-chip {
  flex: 0 0 auto;
  border: none;
  background: #ececec;
  color: #222;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@media (hover: hover) {
  .category-chip:hover {
    background: #dedede;
  }

  .category-chip.is-active:hover {
    background: #111;
  }
}

.category-chip.is-active {
  background: #111;
  color: #fff;
}

.category-chip:focus-visible {
  outline: 2px solid #3ea6ff;
  outline-offset: 2px;
}

.gallery-status {
  color: #666;
  font-size: 0.92rem;
  margin: 0 0 16px;
  text-align: center;
}

.gallery-status[hidden] {
  display: none;
}

.photo-sentinel {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
  padding: 18px 0 8px;
}

.photo-sentinel[hidden] {
  display: none;
}

.photo-masonry {
  column-count: 4;
  column-gap: 14px;
}

.photo-card {
  break-inside: avoid;
  margin: 0 0 14px;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  background: #e6e6e6;
}

.photo-card figcaption,
.photo-card .photo-meta {
  display: block;
  padding: 10px 12px 12px;
  text-align: left;
  font-size: 0.86rem;
  color: #333;
}

.photo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.photo-card.is-hidden {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 64px;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  text-align: center;
}

.lightbox-figure img,
.lightbox-figure video,
.lightbox-figure iframe {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  border-radius: 6px;
}

.lightbox-figure img,
.lightbox-figure video {
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-figure iframe {
  border: 0;
  background: #fff;
}

.lightbox-figure img[hidden],
.lightbox-figure video[hidden],
.lightbox-figure iframe[hidden] {
  display: none;
}

.lightbox-figure figcaption {
  margin-top: 12px;
  color: #f3f3f3;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.lightbox-close {
  top: 16px;
  right: 18px;
  font-size: 2.4rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  line-height: 1;
  padding: 8px 12px;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

/* ==========================================================================
   RWD 響應式佈局斷點
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-link {
    padding: 0 16px;
  }

  .nav-en,
  .nav-zh {
    font-size: 12px;
  }

  .brand-logo-img {
    height: 66px;
  }
}

@media (max-width: 1100px) {
  .photo-masonry {
    column-count: 3;
  }
}

@media (max-width: 880px) {
  :root {
    --header-height: 48px;
  }

  .site-header {
    overflow: hidden;
  }

  .header-container {
    justify-content: space-between;
    align-items: flex-start;
  }

  .main-nav {
    display: none;
    /* 隱藏桌機水平導覽 */
  }

  .mobile-toggle {
    display: flex;
    align-self: center;
  }

  .mobile-menu {
    display: flex;
  }

  .header-brand {
    margin-right: 0;
    align-items: flex-start;
    overflow: hidden;
  }

  .brand-logo-img {
    height: 53px;
    max-height: none;
    margin-top: -4px;
    object-fit: cover;
    object-position: center top;
  }

  .photo-masonry {
    column-count: 2;
  }

  .hero-preview {
    margin-top: 45px;
  }

  .lightbox {
    padding: 56px 12px 24px;
  }
  .hero-preview p {
    margin: 0 auto 15px;
  }
}

@media (max-width: 520px) {
  .photo-masonry {
    column-count: 1;
  }

  .category-bar {
    gap: 8px;
  }

  .category-chip {
    font-size: 0.88rem;
    padding: 9px 14px;
  }
}