body{
  background: var(--color-bg);
}
.partner-page {
  display: grid;
grid-template-columns: 180px 1fr;
grid-template-rows: auto 1fr;
min-height: 100vh;
padding: 80px 48px 24px;
gap: 0 32px;
}
 
/* ── 左側導覽 ── */
.partner-sidebar {
  grid-column: 1;
  grid-row: 1 / 3;
  padding-top: 4px;
  border-right: 1px solid var(--color-line);
  padding-right: 24px;
}
 
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
 
.sidebar-nav li { position: relative; }
 
.sidebar-nav a {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-text-lt);
  letter-spacing: 0.04em;
  padding: 6px 0 6px 14px;
  transition: color 0.2s;
  cursor: pointer;
}
 
.sidebar-nav a:hover { color: var(--color-text); }
 
.sidebar-nav a.active {
  color: var(--color-text);
  font-weight: 700;
}
 
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 16px;
  background: var(--color-text);
  border-radius: 1px;
}
 
/* ── 右側主區 ── */
.partner-main {
  grid-column: 2;
  grid-row: 1;
  padding-left: 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
 
/* ── 詳情區（上） ── */
.partner-detail {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 40px;
  align-items: start;
}
 
.detail-header {
  grid-column: 1 / 3;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-line);
  margin-bottom: 24px;
}
 
.detail-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.04em;
}
 
.detail-info {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
 
.detail-tags {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-md);
  letter-spacing: 0.04em;
}
 
.detail-desc {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--color-text-md);
  letter-spacing: 0.04em;
  line-height: 2;
}
 
.detail-ig {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  width: fit-content;
  transition: border-color 0.2s;
}
 
.detail-ig:hover {
  border-color: var(--color-text-lt);
  background: var(--color-beige-lt);
}
 
.detail-ig img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
 
/* 右側大圖 */
.detail-photo {
  grid-column: 2;
  grid-row: 2 / 4;
  width: 380px;
  height: 400px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
 
.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
 
.detail-photo .ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e8e3de, #d4cdc6);
  display: flex; align-items: center; justify-content: center;
  color: #a09890; font-size: 0.72rem; letter-spacing: 0.1em;
  font-family: var(--font-en);
}
 
/* ── 縮圖列（下） ── */
.partner-thumbs-section {
  grid-column: 2;
  grid-row: 2;
  padding-left: 56px;
  padding-top: 8px;
}
 
.thumbs-wrap {
  position: relative;
  overflow: hidden;
}
 
/* 右側漸層 */
.thumbs-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: calc(100% - 28px);
  background: linear-gradient(to right, transparent, var(--color-bg));
  pointer-events: none;
  z-index: 2;
}
 
.thumbs-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  cursor: grab;
}
 
.thumbs-track:active { cursor: grabbing; }
 
.thumbs-track::-webkit-scrollbar { height: 3px; }
.thumbs-track::-webkit-scrollbar-track { background: transparent; }
.thumbs-track::-webkit-scrollbar-thumb { background: var(--color-line); border-radius: 2px; }
 
/* 單張縮圖 */
.thumb-item {
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
 
.thumb-img {
  width: 180px;
  height: 180px;
  border-radius: 6px;
  overflow: hidden;
  transition: opacity 0.25s, transform 0.25s, box-shadow 0.25s;
  opacity: 0.6;
  filter: saturate(0.6);
}
 
.thumb-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
 
.thumb-img .ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e8e3de, #d4cdc6);
  display: flex; align-items: center; justify-content: center;
  color: #a09890; font-size: 0.65rem; letter-spacing: 0.08em;
  font-family: var(--font-en);
}
 
.thumb-item:hover .thumb-img {
  opacity: 0.85;
  filter: saturate(0.85);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
 
.thumb-item.active .thumb-img {
  opacity: 1;
  filter: saturate(1);
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}
 
.thumb-label {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--color-text-lt);
  letter-spacing: 0.04em;
  opacity: 0.6;
  transition: opacity 0.2s;
}
 
.thumb-item:hover .thumb-label,
.thumb-item.active .thumb-label {
  opacity: 1;
  color: var(--color-text-md);
}

.page-end {
  text-align: center;
  font-size: 12px;
  color: #b5aca4;
  padding-bottom: 10px;
}

/* ════════════════════════════════════════
   RWD — partner page
════════════════════════════════════════ */

/* ─── Tablet（768px ~ 1199px）─── */
@media (min-width: 768px) and (max-width: 1199px) {

  /* 跟手機版一樣單欄版型 */
  .partner-page {
    display: flex;
    flex-direction: column;
    padding: 80px 32px 40px;
    gap: 0;
    min-height: 100vh;
  }

  /* Sidebar → 橫向 tab bar */
  .partner-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--color-line);
    padding-right: 0;
    padding-bottom: 12px;
    margin-bottom: 24px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .sidebar-nav a {
    font-size: 0.9rem;
    padding: 4px 12px;
    border: 1px solid var(--color-line);
    border-radius: 20px;
    white-space: nowrap;
  }

  .sidebar-nav a.active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
  }

  .sidebar-nav a.active::before {
    display: none;
  }

  /* 主區 */
  .partner-main {
    padding-left: 0;
    gap: 20px;
  }

  /* 詳情區：上圖下文 */
  .partner-detail {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .detail-header {
    grid-column: unset;
    margin-bottom: 16px;
  }

  /* 圖片移到最上方 */
  .detail-photo {
    order: -1;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    grid-column: unset;
    grid-row: unset;
    overflow: visible;
  }
  .detail-photo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
  .detail-info {
    grid-column: unset;
  }

  /* 縮圖區 */
  .partner-thumbs-section {
    padding-left: 0;
    padding-top: 4px;
  }

  .thumb-img {
    width: 160px;
    height: 160px;
  }
}

/* ─── Mobile（~ 767px）─── */
@media (max-width: 767px) {

  /* 整頁改為單欄，取消左側導覽佔位 */
  .partner-page {
    display: flex;
    flex-direction: column;
    padding: 72px 20px 40px;
    gap: 0;
    min-height: 100vh;
  }

  /* ── Sidebar → 橫向 tab bar ── */
  .partner-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--color-line);
    padding-right: 0;
    padding-bottom: 12px;
    margin-bottom: 24px;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .sidebar-nav a {
    font-size: 0.82rem;
    padding: 4px 10px;
    border: 1px solid var(--color-line);
    border-radius: 20px;
    white-space: nowrap;
  }

  .sidebar-nav a.active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
  }

  /* active 左側豎線在 mobile 不顯示 */
  .sidebar-nav a.active::before {
    display: none;
  }

  /* ── 主區 ── */
  .partner-main {
    padding-left: 0;
    gap: 20px;
  }

  /* ── 詳情區：改為上圖下文 ── */
  .partner-detail {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .detail-header {
    grid-column: unset;
    margin-bottom: 16px;
  }

  .detail-name {
    font-size: 1.2rem;
  }

  /* 圖片移到最上方 */
  .detail-photo {
    order: -1;           /* 圖片優先顯示 */
    width: 100%;
    height: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    grid-column: unset;
    grid-row: unset;
  }

  .detail-info {
    grid-column: unset;
    gap: 10px;
  }

  .detail-tags {
    font-size: 0.9rem;
  }

  .detail-desc {
    font-size: 0.82rem;
    line-height: 1.9;
  }

  /* ── 縮圖區 ── */
  .partner-thumbs-section {
    padding-left: 0;
    padding-top: 4px;
  }

  .thumb-img {
    width: 130px;
    height: 130px;
  }

  .thumbs-track {
    gap: 12px;
    padding-bottom: 8px;
  }

  .thumb-label {
    font-size: 0.68rem;
  }
}