/* ==========================================================================
   Huamao 華楙生技 — 內頁樣式（技術頁 / 消息 / 產品）
   與 site.css 共用 :root 變數，需在 site.css 之後載入。
   ========================================================================== */

/* --------------------------------------------------------------- 內頁 banner */

.banner {
  position: relative;
  height: 62vh;
  min-height: 420px;
  overflow: hidden;
  background: var(--navy);
}
.banner--compact { height: 50vh; min-height: 340px; }
.banner--article { height: 56vh; min-height: 380px; }
.banner__bg { position: absolute; inset: -14% 0; }
.banner__bg img { width: 100%; height: 100%; object-fit: cover; }
/*
  主視覺的遮罩。

  原則：遮罩是為了「保證文字讀得到」，不是替底圖重新上色。
  所以只在文字所在的位置壓深，四周留給圖片本身，而且一律用中性的深藍
  （--navy），不加飽和的藍或青 —— 底圖是後台可上傳的，任何色調都可能，
  疊一層有顏色的漸層上去只會讓每張圖都變成同一種混濁的紫藍。

  三層由上而下：
    1. 標題在正中央，那一圈壓深確保對比
    2. 頁首的白色選單壓在上緣，需要一條深帶子
    3. 底部收一點，跟下一段內容銜接
*/
.banner__tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(78% 62% at 50% 52%,
      rgba(11,27,51,.34) 0%, rgba(11,27,51,.22) 52%, rgba(11,27,51,.05) 100%),
    linear-gradient(180deg,
      rgba(11,27,51,.58) 0%, rgba(11,27,51,.16) 22%, rgba(11,27,51,0) 42%),
    linear-gradient(0deg,
      rgba(11,27,51,.32) 0%, rgba(11,27,51,0) 24%);
}

/* 消息內頁的標題是靠左的，壓深的位置要跟著移過去 */
.banner--article .banner__tint {
  background:
    radial-gradient(58% 74% at 26% 56%,
      rgba(11,27,51,.34) 0%, rgba(11,27,51,.22) 52%, rgba(11,27,51,.04) 100%),
    linear-gradient(180deg,
      rgba(11,27,51,.58) 0%, rgba(11,27,51,.16) 22%, rgba(11,27,51,0) 42%),
    linear-gradient(0deg,
      rgba(11,27,51,.32) 0%, rgba(11,27,51,0) 24%);
}
.banner__body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad-x);
  text-align: center;
  color: var(--bg);
  /* 底圖是後台可上傳的，亮度無法預期。遮罩負責把底色壓到白字讀得到的
     程度（見 .banner__tint 的說明），這層陰影是第二道保險，
     讓筆畫邊緣跟背景分開。小字級的 eyebrow 特別需要。 */
  text-shadow: 0 1px 3px rgba(11,27,51,.55), 0 2px 20px rgba(11,27,51,.5);
}
.banner__body--left { align-items: flex-start; text-align: left; }

/*
 * 真正保證文字對比的一層，掛在文字上而不是圖片上。
 *
 * 圖片上的漸層是固定尺寸的，但文字會變長 —— 翻成法文之後標題從一行變
 * 三行，副標被推到漸層已經淡出的位置就整段讀不到。掛在這裡，漸層會跟著
 * 文字一起長高。
 *
 * 純白底圖要壓到 a ≈ 0.60 才有 4.5:1 的對比（見 .banner__tint 的說明），
 * 加上圖片層那 .34，兩層疊起來是 1-(1-.34)(1-.58) ≈ .72。
 */
/*
 * 內頁主視覺的進場。
 *
 * 刻意比首頁那個短很多（400ms vs 1100ms），而且只淡透明度、不做位移：
 * .banner__title 是 <h1>，多半也是這一頁的 LCP 文字 —— 動畫拖太久等於
 * 延後訪客來看的東西。半屏的標題帶配上首頁那種 900ms 的淡入會顯得慢。
 *
 * 純 CSS，不依賴 JS。底圖本來就是立即顯示的 <img>，這裡只是讓文字那塊
 * 淡進來；動畫不跑也不影響內容看得見。
 *
 * 用 backwards 而不是 forwards：backwards 保證動畫開始前元素就是起始狀態
 * （opacity: 0），不會有「先以正常樣式畫一次、再跳回 0 開始淡入」的空窗。
 * forwards 則是留住結束狀態，這裡不需要 —— 結束狀態本來就等於元素的正常
 * opacity，留著只會多一個「動畫殘留蓋掉正常樣式」的可能性。
 */
.banner__inner {
  /* linear：見 site.css 的 .reveal，透明度加緩動會把淡入壓縮到前三分之一 */
  animation: bannerIn 400ms linear backwards;
  display: flex;
  flex-direction: column;
  align-items: inherit;
  gap: 20px;
  padding: 40px 30px;
  background: radial-gradient(ellipse 88% 76% at 50% 50%,
    rgba(11,27,51,.58) 0%, rgba(11,27,51,.42) 58%, rgba(11,27,51,0) 100%);
}

@keyframes bannerIn {
  from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .banner__inner { animation: none; }
}
.eyebrow--light { color: var(--cyan-light); font-size: 13px; }
.banner__title {
  margin: 0;
  font-size: 36px;
  /* 200 太細：白字疊在照片上時筆畫會被背景吃掉，字級越小越明顯 */
  font-weight: 300;
  letter-spacing: .34em;
  text-indent: .34em;
  line-height: 1.9;
}
.banner__title--article {
  max-width: 900px;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: .06em;
  text-indent: 0;
  line-height: 1.7;
  text-wrap: pretty;
}
.banner__lead {
  margin: 0;
  max-width: 520px;
  font-size: 14px;
  font-weight: 300;
  line-height: 2.2;
  letter-spacing: .04em;
  color: rgba(246, 248, 252, .82);
}
.banner__meta { display: flex; align-items: center; gap: 14px; }
.banner__date { font-size: 14px; letter-spacing: .24em; color: rgba(246, 248, 252, .78); }
.tag-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(111, 212, 255, .16);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--cyan-light);
}

/* ---------------------------------------------------------------- 麵包屑 */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 48px;
  border-bottom: 1px solid rgba(11, 27, 51, .10);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .14em;
  color: var(--text-faint);
}
.breadcrumb a { color: var(--text-faint); }
.breadcrumb__current { color: var(--navy); }

/* -------------------------------------------------------------- 文件式版面 */

.doc {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 88px;
  padding: 96px var(--pad-x) 130px;
  align-items: start;
}

/* 沒有側邊目錄的頁面（條款、隱私、聯絡我們，或關掉目錄的內頁）。
   少了這個，唯一的 .doc__body 會掉進上面那個 210px 的欄位裡被擠成一條，
   而且整頁會多出一條水平捲軸。 */
.doc--plain { grid-template-columns: minmax(0, 1fr); }
.doc--plain .doc__body { margin-inline: auto; }
.doc__toc {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc__toc h4 {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .34em;
  color: var(--cyan);
}
.doc__toc a {
  padding: 11px 0 11px 16px;
  border-left: 1px solid rgba(11, 27, 51, .16);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .1em;
  color: var(--text-muted);
  transition: border-color 240ms ease, color 240ms ease;
}
.doc__toc a:hover, .doc__toc a.is-current { border-color: var(--blue); color: var(--blue); }

.doc__body { display: flex; flex-direction: column; max-width: 760px; }
.doc__lead {
  margin: 0 0 56px;
  font-size: 22px;
  font-weight: 400;
  line-height: 2.2;
  letter-spacing: .06em;
  text-wrap: pretty;
}
/*
 * 章節標題要「離上一段遠、離自己的內文近」。
 *
 * 原本是 margin: 0 0 22px —— 上面完全沒有間距，全靠前一個區塊的下方
 * margin 撐。但 .rich-text 的最後一個子元素被歸零了（見 site.css），
 * 所以「文字後面接標題」時幾乎是貼著的，而標題到自己內文反而有 22px。
 * 方向剛好相反：讀起來像標題屬於上一段。
 *
 * ⚠ .doc__body 是 flex，相鄰的 margin **不會塌陷**，會相加。
 *   所以預設加上間距，前面已經有大間距的區塊再各自歸零 ——
 *   圖、引言、規格條的下方都是 72px，再疊 56px 就太空了。
 *
 *   這個方向（預設加、例外減）比反過來安全：以後新增一種下方沒有
 *   margin 的區塊，標題前面自動就有間距，不會又貼在一起。
 */
.doc__h2 {
  margin: 56px 0 22px;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .08em;
  scroll-margin-top: 110px;
}

/* 前面已經有足夠間距的，不要再疊加（.doc__body 是 flex，margin 不塌陷）*/
.doc__body > .doc__h2:first-child,
.doc__lead   + .doc__h2,
.doc__figure + .doc__h2,
.doc__quote  + .doc__h2,
.spec-strip  + .doc__h2,
.doc__lead   + .doc__foot,
.doc__figure + .doc__foot,
.doc__quote  + .doc__foot,
.spec-strip  + .doc__foot { margin-top: 0; }
.doc__p {
  margin: 0 0 26px;
  font-size: 16px;
  font-weight: 300;
  line-height: 2.5;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-wrap: pretty;
}
.doc__p--last { margin-bottom: 56px; }
.doc__figure { margin: 12px 0 72px; display: flex; flex-direction: column; gap: 14px; }
.doc__figure img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; border-radius: 14px; }

/*
 * 圖片本身是一顆按鈕（點了放大）。這裡把瀏覽器的按鈕預設樣式清掉，
 * 讓它看起來就是一張圖 —— 唯一的提示是游標變成放大鏡。
 */
.figure-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  /* 透明度一律 linear —— 見 site.css 的 .reveal */
  transition: opacity 260ms linear;
}
.figure-zoom:hover { opacity: .92; }
.figure-zoom:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/*
 * 圓角由情境決定，不寫在 .figure-zoom 上 —— 兩邊的圖本來就不一樣圓
 * （靜態頁 14px、消息內頁 18px）。焦點框會跟著圓角走，所以要對齊。
 */
.doc__figure    .figure-zoom { border-radius: 14px; }
.article__figure .figure-zoom { border-radius: 18px; }
.doc__figure figcaption { font-size: 12px; font-weight: 300; letter-spacing: .1em; color: var(--text-muted); }
.doc__quote {
  margin: 12px 0 72px;
  padding: 30px 34px;
  border-left: 2px solid var(--blue);
  background: var(--bg-alt);
  font-size: 18px;
  font-weight: 400;
  line-height: 2.2;
  letter-spacing: .05em;
  text-wrap: pretty;
}
/*
 * padding-top 是「線到回到首頁」的距離，margin-top 才是「內文到線」的。
 * 原本沒有 margin，線就緊貼在最後一段下面 —— 跟 .doc__h2 同一個原因：
 * .rich-text 的最後一個子元素被歸零了（見 site.css）。
 *
 * 72px 跟圖、引言、規格條的下方 margin 同一級，讀起來是「文章結束了」。
 */
.doc__foot { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }

/*
 * 文末的返回連結。
 *
 * 原本是一個沒有任何 hover 狀態的純文字連結 —— 滑上去毫無反應。
 *
 * 沿用 .cat-group__more 的視覺語言（28px 的圓、999px 圓角、260ms），
 * 方向鏡射成向左。但**顏色比它安靜**：一頁的主要行動不該是「回到首頁」，
 * 預設用 --text-muted，hover 才轉藍。
 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  /* 左邊留得比右邊少：那一側是箭頭的圓，本身已經帶著留白 */
  padding: 10px 22px 10px 10px;
  border: 1px solid rgba(11, 27, 51, .16);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .12em;
  white-space: nowrap;
  /* 手機版的 .article__foot 是 align-items: stretch，不加這條會被拉成滿版 */
  align-self: start;
  transition: border-color 260ms var(--ease), background 260ms var(--ease), color 260ms var(--ease);
}

.back-link i {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(11, 27, 51, .06);
  transition: background 260ms var(--ease), color 260ms var(--ease), transform 260ms var(--ease);
}
.back-link i::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: translate(-35%, -50%) rotate(-45deg);
}

.back-link:hover {
  border-color: rgba(27, 95, 224, .45);
  background: rgba(27, 95, 224, .05);
  color: var(--blue);
}
.back-link:hover i {
  background: var(--blue);
  color: #fff;
  transform: translateX(-3px);
}
.back-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .back-link i { transition: background 260ms ease, color 260ms ease; }
  .back-link:hover i { transform: none; }
}

.spec-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 8px 0 72px;
  background: var(--line);
}
.spec-strip__item { display: flex; flex-direction: column; gap: 10px; padding: 30px 24px; background: var(--bg); }
.spec-strip__value { font-family: var(--font-en); font-size: 34px; font-weight: 300; line-height: 1; color: var(--blue); }
.spec-strip__label { font-size: 13px; font-weight: 300; letter-spacing: .14em; color: var(--text-muted); }

/* ---------------------------------------------------------- 篩選 chips */

/*
 * 一顆分類都沒有時，整條篩選列不會輸出（見 news/index.blade.php）。
 *
 * 但那條列的上下 padding 本來就是「麵包屑與內容之間」的間距 —— 少了它，
 * 頭條會直接貼在麵包屑下面。
 *
 * 所以間距改成由內容自己帶，緊接在篩選列（或頭條）後面時才歸零。
 * 用相鄰選擇器而不是在 Blade 加類別：要不要留間距取決於「前面有沒有
 * 東西」，那件事 CSS 自己就知道，寫在版面裡反而要判斷兩層條件。
 *
 * ⚠ 數字要等於 .filter-bar 的「上」padding，不是「上 + 下」。
 *
 *   原本的視覺順序是：麵包屑 → 60px → chips（有內容）→ 40px → 頭條。
 *   那 40px 底下是有東西的，把 100px 整個當成間距補回去，收掉 chips 之後
 *   就變成 100px 的純空白，看起來離太遠。
 *
 *   要對齊的是「麵包屑到第一個內容的距離」—— 有 chips 時是 60px，
 *   沒有 chips 時第一個內容變成頭條，也該是 60px。
 */
.filter-bar { padding: 60px var(--pad-x) 40px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chip {
  display: flex;
  align-items: center;
  padding: 11px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-size: 14px;
  letter-spacing: .12em;
  transition: background 240ms ease, color 240ms ease, border-color 240ms ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ------------------------------------------------------------- 消息頭條 */

.featured-wrap { padding: 60px var(--pad-x) 60px; }
/*
 * hover 只動 transform 與 opacity（合成器就能處理），不再動 box-shadow ——
 * 那是每一幀都要重繪整張卡片。做法與 .prod-card 相同，見那裡的說明。
 */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: stretch;
  border: 1px solid rgba(11, 27, 51, .06);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(11, 27, 51, .06);
  transition: transform 260ms var(--ease);
}
.featured::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 24px 52px rgba(11, 27, 51, .12);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.featured:hover { transform: translateY(-6px); }
.featured:hover::after { opacity: 1; }

/* 兩欄排版時圖片在左邊，只切左側的圓角 */
.featured__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 23px 0 0 23px;
  background: var(--bg-alt);
}
.featured__media img { width: 100%; height: 100%; object-fit: cover; }
.featured__flag {
  position: absolute;
  left: 20px; top: 20px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--blue);
}
.featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 48px 44px;
}
.featured__title { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: .06em; line-height: 1.7; text-wrap: pretty; }
.featured__text {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 2.3;
  letter-spacing: .04em;
  color: var(--text-muted);
  text-wrap: pretty;
}
.featured__more { font-size: 14px; letter-spacing: .2em; color: var(--blue); }

.meta { display: flex; align-items: center; gap: 14px; }
.meta__date { font-size: 14px; letter-spacing: .24em; color: var(--blue); }
.meta__sep { width: 1px; height: 12px; background: rgba(11, 27, 51, .2); }
.meta__cat { font-size: 12px; font-weight: 300; letter-spacing: .12em; color: var(--text-faint); }

/* ------------------------------------------------------------- 消息列表 */

.list-section { padding-top: 60px; }

.filter-bar    + .featured-wrap,
.filter-bar    + .list-section,
.featured-wrap + .list-section { padding-top: 0; }
.news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
/*
 * hover 只動 transform 與 opacity（合成器就能處理），不再動 box-shadow ——
 * 那是每一幀都要重繪整張卡片。做法與 .prod-card 相同，見那裡的說明。
 */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(11, 27, 51, .06);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(11, 27, 51, .05);
  transition: transform 260ms var(--ease);
}
.post-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 20px 44px rgba(11, 27, 51, .12);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.post-card:hover { transform: translateY(-6px); }
.post-card:hover::after { opacity: 1; }

.post-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 19px 19px 0 0;
  background: var(--bg-alt);
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: 12px; padding: 26px 26px 30px; }
.post-card__title { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: .05em; line-height: 1.75; text-wrap: pretty; }
.post-card__text { margin: 0; font-size: 15px; font-weight: 300; line-height: 2.05; color: var(--text-muted); text-wrap: pretty; }

.empty, .listing__foot {
  margin: 0;
  padding-top: 28px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .08em;
  color: var(--text-muted);
  text-align: center;
}

/* ---------------------------------------------------------------- 分頁 */

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; padding-top: 48px; }
.pager__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-en);
  font-size: 15px;
  letter-spacing: .1em;
  color: var(--navy);
  transition: border-color 240ms ease, background 240ms ease, color 240ms ease;
}
.pager__btn:hover { border-color: var(--blue); color: var(--blue); }
.pager__btn.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager__btn.is-disabled { opacity: .35; }
.pager__gap { color: var(--text-faint); }

/* ------------------------------------------------------------ 消息內頁 */

.article-wrap {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 72px;
  padding: 80px var(--pad-x) 110px;
  align-items: start;
}
.article { display: flex; flex-direction: column; max-width: 780px; }
.article__lead {
  margin: 0 0 46px;
  font-size: 20px;
  font-weight: 400;
  line-height: 2.1;
  letter-spacing: .04em;
  text-wrap: pretty;
}
.article__block { display: flex; flex-direction: column; gap: 18px; padding-bottom: 44px; }
.article__h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: .06em; line-height: 1.7; }
.article__p {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 2.5;
  letter-spacing: .04em;
  color: var(--text-muted);
  text-wrap: pretty;
}
.article__figure { margin: 8px 0 0; display: flex; flex-direction: column; gap: 12px; }
.article__figure-media { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: var(--bg-alt); }
.article__figure-media img { width: 100%; height: 100%; object-fit: cover; }
.article__figure figcaption { font-size: 12px; font-weight: 300; letter-spacing: .08em; color: var(--text-muted); }
.article__quote {
  margin: 8px 0 0;
  padding: 28px 32px;
  border-left: 2px solid var(--blue);
  border-radius: 0 16px 16px 0;
  background: var(--bg-alt);
  font-size: 18px;
  font-weight: 400;
  line-height: 2.2;
  letter-spacing: .04em;
  text-wrap: pretty;
}
.article__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 34px;
  border-top: 1px solid rgba(11, 27, 51, .12);
}
.share { display: flex; align-items: center; gap: 10px; }
.share__label { font-size: 12px; font-weight: 300; letter-spacing: .12em; color: var(--text-faint); }
.share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--text-muted);
  cursor: pointer;
  /* 跟 .back-link 同一組數值 —— 兩者在同一列、相距 10px，不該有不同的節奏 */
  transition: border-color 260ms var(--ease), background 260ms var(--ease), color 260ms var(--ease);
}

/*
 * hover 與 focus 跟 .back-link 一致。
 *
 * 刻意不加箭頭那顆圓：那是「返回」的方向暗示，分享沒有方向可言，
 * 三顆並排各自帶一顆會動的圓也太吵。共用的是顏色與節奏，不是結構。
 */
.share__btn:hover {
  border-color: rgba(27, 95, 224, .45);
  background: rgba(27, 95, 224, .05);
  color: var(--blue);
}
.share__btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.article-side { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 4px; }
.article-side h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .34em;
  color: var(--blue);
}
.related {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(11, 27, 51, .08);
}
.related__date { font-size: 12px; letter-spacing: .2em; color: var(--text-faint); }
.related__title { font-size: 14px; font-weight: 400; line-height: 1.85; color: var(--navy); text-wrap: pretty; }

/* --------------------------------------------------------- 相關產品 */

/* 命名不用 .related：那個已經被消息內頁的側欄連結用掉了 */
.also { display: flex; flex-direction: column; gap: 30px; padding: 40px var(--pad-x) 120px; }

.also__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(11, 27, 51, .12);
}
.also__head h2 { margin: 0; font-size: 27px; font-weight: 500; letter-spacing: .1em; }

.also__more {
  flex: 0 0 auto;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(11, 27, 51, .3);
  color: var(--navy);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .12em;
  white-space: nowrap;
  transition: color 260ms ease, border-color 260ms ease;
}
.also__more:hover { color: var(--blue); border-color: var(--blue); }

@media (max-width: 860px) {
  .also { gap: 20px; padding: 24px var(--pad-x) 70px; }
  .also__head h2 { font-size: 21px; }
  .also__more { font-size: 13px; }
}

/* ------------------------------------------------------------- 產品分類 */

.cat-list { padding: 20px var(--pad-x) 120px; }
.cat-group { display: flex; flex-direction: column; gap: 30px; padding-bottom: 76px; }
.cat-group__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(11, 27, 51, .12);
}
.cat-group__title { display: flex; flex-direction: column; gap: 10px; }
.cat-group__title .eyebrow { color: var(--blue); letter-spacing: .34em; }
.cat-group__title h2 { margin: 0; font-size: 27px; font-weight: 500; letter-spacing: .1em; }
.cat-group__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; max-width: 420px; }
.cat-group__desc { font-size: 13px; font-weight: 300; letter-spacing: .08em; color: var(--text-muted); text-align: right; }

/*
 * 「查看全部產品」。
 *
 * 不共用 .btn-outline：那顆是通用的線框按鈕，這裡想要箭頭能單獨動，
 * 需要自己的結構。改動也不會影響到產品內頁那顆 .btn-outline--lg。
 */
.cat-group__more {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  /* 右邊留得比左邊少：那一側是箭頭的圓，本身已經帶著留白 */
  padding: 10px 10px 10px 22px;
  border: 1px solid rgba(11, 27, 51, .16);
  border-radius: 999px;
  color: var(--blue);
  font-size: 13px;
  letter-spacing: .12em;
  white-space: nowrap;
  transition: border-color 260ms var(--ease), background 260ms var(--ease);
}

/* 箭頭自己是一個圓 —— hover 時整顆填色並往右移，比只換邊框顏色明確得多 */
.cat-group__more i {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(27, 95, 224, .09);
  transition: background 260ms var(--ease), color 260ms var(--ease), transform 260ms var(--ease);
}
.cat-group__more i::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translate(-65%, -50%) rotate(45deg);
}

.cat-group__more:hover {
  border-color: rgba(27, 95, 224, .45);
  background: rgba(27, 95, 224, .05);
}
.cat-group__more:hover i {
  background: var(--blue);
  color: #fff;
  transform: translateX(3px);
}
.cat-group__more:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .cat-group__more i { transition: background 260ms ease, color 260ms ease; }
  .cat-group__more:hover i { transform: none; }
}

.btn-outline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border: 1px solid rgba(11, 27, 51, .16);
  border-radius: 999px;
  color: var(--blue);
  font-size: 13px;
  letter-spacing: .12em;
  white-space: nowrap;
  transition: border-color 260ms ease, background 260ms ease;
}
.btn-outline:hover { border-color: var(--blue); background: var(--bg-alt); }
.btn-outline--lg {
  justify-content: center;
  padding: 16px 30px;
  border-color: rgba(11, 27, 51, .18);
  background: transparent;
  color: var(--navy);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: .16em;
  cursor: pointer;
}
.btn-outline--lg:hover { border-color: var(--blue); color: var(--blue); background: transparent; }

/* ------------------------------------------------------------- 產品卡 */

.prod-grid { display: grid; gap: 22px; }
.prod-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prod-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/*
 * hover 只動 transform 與 opacity，都是合成器就能處理的。
 *
 * 原本是 transform + box-shadow 一起動，而 box-shadow 每一幀都要重繪
 * 整張卡片 —— 產品列表頁用 prod-grid--3，卡片是全站最大的（約 400×650），
 * 加上 44px 的模糊半徑，重繪面積很可觀，hover 就會頓。
 *
 * 加深的陰影改放在 ::after 上、用 opacity 淡入。代價是卡片不能再有
 * overflow: hidden（那會把偽元素的陰影一起裁掉），所以圓角改由
 * .prod-card__media 自己負責 —— 它本來就有 overflow: hidden。
 */
.prod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(11, 27, 51, .06);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(11, 27, 51, .05);
  transition: transform 260ms var(--ease);
}
.prod-card::after {
  content: '';
  position: absolute;
  inset: 0;
  /* 墊在卡片背景後面：陰影只有溢出卡片的部分看得到，卡片底下不會透出來 */
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 20px 44px rgba(11, 27, 51, .12);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.prod-card:hover { transform: translateY(-6px); }
.prod-card:hover::after { opacity: 1; }

/* 卡片沒有 overflow: hidden 了，圖片的圓角要自己切 */
.prod-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 19px 19px 0 0;
  background: var(--bg-alt);
}
.prod-card__media img { width: 100%; height: 100%; object-fit: cover; }
.prod-card__body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }
.prod-card__name { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: .08em; }
.prod-card__desc { margin: 0; font-size: 15px; font-weight: 300; line-height: 2; color: var(--text-muted); text-wrap: pretty; }
.prod-card__more { margin-top: 6px; font-size: 13px; letter-spacing: .2em; color: var(--blue); }

/* ------------------------------------------------------------- 產品列表 */

.listing {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  padding: 60px var(--pad-x) 120px;
  align-items: start;
}
.listing__side { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 6px; }
.listing__side h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .34em;
  color: var(--blue);
}
.listing__cats { display: flex; flex-direction: column; gap: 2px; }
.cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  letter-spacing: .1em;
  transition: background 240ms ease, color 240ms ease;
}
.cat-link:hover { background: var(--bg-alt); }
.cat-link.is-active { background: var(--blue); color: #fff; }
.cat-link__count { font-size: 13px; letter-spacing: .1em; opacity: .6; }

.listing__main { display: flex; flex-direction: column; gap: 26px; }
.listing__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(11, 27, 51, .12);
}
.listing__total { font-size: 14px; font-weight: 300; letter-spacing: .08em; color: var(--text-muted); white-space: nowrap; }
.listing__total strong { font-size: 20px; font-weight: 500; color: var(--navy); }

.sorter { display: flex; align-items: center; gap: 10px; }
.sorter__label { font-size: 13px; font-weight: 300; letter-spacing: .1em; color: var(--text-faint); }
.sorter__field { position: relative; display: flex; align-items: center; }
.sorter__select {
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 40px 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: .1em;
  cursor: pointer;
  outline: none;
  transition: border-color 240ms ease;
}
.sorter__select:hover, .sorter__select:focus { border-color: var(--blue); }
.sorter__caret {
  position: absolute;
  right: 14px;
  width: 14px; height: 14px;
  color: var(--navy);
  pointer-events: none;
}
.sorter__go {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

/* ------------------------------------------------------------- 產品內頁 */

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  padding: 80px var(--pad-x) 100px;
  align-items: start;
}

.gallery { display: flex; flex-direction: column; gap: 14px; }
.gallery__stage {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg-alt);
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.gallery__stage.is-dragging { cursor: grabbing; }
.gallery__track {
  display: flex;
  width: 100%; height: 100%;
  transform: translate3d(0, 0, 0);
  transition: transform 520ms var(--ease);
}
.gallery__slide { flex: 0 0 100%; height: 100%; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }

.gallery__arrow {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid rgba(11, 27, 51, .10);
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  color: var(--navy);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 240ms ease, color 240ms ease;
}
.gallery__arrow:hover { background: var(--blue); color: #fff; }
.gallery__arrow--prev { left: 16px; }
.gallery__arrow--next { right: 16px; }
.gallery__arrow i { display: block; width: 10px; height: 10px; }
.gallery__arrow--prev i { border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(1px, -1px); }
.gallery__arrow--next i { border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg) translate(-1px, 1px); }

.gallery__dots {
  position: absolute;
  left: 50%; bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
}
.gallery__dot {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 27, 51, .22);
  cursor: pointer;
  transition: width 300ms ease, background 300ms ease;
}
.gallery__dot.is-active { width: 20px; background: var(--blue); }

/* 放大提示。點圖也能放大，但滑鼠游標的 zoom-in 不是每個人都會注意到，
   而且鍵盤使用者需要一個真的能 Tab 到的控制項。 */
.gallery__zoom {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
  color: var(--navy);
  cursor: pointer;
  opacity: 0;
  transition: opacity 220ms ease, background 220ms ease;
}
.gallery__stage:hover .gallery__zoom,
.gallery__zoom:focus-visible { opacity: 1; }
.gallery__zoom:hover { background: #fff; }

/* 放大鏡：一個圓加一根柄 */
.gallery__zoom i {
  position: relative;
  display: block;
  width: 13px; height: 13px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.gallery__zoom i::after {
  content: '';
  position: absolute;
  right: -6px; bottom: -6px;
  width: 7px; height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

/* 觸控裝置沒有 hover，一律顯示 */
@media (hover: none) {
  .gallery__zoom { opacity: 1; }
}

.gallery__slide img { cursor: zoom-in; }
.gallery__stage.is-dragging .gallery__slide img { cursor: grabbing; }

/* ---------------------------------------------------------- 放大檢視 */

.lightbox {
  gap: 20px;
  padding: 24px;
  background: rgba(11, 27, 51, .92);
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
  margin: 0;
}

.lightbox__figure img {
  max-width: min(1100px, calc(100vw - 160px));
  /* 扣掉上下留白與說明文字，圖才不會被裁掉 */
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

.lightbox__caption {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .7);
}
.lightbox__caption .en { color: rgba(255, 255, 255, .45); }

.lightbox__close {
  position: absolute;
  top: 20px; right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); }

.lightbox__arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease;
}
.lightbox__arrow:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); }
.lightbox__arrow i { display: block; width: 11px; height: 11px; }
.lightbox__arrow--prev i { border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(1px, -1px); }
.lightbox__arrow--next i { border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg) translate(-1px, 1px); }

@media (max-width: 860px) {
  .lightbox { padding: 16px; gap: 0; }
  /* 手機上左右箭頭會把圖擠掉，改成疊在圖上、貼著邊 */
  .lightbox__arrow { position: absolute; width: 42px; height: 42px; }
  .lightbox__arrow--prev { left: 12px; }
  .lightbox__arrow--next { right: 12px; }
  .lightbox__figure img { max-width: calc(100vw - 32px); max-height: calc(100vh - 150px); }
  .lightbox__close { top: 14px; right: 14px; width: 40px; height: 40px; }
}

.gallery__thumbs { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery__thumb {
  flex: 1 1 0;
  min-width: 60px;
  max-width: calc(25% - 9px);
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 2px solid rgba(11, 27, 51, .10);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-alt);
  opacity: .6;
  cursor: pointer;
  transition: border-color 240ms ease, opacity 240ms ease;
}
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb.is-active { border-color: var(--blue); opacity: 1; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail__info { display: flex; flex-direction: column; gap: 26px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--blue);
  font-size: 12px;
  letter-spacing: .12em;
}
.detail__headline { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: .06em; line-height: 1.6; }
.detail__intro {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 2.4;
  letter-spacing: .04em;
  color: var(--text-muted);
  text-wrap: pretty;
}

.spec-table {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(11, 27, 51, .08);
  border-radius: 18px;
}
.spec-table__row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 15px 22px;
  background: #fff;
}
.spec-table__row:nth-child(odd) { background: var(--bg); }
.spec-table__k { font-size: 13px; font-weight: 400; letter-spacing: .1em; color: var(--navy); }
.spec-table__v { font-size: 13px; font-weight: 300; letter-spacing: .04em; color: var(--text-muted); }

.detail__actions { display: flex; align-items: center; gap: 14px; }
.btn-pill--inline {
  margin: 0;
  padding: 16px 34px;
  border: 0;
  font-family: inherit;
  letter-spacing: .18em;
  cursor: pointer;
}

/* --------------------------------------------------------------- 彈窗 */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: rgba(11, 27, 51, .55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 240ms ease;
}
.modal.is-shown { display: flex; }
.modal.is-open { opacity: 1; }
.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(11, 27, 51, .35);
  transform: translateY(14px);
  transition: transform 280ms var(--ease);
}
.modal.is-open .modal__panel { transform: none; }
.modal__panel--sm { max-width: 400px; }
.modal__panel--md { max-width: 560px; }
.modal__panel--lg { max-width: 640px; }
.modal__panel--center { align-items: center; gap: 16px; padding: 40px 36px 34px; text-align: center; }

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 32px 20px;
  border-bottom: 1px solid rgba(11, 27, 51, .1);
}
.modal__heading { display: flex; flex-direction: column; gap: 8px; }
.modal__heading .eyebrow { letter-spacing: .34em; color: var(--blue); }
.modal__heading h3 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: .08em; }
.modal__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  font-size: 16px;
  cursor: pointer;
  transition: background 220ms ease, border-color 220ms ease;
}
.modal__close:hover { background: var(--bg-alt); border-color: rgba(27, 95, 224, .4); }
.modal__body { display: flex; flex-direction: column; gap: 16px; padding: 26px 32px 32px; overflow-y: auto; }
.modal__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; }
.modal__note { font-size: 13px; font-weight: 300; letter-spacing: .04em; color: var(--text-muted); }
.modal__note.is-error { color: #C2410C; }

/* 送出中：蓋住整個面板，等 API 回應才拿掉 */
.modal__busy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  /* 半透明而不是實心白：讓人知道表單還在，只是被鎖住了 */
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 160ms ease;
}
.modal__busy[hidden] { display: none; }
.modal__busy.is-shown { opacity: 1; }

.modal__busy-text {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .12em;
  color: var(--text-muted);
}

/* 整頁的等待畫面。用在一般表單送出（/contact）—— 那是真的會換頁，
   遮罩會隨著新頁面載入自然消失。 */
.page-busy {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(247, 249, 252, .9);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 160ms ease;
}
.page-busy.is-shown { opacity: 1; }

.page-busy-text {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .12em;
  color: var(--text-muted);
}

.spinner {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(27, 95, 224, .18);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 780ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  /* 不轉圈，改用呼吸的方式表示「還在跑」 */
  .spinner { animation: pulse 1.4s ease-in-out infinite; border-top-color: rgba(27, 95, 224, .18); }
  .modal__busy { transition: none; }
}

@keyframes pulse { 50% { opacity: .3; } }
.modal__check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--blue) 0%, var(--cyan) 100%);
  color: #fff;
  font-size: 22px;
}
.modal__title { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: .08em; }
.modal__text { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.9; letter-spacing: .04em; color: var(--text-muted); }

.field {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(11, 27, 51, .16);
  border-radius: 14px;
  background: var(--bg);
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  line-height: 2;
  letter-spacing: .04em;
  color: var(--navy);
  resize: vertical;
  outline: none;
  transition: border-color 240ms ease, background 240ms ease;
}
.field:focus { border-color: var(--blue); background: #fff; }

.dl-list { display: flex; flex-direction: column; gap: 12px; }
.dl {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(11, 27, 51, .08);
  border-radius: 16px;
  background: var(--bg);
  transition: border-color 240ms ease, background 240ms ease;
}
.dl:hover { border-color: rgba(27, 95, 224, .38); background: #fff; }
.dl__ext {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(11, 27, 51, .08);
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--blue);
}
.dl__text { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.dl__label { font-size: 15px; font-weight: 400; letter-spacing: .06em; color: var(--navy); }
.dl__note { font-size: 13px; font-weight: 300; letter-spacing: .04em; color: var(--text-muted); }
.dl__arrow { font-size: 16px; color: var(--blue); }

/* --------------------------------------------------------------------------
   平板 ≤ 1200px
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
  /* 手機版：字距收窄，讓七八個字的標題不會斷在莫名其妙的位置；
     字重再加一級，小字級在照片上才撐得住 */
  .banner__inner { padding: 30px 18px; gap: 14px; }
  .banner__title {
    font-size: clamp(26px, 7vw, 32px);
    font-weight: 400;
    letter-spacing: .18em;
    text-indent: .18em;
    line-height: 1.65;
    text-wrap: balance;
  }
  .breadcrumb { padding: 20px var(--pad-x); }

  .doc { grid-template-columns: 1fr; gap: 48px; padding: 72px var(--pad-x) 100px; }
  .doc__toc { position: static; }

  .filter-bar { padding: 44px var(--pad-x) 28px; }
  .featured-wrap { padding: 44px var(--pad-x) 44px; }
  .list-section { padding-top: 44px; }

  .filter-bar    + .featured-wrap,
  .filter-bar    + .list-section,
  .featured-wrap + .list-section { padding-top: 0; }
  .featured { grid-template-columns: 1fr; }
  .featured__body { padding: 36px 32px; }
  .news-list { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .article-wrap { grid-template-columns: 1fr; gap: 44px; padding: 60px var(--pad-x) 90px; }
  .article-side { position: static; }

  .cat-list { padding: 12px var(--pad-x) 90px; }
  .prod-grid { gap: 16px; }
  .prod-grid--4, .prod-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .listing { grid-template-columns: 1fr; gap: 30px; padding: 44px var(--pad-x) 90px; }
  .listing__side { position: static; }
  .listing__cats { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .cat-link { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); }

  .detail { gap: 40px; padding: 60px var(--pad-x) 80px; }
}

/* --------------------------------------------------------------------------
   手機 ≤ 860px
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .banner { height: 46vh; min-height: 320px; }
  .banner--compact { height: 38vh; min-height: 260px; }
  .banner--article { height: 42vh; min-height: 300px; }
  .banner__title { font-size: 24px; letter-spacing: .24em; text-indent: .24em; }
  .banner__title--article { font-size: 21px; letter-spacing: .04em; line-height: 1.65; }
  .banner__lead { font-size: 13px; }
  .breadcrumb { padding: 16px var(--pad-x); gap: 8px; }

  .doc { gap: 34px; padding: 48px var(--pad-x) 76px; }
  .doc__lead { font-size: 18px; line-height: 2.1; margin-bottom: 40px; }
  .doc__h2 { font-size: 21px; margin-top: 40px; }   /* 跟著 .doc__lead 的 40px */
  .doc__foot { margin-top: 52px; }
  .doc__p { font-size: 15px; line-height: 2.2; }
  .doc__figure { margin-bottom: 48px; }
  .doc__quote { padding: 22px 20px; font-size: 17px; margin-bottom: 48px; }
  .spec-strip { grid-template-columns: 1fr; margin-bottom: 48px; }

  /* chips 手機改橫向滑動 */
  .filter-bar { padding: 32px var(--pad-x) 20px; }
  .chips {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    margin: 0 calc(var(--pad-x) * -1);
    padding: 0 var(--pad-x) 4px;
    -webkit-overflow-scrolling: touch;
  }
  .chip { flex: 0 0 auto; padding: 10px 16px; font-size: 13px; letter-spacing: .06em; white-space: nowrap; }

  .featured-wrap { padding: 32px var(--pad-x) 32px; }
  .list-section { padding-top: 32px; }

  .filter-bar    + .featured-wrap,
  .filter-bar    + .list-section,
  .featured-wrap + .list-section { padding-top: 0; }
  .featured { border-radius: 16px; }
  /* 單欄時圖片在上面，圓角換成上緣兩角 */
  .featured__media { aspect-ratio: 16 / 11; border-radius: 15px 15px 0 0; }
  .featured__body { padding: 22px 20px 26px; gap: 12px; }
  .featured__title { font-size: 20px; }
  .featured__text { font-size: 15px; line-height: 2.1; }

  /* 消息卡與產品卡手機改橫式 */
  .news-list { grid-template-columns: 1fr; gap: 14px; }
  .post-card { flex-direction: row; align-items: stretch; border-radius: 16px; }
  /* 橫排時圖片在左邊，圓角跟著換方向 */
  .post-card__media { flex: 0 0 118px; aspect-ratio: auto; border-radius: 15px 0 0 15px; }
  .post-card__body { flex: 1; justify-content: center; padding: 14px 16px; gap: 6px; }
  .post-card__title { font-size: 17px; line-height: 1.6; }
  .post-card__text { font-size: 14px; line-height: 1.85; }
  .post-card .meta__cat { display: none; }

  .pager { padding-top: 32px; }

  .article-wrap { gap: 32px; padding: 40px var(--pad-x) 70px; }
  .article__lead { font-size: 17px; line-height: 2; margin-bottom: 32px; }
  .article__block { gap: 14px; padding-bottom: 32px; }
  .article__h2 { font-size: 19px; }
  .article__p { font-size: 15px; line-height: 2.2; }
  .article__figure-media,
  .article__figure .figure-zoom { border-radius: 14px; }
  .article__quote { padding: 20px 18px; font-size: 17px; }
  .article__foot { flex-direction: column; align-items: stretch; gap: 14px; }
  .share__label { display: none; }

  .cat-list { padding: 8px var(--pad-x) 72px; }
  .cat-group { gap: 20px; padding-bottom: 48px; }
  .cat-group__title h2 { font-size: 21px; }

  /*
   * 手機版把「查看全部產品」移到卡片下面。
   *
   * 原本整個 __aside 是 display:none，系列描述與那顆按鈕在手機上都不見了 ——
   * 等於沒有任何入口可以從這一頁進到某個系列的完整列表。
   *
   * 這一頁每個系列只列 4 個產品，所以按鈕放在卡片之後才合理：
   * 看完那幾個再問「還有更多嗎」，順便當成下一個系列之前的分隔。
   *
   * display:contents 讓 __head 的兩個子項變成 .cat-group 的直接項目，
   * order 才跨得過中間的 .prod-grid（order 只在同一個 flex 容器內有效）。
   * 舊瀏覽器不支援時會退回「按鈕在標題下面」—— 位置不同，但看得到也按得到。
   */
  .cat-group__head { display: contents; }

  .cat-group__title {
    order: 1;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(11, 27, 51, .12);
  }

  .cat-group .prod-grid { order: 2; }

  .cat-group__aside { order: 3; align-items: stretch; max-width: none; }

  /* 描述維持隱藏：4 張卡片已經說明這個系列在做什麼，
     手機上多一段說明只是把內容推得更長 */
  .cat-group__desc { display: none; }

  /* 滿版時把箭頭推到最右邊，讀起來像一列「往這邊走」，
     整條都是可以按的範圍 */
  .cat-group__more { width: 100%; padding: 12px 12px 12px 24px; font-size: 14px; }

  .prod-grid--4, .prod-grid--3 { grid-template-columns: 1fr; gap: 12px; }
  .prod-card { flex-direction: row; align-items: stretch; border-radius: 16px; }
  /* 橫向排列時圖片在左邊，圓角跟著換方向 */
  .prod-card__media { flex: 0 0 120px; aspect-ratio: auto; border-radius: 15px 0 0 15px; }
  .prod-card__body { flex: 1; justify-content: center; padding: 16px; gap: 6px; }
  .prod-card__name { font-size: 16px; letter-spacing: .04em; }
  .prod-card__desc { font-size: 14px; line-height: 1.85; }
  .prod-card__more { margin-top: 2px; font-size: 12px; }

  .listing { gap: 22px; padding: 32px var(--pad-x) 72px; }
  .listing__bar { flex-wrap: wrap; gap: 12px; }

  .detail { grid-template-columns: 1fr; gap: 30px; padding: 40px var(--pad-x) 60px; }
  .gallery__stage { border-radius: 16px; aspect-ratio: 1 / 1; }
  .gallery__arrow { width: 38px; height: 38px; }
  .gallery__arrow--prev { left: 10px; }
  .gallery__arrow--next { right: 10px; }
  .gallery__thumbs { gap: 8px; }
  .detail__headline { font-size: 23px; }
  .detail__intro { font-size: 15px; line-height: 2.2; }
  .spec-table__row { grid-template-columns: 96px 1fr; gap: 10px; padding: 12px 14px; }
  .spec-table__k, .spec-table__v { font-size: 12px; }
  .detail__actions { flex-direction: column; align-items: stretch; gap: 10px; }

  .modal { padding: 16px 14px; }
  .modal__panel { border-radius: 16px; max-width: 100%; }
  .modal__panel--center { padding: 30px 22px 26px; }
  .modal__head { padding: 18px 16px 14px; gap: 12px; }
  .modal__heading h3 { font-size: 19px; }
  .modal__body { padding: 20px 20px 24px; gap: 14px; }
  .modal__foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .dl { gap: 12px; padding: 14px 16px; }
  .dl__ext { width: 38px; height: 38px; font-size: 11px; border-radius: 10px; }
}

/* ==========================================================================
   聯絡表單頁（/contact）
   沿用 .doc 版型與 .field，只補表單網格與提示訊息。
   ========================================================================== */

.doc__body--wide { max-width: 920px; }

.notice {
  margin: 0 0 40px;
  padding: 18px 22px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 300;
  line-height: 2;
  letter-spacing: .04em;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice--ok  { background: rgba(0, 168, 232, .10); border: 1px solid rgba(0, 168, 232, .34); color: var(--navy); }
.notice--err { background: rgba(214, 60, 60, .08);  border: 1px solid rgba(214, 60, 60, .30);  color: #9c2b2b; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
  margin: 0 0 64px;
}

.form-row { display: flex; flex-direction: column; gap: 10px; }
.form-row--full { grid-column: 1 / -1; }

.form-row label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--text-muted);
}

.req { color: var(--blue); }

.form-actions { align-items: flex-start; }

/* 彈窗裡的表單：獨立頁面下方要留白給頁尾，彈窗裡不用 */
.form-grid--modal { margin-bottom: 0; gap: 18px 24px; }

/* 唯讀欄位（詢問產品）。用 span + p 而不是 disabled input ——
   那不是要填的東西，做成輸入框只會讓人想點它。 */
.form-label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--text-muted);
}

.form-static {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--navy);
}

/* 蜜罐欄位：對真人完全隱形，但不用 display:none —— 有些機器人會跳過被隱藏的欄位 */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 860px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
