/* ============================================================
   JA 首頁 — Quiet Showroom（Charcoal × Brass）編輯式版面
   Signature：Showroom Index（展間索引）— 分類區用展件標籤式表頭
   tokens（--jashow-*）由 showroom.css :root 定義，全站載入可用。
   嚴格作用域於 .jashow-home，勿污染商品/分類/about。
   ============================================================ */

.jashow-home {
  --jashow-home-max: 1180px;
  font-family: 'Noto Sans TC', sans-serif;
  color: var(--jashow-ink, #1A1917);
  max-width: var(--jashow-home-max);
  margin: 0 auto;
  padding: clamp(8px, 2vw, 24px) 20px clamp(48px, 8vw, 96px);
}
.jashow-home *,
.jashow-home *::before,
.jashow-home *::after { box-sizing: border-box; }

/* 清掉主題 .entry-content a 的預設底線(specificity 比單一 class 高,故需 .entry-content 前綴)。
   首頁連結一律無 text-decoration;「查看更多」的線改由 border-bottom 提供,避免雙底線。 */
.entry-content .jashow-home a,
.entry-content .jashow-home a:hover { text-decoration: none; }

/* 共用 eyebrow / 展件標籤（與 about 同語言） */
.jashow-home-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jashow-stone, #8A857D);
  margin: 0 0 1em;
}
.jashow-home-eyebrow-en { color: var(--jashow-brass-ink, #8F6E3C); }
.jashow-home-eyebrow-dot { color: var(--jashow-line, #E4E1DB); }
.jashow-home-stars { color: var(--jashow-brass, #A98147); letter-spacing: 0.08em; }

/* ===== Hero ===== */
.jashow-home-hero {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 5vw, 64px) 0 clamp(36px, 6vw, 72px);
  border-bottom: 1px solid var(--jashow-line, #E4E1DB);
}
.jashow-home-hero-copy { max-width: 34rem; }
.jashow-home-title {
  font-family: 'Noto Serif TC', serif;
  font-weight: 500;
  font-size: clamp(27px, 4vw, 44px);
  line-height: 1.28;
  letter-spacing: 0.01em;
  color: var(--jashow-ink, #1A1917);
  margin: 0 0 0.7em;
}
.jashow-home-lede p {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.95;
  color: #403D39;
  margin: 0 0 0.85em;
}
.jashow-home-lede p:first-child {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--jashow-ink, #1A1917);
}
.jashow-home-lede p:last-child { margin-bottom: 0; }

/* Hero 影像輪播：細邊框、無圓角 */
/* min-width:0 關鍵:grid item 預設 min-width:auto 會被 Swiper 內容撐爆寬度 */
.jashow-home-hero-media { position: relative; min-width: 0; }
/* 明確高度(非 aspect-ratio):避免 Swiper flex + img height:100% 的寬高互相回授爆量 */
.jashow-home-hero-media .swiper1 {
  width: 100%;
  max-width: 100%;
  height: clamp(280px, 56vw, 380px);
  border: 1px solid var(--jashow-line, #E4E1DB);
  overflow: hidden;
  background: var(--jashow-line, #E4E1DB);
}
.jashow-home-hero-media .swiper1 .swiper-wrapper { height: 100%; }
.jashow-home-hero-media .swiper-slide { height: 100%; overflow: hidden; }
.jashow-home-hero-media .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.jashow-home-hero-media .swiper-button-next,
.jashow-home-hero-media .swiper-button-prev { color: #fff; }
.jashow-home-hero-media .swiper-button-next::after,
.jashow-home-hero-media .swiper-button-prev::after { font-size: 22px; }
.jashow-home-hero-media .swiper-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.jashow-home-hero-media .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 9px;
  background: #fff;
  opacity: 0.6;
}
.jashow-home-hero-media .swiper-pagination-bullet-active {
  background: var(--jashow-brass, #A98147);
  opacity: 1;
}

@media (min-width: 880px) {
  .jashow-home-hero { grid-template-columns: 0.85fr 1.15fr; }
  .jashow-home-hero-media .swiper1 { height: clamp(360px, 30vw, 460px); }
}

/* ===== Proof：合作夥伴 + 顧客數據 ===== */
.jashow-home-proof {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  padding: clamp(36px, 5vw, 60px) 0 clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--jashow-line, #E4E1DB);
}
.jashow-home-partner-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em 1.4em;
}
.jashow-home-partner-list li {
  position: relative;
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--jashow-ink, #1A1917);
  letter-spacing: 0.02em;
  padding-right: 1.4em;
}
.jashow-home-partner-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 0.9em;
  background: var(--jashow-line, #E4E1DB);
}
.jashow-home-stat {
  border-top: 1px solid var(--jashow-line, #E4E1DB);
  padding-top: clamp(24px, 4vw, 36px);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2em 0.9em;
}
.jashow-home-stat-num {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1;
  color: var(--jashow-brass-ink, #8F6E3C);
}
.jashow-home-stat-label {
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--jashow-stone, #8A857D);
  margin: 0;
  letter-spacing: 0.02em;
}

@media (min-width: 880px) {
  .jashow-home-proof { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .jashow-home-stat {
    border-top: 0;
    border-left: 1px solid var(--jashow-line, #E4E1DB);
    padding-top: 0;
    padding-left: clamp(28px, 4vw, 48px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4em;
  }
}

/* ===== 區段表頭（Showroom Index 展件標籤式） ===== */
.jashow-home-section { padding: clamp(40px, 6vw, 72px) 0 0; }
.jashow-home-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8em 1.5em;
  margin-bottom: clamp(20px, 3vw, 32px);
}
.jashow-home-sec-head .jashow-home-eyebrow { margin-bottom: 0.6em; }
.jashow-home-sec-title {
  font-family: 'Noto Serif TC', serif;
  font-weight: 500;
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--jashow-ink, #1A1917);
  margin: 0;
}
.jashow-home-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: var(--jashow-brass-ink, #8F6E3C);
  text-decoration: none;
  border-bottom: 1px solid var(--jashow-brass, #A98147);
  padding: 0.55rem 0 0.25em;
  white-space: nowrap;
  transition: gap 0.15s ease, color 0.15s ease;
}
.jashow-home-more:hover { color: var(--jashow-ink, #1A1917); gap: 0.85em; }
.jashow-home-arrow { transition: transform 0.15s ease; }
.jashow-home-more:hover .jashow-home-arrow { transform: translateX(3px); }
.jashow-home-more:focus-visible {
  outline: 2px solid var(--jashow-brass, #A98147);
  outline-offset: 3px;
}

/* ===== 顧客評論輪播卡 ===== */
.jashow-home-reviews .swiper-container1 {
  overflow: hidden;
  padding: 4px 0 8px;
}
.jashow-home-reviews .swiper-wrapper { display: flex; align-items: flex-start; }
.jashow-home-reviews .swiper-slide {
  height: auto;
  box-sizing: border-box;
}
.jashow-home-reviews .review {
  background: #FBFAF8;
  border: 1px solid var(--jashow-line, #E4E1DB);
  padding: clamp(20px, 2.5vw, 28px);
  height: auto;
}
.jashow-home-reviews .review-header {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: 0.8em;
}
.jashow-home-reviews .review-header img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}
.jashow-home-reviews .author-info h3 {
  margin: 0;
  font-family: 'Noto Serif TC', serif;
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--jashow-ink, #1A1917);
}
.jashow-home-reviews .author-info a { color: inherit; text-decoration: none; }
.jashow-home-reviews .author-info a:hover { color: var(--jashow-brass-ink, #8F6E3C); }
.jashow-home-reviews .rating {
  color: var(--jashow-brass, #A98147);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.6em;
}
.jashow-home-reviews .review p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #403D39;
  margin: 0;
}
.jashow-home-reviews .swiper-button-next,
.jashow-home-reviews .swiper-button-prev { color: var(--jashow-char, #232220); }
.jashow-home-reviews .swiper-button-next::after,
.jashow-home-reviews .swiper-button-prev::after { font-size: 20px; }
.jashow-home-reviews .swiper-pagination { position: static; margin-top: 8px; }
.jashow-home-reviews .swiper-pagination-bullet-active { background: var(--jashow-brass, #A98147); }

/* ===== 無障礙 ===== */
@media (prefers-reduced-motion: reduce) {
  .jashow-home-more,
  .jashow-home-arrow { transition: none; }
  .jashow-home-hero-media .swiper-slide,
  .jashow-home-reviews .swiper-slide { transition: none; }
}

/* ===== 手機 ===== */
@media (max-width: 600px) {
  .jashow-home { padding-left: 16px; padding-right: 16px; }
  .jashow-home-hero-media .swiper-button-next,
  .jashow-home-hero-media .swiper-button-prev { display: none; }
  .jashow-home-sec-head { align-items: baseline; }
}

/* ============================================================
   Spec Dossier signature overrides
   ============================================================ */
.jashow-home-eyebrow {
  position: relative;
  padding-top: 0.78rem;
  color: var(--jashow-stone, #716C63);
  font-variant-numeric: tabular-nums;
}

.jashow-home-eyebrow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: min(100%, 13rem);
  height: 1px;
  background: linear-gradient(to right, var(--jashow-brass, #A98147) 0 2.25rem, var(--jashow-line, #E4E1DB) 2.25rem 100%);
}

.jashow-home-hero-copy .jashow-home-eyebrow {
  margin-bottom: 1.15rem;
}

.jashow-home-hero-copy .jashow-home-eyebrow,
.jashow-home-partners > .jashow-home-eyebrow {
  padding-top: 0;
}
.jashow-home-hero-copy .jashow-home-eyebrow::before,
.jashow-home-partners > .jashow-home-eyebrow::before {
  content: none;
}

.jashow-home-spec-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(22px, 4vw, 34px) 0 0;
  padding: 0;
  border-top: 1px solid var(--jashow-line, #E4E1DB);
  border-bottom: 1px solid var(--jashow-line, #E4E1DB);
}

.jashow-home-spec-strip div {
  min-width: 0;
  padding: 0.9rem 1rem 0.95rem;
}

.jashow-home-spec-strip div + div {
  border-left: 1px solid var(--jashow-line, #E4E1DB);
}

.jashow-home-spec-strip dt {
  margin: 0 0 0.35rem;
  color: var(--jashow-stone, #716C63);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.jashow-home-spec-strip dd {
  margin: 0;
  color: var(--jashow-brass-ink, #80622F);
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  font-weight: 600;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.jashow-home-proof {
  align-items: end;
}

.jashow-home-reviews {
  padding-top: clamp(28px, 4vw, 48px);
}

.jashow-home-proof-note {
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--jashow-line, #E4E1DB);
  color: var(--jashow-stone, #716C63);
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.jashow-home-sec-head {
  position: relative;
  padding-top: 0.95rem;
  border-top: 1px solid var(--jashow-line, #E4E1DB);
}

.jashow-home-sec-head::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.35rem;
  height: 1px;
  background: var(--jashow-brass, #A98147);
}

.jashow-home-sec-head .jashow-home-eyebrow {
  padding-top: 0;
  color: var(--jashow-brass-ink, #80622F);
}

.jashow-home-sec-head .jashow-home-eyebrow::before {
  content: none;
}

.jashow-home-more {
  border-bottom-color: var(--jashow-line, #E4E1DB);
}

.jashow-home-more:hover {
  border-bottom-color: var(--jashow-brass, #A98147);
}

@media (min-width: 880px) {
  .jashow-home-sec-head::after {
    content: "";
    flex: 1 1 8rem;
    height: 1px;
    order: 2;
    background: var(--jashow-line, #E4E1DB);
  }

  .jashow-home-more {
    order: 3;
  }
}

@media (max-width: 600px) {
  .jashow-home-spec-strip {
    grid-template-columns: 1fr;
  }

  .jashow-home-spec-strip div + div {
    border-top: 1px solid var(--jashow-line, #E4E1DB);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .jashow-home-spec-strip {
    animation: jashow-dossier-draw 420ms ease both;
  }
}

@keyframes jashow-dossier-draw {
  from { clip-path: inset(0 100% 0 0); opacity: 0.65; }
  to { clip-path: inset(0 0 0 0); opacity: 1; }
}

/* Bugfix: keep review Swiper controls inside the review section. */
#swiper-1,
.jashow-home-reviews .swiper-container1 {
  position: relative;
}

@media (max-width: 600px) {
  .jashow-home-reviews .swiper-button-next,
  .jashow-home-reviews .swiper-button-prev {
    display: none;
  }
}

/* ============================================================
   轉換動線：Hero 導引 + 頁尾收尾 CTA
   ============================================================ */

/* Hero：把首屏訪客帶進下方證明區（案例），沿用「查看更多」的線性語彙 */
.jashow-home-hero-cta { margin: clamp(20px, 3vw, 28px) 0 0; }
.jashow-home-hero-cta .jashow-home-more {
  font-size: 1rem;
  min-height: 48px;
  border-bottom-color: var(--jashow-brass, #A98147);
}

/* 錨點落點：避開主題固定表頭。
   主題的平滑捲動腳本會 preventDefault 後自行捲動並忽略 scroll-margin-top，
   故改用零高度定位錨，偏移量不依賴該腳本。 */
.jashow-anchor {
  display: block;
  position: relative;
  top: -112px;
  height: 0;
}
@media (max-width: 600px) {
  .jashow-anchor { top: -80px; }
}

/* 滿版通欄靠 100vw，而 100vw 含捲軸寬（本機實測多出 15px）會造成水平捲動。
   本檔只在首頁 enqueue（ja-home-static.php 的 ja_home_is_target），故在此收掉；
   用 clip 而非 hidden：不建立捲動容器，也不影響 position: sticky。
   必須下在 html：clip 下在 body 不會傳播到 viewport，實測仍可橫捲 8px。 */
html { overflow-x: clip; }

/* 收尾區塊：charcoal 終端色帶。
   滿版通欄（掙脫 .jashow-home 的 1180px 容器），並用負的下外距吃掉容器 padding-bottom，
   讓色帶直接收在頁尾，讀作頁面終點而非浮起的卡片。內容仍對齊頁面網格。 */
/* 只讓「背景」滿版，內容留在正常流裡。
   如此內容自動沿用 .jashow-home 與 Astra 外層容器的內距，各斷點都與頁面網格對齊，
   不必猜任何 padding 值（手機外層另有容器內距，硬湊會偏移）。 */
.jashow-home-closing {
  position: relative;
  margin-top: clamp(48px, 7vw, 88px);
  margin-bottom: calc(-1 * clamp(48px, 8vw, 96px));
  /* 下內距收斂：頁尾本身為深色且自帶上內距，色帶與頁尾相連，不需再留同等空間 */
  padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 3.5vw, 40px);
  color: #F6F5F2;
}
.jashow-home-closing::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--jashow-char, #232220);
}
.jashow-home-closing-inner {
  position: relative; /* 疊在 ::before 之上 */
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}
.jashow-home-closing .jashow-home-eyebrow {
  padding-top: 0.78rem;
  margin-bottom: 1.1rem;
  color: rgba(246, 245, 242, 0.62);
}
/* 保留 eyebrow 的 brass 起筆記號，僅把延伸線改為深底適用的亮度 */
.jashow-home-closing .jashow-home-eyebrow::before {
  background: linear-gradient(to right, var(--jashow-brass, #A98147) 0 2.25rem, rgba(246, 245, 242, 0.18) 2.25rem 100%);
}
.jashow-home-closing .jashow-home-eyebrow-en { color: var(--jashow-brass, #A98147); }
.jashow-home-closing-title {
  font-family: 'Noto Serif TC', serif;
  font-weight: 500;
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: #FBFAF8;
  margin: 0 0 0.55em;
}
.jashow-home-closing-intro {
  margin: 0 0 clamp(18px, 2.5vw, 24px);
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.9;
  color: rgba(246, 245, 242, 0.82);
}

/* Signature：待填的丈量單。hero spec-strip 是已填好的規格，這裡刻意留空。 */
.jashow-home-closing-asks {
  margin: 0;
  padding: 0;
  max-width: 30rem;
}
.jashow-home-closing-asks div {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 0.72rem 0 0.62rem;
  border-bottom: 1px dashed rgba(246, 245, 242, 0.26);
}
/* dt 為小標籤、dd 為內容——與 hero spec-strip 的主從關係一致。
   brass 只留給 eyebrow 起筆與主 CTA，避免強調色散在四處。 */
.jashow-home-closing-asks dt {
  flex: none;
  width: 3.6rem;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(246, 245, 242, 0.55);
}
.jashow-home-closing-asks dd {
  margin: 0;
  font-size: clamp(0.95rem, 1.5vw, 1.06rem);
  color: #F6F5F2;
}

.jashow-home-closing-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
/* 單子的註腳：跟著 asks 走，右欄只負責行動 */
.jashow-home-closing-note {
  margin: 0.95rem 0 0;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  color: rgba(246, 245, 242, 0.66);
}

@media (min-width: 880px) {
  /* 單子的虛線橫貫左欄、按鈕收在線末：引導線把視線帶到送出鍵，
     而不是讓兩塊各自靠邊、中間留下讀起來像破圖的空洞。 */
  .jashow-home-closing-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: clamp(64px, 8vw, 132px);
    align-items: end;
  }
  .jashow-home-closing-asks { max-width: none; }
  .jashow-home-closing-actions { align-items: flex-end; text-align: right; }
}

/* .entry-content 前綴：壓過主題對 a 的預設色，與檔頭既有做法一致 */
.entry-content .jashow-home-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.9rem;
  background: var(--jashow-brass, #A98147);
  color: #1A1917;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: background 0.15s ease;
}
.entry-content .jashow-home-cta-primary:hover {
  background: #C09A5A;
  color: #1A1917;
}
.jashow-home-cta-primary:focus-visible {
  outline: 2px solid #F6F5F2;
  outline-offset: 3px;
}

.entry-content .jashow-home-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 48px;
  padding-bottom: 0.2em;
  color: rgba(246, 245, 242, 0.86);
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(246, 245, 242, 0.28);
  transition: color 0.15s ease, border-bottom-color 0.15s ease, gap 0.15s ease;
}
.entry-content .jashow-home-cta-secondary:hover {
  color: #FBFAF8;
  border-bottom-color: var(--jashow-brass, #A98147);
  gap: 0.85em;
}
.jashow-home-cta-secondary:focus-visible {
  outline: 2px solid var(--jashow-brass, #A98147);
  outline-offset: 3px;
}
.jashow-home-cta-secondary:hover .jashow-home-arrow { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .jashow-home-cta-primary,
  .jashow-home-cta-secondary { transition: none; }
}

@media (max-width: 600px) {
  .jashow-home-closing-actions { gap: 1.1rem; }
  .entry-content .jashow-home-cta-primary { width: 100%; }
}
