/* ==========================================================================
   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,.56) 0%, rgba(11,27,51,.34) 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,.62) 0%, rgba(11,27,51,.32) 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;
  gap: 20px;
  padding: 0 var(--pad-x);
  text-align: center;
  color: var(--bg);
  /* 底圖是後台可上傳的，亮度無法預期。遮罩本身已經處理大部分情況，
     這層柔和的陰影是保險：深色圖上看不出來，遇到很亮的圖才發揮作用。
     小字級的 eyebrow 在純白底圖上只有 2.4:1，靠這個補回來。 */
  text-shadow: 0 1px 2px rgba(11,27,51,.30), 0 2px 18px rgba(11,27,51,.45);
}
.banner__body--left { align-items: flex-start; text-align: left; }
.eyebrow--light { color: var(--cyan-light); font-size: 13px; }
.banner__title {
  margin: 0;
  font-size: 36px;
  font-weight: 200;
  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;
}
.doc__h2 {
  margin: 0 0 22px;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: .08em;
  scroll-margin-top: 110px;
}
.doc__p {
  margin: 0 0 26px;
  font-size: 15px;
  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; }
.doc__figure figcaption { font-size: 12px; font-weight: 300; letter-spacing: .1em; color: var(--text-faint); }
.doc__quote {
  margin: 12px 0 72px;
  padding: 30px 34px;
  border-left: 2px solid var(--blue);
  background: var(--bg-alt);
  font-size: 17px;
  font-weight: 400;
  line-height: 2.2;
  letter-spacing: .05em;
  text-wrap: pretty;
}
.doc__foot { padding-top: 40px; border-top: 1px solid var(--line); }
.doc__foot a { font-size: 14px; font-weight: 300; letter-spacing: .16em; color: var(--text-muted); }

.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 */

.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: 0 var(--pad-x) 60px; }
.featured {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: stretch;
  overflow: hidden;
  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 340ms var(--ease), box-shadow 340ms ease;
}
.featured:hover { transform: translateY(-6px); box-shadow: 0 24px 52px rgba(11, 27, 51, .12); }
.featured__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; 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: 15px;
  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: 0; }
.news-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  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 340ms var(--ease), box-shadow 340ms ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(11, 27, 51, .12); }
.post-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; 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-soft); text-wrap: pretty; }

.empty, .listing__foot {
  margin: 0;
  padding-top: 28px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: .08em;
  color: var(--text-faint);
  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: 23px; font-weight: 500; letter-spacing: .06em; line-height: 1.7; }
.article__p {
  margin: 0;
  font-size: 15px;
  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-faint); }
.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: 17px;
  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);
}
.article__foot > a { font-size: 14px; font-weight: 300; letter-spacing: .16em; color: var(--text-muted); }
.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;
  transition: border-color 240ms ease, color 240ms ease;
}
.share__btn:hover { border-color: var(--blue); color: var(--blue); }

.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 {
  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)); }

.prod-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  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 340ms var(--ease), box-shadow 340ms ease;
}
.prod-card:hover { transform: translateY(-6px); box-shadow: 0 20px 44px rgba(11, 27, 51, .12); }
.prod-card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; 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-soft); 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: 15px;
  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-soft); }
.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-faint); }
.dl__arrow { font-size: 16px; color: var(--blue); }

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

@media (max-width: 1200px) {
  .banner__title { font-size: 30px; }
  .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: 0 var(--pad-x) 44px; }
  .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; }
  .doc__p { font-size: 14px; line-height: 2.2; }
  .doc__figure { margin-bottom: 48px; }
  .doc__quote { padding: 22px 20px; font-size: 15px; 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: 0 var(--pad-x) 32px; }
  .featured { border-radius: 16px; }
  .featured__media { aspect-ratio: 16 / 11; }
  .featured__body { padding: 22px 20px 26px; gap: 12px; }
  .featured__title { font-size: 20px; }
  .featured__text { font-size: 14px; 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; }
  .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: 18px; }
  .article__p { font-size: 14px; line-height: 2.2; }
  .article__figure-media { border-radius: 14px; }
  .article__quote { padding: 20px 18px; font-size: 15px; }
  .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__aside { display: none; }
  .cat-group__title h2 { font-size: 21px; }

  .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; }
  .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: 14px; 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; }
}
