/* ========================================================================
   STYLE.CSS — 全站共用樣式（style-v3：GROW 精密工業）
   目錄 TABLE OF CONTENTS
   ------------------------------------------------------------------------
   01. Google Fonts
   02. Design Tokens
   02b. Tailwind 相容層（cdn.tailwindcss.com 移除後手寫，只有 11 個 class）
   03. Base Reset
   04. 版心容器 .container
   05. eyebrow 英文小標 / section-title
   06. 導覽列 Header + 漢堡選單 + 手機選單
   07. Hero（首頁）
   08. 核心優勢（圖文雙欄 + 優勢卡片 + 數據列）
   09. 色塊分隔 CTA（背景圖 + 遮罩 + 置中標題按鈕）
   10. 應用領域（標題／說明 + 左照片可切換／右清單，hover 切換照片）
   11. 熱門產品輪播（左文字＋按鈕＋箭頭／右卡片輪播，右側切出版面外）
   12. 產品分類色塊（標題＋按鈕同排／縮圖列＋輪播箭頭／白底說明列）
   13. 最新消息（置中標題；2x2 文章卡片；下方置中按鈕）
   14. 合作夥伴（左：標題＋按鈕／右：標誌 4x2 網格）
   15. 頁尾 Footer（品牌＋聯絡／產品分類／最新消息）
   16. 內頁橫幅 Page Hero（各內頁共用；背景圖＋遮罩＋小標題）
   ------------------------------------------------------------------------
   之後每完成一個區塊（footer / stats / cards…）會依序往下補上。
   ======================================================================== */

/* ==========================================
   01. Google Fonts
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@600;700&family=Inter:wght@400;500;600;700;800&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

/* ==========================================
   02. Design Tokens（依設計稿色票取樣定案）
   品牌靛藍 #111872／強調寶藍 #1A29BA／膠囊圓角
   ========================================== */
:root {
  /* Colors — Brand */
  --color-brand: #111872;
  /* 品牌深靛藍：Hero、色塊區、Footer */
  --color-brand-deep: #09153F;
  /* 更深的靛藍：Footer 底色 */
  --color-accent: #1A29BA;
  /* 強調寶藍：白底區塊上的按鈕／連結／icon */
  --color-accent-dark: #141F8C;
  /* 強調色 hover */

  /* Colors — Neutral / Text */
  --color-text: #14183A;
  /* 主要文字、標題（深靛藍黑） */
  --color-muted: #5B6072;
  /* 次要文字、內文 */
  --color-muted-light: #AEB4D6;
  /* 深色底上的次要文字 */

  /* Colors — Surface */
  --color-bg: #F9FAFF;
  /* 頁面預設背景（微冷白） */
  --color-bg-alt: #EAF0FE;
  /* 交替淺薰衣草藍區塊 */
  --color-surface: #FFFFFF;
  /* 卡片背景 */
  --color-border: #DCE3F7;
  /* 分隔線、邊框 */
  --color-timeline: rgba(26, 41, 186, 0.3);
  /* 公司沿革時間軸的軸線與左端箭頭：沿用品牌強調藍（--color-accent）降低不透明度，
     跟全站的寶藍色系一致，不再是設計稿原本取樣到的鋼藍 */
  --color-timeline-dot: var(--color-accent);
  /* 時間軸上的菱形節點：直接用強調寶藍，跟核心價值卡片圖示、按鈕同一個顏色 */
  --color-hero-btn: #F0F7FF;
  /* 深色底上的實心淺色按鈕（Hero CTA） */

  /* Colors — State */
  /* 深色底上的強調／懸停色（藍紫）：Hero 標題強調字、頁尾連結懸停、錯誤頁數字、輪播箭頭懸停共用。
     PM 2026-09-24：熱門產品箭頭懸停要用「頁尾聯絡我們的懸停色」＝這個色；合流時收成 token，原本寫死 5 處 */
  --color-accent-on-dark: #7C93FF;
  --color-danger: #EF4444;
  --color-success: #22C55E;

  /* Typography */
  --font-heading: 'Inter', 'Noto Sans TC', sans-serif;
  /* 內文用系統字體（合流 P4，PM 定案 D11）：網路字型在冷快取／慢網路下會「先系統字、載完再換」，
     整頁文字跳一次（font-display: swap 的定義就是這樣，它不是解法）。自訂字體（Inter／Noto Sans TC）
     只留給 --font-heading 標題與 --font-display 數字。
     蘋方（Mac／iOS）→ 微軟正黑（Windows）→ 已安裝的 Noto Sans TC（Android 等），都沒有才退回 sans-serif。 */
  --font-body: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Barlow', 'Inter', sans-serif;
  /* 大數字（數據列）專用字體 */
  /* 等寬字：富文本內文的行內程式碼（048）；系統內建，不另載字型 */
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* Radius — 膠囊圓角風格 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 9999px;

  /* Shadow — 柔和擴散陰影（偏品牌色調，避免死黑） */
  --shadow-md: 0 10px 30px rgba(17, 24, 114, .10);
  --shadow-lg: 0 24px 50px rgba(17, 24, 114, .16);

  /* Easing */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  /* 捲動進場專用：AOS 的 'ease-out-cubic' 原值，換掉 AOS 後照原值搬過來，節奏不變 */
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  /* 捲動進場的位移量（單一來源，改這裡全站生效）。PM 定案 24px：AOS 原本 fade-up 是 100px，
     在大區塊上「飛」得太遠，看起來像版面在跳 */
  --reveal-shift: 24px;

  /* Spacing */
  /* 區塊上下間距：平板／手機（< 1280px）是桌機的一半（PM 2026-09-24：小螢幕上 96px 空白過寬）。
     斷點在下方 @media (min-width: 1280px) 那條 :root 覆寫。 */
  --space-section: 48px;
  /* 單欄堆疊時「標題 → 說明文字」的間距（PM 2026-09-24：比照眉標 → 標題，不要再大一截） */
  --stack-head-gap: 1rem;
  /* 輪播／卡片列一次顯示幾張（平板手機）：手機 1、768 起 2、1024 起 3。
     PM 2026-09-24：同一個寬度下，每一區的張數要一致（不要上一區 3 張、下一區 2 張）。
     全站輪播與卡片網格都吃這個變數，改這裡全站一起變；桌機（≥ 1280）各區維持自己的張數。
     例外：客製詢價的服務流程是步驟清單、不是卡片，不吃這個變數。 */
  --per-view: 1;
  --container: 1440px;
}

@media (min-width: 768px) {
  :root {
    --per-view: 2;
  }
}

@media (min-width: 1024px) {
  :root {
    --per-view: 3;
  }
}

/* 🔒 v3 的「平板」是 768–1279px（PM 2026-09-24）：1024 寬度放不下左右兩欄的文字，
   雙欄版型（標題／說明、左文右圖、頁尾）一律到 1280 才展開，以下都照 768 的單欄排版。 */
@media (min-width: 1280px) {
  :root {
    --space-section: 96px;
  }
}

/* ==========================================
   02b. Tailwind 相容層
   ------------------------------------------------------------------------
   本主題原本用 https://cdn.tailwindcss.com 的執行期 JIT 引擎，官方明訂這支不建議
   正式環境使用（2026-08-28 移除，改用本地 vendor 檔＋這一段手寫 CSS，見 layout.php
   開頭註解）。cdn.tailwindcss.com 除了依 class 屬性動態產生 utility class，還會
   無條件注入一份「Preflight」基礎重置（不管有沒有用到任何 utility class 都會套用），
   拿掉 CDN 等於這兩層都要手動補，不是只補 utility class 就夠——這裡分兩段：

   【A. Utility class】全站樣板／JS 掃過，class="..." 裡實際用到的 Tailwind
   utility 只有下面這 11 個（集中在 header 固定定位、hero 的 position/overflow、
   403／404 數字強調色、<body> 的字體與底色）。不是完整的 Tailwind 相容層——
   之後如果在樣板裡加其他 utility class（例如 flex、p-4、rounded-lg…）不會有
   任何效果，要自己補規則。數值怎麼來的：
   - relative／fixed／overflow-hidden／inset-x-0／top-0／z-10／z-50 是
     Tailwind 官方預設值，移除前的 tailwind.config（theme.extend）沒有覆寫
     這幾個 key，維持官方預設。
   - text-accent／text-ink／font-body 是這個主題自訂的 theme.extend 值，
     直接沿用本檔已有的 CSS 變數（--color-accent／--color-text／--font-body，
     見「02. Design Tokens」），跟移除前 tailwind.config 寫的設定值逐一核對
     一致：accent: '#1A29BA'、ink: '#14183A'、body: ['Noto Sans TC', 'sans-serif']。
   - bg-white 沒有被 theme.extend 覆寫，是 Tailwind 內建色票，純白 #FFFFFF。

   【B. Preflight 等效重置】拿掉 CDN 後，Preflight 的全域重置也一起消失。逐一
   審過全站樣板／script.js 動態產生的 HTML／文章內文富文本（後台圖文編輯器可能
   產出任意 <p>／<ul>／<h2> 等無 class 標籤），找出真的依賴 Preflight 的地方，
   只補這些用到的標籤（不是整份 Preflight）：
   - 邊框：目前沒有任何地方用 Tailwind 的 border-* class，但表單欄位
     （.contact-form__field input/select/textarea 等）本來就沒寫 border，
     一直是靠 Preflight 的 `* { border-width: 0 }` 才没有瀏覽器預設邊框，
     拿掉會冒出瀏覽器原生的輸入框邊框。
   - 清單：全站導覽、卡片等用 <ul> 排版的地方靠 Preflight 的 `ul,ol{list-style:none}`
     拿掉項目符號。富文本內文（.nd-body／.pd-panel--rich 的 ul/ol，後台編輯器產出）
     要有符號，已在「富文本內文」那組規則明確寫回 disc／decimal，不受這條影響。
   - 標題／段落：privacy-policy.php 等頁面有沒帶 class 的 <h2>/<h3>/<p>，
     這些都已經被更高優先度的容器選擇器（如 .nd-body h2、.empty-state h3、
     .custom-inquiry__section-head h3）蓋過字重/字級/margin，這裡只是比照
     Preflight 數值補一層保險（優先度低於任何 class 選擇器，不會蓋掉已有樣式）。
   - 表單元件／按鈕：<button>/<input>/<select>/<textarea> 的字體繼承與
     瀏覽器原生外觀重置，同樣是保險層級，避免以後新增欄位/按鈕忘記重置。
   - svg：全站約 99 處 inline <svg> 圖示，目前全部都包在 inline-flex／flex
     容器裡（會被 flex 佈局「blockify」，逐一核對過 .btn-arrow、.nav-caret、
     .app-item__icon、.value-card__icon 等容器都是 flex），移除 Preflight
     實測不影響版面；仍比照官方值補上，不留疑慮。
   下面這幾條全部是低優先度的「標籤」選擇器（不是 class），任何既有的 class
   選擇器都會照舊蓋過去，不會改變任何已經有樣式的元素。
   ========================================== */
.relative { position: relative; }
.fixed { position: fixed; }
.overflow-hidden { overflow: hidden; }
.inset-x-0 { left: 0; right: 0; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.text-accent { color: var(--color-accent); }
.text-ink { color: var(--color-text); }
.font-body { font-family: var(--font-body); }
.bg-white { background-color: #FFFFFF; }
/* 合流 P4 補上（B10）：只給螢幕報讀器讀、畫面上不顯示。移除 Tailwind 時漏了這一條，
   型錄搜尋框前多出一行標籤、窄螢幕分類下拉與文章分類下拉的標籤外露、客製詢價露出原生檔案選擇框。 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

*,
*::before,
*::after {
  border-width: 0;
  border-style: solid;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

p, blockquote, dl, dd, hr {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* 屬性選擇器包 :where()（⑭ 2026-10-06）：[type='button'] 權重 0,1,0 會蓋過 SweetAlert2 的
   div:where(.swal2-container) button:where(.swal2-confirm)（0,0,2），所有彈窗的確定／取消鈕
   變成白字透明底。reset 本來就該是最低權重，讓任何元件樣式都能蓋過它 */
button, :where([type='button'], [type='submit'], [type='reset']) {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

button, [role='button'] {
  cursor: pointer;
}

svg {
  display: block;
  vertical-align: middle;
}

/* ==========================================
   03. Base Reset
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  margin: 0;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================
   捲動進場（reveal）——取代 AOS（合流 P4，PM 版 5-A A7）
   ==========================================
   原本：AOS ＋ `.js [data-aos] { opacity: 0 }`（無條件隱藏）。只要 AOS 沒跑起來
   （腳本報錯、檔案沒載到、瀏覽器擋），整頁內容就永遠看不見——實測關掉 JS 首頁可見文字 0/23。
   現在：
     ① 沒有 .reveal-on → 內容完全正常可見。JS 沒跑＝沒有動畫，不是空白頁。
     ② script.js 的 setupReveal 在換頁遮罩收起前補上 .reveal-on，隱藏起始狀態由這裡提供、不會閃。
     ③ 元素捲進視窗時加上 .is-revealed 播放，播完不再觀察（＝AOS 的 once）。
   HTML 寫法：data-reveal（原 data-aos="fade-up"）、data-reveal-delay="100"（原 data-aos-delay）。 */
.reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition:
    opacity .7s var(--ease-out-cubic),
    transform .7s var(--ease-out-cubic);
}

.reveal-on [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* 延遲只有這幾個離散值（全站實際用到的），所以各寫一條，不由 JS 寫 inline style。
   列表的逐張延遲在 script.js 已收斂成 100 的倍數、最多 500。 */
.reveal-on [data-reveal-delay="100"] { transition-delay: .1s; }
.reveal-on [data-reveal-delay="150"] { transition-delay: .15s; }
.reveal-on [data-reveal-delay="200"] { transition-delay: .2s; }
.reveal-on [data-reveal-delay="250"] { transition-delay: .25s; }
.reveal-on [data-reveal-delay="300"] { transition-delay: .3s; }
.reveal-on [data-reveal-delay="400"] { transition-delay: .4s; }
.reveal-on [data-reveal-delay="500"] { transition-delay: .5s; }

/* 全站頁面過場：純色遮罩，不做任何圖案/圖片效果，只有收起/蓋上兩個動作，要俐落乾脆。
   遮罩用 html::before（不是塞在 <body> 裡的 <div>），純 CSS＋一個 class 就能做到，
   不用每一頁都手動加一段 HTML；<html> 上的 class 是在 <head> 最前面就用行內 <script> 打上去的
   （跟同一行加 .js 的手法一樣），確保外部樣式表還沒載入、內容都還沒畫出來之前遮罩就已經蓋著，
   不會有進頁面先閃一下內容才蓋上去的問題。
   script.js（放在 </body> 前）進場時把 .is-revealing 加上去、收起遮罩；
   點站內連結離開時先把 .is-revealing 拿掉、蓋上遮罩，等動畫跑完才真的換頁 */
html.is-transitioning::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--color-brand-deep);
  transform: scaleY(1);
  transform-origin: top;
  transition: transform .35s cubic-bezier(.65, 0, .35, 1);
}

html.is-transitioning.is-revealing::before {
  transform: scaleY(0);
}

/* 🔴 保險（合流 P4，C13）：遮罩在 <head> 就蓋上，原本「只有」script.js 能把它收起來——
   只要 script.js 沒載到或中途報錯，整頁就被深藍色蓋住、什麼都看不到。
   這裡讓遮罩在 3 秒後自己收起。只用 fill-mode: forwards（不用 both／backwards）：
   延遲期間動畫不介入，JS 正常時照舊由 .is-revealing＋transition 收起，看不出差別。 */
@keyframes page-mask-failsafe {
  to { transform: scaleY(0); }
}

html.is-transitioning:not(.is-revealing)::before {
  animation: page-mask-failsafe .35s ease 3s forwards;
}

@media (prefers-reduced-motion: reduce) {
  html.is-transitioning::before {
    transition: none;
  }
}

/* ==========================================
   04. 全局共用：版心容器
   ========================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ==========================================
   05. 英文小標 eyebrow / 區塊主標題
   ========================================== */
.eyebrow {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.eyebrow--light {
  color: #FFFFFF;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  font-size: clamp(1.625rem, 1rem + 1.9vw, 2.625rem);
}

.section-title--light {
  color: #FFFFFF;
}

/* ==========================================
   06. 導覽列 Header：浮動膠囊導覽列（inset 於 Hero／色塊上方，非滿版）
   ========================================== */
.brand-logo {
  height: 2.25rem;
  width: auto;
  display: block;
  flex-shrink: 0;   /* logo 是 flex item，不加這條會在窄視窗被壓扁變形（309:82 的比例會跑掉） */
}

@media (min-width: 1100px) {
  .site-nav .brand-logo {
    height: 2.5rem;
  }
}

.site-nav {
  /* position:fixed／inset-x-0／top-0／z-50 已由 HTML 上的 .fixed .inset-x-0 .top-0
     .z-50 這幾個 utility class 提供（見「02b. Tailwind 相容層」），這裡不用再設 */
  background-color: transparent;
  padding-inline: 1rem;
  padding-top: 1rem;
  transition: padding .35s ease;
}

@media (min-width: 640px) {
  .site-nav {
    padding-inline: 1.5rem;
    padding-top: 1.25rem;
  }
}

@media (min-width: 1280px) {
  .site-nav {
    /* ③ PM 2026-08-17 定案：header 左右貼近視窗邊緣，與一般區塊內容（.container 的
       padding-inline: 20px）對齊。原值 8rem＝128px，比內容區多出 108px。
       PM 2026-09-24 再定案：全站寬度統一，Hero 也改回全站 .container（原本 8rem 的特例已移除）。 */
    padding-inline: 20px;
    padding-top: 1.5rem;
  }
}

/* 捲動後：上下內距收小，讓內容更貼近滿版底色的頂端（左右內距維持不變，寬度／位置不受影響） */
.site-nav.is-scrolled {
  padding-top: 0;
}

/* 捲動後的實色背景：獨立一層，鋪滿 .site-nav 整個版面（不受 .site-nav 自己的 padding 影響），
   達到「底色滿版貼齊頂部」；內部的 .site-nav__bar 仍吃 .site-nav 的 padding，內容位置完全不變 */
.site-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: #09143F;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, box-shadow .3s ease;
}

.site-nav.is-scrolled::before {
  opacity: 1;
  box-shadow: 0 8px 20px rgba(9, 21, 63, .25);
}

/* 置頂：浮動膠囊本體，白色玻璃感（半透明白底＋模糊）＋細白邊框
   （桌機／手機共用，膠囊本身永遠顯示；漢堡展開的 #mobile-menu 是另一塊，不要搞混）
   捲動後（.is-scrolled）：底色交給上面的 .site-nav::before（滿版），
   自己變透明只保留內容位置，避免膠囊圓角/邊框跟滿版底色打架 */
.site-nav__bar {
  /* ③ 與內容區對齊：.container 是 max-width:1440px ＋ margin-inline:auto ＋ padding-inline:20px，
     所以「內容左緣」在窄視窗是 20px、在寬視窗則因 max-width 收斂而內縮。
     header 若只把 padding 改成 20px，只有 ≤1440px 對得齊——實測 1600px 差 72px、1920px 差 232px。
     這裡讓膠囊跟著收斂：max-width 取「container 寬度扣掉它的左右 padding」，
     膠囊左緣就等於內容左緣，**所有寬度都對齊**（實測 1280／1440／1600／1920 皆差 0px）。 */
  max-width: calc(var(--container) - 40px);
  margin-inline: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1.5rem 0.7rem 1.5rem;
  background-color: rgb(191 208 255 / 16%);
  border: 0.5px solid rgba(255, 255, 255, .4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md), 0 0 18px rgba(255, 255, 255, .2);
  transition: background-color .3s ease, box-shadow .3s ease, border-radius .35s ease, border-color .35s ease;
}

.site-nav.is-scrolled .site-nav__bar {
  background-color: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* 桌機導覽連結：佔據 logo 與右側按鈕之間的剩餘空間並置中。
   🔴 原本是 position:absolute + left:50% + translate(-50%,-50%) 的「絕對置中」。
   那樣做選單完全不與右側的 .nav-actions 互相避讓——項目一多或文字一長就直接**覆蓋**上去。
   合流前實測：1280px 重疊 109px、1366px 78px、1440px 41px（PM 2026-08-17 截圖回報同一問題）。
   本主題的導覽項目與客製詢價按鈕文字租戶都能在後台改，項目越多越嚴重。
   改為回到正常流、用 flex:1 佔據中間剩餘空間並置中內容 → 三組元素互相避讓。
   ⚠️ 取捨：這是「視覺置中」（剩餘空間的中央）而非「幾何置中」（視窗正中）。
   左右兩側寬度不等時選單會略偏，但**不會再重疊**——這是刻意選的。
   **置中要用 flex 三欄，不要用 absolute。** */
.nav-desktop {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  min-width: 0;   /* flex item 預設 min-width:auto，內容過長時不會縮 → 仍可能擠爆右側 */
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;   /* 選單文字不換行（2026-10-15） */
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: #FFFFFF;
  padding-block: 0.25rem;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s ease;
}

/* 底線改從正中央往左右展開：固定在置中位置（left:50% + translateX(-50%)），
   用 scaleX(0→1) 而不是 width(0→100%)，這樣兩側才會同步往外長，不是單純從左邊長過去 */
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: 1px;   /* PM 2026-09-23 合流定案改 1px（原 2px 過粗）。hover 與 aria-current 共用這條規則，改一處兩態同步 */
  /* 底線跟著文字色走（PM 2026-09-24）：懸停時文字變寶藍、底線一起變；目前所在頁文字是白、底線就是白 */
  background-color: currentColor;
  transform: translateX(-50%) scaleX(0);
  transition: transform .25s ease;
}

.nav-link:hover {
  /* PM 2026-09-24 改定：懸停色＝ --color-accent-on-dark #7C93FF（頁尾連結、輪播箭頭同一個藍紫）。
     取代 2026-08-17 的 #1A29BA（在深色 nav 底上對比偏低）。底線跟著文字色（currentColor）一起變。
     ⚠️ 手機選單的 .mobile-nav__link／__sublink／.nav-lang-option.is-active 那 3 處是「目前所在」標示、
     不是懸停，維持淺藍 #BFD0FF。 */
  color: var(--color-accent-on-dark);
}

.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-link[aria-current="page"]::after {
  transform: translateX(-50%) scaleX(1);
}

/* 下拉選單（產品型錄／最新消息分類、語言切換）：hover／focus-within 展開 */
.nav-item {
  position: relative;
}

.nav-caret {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform .25s ease;
}

.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 12rem;
  margin-top: 0.75rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, .98);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 20;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-dropdown ul {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nav-dropdown a,
.nav-dropdown button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9375rem;
  color: var(--color-text);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.nav-dropdown a:hover,
.nav-dropdown button:not([disabled]):hover {
  background-color: var(--color-bg-alt);
  color: var(--color-accent);
}

.nav-lang-option.is-active {
  color: var(--color-accent);
  font-weight: 600;
}

/* 右側：導覽列的兩顆按鈕（桌機）。尺寸縮小、不吃 .btn 的基礎大小，
   避免撐高整條導覽膠囊——原本只有一顆 .btn-ghost 縮小過，現在兩顆都要縮小才會等高，
   高度也才會跟改版前一樣。
   用 .btn.btn--nav-cta（兩個 class 疊起來）拉高優先度：.btn 本身的 min-height/padding
   宣告在後面，跟這裡同樣只有「一個 class」的優先度打平時是後面的贏，單寫 .btn--nav-cta
   完全沒用、會被 .btn 蓋掉，這也是先前改了兩次都「感覺沒變」的原因 */
.btn.btn--nav-cta {
  min-height: 2.5rem;
  padding: 0.5rem 1.35rem;
  font-size: 1rem;
}

/* 導覽列按鈕 hover 不要位移，同樣要疊 .btn class 才能穩定蓋過按鈕 :hover 的 transform 宣告 */
.btn.btn--nav-cta:hover {
  transform: none;
}

/* 🔴 必須疊成 .btn.btn--nav-cta（兩個 class）才蓋得過 .btn 的 display。
   單寫 .btn--nav-cta 與 .btn 同為一個 class 的權重，而 `.btn { display: inline-flex }`
   宣告在後面（按鈕系統段）→ 後者贏，這條 display:none **從來沒有生效過**。
   後果：這兩顆按鈕在手機上一直顯示，把 logo 擠到 0px 寬（375px 下完全消失）、按鈕擠成橢圓形。
   ⚠️ 上方 .btn.btn--nav-cta 的註解早就寫明同一個坑（min-height／padding 也踩過），
   當時修了那兩個屬性卻沒發現 display 犯一模一樣的錯——**同一份檔案裡的同類問題要一起掃**。 */
.btn.btn--nav-cta {
  display: none;
}

/* 漢堡按鈕（窄版顯示） */
.nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #FFFFFF;
  flex-shrink: 0;
}

.nav-burger__bars {
  position: relative;
  /* 線條寬度取 1.375rem＝22px，與旁邊 .nav-cart svg 同寬，兩顆圖示視覺重量才一致。
     原本是 2.5rem＝40px（與按鈕觸控區同寬），線條長到蓋過旁邊所有元素。
     ⚠️ 觸控區維持在 .nav-burger 的 2.5rem，這裡縮的只有線條本身。 */
  width: 1.375rem;
  height: 14px;   /* 配合縮短後的寬度收斂高度，維持接近 Lucide Menu 的長寬比 */
}

.nav-burger__bar {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: top .3s ease, transform .3s ease, opacity .2s ease;
}

.nav-burger__bar:nth-child(1) {
  top: 0;
}

.nav-burger__bar:nth-child(2) {
  top: 6px;
}

.nav-burger__bar:nth-child(3) {
  top: 12px;
}

.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(2) {
  opacity: 0;
}

.nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* 桌機／窄版切換：務必放在 .nav-desktop / .btn--nav-cta / .nav-burger 基礎規則「之後」，
   CSS 層疊在同權重時以來源順序決勝負，寫在前面會被後面的基礎規則蓋掉而失效 */
@media (min-width: 1100px) {
  .nav-desktop {
    display: flex;
  }

  .btn.btn--nav-cta {
    display: inline-flex;   /* 同上：要疊兩個 class 才蓋得過 .btn */
  }

  .nav-burger {
    display: none;
  }
}

/* 手機下拉選單：獨立浮動卡片，位於膠囊導覽列下方
   白色玻璃感（半透明白底＋模糊）＋下緣彩色反光（::before 柔光色塊，藏在 overflow:hidden 內） */
#mobile-menu {
  position: relative;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  /* ⑤⑥ 收合時完全不佔高度：margin 與 border 只在 .is-open 時才給。
     原本 margin-top:0.75rem ＋ 上下 border 各 1px ＝ **收合狀態仍佔 14px**，
     那正是「捲動後 header 上 0／下 14 不對稱」的來源。
     ⚠️ 外距只能加在面板本身，不能加在內層 nav——加在內層的話收合時會撐出一條縫。 */
  margin: 0;
  border: 0 solid rgba(255, 255, 255, .45);
  /* ④ 15% 白底＋白字（PM 2026-08-17 定案方案 A；2026-09-23 合流時再次確認）。
     ⚠️ 已知取捨：.site-nav 是 position:fixed，選單背後是「當下捲到哪裡」的內容，
     不是頁面頂部的 banner。實測捲到頁面中段時背後是近白色，
     白字對白底只有 1.04:1 ＝ 幾乎看不見；頁面頂部則是 9.91:1 沒問題。
     PM 已知悉此取捨。若要換方案 B，只需把下面這個色值改成 rgba(9, 20, 63, .82)，
     文字維持白色即可，其餘一律不動。 */
  background-color: rgb(255 255 255 / 15%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transition: grid-template-rows .32s ease, opacity .32s ease;
}

/* 開啟時才給外距與邊框——收合時完全不佔高度（見上方說明）。
   ④ PM 2026-08-17：下緣與頁面深藍背景的間距加大 → 下 1.375rem(22px)、上 0.75rem(12px)。 */
#mobile-menu.is-open {
  margin: 0.75rem 0 1.375rem;
  border-width: 1px;
  grid-template-rows: 1fr;
  opacity: 1;
}

#mobile-menu>nav {
  min-height: 0;
  overflow: hidden;
}

/* 下緣彩色反光：品牌強調色的柔光色塊，貼在選單底部、模糊暈開（加深加大，反光更明顯） */
#mobile-menu::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: -15%;
  width: 140%;
  height: 65%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(124, 147, 255, .95) 0%, rgba(26, 41, 186, .75) 45%, rgba(124, 147, 255, 0) 78%);
  filter: blur(24px);
  pointer-events: none;
}

.mobile-menu__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 2.5rem 2.5rem;
  max-height: calc(100vh - 8rem - var(--admin-bar-h, 0px));   /* 有前台管理列時一併扣掉，否則選單底部超出視窗捲不到 */
  overflow-y: auto;
}

.mobile-nav__link {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .22);   /* ④ 配白字：原本是配白底的深色線，15% 白底下看不見 */
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: #FFFFFF;   /* ④ PM 2026-08-17 定案：15% 白底＋白字 */
}

.mobile-nav__link:hover,
.mobile-nav__link[aria-current="page"] {
  color: #BFD0FF;   /* ④ 白字方案下的「目前所在」標示：--color-accent 深寶藍在半透明白底上幾乎看不見，改用 v3 深底既有的淺藍 */
}

/* 手機版分類手風琴（產品型錄／最新消息／語言切換）：點按鈕展開子選單 */
.mobile-nav__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .22);   /* ④ 配白字：原本是配白底的深色線，15% 白底下看不見 */
  cursor: pointer;
  text-align: left;
}

.mobile-nav__group .mobile-nav__toggle {
  border-bottom: 0;
}

.mobile-nav__toggle .nav-caret {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  transition: transform .25s ease;
}

.mobile-nav__toggle[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.mobile-nav__group {
  border-bottom: 1px solid rgba(255, 255, 255, .22);   /* ④ 配白字：原本是配白底的深色線，15% 白底下看不見 */
}

.mobile-nav__submenu {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows .25s ease;
}

.mobile-nav__submenu>div {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mobile-nav__group.is-open .mobile-nav__submenu {
  grid-template-rows: 1fr;
}

/* 下緣留白只在展開時加（PM 2026-09-24）：原本收合時也在，0fr 的列高仍含這 8px 內距，
   分類群組的文字就比其他項目偏上（上 19px、下 27px），沒有在上下分隔線之間置中 */
.mobile-nav__group.is-open .mobile-nav__submenu>div {
  padding-bottom: 0.5rem;
}

.mobile-nav__sublink {
  padding: 0.65rem 0 0.65rem 1rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, .82);   /* ④ 白字；比主項目略淡以區分層級 */
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.mobile-nav__sublink:hover,
.mobile-nav__sublink.is-trail,
.mobile-nav__sublink[aria-current="page"] {
  color: #BFD0FF;   /* ④ 白字方案下的「目前所在」標示：--color-accent 深寶藍在半透明白底上幾乎看不見，改用 v3 深底既有的淺藍 */
}

.mobile-nav__sublink[aria-current="page"] {
  font-weight: 600;
}

.mobile-nav__sublink.nav-lang-option.is-active {
  color: #BFD0FF;   /* ④ 白字方案下的「目前所在」標示：--color-accent 深寶藍在半透明白底上幾乎看不見，改用 v3 深底既有的淺藍 */
  font-weight: 600;
}

/* ------------------------------------------
   導覽三層（合流 P2，PM 版 I2④）：桌機階梯式飛出＋手機縮排清單
   HTML 由 partials/header.php 輸出。手機因 script.js 的手風琴是「開一個就關掉其他全部」
   而不能巢狀，改用同一層內的縮排清單完整呈現三層。
   🔴 飛出面板刻意**不叫** .nav-dropdown：`.nav-item:hover .nav-dropdown` 是後代選擇器，
   同名會讓所有層在 hover 主項目時一次全開。
   ------------------------------------------ */
.nav-casc__item {
  position: relative;   /* 飛出層的定位基準 */
}

.nav-casc__link {
  white-space: nowrap;
}

/* 分類的「目前所在」標示（PM 2026-09-24：點進分類後選單要看得出停在哪）。
   標示由 script.js 的 markNavCategory() 掛上：所在分類＝aria-current="page"，它的上層＝.is-trail。
   上層也標，是因為下拉平常收著，打開時要能沿著路徑一路找到目前那一格。 */
.nav-casc__link[aria-current="page"],
.nav-casc__link.is-trail {
  color: var(--color-accent);
}

.nav-casc__link[aria-current="page"] {
  font-weight: 600;
}

.nav-casc__chev {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.nav-casc__sub {
  position: absolute;
  top: -0.5rem;    /* 對齊父面板的 padding，讓兩層的內容上緣切齊 */
  left: 100%;      /* 貼著父面板右緣展開，中間不留空隙——有空隙滑鼠移過去就會斷掉 */
  min-width: 12rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, .98);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 1;
}

.nav-casc__item:hover > .nav-casc__sub,
.nav-casc__item:focus-within > .nav-casc__sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* 手機：三層用縮排區分（基礎 padding-left 1rem 由 .mobile-nav__sublink 提供） */
.mobile-nav__sublink--cat {
  font-weight: 500;
  color: #FFFFFF;   /* 主分類比子層亮一階（手機選單是 15% 白底＋白字，見 P1） */
}

.mobile-nav__sublink--sub {
  padding-left: 2rem;
}

.mobile-nav__sublink--leaf {
  padding-left: 3rem;
  font-size: 0.875rem;   /* 14px，仍在可見文字下限之上 */
}

@media (min-width: 1100px) {
  #mobile-menu {
    display: none !important;
  }
}

html.is-menu-open,
html.is-menu-open body,
html.is-lightbox-open,
html.is-lightbox-open body {
  overflow: hidden;
}

/* ------------------------------------------
   按鈕系統（膠囊圓角）
   ------------------------------------------ */
/* 說明文字下方的按鈕列（PM 2026-09-24：全站按鈕放在說明文字下方、寬度只跟文字長短走）。
   間距只有這一個來源；按鈕是 inline-flex 放在這個 flex 容器裡，不會被網格拉成整列寬。 */
.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* 區塊按鈕的位置（PM 2026-09-24）：桌機在說明文字下方（--inline）；平板手機移到整個區塊內容之後、置中（--end）。
   單欄堆疊時說明後面緊接著按鈕，內容還沒看完就先被引導跳頁。HTML 兩處都輸出同一顆按鈕，這裡依寬度只顯示一處。 */
.section-actions--end {
  justify-content: center;
  margin-top: var(--body-gap-action);   /* ㉙-12：區塊內容 → 下方置中按鈕，全站一個值（見檔尾 ㉙） */
}

@media (max-width: 1279.98px) {
  .section-actions--inline {
    display: none;
  }
}

/* 放在已有 gap 的容器裡時，扣掉容器的 gap 再補到 --body-gap-action（不然 gap＋上外距會疊成兩倍）。
   合作客戶／精選分類的容器 gap 是 2.5rem（<1280），公司簡介／核心優勢的網格列距是 --stack-head-gap */
.partners__grid>.section-actions--end,
.product-teaser__row>.section-actions--end {
  margin-top: calc(var(--body-gap-action) - 2.5rem);
}

.about-intro__grid>.section-actions--end {
  margin-top: calc(var(--body-gap-action) - var(--stack-head-gap));
}

@media (min-width: 1280px) {
  .section-actions--end {
    display: none;
  }
}

/* ㉓-3（PM 10/16）：手機（< 768）首頁／關於我們的區塊按鈕、Hero、CTA 廣告區的按鈕全寬；兩顆並排的改成上下各一顆，順序不變（主按鈕在上）。
   規則寫在容器上，不逐顆按鈕加。其他頁的功能按鈕（加入詢價、送出、回首頁…）不在範圍內、維持原樣（被否決：全站按鈕手機一律全寬）。
   .section-actions--end 只出現在首頁／關於我們（桌機那顆 --inline 在 < 1280 已隱藏）；.news-teaser__actions＝首頁最新消息那顆。 */
@media (max-width: 767.98px) {
  .section-actions--end,
  .news-teaser__actions,
  .hero__ctas,
  .cta-band__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .section-actions--end > .btn,
  .news-teaser__actions > .btn,
  .hero__ctas > .btn,
  .cta-band__actions > .btn {
    width: 100%;
  }
}

/* ㉜-6（PM 10/28，比照 v1 ㉛-2c）：手機（< 768）頁面層級的功能按鈕也和框架同寬——聯絡表單送出、404／403「回首頁」、
   詢價成功頁、詢價單空狀態。文字與箭頭置中（.btn 已 justify-content:center）、箭頭在文字後（樣板順序）、長文字換行。
   只撐按鈕本身（align-self），容器不改 align-items：404／詢價成功頁按鈕下方的文字連結維持依文字寬度置中。
   上面 ㉓-3「其他頁功能按鈕維持原樣」的範圍由這條補上；㉜-6b（PM 10/28）補客製詢價送出、產品／文章找不到頁的按鈕。
   .btn.contact-form__submit、.btn.custom-inquiry__submit 疊寫提權重：原規則（justify-self:start／align-self:flex-start）寫在後面，同權重會蓋掉這裡。
   不在範圍：頁首、輪播箭頭、數量欄、加入詢價鈕、清單列內鈕、已同寬的（上面 ㉓-3、填寫詢價資料送出鈕）。
   被否決：依文字寬度、內容下方置中（PM 10/27：位置一下靠左一下置中，不整齊）。 */
@media (max-width: 767.98px) {
  .btn.contact-form__submit,
  .btn.custom-inquiry__submit,
  .error-hero__actions > .btn,
  .inquiry-success__actions > .btn,
  #inq-empty > .empty-state > .btn,
  #pd-not-found > .empty-state > .btn,
  #nd-not-found > .empty-state > .btn {
    width: 100%;
    justify-self: stretch;
    align-self: stretch;
    white-space: normal;
    text-align: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}

/* Hero 用：深色底上的實心白按鈕，hover 轉淡藍 */
.btn-hero {
  background-color: #FFFFFF;
  color: var(--color-brand);
}

.btn-hero:hover {
  background-color: var(--color-hero-btn);
  transform: translateY(-2px);
}

/* Hero 用：按鈕二（次要 CTA），外框樣式跟主按鈕（實心白）做出區隔 */
.btn-hero-outline {
  background-color: transparent;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, .6);
}

.btn-hero-outline:hover {
  background-color: rgba(255, 255, 255, .12);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

/* 白底區塊用：強調寶藍實心按鈕 */
.btn-accent {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.btn-accent:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-2px);
}

/* 導覽列「客製詢價」：實心淺色按鈕（F0F7FF 底、品牌深藍字），非外框。
   不覆寫尺寸——維持跟 .btn-accent 一樣的 .btn 基礎大小，兩顆導覽按鈕才會等高等寬邏輯一致 */
.btn-ghost {
  background-color: #FFFFFF;
  color: var(--color-brand);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.btn-arrow {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  transition: transform .25s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ==========================================
   輪播滑動手勢（㉗-8，JS 的 bindSwipe() 加上 .swipe-area）：
   只把橫向手勢交給輪播，直向捲動與雙指縮放照常由瀏覽器處理；
   拖曳中停用選字、游標換成抓取。JS 沒跑就沒有這個 class，頁面不受影響
   ========================================== */
.swipe-area {
  touch-action: pan-y pinch-zoom;
}

.swipe-area.is-dragging {
  cursor: grabbing;
  user-select: none;
}

/* ==========================================
   07. Hero（首頁）：背景圖交叉淡入輪播 + 下緣雙欄文字輪播
   ========================================== */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--color-brand);
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-top: 9rem;
  padding-bottom: 7rem;
}

@media (max-width: 767.98px) {
  .hero {
    min-height: 42rem;
    padding-top: 7.5rem;
    padding-bottom: 5.5rem;
  }
}

/* Hero 內容寬度：沿用全站 .container（max-width 1440＋左右 20px），與導覽列、下方各區塊對齊。
   🔒 PM 2026-09-24：全站寬度統一。原本 Hero 另設 1rem／2.5rem／8rem 的左右留白（當時要對齊舊版 header），
   header 在合流 P1 已改成對齊內容區，Hero 的特例就拿掉，不要再加回來。 */

/* 背景圖：與文字輪播同步交叉淡入（結構同 .hero-slide 慣例） */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

/* 黑色遮罩：獨立圖層（非 ::after），日後要調深淺／換漸層方向只需改這裡的 --hero-mask-* 變數 */
.hero-bg__mask {
  position: absolute;
  inset: 0;
  --hero-mask-from: rgba(0, 0, 0, .25);
  --hero-mask-to: rgba(0, 0, 0, .7);
  background: linear-gradient(180deg, var(--hero-mask-from) 0%, var(--hero-mask-to) 100%);
}

/* 平板／手機：單欄，標題在上、說明＋按鈕在下（v3 平板規則，1280 起才分兩欄）。
   🔴 原本靠 flex-wrap＋min-width 自動換行，768 時兩欄仍並排——這種「沒有斷點的雙欄」
   掃 @media 找不到，改成明確的斷點。 */
.hero__row {
  display: flex;
  flex-direction: column;
  gap: var(--stack-head-gap);
  width: 100%;
}

/* 桌機：下緣並排雙欄，左＝眉標＋大標題（主角）；右＝輔助說明＋CTA 按鈕，各占一半。
   ㉓-1（PM 10/16）：右欄頂端對齊「標題」而不是眉標。做法＝兩列網格：第 1 列只放眉標，標題與右欄都從第 2 列開始；
   眉標包在 .hero__headline > #hero-headline 兩層裡（#hero-headline 由 JS 換內容、做淡入淡出），兩層都用 subgrid 把眉標／標題交給外層的列。
   眉標留空不輸出時第 1 列高度是 0，右欄直接對齊標題、不留空白位移。被否決：右欄寫死 padding-top（眉標換行或留空就對不齊）。 */
@media (min-width: 1280px) {
  .hero__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;   /* PM 2026-09-24：兩欄頂端對齊（原本底部對齊） */
    column-gap: 7rem;
    row-gap: 0;
  }

  .hero__headline,
  #hero-headline {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-rows: subgrid;
    min-width: 0;
  }

  #hero-headline > .hero-eyebrow { grid-row: 1; }
  #hero-headline > .hero-title { grid-row: 2; }

  .hero__aside {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
  }
}

#hero-headline,
#hero-aside,
#hero-ctas {
  transition: opacity .26s ease;
}

#hero-headline.is-fading,
#hero-aside.is-fading,
#hero-ctas.is-fading {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

  #hero-headline,
  #hero-aside,
  #hero-ctas {
    transition: none;
  }
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  text-transform: uppercase;
  color: #BFD0FF;
  margin: 0 0 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.28;
  color: #FFFFFF;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
  margin: 0;
}

.hero-title .text-accent {
  color: var(--color-accent-on-dark);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  margin-top: 1.5rem;   /* 按鈕在說明文字下方（PM 2026-09-24） */
}

.hero-desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.85;
  color: #FFFFFF;
}

/* 輪播控制：左右箭頭（垂直置中於左右緣） */
.hero-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding-inline: 1rem;
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .hero-nav {
    display: none;
  }
}

.hero-nav button {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .2s ease;
}

.hero-nav button:hover {
  background-color: rgba(255, 255, 255, .22);
}

.hero-nav svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 輪播控制：底部圓點，外層包一個藥丸框（比照導覽列膠囊玻璃感） */
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: rgb(255 255 255 / 16%);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: var(--radius-full);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hero-dots button {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, .35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color .2s ease, width .2s ease;
}

.hero-dots button.is-active {
  width: 1.5rem;
  background-color: #FFFFFF;
}

/* ==========================================
   08. 核心優勢（首頁）：左＝標題＋優勢卡片／右＝說明＋照片；下方三欄數據列
   ========================================== */
.about-intro {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

/* ==========================================
   23. 詢價送出成功頁（/inquiry/success）
   ========================================== */
.inquiry-success {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.inquiry-success__card {
  max-width: 34rem;
  margin: 0 auto;
  padding: 3rem;
  text-align: center;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.inquiry-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-alt);
  color: var(--color-accent);
}

.inquiry-success__icon svg {
  width: 2rem;
  height: 2rem;
}

.inquiry-success__title {
  margin: 1.5rem 0 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--color-text);
}

.inquiry-success__desc {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-muted);
}

.inquiry-success__desc strong {
  color: var(--color-text);
}

.inquiry-success__number {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-top: 2rem;
  padding: 1.25rem;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-sm);
}

.inquiry-success__number-label {
  font-size: 1rem;
  color: var(--color-muted);
}

.inquiry-success__number-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.8rem;
  letter-spacing: .02em;
  color: var(--color-accent);
}

.inquiry-success__hint {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--color-muted);
}

.inquiry-success__actions {
  margin-top: var(--head-gap-action-sm);   /* ㉙-12：卡片內小標頭 說明 → 按鈕（原 2rem） */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.inquiry-success__continue {
  font-size: 1rem;
  color: var(--color-muted);
  transition: color .2s ease;
}

.inquiry-success__continue:hover {
  color: var(--color-accent);
}

/* ==========================================
   22. 填寫詢價資料頁（/inquiry/submit）：左表單／右唯讀清單摘要
   表單欄位沿用聯絡我們頁的 .contact-form__row/.contact-form__field
   ========================================== */
.inquiry-submit {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.inquiry-submit__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .inquiry-submit__grid {
    grid-template-columns: 1fr 20rem;
    gap: 3rem;
  }
}

/* 跟客製詢價頁的 .custom-inquiry__form 同一套外殼：白底＋邊框＋圓角，
   間距層級也統一（1.5rem 大區塊／1rem 並排欄位／0.5rem 標籤—輸入框） */
.inquiry-submit__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.inquiry-submit__form .contact-form__row {
  gap: 1rem;
}

.inquiry-submit__form .contact-form__field input,
.inquiry-submit__form .contact-form__field select,
.inquiry-submit__form .contact-form__field textarea {
  padding: 0.875rem 1.5rem;
  background-color: #F3F7FE;
}

.inquiry-submit__form .contact-form__field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6072' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

/* 表單載入失敗的提示（④-2：成功狀態那個寫死「一個工作天內」的藍框已移除，只剩這個用途） */
.inquiry-submit__note {
  display: flex;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-muted);
}

.inquiry-submit__note svg {
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  color: var(--color-accent);
}

.inquiry-submit__note strong {
  color: var(--color-text);
}

.inquiry-submit__button {
  /* ㉚（PM 10/27）：寬度＝表單卡片內容寬、文字與箭頭置中（.btn 本身已置中）。
     父層是 flex 直排，用 align-self: stretch 撐滿；原本 justify-self:start 在非 grid 父層無效 */
  align-self: stretch;
  margin-top: 0.5rem;
}

/* 右欄摘要清單裡的唯讀商品項目（沿用 .inquiry-summary 卡片外殼） */
.inquiry-summary__items {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1.25rem;
}

.isub-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.isub-item__media {
  flex: 0 0 3rem;
  width: 3rem;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.isub-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.isub-item__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
}

.isub-item__qty {
  margin: 0.125rem 0 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.inquiry-summary__edit-link {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-accent);
}

.inquiry-summary__edit-link:hover {
  color: var(--color-accent-dark);
}

/* ==========================================
   21. 詢價清單確認頁（/inquiry）：左商品清單／右詢價摘要卡片
   ========================================== */
.inquiry-list {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.inquiry-list__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .inquiry-list__grid {
    grid-template-columns: 1fr 20rem;
    gap: 3rem;
  }
}

.inquiry-list__items {
  display: flex;
  flex-direction: column;
  /* 跟品項卡片之間的 .custom-items__list 統一，都是 1rem */
  gap: 1rem;
}

.inquiry-item {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  gap: 1.25rem;
  padding: 2rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.inquiry-item__media {
  grid-row: span 2;
  width: 6rem;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.inquiry-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inquiry-item__name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--color-text);
}

.inquiry-item__sku {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  color: var(--color-muted-light);
}

.inquiry-item__moq {
  font-weight: 500;
  margin: 0.375rem 0 0;
  font-size: 1rem;
  color: var(--color-accent);
}

.inquiry-item__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-full);
  background: none;
  border: 0;
  color: var(--color-muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.inquiry-item__remove:hover {
  background-color: var(--color-bg-alt);
  color: #D2402D;
}

.inquiry-item__remove svg {
  width: 1.125rem;
  height: 1.125rem;
}

.inquiry-item__qty {
  grid-column: 2 / 3;
  display: flex;
  flex-wrap: wrap;   /* MOQ 提示（.inquiry-item__moq-hint）放不下時換行到數量框下方 */
  align-items: center;
  gap: 0.75rem;
}


.inquiry-item__qty-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.inquiry-item__qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: none;
  border: 0;
  font-size: 1.125rem;
  color: var(--color-text);
  cursor: pointer;
}

.inquiry-item__qty-btn:hover:not(:disabled) {
  background-color: var(--color-bg-alt);
}

/* 數量到下限（MOQ）時減號停用（P9）；產品詳情頁的 .pd-qty__btn 同一套 */
.inquiry-item__qty-btn:disabled,
.pd-qty__btn:disabled {
  color: var(--color-muted-light);
  cursor: not-allowed;
}

.inquiry-item__moq-hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.inquiry-item__qty input {
  /* ㉚：放得下「9,999,999」（7 位數＋逗號，量過 6.5rem 完整可見）；type=text 沒有瀏覽器上下箭頭 */
  width: 6.5rem;
  height: 2.25rem;
  border: 0;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.inquiry-item__note {
  grid-column: 2 / 4;
  margin-top: 0.25rem;
}

/* 跟客製詢價頁的表單欄位同一套規範：標籤字體／字重／顏色，
   輸入框內距／淡藍底／邊框／圓角都統一 */
.inquiry-item__note label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.inquiry-item__note textarea {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text);
  background-color: #F3F7FE;
  border: 1px solid var(--color-border);
  /* 多行留言框，跟其他頁面的 textarea 一樣不做藥丸圓角 */
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 3.25rem;
  transition: border-color .2s ease;
}

.inquiry-item__note textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* ㊱-6：品項卡片不可被內容撐寬。grid／flex 子項預設 min-width:auto，長品名或數量框會把卡片撐出欄寬，
   右緣被外層裁掉（375 原本卡片 436px 以上）；品名、型號沒有空格的長字也要能斷行 */
.inquiry-list__grid > *,
.inquiry-item > * {
  min-width: 0;
}

.inquiry-item__name,
.inquiry-item__sku {
  overflow-wrap: anywhere;
}

/* ㊱-6 手機：圖縮小、內距同客製詢價品項卡（.custom-item 1.25rem）；數量框換到下一行、和備註一樣跨整張卡片，
   品名那一列只剩「圖｜品名｜刪除鈕」，320 也放得下 */
@media (max-width: 767.98px) {
  .inquiry-item {
    grid-template-columns: 4rem 1fr auto;
    column-gap: 0.75rem;
    row-gap: 1rem;
    padding: 1.25rem;
  }

  .inquiry-item__media {
    grid-row: auto;
    width: 4rem;
  }

  .inquiry-item__name {
    font-size: 1.125rem;
  }

  .inquiry-item__qty,
  .inquiry-item__note {
    grid-column: 1 / -1;
  }

  .inquiry-item__note {
    margin-top: 0;
  }
}

/* 詢價摘要卡片（右欄，桌機 sticky）：跟客製詢價頁的 .custom-inquiry__form 同一套外殼，
   白底＋邊框，不再用淡藍實色底 */
.inquiry-summary {
  padding: 1.75rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

@media (min-width: 1024px) {
  .inquiry-summary {
    position: sticky;
    top: 7rem;
  }
}

.inquiry-summary__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--color-text);
}

.inquiry-summary__count {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--color-accent);
}

.inquiry-summary__count span {
  font-size: inherit;
}

.inquiry-summary__hint {
  margin: 0.75rem 0 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-muted);
}

.inquiry-summary__submit {
  /* ㉚（PM 10/27）：和摘要卡內容同寬、文字與箭頭置中，和下方置中的「或送出客製化詢價」對齊。
     父層 .inquiry-summary 是一般 block，justify-self 無效；改 flex＋100% 寬（.btn 本身已置中內容） */
  display: flex;
  width: 100%;
  margin-top: 1.5rem;
}

.inquiry-summary__continue {
  display: block;
  text-align: center;
  margin-top: 0.875rem;
  font-size: 1rem;
  color: var(--color-muted);
  transition: color .2s ease;
}

.inquiry-summary__continue:hover {
  color: var(--color-accent);
}

/* 摘要卡片最下面收尾用的分隔線，下面不再接任何內容 */
/* 貼在「詢價摘要」標題正下方，把標題跟底下的商品數量/提示文字分開 */
.inquiry-summary__divider {
  margin: 1.2rem 0 1.2rem 0;
  border: 0;
  border-top: 1px solid var(--color-border);
}

.inquiry-summary__or {
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.inquiry-summary__custom-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
}

.inquiry-summary__custom-link:hover {
  color: var(--color-accent-dark);
}

/* ==========================================
   20. 導覽列詢價清單圖示（購物車）
   ========================================== */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #FFFFFF;
  transition: color .2s ease;
}

.nav-cart:hover {
  color: var(--color-accent-on-dark);   /* 同 .nav-link:hover（PM 2026-09-24） */
}

.nav-cart svg {
  width: 1.375rem;
  height: 1.375rem;
}

.nav-cart__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  right: 0;
  min-width: 1.125rem;
  height: 1.125rem;
  padding-inline: 0.2rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.625rem;
  line-height: 1;
}

/* .nav-cart__badge 自己有 display:inline-flex（author 規則），優先度天生蓋過瀏覽器
   內建的 [hidden]{display:none}（UA 規則），要另外補一條 author 規則才會真的隱藏 */
.nav-cart__badge[hidden] {
  display: none;
}

/* 手機／平板：單欄，依 DOM 順序（標題→說明→卡片→照片）直接往下堆疊。
   標題 → 說明貼近（--stack-head-gap），說明之後的內容區塊再多留一段，合計 2.5rem */
.about-intro__grid {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--stack-head-gap);
}

.about-intro__grid>.feature-grid,
.about-intro__grid>.about-intro__photo,
.about-intro__grid>.about-intro__photos {
  margin-top: calc(2.5rem - var(--stack-head-gap));
}

/* 桌機：改真正的網格直接排版——
   第 1、2 列＝標題／說明文字（第 1 列只放眉標，說明從第 2 列＝標題那一列開始，㉓-2）；第 3 列＝優勢卡片／照片。
   都頂端對齊（PM 2026-09-24：原本第一列底部對齊、第二列垂直置中，照片比卡片矮時會往下掉，和左邊對不齊）。
   標題列的 subgrid 寫法見檔尾「㉓-2」那段；列距因此歸零，原本 2.5rem 的列距改由第 3 列以後的上外距提供 */
@media (min-width: 1280px) {
  .about-intro__grid {
    grid-template-columns: 1fr 1.05fr;
    column-gap: 6rem;
    row-gap: 0;
  }

  .about-intro__grid>.feature-grid {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    margin-top: 2.5rem;
  }

  /* ㉞-6（PM 10/28）照片高度跟著左邊特點：特點多 → 照片拉到和特點區同高，不在照片下方留空白；
     特點少 → 維持 9:8 當最低高度（::before 撐出比例，aspect-ratio 和 stretch 不能並用）。
     平板手機上下排列時照片照舊用自己的固定比例 16:9（不受這條影響）。 */
  .about-intro__grid>.about-intro__photo {
    grid-column: 2;
    grid-row: 3;
    align-self: stretch;
    margin-top: 2.5rem;
    position: relative;
    aspect-ratio: auto;
  }
  .about-intro__grid>.about-intro__photo::before {
    content: "";
    display: block;
    padding-top: calc(100% * 8 / 9);
  }
  .about-intro__grid>.about-intro__photo > img,
  .about-intro__grid>.about-intro__photo > .img-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
}

.about-intro__heading .section-title {
  margin-top: 0.75rem;
}

/* 2x2 優勢卡片：卡片間用細分隔線呈現「＋」字十字分隔（比照截圖），
   不用 grid gap 留白，改用每張卡片的 padding 撐出間距，分隔線落在 padding 交界處 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.feature-card:nth-child(odd) {
  padding-right: 3rem;
  border-right: 1px solid var(--color-border);
}

.feature-card:nth-child(even) {
  padding-left: 3rem;
}

/* 橫向分隔線寫在「每一列的上緣」而不是「第一列的下緣」（合流 P6b，PM 版 I2⑥）：
   原本寫 :nth-child(-n+2){border-bottom}，只有第一、二列之間有線——卡片補到後台上限 6 張（3 列）時，
   第二、三列之間就沒有線。改成「第 3 張起補上緣」，列數再多都自動有線；4 張時線的位置完全不變。 */
.feature-card:nth-child(n+3) {
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

/* 最後一列不留下緣內距（版面底部才不會多出一段空白） */
.feature-card:not(:nth-last-child(-n+2)) {
  padding-bottom: 3rem;
}

/* 手機：一筆一列（PM 2026-09-24：寬度不夠左右兩欄，文字被擠成一行四五個字）。
   直分隔線拿掉，每筆之間只留橫線；上面兩欄用的「奇偶／第 3 張起」規則在這裡一併歸零 */
@media (max-width: 767.98px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card:nth-child(odd),
  .feature-card:nth-child(even) {
    padding-inline: 0;
    border-right: 0;
  }

  .feature-card:nth-child(n+2) {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
  }

  .feature-card:not(:last-child) {
    padding-bottom: 2rem;
  }
}

/* 1024–1279：一列 3 張（張數同全站 --per-view）。兩欄用的「奇偶」直線改成「每列最後一張以外」，
   橫線同樣畫在「第二列起的上緣」 */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-card:nth-child(odd),
  .feature-card:nth-child(even) {
    padding-inline: 2rem;
    border-right: 1px solid var(--color-border);
  }

  .feature-card:nth-child(3n+1) {
    padding-left: 0;
  }

  .feature-card:nth-child(3n) {
    padding-right: 0;
    border-right: 0;
  }

  .feature-card:nth-child(n+3) {
    padding-top: 0;
    border-top: 0;
  }

  .feature-card:nth-child(n+4) {
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
  }

  .feature-card:not(:nth-last-child(-n+2)) {
    padding-bottom: 0;
  }

  .feature-card:not(:nth-last-child(-n+3)) {
    padding-bottom: 3rem;
  }
}

.feature-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: #FFFFFF;
  margin-bottom: 1rem;
}

.feature-card__icon svg {
  width: 3rem;
  height: 2rem;
}

.feature-card__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.feature-card__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-muted);
  margin: 0;
}

/* 右欄：說明文字＋照片 */
.about-intro__desc {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
  margin: 0;
}

.about-intro__photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;   /* 平板／手機：照片橫跨整欄，9:8 會高到快一個螢幕（PM 2026-09-24，同應用領域） */
  box-shadow: var(--shadow-lg);
}

@media (min-width: 1280px) {
  .about-intro__photo {
    aspect-ratio: 9 / 8;   /* 桌機：與左側卡片並排 */
  }
}

.about-intro__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 「關於我們」公司簡介變化版：中段改為左右兩張等寬照片，取代優勢卡片＋單張照片 */
.about-intro__photos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .about-intro__photos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ㉘-2（PM 10/22）公司簡介（關於我們＋首頁）：
   桌機兩欄四列——第 1、2 列＝眉標／標題｜說明（㉓-2 subgrid）；第 3 列＝左數據數字、右特點條列（上緣各一條細線、同高）；
   第 4 列＝雙照片跨兩欄收尾。沒數據時左格空著、特點仍在右欄；沒特點只剩數據；兩者都沒等於原本的版面。
   平板手機單欄照 DOM 順序（標題 → 說明 → 數據 → 特點 → 照片），間距＝列距 --stack-head-gap＋各自上外距，合計 2.5rem。
   被否決：特點用核心優勢 .feature-grid（首頁下一區就是核心優勢，換成撞那一區）、特點做成照片下方 4 欄橫條（緊接數字統計，兩條橫排疊在一起）、
   數據疊在照片上做角標（沒照片時是色塊，角標沒有依託）。 */
.about-intro__grid>.about-intro__stat,
.about-intro__grid>.about-intro__highlights {
  margin-top: calc(2.5rem - var(--stack-head-gap));
}

@media (min-width: 1280px) {
  .about-intro__grid>.about-intro__stat {
    grid-column: 1;
    grid-row: 3;
    margin-top: 3.5rem;
  }

  .about-intro__grid>.about-intro__highlights {
    grid-column: 2;
    grid-row: 3;
    margin-top: 3.5rem;
  }

  /* 列距歸零（㉓-2），上間距由這裡提供；選擇器要和單欄補間距那條同權重才蓋得過 */
  .about-intro__grid>.about-intro__photos {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 4.5rem;
  }
}

.about-intro__photos .about-intro__photo {
  aspect-ratio: 4 / 3;
}

/* 數據數字：上緣細線、數字→標籤→說明上下排；數字是這區的視覺重點（Barlow、主色），單位小一號接在後面 */
.about-intro__stat {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.about-intro__stat-num {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  font-size: clamp(3.5rem, 2.4rem + 3vw, 5.5rem);
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
}

.about-intro__stat-unit {
  margin-left: 0.15em;
  font-size: 0.4em;
  vertical-align: 0.9em;
}

.about-intro__stat-label {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text);
}

.about-intro__stat-desc {
  max-width: 22rem;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-muted);
}

/* 特點條列（.intro-hl）：不做卡片（無底色、陰影、圓角），靠左；每筆上緣細線。
   圖示不帶底色、主色 22px，和標題同一行；說明在下。≥640 兩欄、手機一欄。
   刻意和經營理念（白色浮起卡片、置中）、首頁核心優勢（實心藍圓圖示＋十字線）分開 */
.about-intro__highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 2.5rem;
}

@media (min-width: 640px) {
  .about-intro__highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

.intro-hl {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  min-width: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.intro-hl__top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.intro-hl__icon {
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
  color: var(--color-accent);
}

.intro-hl__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text);
}

.intro-hl__desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-muted);
}

/* 下方三欄數據列：整列與每組數字＋說明皆置中（首頁／關於我們共用） */
.stats-light {
  margin-top: calc(var(--space-section) - 0.5rem);   /* 桌機 5.5rem；平板手機跟著區塊間距減半 */
  margin-bottom: 0.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  text-align: center;
}

/* 欄數跟著筆數走（合流 P6b）：auto-fit 讓 2／3／4 筆都平均分配、不留空欄，
   也不會像寫死 repeat(3,1fr) 那樣讓第 4 筆自己掉到第二列 */
@media (min-width: 640px) {
  .stats-light {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 2.5rem;
  }
}

/* 4 筆以上的密集版：欄寬只剩四分之一，數字沿用原字級會撐破欄位（「99.6%」這種 5 字元最明顯）。
   由 script.js 依筆數掛上 .stats-light--dense，門檻只有一個來源（STATS_DENSE_FROM）。 */
.stats-light--dense .stat-light__num {
  font-size: clamp(2.25rem, 1.5rem + 3.2vw, 4.25rem);
}

.stats-light--dense .stat-light__label {
  max-width: 16rem;
}

/* 1024–1279：數字一列排開、字級變大，上下只留 40／56px 顯得擠（PM 2026-09-24）。只加這段寬度，其他尺寸不動 */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .stats-light {
    margin-top: 4.5rem;
    margin-bottom: 2rem;
  }
}

/* 4 筆在 768 左右 auto-fit 會排成 3＋1（PM 2026-09-24）：這段寬度固定 2×2，1024 起才一列排開 */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .stats-light--dense {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-light__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1;
  font-size: clamp(2.5rem, 2.5rem + 4.5vw, 6rem);
  color: var(--color-text);
}

/* ㉕-5 數字統計圖示（後台有選才畫）：數字上方、強調色 */
.stat-light__icon {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.stat-light__icon svg {
  width: 100%;
  height: 100%;
}

.stat-light__label {
  font-weight: 500;
  margin-top: 0.75rem;
  margin-inline: auto;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-accent);
  max-width: 22rem;
}

/* ==========================================
   08b. 核心價值（關於我們）：淺藍紫底；3 欄網格，
   第一格＝標題文字，其餘 5 格＝卡片，依 DOM 順序自然排列（無需手動指定格位）
   ========================================== */
.core-values {
  background-color: var(--color-bg-alt);
  padding-block: var(--space-section);
}

.core-values__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* 平板：標題獨佔一列（單欄時卡片會被拉成整排寬的長條） */
@media (min-width: 768px) and (max-width: 1279.98px) {
  .core-values__grid {
    gap: 1.5rem;
  }

  .core-values__heading {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1280px) {
  .core-values__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.core-values__heading {
  align-self: center;
}

/* 核心價值區塊說明（後台「核心價值 → 說明」，P9：v1／v2 有、v3 原本沒畫），語彙同其他區塊的說明段落 */
.core-values__desc {
  margin: var(--stack-head-gap) 0 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

/* 卡片數讓最後一列填不滿時（例：後台上限 6 張＋標題格＝7 格），標題改獨佔一整列，
   卡片自成矩陣。判斷在 script.js（CSS 選不到「總數是不是 3 的倍數」）。
   ㉓-4（PM 10/16）：標題獨佔一列時，文字區與框架同寬（拿掉原本的 44rem 上限）；標題與卡片同一列（2 或 5 張）維持原樣。 */
@media (min-width: 1280px) {
  .core-values__grid--stacked-head .core-values__heading {
    grid-column: 1 / -1;
    align-self: start;
  }
}

/* ㉓-6／㉓-C1（PM 10/16，≥768 全部寬度）：一排 3 張（PM「平板改成三張一排」，768 起就 3 張，不跟全站 --per-view），
   「最後一排的卡片平分整排」：1 張＝與框架同寬、2 張＝各半、3 張＝各 1/3（例：4 張＝3＋1、5 張＝3＋2）。
   做法：用 6 欄網格，卡片平常跨 2 欄；最後一排剩 1 張跨 6 欄、剩 2 張各跨 3 欄。
   「剩幾張」用 :nth-child(… of .value-card) 只數卡片（標題格不算）。
   被否決：768–1023 每排 2 張（㉓-A 照 --per-view 做，是規格寫錯）。
   桌機標題與卡片同一列（沒有 --stacked-head）時不套這組，維持 3 欄（被否決：只在平板套用——桌機一張卡也會靠左留白）。
   768–1279 標題一律獨佔一列；桌機只有 --stacked-head 時才獨佔。兩段內容相同，只差套用的網格 */
@media (min-width: 768px) and (max-width: 1279.98px) {
  .core-values__grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .core-values__grid > .value-card {
    grid-column: span 2;
  }

  .core-values__grid > .value-card:nth-child(3n+1 of .value-card):last-child {
    grid-column: 1 / -1;
  }

  .core-values__grid > .value-card:nth-child(3n+1 of .value-card):nth-last-child(2),
  .core-values__grid > .value-card:nth-child(3n+2 of .value-card):last-child {
    grid-column: span 3;
  }
}

@media (min-width: 1280px) {
  .core-values__grid--stacked-head {
    grid-template-columns: repeat(6, 1fr);
  }

  .core-values__grid--stacked-head > .value-card {
    grid-column: span 2;
  }

  .core-values__grid--stacked-head > .value-card:nth-child(3n+1 of .value-card):last-child {
    grid-column: 1 / -1;
  }

  .core-values__grid--stacked-head > .value-card:nth-child(3n+1 of .value-card):nth-last-child(2),
  .core-values__grid--stacked-head > .value-card:nth-child(3n+2 of .value-card):last-child {
    grid-column: span 3;
  }
}

.value-card {
  background-color: #FFFFFF;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding-block: 5rem;
  padding-inline: 2rem;
  text-align: center;
}

/* ㉓-4（PM 10/16）：經營理念、認證資歷的卡片加懸停效果，沿用 v3 卡片的語彙（.product-card：上移 4px＋--shadow-lg，.25s ease）。
   🔴 位移用獨立的 translate 屬性、不用 transform：這兩種卡片帶 data-reveal，進場動畫用的是 transform 與 transition（.7s＋逐張延遲）。
   用 transform 會被進場的 transform:none 打架；只寫 transition 簡寫又會把進場的淡入與延遲蓋掉。
   所以有 .reveal-on 時把進場的兩項（含延遲 --card-reveal-delay）與懸停的兩項寫在同一條清單裡。
   首頁公司簡介的 highlights 也用 .value-card，但不在這次範圍內，所以只限定 .core-values 底下。 */
.core-values .value-card,
.cert-card {
  transition: translate .25s ease, box-shadow .25s ease;
}

.reveal-on .core-values .value-card,
.reveal-on .cert-card {
  transition:
    opacity .7s var(--ease-out-cubic) var(--card-reveal-delay, 0s),
    transform .7s var(--ease-out-cubic) var(--card-reveal-delay, 0s),
    translate .25s ease,
    box-shadow .25s ease;
}

.core-values .value-card[data-reveal-delay="100"], .cert-card[data-reveal-delay="100"] { --card-reveal-delay: .1s; }
.core-values .value-card[data-reveal-delay="200"], .cert-card[data-reveal-delay="200"] { --card-reveal-delay: .2s; }
.core-values .value-card[data-reveal-delay="300"], .cert-card[data-reveal-delay="300"] { --card-reveal-delay: .3s; }
.core-values .value-card[data-reveal-delay="400"], .cert-card[data-reveal-delay="400"] { --card-reveal-delay: .4s; }
.core-values .value-card[data-reveal-delay="500"], .cert-card[data-reveal-delay="500"] { --card-reveal-delay: .5s; }

.core-values .value-card:hover,
.cert-card:hover {
  translate: 0 -4px;
  box-shadow: var(--shadow-lg);
}

@media (prefers-reduced-motion: reduce) {
  .core-values .value-card:hover,
  .cert-card:hover {
    translate: none;
  }
}

/* ㉕-5 經營理念項目圖片：任一張有圖時整組卡片都有圖位（script.js 掛 --media），圖在卡片上方、圖示與文字照舊；
   有圖時卡片上下內距縮小，不然圖片上方會空一大段 */
.core-values__grid--media > .value-card {
  padding-block: 2rem 3rem;
}

.value-card__media {
  aspect-ratio: 16 / 10;
  margin-bottom: 1.75rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.value-card__media img,
.value-card__media .img-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ㉖-1 有圖位但這張沒上傳圖片：圖示放在圖位正中，底色同色塊（--color-bg-alt），高度與有圖的卡一致 */
.value-card__media--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-bg-alt);
}

.value-card__media--icon .value-card__icon {
  margin-bottom: 0;
}

.value-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.value-card__icon svg {
  width: 100%;
  height: 100%;
}

.value-card__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

.value-card__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-muted);
  margin: 0;
}

/* ==========================================
   08b. 認證資歷（關於我們）：卡片網格，版面沿用核心價值（.core-values）同一套節奏
   ========================================== */
.certs {
  background-color: var(--color-bg);
  padding-block: var(--space-section);
}

/* ㉓-5（PM 10/16）：關於我們頁的沿革、認證、精選產品輪播三區的標頭各寬度都上下排列（眉標 → 標題 → 說明），說明全寬，
   比照經營理念；原本桌機是「左標題／右說明」兩欄。首頁、聯絡頁同類區塊維持兩欄（㉓-2）。被否決：全站標頭都改上下排列 */
.certs__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-head-gap);
  margin-bottom: 3.5rem;
}


.certs__desc {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
  margin: 0;
}

.certs__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .certs__grid {
    grid-template-columns: repeat(var(--per-view), 1fr);
  }
}

@media (min-width: 1280px) {
  .certs__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cert-card {
  background-color: #FFFFFF;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 1.75rem;
  text-align: center;
}

.cert-card__media {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cert-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cert-card__media svg {
  width: 100%;
  height: 100%;
  color: var(--color-accent);
}

.cert-card__name {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--color-text);
  margin: 0 0 0.35rem;
}

.cert-card__sub {
  font-size: 0.9rem;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.cert-card__desc {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-muted);
  margin: 0;
}

/* ==========================================
   08c. 公司沿革 Timeline（關於我們）：橫向時間軸，項目交錯上下排列於中線兩側
   手機版收合為單欄直向堆疊
   ========================================== */
.milestones {
  /* 版心左邊界：寬螢幕時＝置中內容的左緣，窄螢幕時＝ .container 的 20px 內距 */
  --ms-gutter: max(20px, calc((100vw - var(--container)) / 2 + 20px));
  padding-block: var(--space-section);
  background-color: var(--color-bg);
  /* 裁掉破版延伸超出視窗的部分，避免產生水平捲軸 */
  overflow: hidden;
}

.milestones__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-head-gap);
  margin-bottom: calc(var(--space-section) / 1.5);   /* 桌機 4rem；平板手機跟著減半 */
}


.milestones__desc {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
  margin: 0;
}

/* 舞台：左緣對齊版心左邊界，右緣一路破版延伸到視窗外（不套 .container）。
   軸線固定於正中央不動，只有卡片軌道左右位移 */
.milestones__stage {
  position: relative;
  /* 左側內距對齊全站 .container 的左邊界（寬螢幕時＝置中內容的左邊界，而非固定 20px） */
  padding-left: var(--ms-gutter);
}

.milestones__line {
  position: absolute;
  top: 50%;
  left: var(--ms-gutter);
  right: 0;
  height: 2px;
  margin-top: -1px;
  background-color: var(--color-timeline);
  z-index: 0;
}

/* 左端箭頭：正方形只留左＋下框線，旋轉 45° 形成向左的「＜」箭頭 */
.milestones__line::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-left: 2px solid var(--color-timeline);
  border-bottom: 2px solid var(--color-timeline);
  transform: translateY(-50%) rotate(45deg);
}

/* 只裁切滑動中的卡片，軸線是它的兄弟層所以不受影響。
   滑動手勢（touch-action、拖曳中的游標與停用選字）由全站共用的 .swipe-area 提供（㉗-8） */
.milestones__viewport {
  overflow: hidden;
  cursor: grab;
}

.milestones__track {
  /* 小數＝最右側刻意露出半張卡，暗示後面還有內容可以拖進來 */
  --ms-visible: 1.15;
  --ms-gap: 2.5rem;
  display: flex;
  gap: var(--ms-gap);
  transition: transform .45s var(--ease-out);
  will-change: transform;
}

@media (min-width: 640px) {
  .milestones__track {
    --ms-visible: 2.25;
  }
}

@media (min-width: 1024px) {
  .milestones__track {
    --ms-visible: 3.4;
    --ms-gap: 2.5rem;
  }
}

/* 一張卡＝一個里程碑：上下兩個等高欄位，交界正好落在軸線上（top:50%） */
.milestone {
  flex: 0 0 calc((100% - (var(--ms-visible) - 1) * var(--ms-gap)) / var(--ms-visible));
  display: grid;
  grid-template-rows: 1fr 1fr;
  position: relative;
}

/* 上半：內容靠下（貼近軸線）；下半：內容靠上。
   間距由欄位的 padding 提供，圖片本身不帶 padding，
   才不會壓縮 <img> 的內容框、導致比例失真與圓角只有單邊看得到 */
.milestone__slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.milestone__slot--top {
  justify-content: flex-end;
  padding-bottom: 2.5rem;
}

.milestone__slot--bottom {
  justify-content: flex-start;
  padding-top: 2.5rem;
}

/* 菱形節點：卡片正中央＝軸線位置，正好落在圖片與文字之間；
   z-index 高於軸線，讓菱形實心壓在線上（而不是被線穿過去） */
.milestone::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.6875rem;
  height: 0.6875rem;
  background-color: var(--color-timeline-dot);
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 2;
}

/* 就是單純一張圖：<img> 直接是欄位子層，不外包容器、不加陰影卡片感 */
.milestone__photo {
  border-radius: var(--radius);
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  /* 拖曳時不要觸發瀏覽器原生的「拖曳圖片」行為 */
  -webkit-user-drag: none;
  user-select: none;
}

/* 間距統一由父層 gap 控制，子元件不各自管理 margin——
   這樣上半側反轉順序時，上下兩側的間距仍完全對稱 */
.milestone__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

/* 上半側的文字組反轉順序，讓年份始終貼著軸線、說明文字在外側，
   與下半側的文字組上下鏡射對稱（對照設計稿：標籤永遠靠線、說明永遠在外） */
.milestone__slot--top .milestone__body {
  flex-direction: column-reverse;
}

.milestone__year {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-accent);
  font-size: 2rem;
}

.milestone__title {
  font-size: 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.milestone__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-muted);
  margin: 0;
  max-width: 16rem;
}

/* ㉗-3（PM 10/22）：箭頭外觀共用 .carousel-arrow、位置同首頁輪播（左右兩側、壓在內容區邊緣 -0.75rem），
   垂直置中在軸線上（上下兩側各有 2.5rem 的留白，不會壓到圖片或文字）。
   右側對齊版心右緣（--ms-gutter 與左側對稱），不貼著破版延伸的視窗邊緣。
   原本是置中在輪播下方、白底框線的另一套外觀 */
.milestones__arrow {
  top: 50%;
  transform: translateY(-50%);
}

.milestones__arrow--prev {
  left: calc(var(--ms-gutter) - 0.75rem);
}

.milestones__arrow--next {
  right: calc(var(--ms-gutter) - 0.75rem);
}

/* ==========================================
   08d. 精選產品輪播（關於我們）：眉標 → 標題 → 說明上下排列、說明全寬（㉓-5，同沿革／認證／經營理念）；
   下方 4 卡片輪播（卡片＝全站共用產品卡片 .category-thumb，見 script.js 的 productCardHtml；
   箭頭定位沿用首頁產品分類色塊的側邊懸浮箭頭手法）
   ========================================== */
.product-showcase {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.product-showcase__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-head-gap);
  margin-bottom: calc(var(--space-section) / 1.5);   /* 桌機 4rem；平板手機跟著減半 */
}

.product-showcase__desc {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
  margin: 0;
}

/* 外層 .product-showcase__carousel 只負責定位箭頭（不裁切）；
   .product-showcase__track-wrap 才是滑動可視範圍（overflow:hidden），
   兩者分開，箭頭才不會被裁掉 */
.product-showcase__carousel {
  position: relative;
}

.product-showcase__track-wrap {
  overflow: hidden;
}

.product-showcase__track {
  display: flex;
  gap: 2.5rem;
  transition: transform .45s var(--ease-out);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .product-showcase__track {
    transition: none;
  }
}

.product-showcase__track .category-thumb {
  /* 平板手機一次 --per-view 張（1／2／3），桌機 4 張。2.5rem＝軌道 gap */
  flex: 0 0 calc((100% - (var(--per-view) - 1) * 2.5rem) / var(--per-view));
  width: auto;
}

@media (min-width: 1280px) {
  .product-showcase__track .category-thumb {
    flex: 0 0 calc(25% - 1.125rem);   /* 桌機原值不動（第 4 張露出一部分，暗示可以往右滑） */
  }
}

/* 箭頭：外觀共用 .carousel-arrow（PM 2026-09-24：全站輪播箭頭同一套、各尺寸都顯示），這裡只管位置——
   垂直置中於縮圖。原本是白底框線的另一套外觀、1280 以下隱藏、位置 -4rem（1280～1360 會跑出畫面外） */
.product-showcase__nav--prev {
  left: -0.75rem;
}

.product-showcase__nav--next {
  right: -0.75rem;
}

/* ==========================================
   14. 據點資訊（聯絡我們）：左標題／右說明（右欄對齊標題，見檔尾 ㉓-2）；
   下方左＝聯絡資訊清單／右＝地圖嵌入，單一據點版本（全頁展示單一據點）
   ========================================== */
.contact-info {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.contact-info__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-head-gap);
  margin-bottom: calc(var(--space-section) / 1.5);   /* 桌機 4rem；平板手機跟著減半 */
}

@media (min-width: 1280px) {
  .contact-info__head {
    grid-template-columns: 1fr 1.05fr;
    column-gap: 6rem;
    row-gap: 0;   /* ㉓-2，見檔尾 */
    align-items: start;   /* PM 2026-09-24：兩欄頂端對齊（原本底部對齊） */
  }
}

.contact-info__desc {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
  margin: 0;
}

.contact-info__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1280px) {
  .contact-info__grid {
    grid-template-columns: 1fr 1.2fr;
    column-gap: 6rem;
  }
}

/* 據點分頁：底線式 tab，選取態用強調藍文字＋底線，非選取態為次要文字色 */
.contact-info__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.contact-tab {
  padding: 0 0 1rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.contact-tab:hover {
  color: var(--color-text);
}

.contact-tab[aria-selected="true"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.contact-info__details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin: 0;
}

/* 社群媒體（公司層級資訊）跟切換據點的清單之間留出區隔間距 */
.contact-info__details--static {
  margin-top: 2.5rem;
}

.contact-detail__label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  /* 改用跟說明文字（.contact-info__desc）同一個灰色，不用強調藍 */
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}

.contact-detail__value {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

.contact-detail__value a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.contact-detail__value a:hover {
  color: var(--color-accent);
}

/* 社群連結：跟頁尾的白圈圖示同一套概念，但頁尾是深底、這裡是白底，
   改用淺薰衣草藍圈（--color-bg-alt）＋強調藍圖示，避免白底疊白圈看不見 */
.contact-detail__socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.contact-detail__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: #FFFFFF;
  transition: background-color .2s ease, transform .2s ease;
}

.contact-detail__socials a:hover {
  /* 跟 .btn-accent:hover 用同一個深色，圖示維持白色不變。
     需要明寫 color:#FFF——這些 <a> 也是 .contact-detail__value 的子孫，
     會被 .contact-detail__value a:hover{color:accent} 蓋掉（同優先度比後到者），
     不明寫就會在 hover 時被染成藍色 */
  background-color: var(--color-accent-dark);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.contact-detail__socials svg {
  width: 1.25rem;
  height: 1.25rem;
}

.contact-info__map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
}

/* 平板：地圖在清單下方橫跨整欄，4:3 會太高 */
@media (min-width: 768px) and (max-width: 1279.98px) {
  .contact-info__map {
    aspect-ratio: 16 / 9;
  }
}

@media (min-width: 1280px) {

  /* 桌機版拉掉固定比例，改用 100% 高度撐滿 grid row，
     跟左欄的聯絡資訊清單一樣高（grid 預設 align-items:stretch） */
  .contact-info__map {
    aspect-ratio: auto;
    height: 100%;
    min-height: 26rem;
  }
}

.contact-info__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================
   14b. 聯絡表單（聯絡我們）：淺藍紫底；左＝標題＋說明（單欄堆疊，非左右兩欄說明）／右＝表單
   ========================================== */
.contact-form-section {
  padding-block: var(--space-section);
  background-color: var(--color-bg-alt);
}

.contact-form-section__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1280px) {
  .contact-form-section__grid {
    grid-template-columns: 1fr 1.3fr;
    column-gap: 6rem;
    /* 左側文字跟右側表單高度通常不一樣，改成垂直置中對齊，而不是頂著上緣 */
    align-items: start;   /* PM 2026-09-24：左欄標題靠上、與右欄頂端對齊（原本垂直置中） */
  }
}

.contact-form-section__desc {
  margin-top: var(--stack-head-gap);   /* 平板／手機：標題 → 說明貼近；桌機見下方 */
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

@media (min-width: 1280px) {
  .contact-form-section__desc {
    margin-top: 2.5rem;
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* 客製詢價頁專屬：欄位間距縮小，跟聯絡我們頁的 .contact-form__row 分開，互不影響；
   數值跟品項卡片裡「產品類型／預計數量」的 .custom-item__row 統一，兩段項目間距才會一樣 */
.custom-inquiry__form .contact-form__row {
  gap: 1rem;
}

@media (min-width: 640px) {
  .contact-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-form__field label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
}

.contact-form__field input,
.contact-form__field select,
.contact-form__field textarea {
  width: 100%;
  padding: 0.875rem 2.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-surface);
  border-radius: var(--radius-full);
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* 客製詢價頁專屬的欄位樣式（不影響聯絡我們頁的 .contact-form）：
   內距縮小、換成比 --color-bg-alt 更淡的藍，跟同頁的品項欄位（.custom-item__field）視覺統一 */
.custom-inquiry__form .contact-form__field input,
.custom-inquiry__form .contact-form__field select,
.custom-inquiry__form .contact-form__field textarea {
  padding: 0.875rem 1.5rem;
  background-color: #F3F7FE;
}

.contact-form__field textarea {
  resize: vertical;
  min-height: 9rem;
  /* 訊息欄位不做藥丸圓角，維持一般圓角矩形 */
  border-radius: var(--radius);
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26, 41, 186, .15);
}

/* 表單驗證（P9，比照 v1／v2）：必填星號、欄位下方錯誤紅字、錯誤欄位紅框。HTML 見 data/formField.php */
.form-req {
  margin-left: 0.2rem;
  color: var(--color-danger);
}

.form-error {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-danger);
}

.form-error:empty {
  display: none;
}

.contact-form__field .is-invalid,
.contact-form__field .is-invalid:focus,
.custom-item__field .is-invalid,
.custom-item__field .is-invalid:focus {
  box-shadow: 0 0 0 2px var(--color-danger);
}

/* 表單裡的附註說明 */
.form-note {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-muted);
}

/* 欄位說明文字（033：後台「表單設定」的說明文字，data/formField.php 輸出在控制項正下方、錯誤紅字之前）。
   與上方控制項的距離交給欄位容器的 gap，不另加 margin */
.form-help {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-muted);
}

/* 文件上傳欄位（037）的 input 是 .sr-only（點整個上傳框選檔），但欄位容器對 input 設了 width:100%／padding，
   權重比 .sr-only 高會把它撐回原本大小；這裡把尺寸壓回 1px。必填沒選檔時紅框畫在上傳框上 */
.form-upload input[type="file"] {
  width: 1px;
  padding: 0;
}

.custom-item__upload.is-invalid {
  border-color: var(--color-danger);
}

.contact-form__submit {
  /* 寬度跟著文字長短走（PM 2026-09-24：全站按鈕統一，原本 width:100% 撐滿整欄）；
     justify-self／align-self 讓它在 grid／flex 父層裡不被拉伸 */
  justify-self: start;
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* ==========================================
   09. 色塊分隔 CTA（背景圖 + 藍紫遮罩 + 置中標題按鈕）
   段落轉場用，全站可重複使用同一個 .cta-band 結構
   ========================================== */
.cta-band {
  position: relative;
  overflow: hidden;
  min-height: 17rem;
  display: flex;
  align-items: center;
  padding-block: calc(var(--space-section) * 7 / 6);   /* 桌機 7rem；平板手機跟著區塊間距減半 */
}

.cta-band__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

/* 滾動視差（PM 2026-09-24）：背景圖固定在視窗、內容捲過去。首頁與關於我們的 CTA 共用。
   只給有滑鼠的裝置：iOS Safari 不支援 fixed 背景（會自動退回一般捲動），部分 Android 支援但捲動會卡頓、
   且 cover 會以整個視窗高度去放大圖片；觸控裝置維持一般背景。減少動態效果的使用者也不套。
   ⚠️ 這個元素與祖先都不能加 transform／filter，否則 fixed 會失效（進場動畫只掛在內層 .cta-band__inner，不影響） */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cta-band__bg {
    background-attachment: fixed;
  }
}

.cta-band__mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(26, 41, 186, .55) 0%, rgba(17, 24, 114, .82) 100%);
}

.cta-band__inner {
  position: relative;
  z-index: 2;
  /* PM 2026-09-24：放寬（原 40rem）。標題與說明由客戶在後台輸入、自己決定換行，
     太窄會在較小的裝置上被壓成好幾行；與內頁 Banner 的頁面簡介同寬（.page-hero__lead）。
     ㉙（PM 10/27）已改成框架同寬，這裡的 60rem 被檔尾「㉙」段蓋掉 */
  max-width: 60rem;
  margin-inline: auto;
  text-align: center;
}

.cta-band__title {
  margin: 0 0 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.4;
  color: #FFFFFF;
  font-size: clamp(1.625rem, 1rem + 1.9vw, 2.625rem);
}

.cta-band__desc {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #EAF0FE;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ==========================================
   10. 應用領域：上方標題／說明；下方左照片（可切換）／右清單
   滑到右側任一項目，左側照片切換成該項目的代表圖（見 script.js）
   ========================================== */
.app-areas {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

/* 上方：標題／說明 兩欄，頂部對齊 */
.app-areas__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-head-gap);
}

@media (min-width: 1280px) {
  .app-areas__top {
    grid-template-columns: 1fr 1.05fr;
    column-gap: 6rem;
    row-gap: 0;   /* ㉓-2：標題列拆成「眉標／標題」兩列，列距要歸零（見檔尾 ㉓-2） */
    align-items: start;   /* PM 2026-09-24：兩欄頂端對齊（原本底部對齊） */
  }
}

.app-areas__heading .section-title {
  margin-top: 0.75rem;
}

.app-areas__desc {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
  margin: 0;
}


/* 下方：左照片／右清單 */
.app-areas__body {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1280px) {
  .app-areas__body {
    grid-template-columns: 1fr 1.7fr;
    gap: 6rem;
    align-items: center;
  }
}

/* 項目多時（門檻在 script.js 的 APP_STICKY_FROM）左側照片改 sticky（合流 P6b）。
   top 加上 --admin-bar-h：有前台管理列時一併讓開，一般訪客時是 0px。 */
@media (min-width: 1280px) {
  .app-areas__body--sticky-photo {
    align-items: start;
  }

  .app-areas__body--sticky-photo .app-areas__photo {
    position: sticky;
    top: calc(7rem + var(--admin-bar-h));
  }
}

.app-areas__photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;   /* 平板／手機：照片在清單上方橫跨整欄，直式比例會高到一整個螢幕（PM 2026-09-24） */
  box-shadow: var(--shadow-lg);
}

@media (min-width: 1280px) {
  .app-areas__photo {
    aspect-ratio: 13 / 19;   /* 桌機：左欄窄、與右側清單並排，用直式 */
  }
}

.app-areas__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .25s ease;
}

.app-areas__list {
  display: flex;
  flex-direction: column;
}

/* 每一項應用領域：icon＋標題／說明＋右上角箭頭；滑上時整列反白提示、箭頭與標題變強調色 */
.app-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding-block: 3rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(20, 24, 58, .08);
}

.app-item:first-child {
  padding-top: 0;
}

.app-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.app-item__icon {
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  color: var(--color-accent);
  transition: background-color .2s ease, color .2s ease;
}

.app-item__icon svg {
  width: 2rem;
  height: 2rem;
}

.app-item__body {
  flex: 1;
  min-width: 0;
}

.app-item__tag {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--color-muted-light);
  margin: 0 0 0.35rem;
}

.app-item__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--color-text);
  margin: 0 0 0.5rem;
  transition: color .2s ease;
}

.app-item__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-muted);
  margin: 0;
}

.app-item:hover .app-item__icon,
.app-item.is-active .app-item__icon {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.app-item:hover .app-item__title,
.app-item.is-active .app-item__title {
  color: var(--color-accent);
}

/* ==========================================
   11. 熱門產品輪播：淺紫底，左文字＋按鈕＋箭頭／右卡片輪播
   右側刻意不套 .container，讓卡片軌道延伸貼齊視窗右緣（比照設計稿的「切出版面外」效果）
   ========================================== */
.product-teaser {
  background-color: var(--color-bg-alt);
  padding-block: var(--space-section);
  overflow: hidden;
}

.product-teaser__row {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-inline: 20px;
}

@media (min-width: 1280px) {
  .product-teaser__row {
    flex-direction: row;
    align-items: start;   /* PM 2026-09-24：左欄標題靠上、與右欄頂端對齊（原本垂直置中） */
    gap: 6rem;
    /* 左側內距對齊全站 .container 的左邊界（寬螢幕時＝置中內容的左邊界，而非固定 20px） */
    padding-left: max(20px, calc((100vw - var(--container)) / 2 + 20px));
    padding-right: 0;
  }
}

.product-teaser__text {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 1280px) {
  .product-teaser__text {
    flex: 0 0 34rem;
  }
}

.product-teaser__desc {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

.product-teaser__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

/* 平板手機：按鈕移到輪播下方（.section-actions--end）、箭頭移到輪播兩側，這一列整個不需要 */
@media (max-width: 1279.98px) {
  .product-teaser__actions {
    display: none;
  }
}

/* 輪播左右箭頭：按鈕旁邊的一組小圓按鈕 */
.product-teaser__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-teaser__nav button {
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.product-teaser__nav button:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #FFFFFF;
}

.product-teaser__nav svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 右側卡片輪播：軌道用 transform 位移切換，不用原生 overflow 拖曳捲動。
   外層 __carousel 只負責定位兩側箭頭（不裁切），__viewport 才是可視範圍——分開箭頭才不會被裁掉 */
.product-teaser__carousel {
  position: relative;
  flex: 1;
  min-width: 0;
}

.product-teaser__viewport {
  overflow: hidden;
}

/* 箭頭兩組：桌機用按鈕旁那組（.product-teaser__nav）；平板手機用輪播兩側這組，
   外觀共用 .carousel-arrow，垂直置中於卡片圖片（圖片 4:3，高＝卡片寬 × 3/4） */
.product-teaser__nav {
  display: none;
}

.product-teaser__carousel {
  container-type: inline-size;
}

.product-teaser__arrow {
  top: calc((100cqw - (var(--per-view) - 1) * 2.5rem) / var(--per-view) * 3 / 8);
  transform: translateY(-50%);
}

.product-teaser__arrow--prev {
  left: -0.75rem;
}

.product-teaser__arrow--next {
  right: -0.75rem;
}

@media (min-width: 1280px) {
  .product-teaser__nav {
    display: flex;
  }

  .carousel-arrow.product-teaser__arrow {
    display: none;
  }

  .product-teaser__carousel {
    container-type: normal;
  }
}

.product-teaser__track {
  display: flex;
  gap: 2.5rem;
  transition: transform .45s var(--ease-out);
  will-change: transform;
}

.product-card-teaser {
  /* 平板手機一次 --per-view 張（1／2／3，同全站）；桌機固定 20rem、軌道延伸到視窗右緣。2.5rem＝軌道 gap */
  flex: 0 0 calc((100% - (var(--per-view) - 1) * 2.5rem) / var(--per-view));
}

@media (min-width: 1280px) {
  .product-card-teaser {
    flex: 0 0 auto;
    width: 20rem;
  }
}

/* ㉜-3v（PM 10/28）：平板手機一次張數＝min(筆數, --per-view)，筆數少於全站張數時不留空格
   （同 v1 應用產業 ㉝-6）。data-count 由 script.js renderProductTeaser 寫在 __carousel 上
   （不是 __track：兩側箭頭的垂直位置也吃 --per-view，要一起覆寫）。只覆寫 per-view 大於筆數的斷點；
   ≥1280 卡片固定 20rem、軌道延伸到視窗右緣（原設計），不受影響。 */
@media (min-width: 768px) and (max-width: 1279.98px) {
  .product-teaser__carousel[data-count="1"] {
    --per-view: 1;
  }
}

@media (min-width: 1024px) and (max-width: 1279.98px) {
  .product-teaser__carousel[data-count="2"] {
    --per-view: 2;
  }
}

.product-card-teaser__media {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.product-card-teaser__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

/* ㉕-5：整張卡片是連結（到型錄頁的該分類）；懸停照產品卡的語彙放大圖片、標題換強調色 */
.product-card-teaser {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-card-teaser:hover .product-card-teaser__media img {
  transform: scale(1.05);
}

.product-card-teaser:hover .product-card-teaser__title {
  color: var(--color-accent);
}

@media (prefers-reduced-motion: reduce) {
  .product-card-teaser:hover .product-card-teaser__media img {
    transform: none;
  }
}

/* 分類副標題（後台分類「副標題」）：標題上方的小字，同區塊眉標的強調色 */
.product-card-teaser__tag {
  margin: 1.25rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-accent);
}

.product-card-teaser__tag + .product-card-teaser__title {
  margin-top: 0.35rem;
}

/* 產品數：說明下方的輔助資訊 */
.product-card-teaser__count {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
}

.product-card-teaser__title {
  margin: 1.25rem 0 0.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.13rem;
  color: var(--color-text);
  transition: color .25s ease;
}

.product-card-teaser__desc {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-muted);
  margin: 0;
}

/* ==========================================
   12. 產品分類色塊：背景圖鋪滿整個區塊；遮罩用「硬停」漸層（同一個百分比擺兩個色停點）
   在約 65% 高度直接切成白色，不是漸淡——讓縮圖卡片的上半部壓在色塊上、
   下半部＋標題文字落在白底，比照截圖「卡片跨在色塊／白底交界」的效果
   ========================================== */
.category-band {
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg);
}

/* 卡片新增了分類標籤＋說明文字（原本只有標題），卡片變高、整個區塊也跟著變高，
   色塊／白底的切齊點若還停在 60%，會被往下拉、切進圖片裡更深（原本只壓到圖片上緣一小截）。
   往上調到 52% 讓切齊點大致落回圖片同一個相對位置——是估算值，實際還是要看畫面微調 */
.category-band__mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* 上半純色色塊、下半白底（PM 10/28：純色、不用漸層，也不墊照片——後台沒有這區的照片欄位） */
  background: linear-gradient(180deg,
      var(--color-brand) 0%,
      var(--color-brand) 52%,
      var(--color-bg) 52%,
      var(--color-bg) 100%);
}

.category-band__inner {
  position: relative;
  z-index: 2;
  padding-top: var(--space-section);
  padding-bottom: calc(var(--space-section) / 1.5);   /* 桌機 4rem；平板手機跟著減半 */
}

/* 標題列：左欄眉標＋標題、右欄說明文字＋按鈕，兩欄頂端對齊（PM 2026-09-24；欄寬比例同 .about-intro__grid）。
   手機單欄堆疊。 */
.category-band__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-head-gap);
  margin-bottom: 2.5rem;
}

@media (min-width: 1280px) {
  .category-band__top {
    grid-template-columns: 1fr 1.05fr;
    column-gap: 6rem;
    row-gap: 0;   /* ㉓-2，見檔尾 */
    align-items: start;
  }
}

.category-band__heading {
  min-width: 0;
}

.category-band__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, .85);
}

.category-band__title {
  margin: 0.5rem 0 0;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
  color: #FFFFFF;
  font-size: clamp(1.625rem, 1rem + 1.9vw, 2.625rem);
}

/* 縮圖列：真正的滑動軌道（比照熱門產品輪播），一次只位移一張卡片寬度，
   不是整排重新渲染；桌機一次看到 4 張，卡片寬度用 % 撐滿可視寬度
   外層 .category-band__carousel 只負責定位箭頭（不裁切）；
   .category-band__thumbs-wrap 才是滑動可視範圍（overflow:hidden），
   兩者分開，箭頭才不會被裁掉 */
.category-band__carousel {
  position: relative;
}

.category-band__thumbs-wrap {
  overflow: hidden;
}

.category-band__thumbs {
  display: flex;
  gap: 1.5rem;
  transition: transform .45s var(--ease-out);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .category-band__thumbs {
    transition: none;
  }
}

/* 產品卡在輪播軌道裡的寬度（首頁熱門產品、產品頁相關產品；型錄頁是 grid，不吃 flex）：
   平板手機一次 --per-view 張（1／2／3，同全站），桌機 4 張。1.5rem＝這兩條軌道的 gap。
   關於我們的產品展示軌道 gap 不同，另有自己的一條（.product-showcase__track .category-thumb） */
.category-thumb {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * 1.5rem) / var(--per-view));
}

@media (min-width: 1280px) {
  .category-thumb {
    flex: 0 0 calc(25% - 1.125rem);
  }
}

.category-thumb__media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}

/* 有連結的卡片，圖片是 <a>（㉕-6）；沒有 id／slug 的資料圖片是 <div>、不可點 */
a.category-thumb__media {
  display: block;
}

.category-thumb__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, filter .3s ease;
}

.category-thumb:hover .category-thumb__media img {
  transform: scale(1.05);
  filter: brightness(.82);
}

@media (prefers-reduced-motion: reduce) {
  .category-thumb__media img {
    transition: none;
  }
}

/* ㉖-2（PM 10/21，改回 ㉕ 之前的互動）：滑過圖片時從下緣往上滑出的藍底「查看詳情」提示列。
   不做滿版覆蓋，只在底部貼一條；它是圖片連結裡的 <span>，點下去就是圖片連結本身。
   名稱連結取得鍵盤焦點時也滑出（:focus-within）。觸控裝置沒有 hover，點圖片或名稱一樣進詳情頁 */
.category-thumb__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-block: 0.75rem;
  background-color: color-mix(in srgb, var(--color-accent) 88%, transparent);
  color: var(--color-surface);
  transform: translateY(100%);
  transition: transform .3s var(--ease-out);
}

.category-thumb__overlay svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.category-thumb__overlay span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
}

.category-thumb:hover .category-thumb__overlay,
.category-thumb:focus-within .category-thumb__overlay {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .category-thumb__overlay {
    transition: none;
  }
}

/* ㉚（PM 10/27）：圖片 → 文字區固定 1rem（不靠分類標籤撐；原本沒標籤時標題離圖片只剩 .2rem），
   文字之間由 gap 提供（標籤→標題略近），少一個元素也不留空洞 */
.category-thumb__body {
  display: grid;
  justify-items: start;
  gap: 0.4rem;
  margin-top: 1rem;
}

.category-thumb__tag + .category-thumb__title {
  margin-top: -0.15rem;
}

.category-thumb__tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-accent);
}

.category-thumb__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--color-text);
}

.category-thumb__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-muted);
}

/* ==========================================
   輪播箭頭（共用，PM 2026-09-24）：熱門產品（.category-band__nav）與最新消息（.news-teaser__nav）
   同一套外觀——寶藍實心圓、白色箭頭，懸停換成藍紫 --color-accent-on-dark（＝頁尾連結懸停色）。
   HTML 上兩個 class 並掛（.carousel-arrow 管外觀、各區自己的 class 只管位置），改外觀只改這一條。
   位置壓在內容區邊緣（-0.75rem）：內容區左右只留 20px，原本的 -4rem 在 1440px 以下會跑出畫面外。
   ========================================== */
.carousel-arrow {
  position: absolute;
  z-index: 2;
  display: inline-flex;   /* 各尺寸都顯示（PM 2026-09-24：原本 1280 以下隱藏，平板手機就沒辦法切換） */
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

/* 卡片全部放得下、不需要輪播時，JS（setupLoopCarousel）用 hidden 收起箭頭——全站輪播都是。
   ㉗-9（PM 10/22）：箭頭／圓點／縮圖列在樣板裡一律先帶 hidden，JS 判斷「能切換」才打開（Hero 1 張、產品圖 1 張、卡片放得下都不出現）。
   .carousel-arrow、.product-teaser__nav button 等的 display 會蓋過瀏覽器內建的 [hidden]，
   要補這條 author 規則；新增輪播箭頭若另有 display 規則，要加進這裡 */
.carousel-arrow[hidden],
.product-teaser__nav button[hidden],
.pd-gallery__arrow[hidden],
.pd-gallery__zoom[hidden],
.pd-gallery__thumbs[hidden],
.pd-lightbox__arrow[hidden],
.hero-nav[hidden],
.hero-dots[hidden] {
  display: none;
}

/* 精選分類桌機：按鈕旁那組箭頭收起時，箭頭容器不佔位；按鈕也沒填時整列（含上外距）不輸出，不留空白 */
.product-teaser__nav:not(:has(> button:not([hidden]))),
.product-teaser__actions:not(:has(> a, button:not([hidden]))) {
  display: none;
}

.carousel-arrow:hover:not(:disabled),
.carousel-arrow:focus-visible:not(:disabled) {
  background-color: var(--color-accent-on-dark);
  color: #FFFFFF;
}

/* 不循環的輪播（公司沿革，㉓-7）停在頭尾時的停用狀態：淡色底、不換懸停色 */
.carousel-arrow:disabled {
  background-color: var(--color-muted-light);
  box-shadow: none;
  cursor: not-allowed;
}

.carousel-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* 輪播可視範圍讓出卡片陰影的空間（PM 2026-09-24：文章卡片陰影被切掉）。
   --shadow-md 是 0 10px 30px：往下約 40px、左右約 30px、往上約 20px；原本只留 1rem（還只有最新消息有留），
   下緣被切成一條線。內距讓出空間、等量負外距抵銷，版面位置不變。
   左右只讓 1.25rem：不能超過卡片間距（最小 1.5rem），否則會露出隔壁那張；手機內容區左右剛好 20px，不會撐出畫面 */
.news-teaser__viewport,
.category-band__thumbs-wrap,
.product-showcase__track-wrap,
.pd-related__viewport {
  padding: 1.25rem 1.25rem 2.75rem;
  margin: -1.25rem -1.25rem -2.75rem;
}

/* 產品卡輪播的箭頭（首頁熱門產品、關於我們產品展示、產品頁相關產品）：垂直置中於卡片圖片，不是整張卡（含標題）。
   ㉗-3（PM 10/22）：三處原本各寫一個百分比（40%／35%／35%），卡片文字長短一變就偏離圖片；
   改成跟首頁精選分類、最新消息同一種算法——圖片 4:3，正中＝卡片寬 × 3/8，卡片寬用輪播容器寬（cqw）算，
   公式與各軌道的卡片寬度規則一致（平板手機 --per-view 張、桌機 25% − 1.125rem）。 */
.category-band__carousel,
.product-showcase__carousel,
.pd-related__carousel {
  container-type: inline-size;
}

.category-band__nav,
.product-showcase__nav,
.pd-related__nav {
  --thumb-w: calc((100cqw - (var(--per-view) - 1) * 1.5rem) / var(--per-view));
  top: calc(var(--thumb-w) * 3 / 8);
  transform: translateY(-50%);
}

/* 產品展示軌道 gap 2.5rem（見 .product-showcase__track .category-thumb） */
.product-showcase__nav {
  --thumb-w: calc((100cqw - (var(--per-view) - 1) * 2.5rem) / var(--per-view));
}

@media (min-width: 1280px) {
  .category-band__nav,
  .product-showcase__nav,
  .pd-related__nav {
    --thumb-w: calc(25cqw - 1.125rem);
  }
}

.category-band__nav--prev {
  left: -0.75rem;
}

.category-band__nav--next {
  right: -0.75rem;
}

/* ==========================================
   13. 最新消息：置中標題；2x2 文章卡片（左圖右文）；下方置中按鈕
   ========================================== */
.news-teaser {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.news-teaser__head {
  text-align: center;
  max-width: 48rem;
  margin-inline: auto;
}

/* 說明文字（PM 2026-09-24 補上），語彙同其他區塊的說明段落。
   相關產品／相關文章（.pd-related__desc，報告 159）同為置中標頭，共用這一條 */
.news-teaser__desc,
.pd-related__desc {
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

.news-teaser__grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .news-teaser__grid {
    grid-template-columns: repeat(var(--per-view), 1fr);   /* 未達輪播門檻的網格版，張數同輪播 */
    gap: 2rem;
  }
}

@media (min-width: 1280px) {
  .news-teaser__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- 超過門檻篇數時改橫向輪播（門檻在 script.js 的 CAROUSEL_FROM；合流 P6b 自 PM 版移植）----
   同一個容器換一組排版規則、卡片 HTML 完全不變：display 從 grid 改成 flex，
   卡片改成固定基準寬，其餘（gap、margin-top）沿用上面的網格設定，不重寫一份。 */
.news-teaser__carousel {
  position: relative;
}

/* 卡片有陰影，overflow:hidden 會把上下緣切掉——用內距讓出陰影空間、
   再用等量負外距抵銷，版面位置與沒有這層 wrapper 時完全相同
   （手法同合作夥伴跑馬燈的 .partners__logos） */
.news-teaser__viewport {
  overflow: hidden;
}

.news-teaser__grid--carousel {
  display: flex;
  transition: transform .45s var(--ease-out);
  will-change: transform;
}

/* 平板手機一次 --per-view 張（1／2／3，卡片是圖上文下）；桌機橫式卡一次 2 張。2rem＝768 起的 gap */
.news-teaser__grid--carousel>.news-card-teaser {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * 2rem) / var(--per-view));
}

@media (min-width: 1280px) {
  .news-teaser__grid--carousel>.news-card-teaser {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-teaser__grid--carousel {
    transition: none;
  }
}

/* 最新消息輪播箭頭：外觀共用 .carousel-arrow（見「輪播箭頭」段），這裡只管位置（PM 2026-09-24）。
   垂直置中於卡片列：上外距從內層網格移到輪播外層，top:50% 才是卡片的正中（原本偏下 1.5rem）。 */
.news-teaser__carousel {
  margin-top: 3rem;
}

.news-teaser__carousel .news-teaser__grid {
  margin-top: 0;
}

.news-teaser__nav {
  top: 50%;
  transform: translateY(-50%);
}

/* 平板／手機的卡片是圖上文下（見 .news-card-teaser），整張卡的正中會落在文字上、把分類蓋住——
   改成對齊圖片正中：圖片高＝卡片寬 × 10/16，卡片寬用容器寬（cqw）算，一張／兩張各一條 */
@media (max-width: 1279.98px) {
  .news-teaser__carousel {
    container-type: inline-size;
  }

  .news-teaser__nav {
    top: calc((100cqw - (var(--per-view) - 1) * 2rem) / var(--per-view) * 5 / 16);
  }
}

.news-teaser__nav--prev {
  left: -0.75rem;
}

.news-teaser__nav--next {
  right: -0.75rem;
}

/* 未達門檻（維持 2×2 網格）時整組箭頭不存在——JS 沒加 .is-carousel。
   選擇器多疊一層，才蓋得過 .carousel-arrow 的 display:inline-flex */
.news-teaser__carousel:not(.is-carousel) .news-teaser__nav {
  display: none;
}

.news-card-teaser {
  display: flex;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, box-shadow .25s ease;
}

.news-card-teaser:hover {
  transform: translateY(-4px);
}

/* 列表頁的卡片不要 hover 上移，首頁預覽卡（沒有這個 class）維持原本的位移效果 */
.news-card-teaser--static:hover {
  transform: none;
}

.news-card-teaser__media {
  flex: 0 0 40%;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
}

/* 平板／手機：圖上、內容下（PM 2026-09-24）。卡片寬只剩 300–480px 時，左圖右文會把照片擠成細長條。
   （所以平板一次放 3 張也成立——直式卡片不受「橫式卡只放 2 欄」的限制） 
   文章卡片全站只有這一份（首頁最新消息、文章專區、文章內頁的相關文章都吃它），一起變 */
@media (max-width: 1279.98px) {
  .news-card-teaser {
    flex-direction: column;
  }

  .news-card-teaser__media {
    flex: none;
    aspect-ratio: 16 / 10;
  }
}

.news-card-teaser__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, filter .25s ease;
}

.news-card-teaser:hover .news-card-teaser__media img {
  transform: scale(1.05);
  filter: brightness(.82);
}

.news-card-teaser__body {
  flex: 1;
  min-width: 0;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* 分類＋日期：只有列表頁的卡片會用到這個外層 wrapper（首頁預覽卡沒有分類標籤，
   HTML 裡沒放 .news-card-teaser__meta，不會受這裡影響） */
.news-card-teaser__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.news-card-teaser__tag {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-accent);
}

/* 分類已經是強調色了，日期在這裡改回中性灰，避免兩個藍色擠在一起搶焦點；
   選擇器多疊一層 .news-card-teaser__meta 只在有分類標籤的列表頁卡片生效，
   首頁預覽卡的日期沒有這層外殼，不受影響、維持原本的強調色 */
.news-card-teaser__meta .news-card-teaser__date {
  color: var(--color-muted-light);
}

.news-card-teaser__date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-accent);
}

.news-card-teaser__date svg {
  width: 1rem;
  height: 1rem;
}

.news-card-teaser__title {
  margin: 0.75rem 0 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--color-text);
}

/* ㉚：分類與日期都沒有時 meta 列不輸出，標題就是第一個元素，不留上距 */
.news-card-teaser__title:first-child {
  margin-top: 0;
}

/* 標題文字本身包一層 <a>，顏色/字重都繼承外層 h3 的設定，看起來還是純標題，
   不會像一般連結那樣變色加底線 */
.news-card-teaser__title a {
  color: inherit;
  text-decoration: none;
}

/* 兩行後截斷加刪節號：摘要現在也是 <a>（可以點擊連到內文），
   同樣把連結預設樣式蓋掉，看起來還是純文字說明。
   只有列表頁卡片有這個元素，首頁預覽卡沒有，不受影響 */
.news-card-teaser__excerpt {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-muted);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-teaser__link {
  margin-top: auto;
  padding-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-accent);
  transition: gap .2s ease;
}

.news-card-teaser__link svg {
  width: 1rem;
  height: 1rem;
}

.news-card-teaser:hover .news-card-teaser__link {
  gap: 0.6rem;
}

.news-teaser__actions {
  margin-top: var(--body-gap-action);   /* ㉙-12：原 3rem，與其他區塊內容下方的置中按鈕統一 */
  display: flex;
  justify-content: center;
}

/* ==========================================
   14. 合作夥伴：左＝標題＋說明＋按鈕；右＝夥伴標誌 4x2 網格（灰階，hover 恢復彩色）
   ========================================== */
.partners {
  padding-block: var(--space-section);
  background-color: var(--color-bg-alt);
}

.partners__grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

@media (min-width: 1280px) {
  .partners__grid {
    flex-direction: row;
    align-items: start;   /* PM 2026-09-24：左欄標題靠上、與右欄頂端對齊（原本垂直置中） */
    gap: 6rem;
  }

  .partners__text {
    flex: 0 0 34rem;
  }

  .partners__logos {
    flex: 1;
    min-width: 0;
  }
}

.partners__desc {
  margin: 1.25rem 0 0;   /* 下方 2rem 改由 .section-actions 的上外距提供（按鈕包進 .section-actions 後，兩者疊加會變 4rem） */
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

/* 兩排跑馬燈：上排往右、下排往左，各自把清單複製一份接在後面做無縫循環 */
.partners__logos {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: hidden;
  padding-block: 1rem;
  margin-block: -1rem;
  mask-image: linear-gradient(90deg, transparent 0, #000 4rem, #000 calc(100% - 4rem), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4rem, #000 calc(100% - 4rem), transparent 100%);
}

.partners__marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 2.5rem;
  width: max-content;
  animation: partners-marquee-left 26s linear infinite;
}

.partners__marquee-track--reverse {
  animation-name: partners-marquee-right;
}

.partners__marquee-track:hover {
  animation-play-state: paused;
}

/* 位移距離改用 JS 量出來的精確 px（--marquee-distance），不用 -50%——
   -50% 是抓「軌道自己（兩份清單）」的總寬度去除以二，若有捲動軸／子像素捨入，
   兩份清單的實際寬度不會剛好對半，每次循環銜接處就會卡一下；
   改成量測「第二份清單第一項」的實際 offsetLeft，保證跟第一項起點完全對齊 */
@keyframes partners-marquee-left {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-1 * var(--marquee-distance, 50%)));
  }
}

@keyframes partners-marquee-right {
  from {
    transform: translateX(calc(-1 * var(--marquee-distance, 50%)));
  }

  to {
    transform: translateX(0);
  }
}

/* ㉗-9（PM 10/22）：一份清單就放得下時不捲動（JS 掛 .is-static）——不放接縫用的複本、兩側也不做淡出遮罩
   （靜止時淡出會蓋到最左右的 Logo）。減少動態偏好同樣不捲動，複本也一起收起，不讓同一家出現兩次 */
.partners__logos.is-static {
  mask-image: none;
  -webkit-mask-image: none;
}

.partners__logos.is-static .partners__marquee-track {
  animation: none;
  margin-inline: auto;   /* PM 10/22：放得下停住時置中（三版一致） */
}

.partners__logos.is-static .partner-logo--dup {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .partners__marquee-track {
    animation: none;
  }

  .partners__logos .partner-logo--dup {
    display: none;
  }
}

.partner-logo {
  flex: 0 0 9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  background-color: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform .25s ease;
}

.partner-logo:hover {
  transform: translateY(-3px);
}

/* ㉗-1（PM 10/22，照 v1）：灰階＋半透明只套在 Logo 圖上（原本套整張卡，只有名稱的卡片文字也被淡化） */
.partner-logo__image {
  max-width: 6rem;
  max-height: 2rem;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .6;
  transition: filter .25s ease, opacity .25s ease;
}

.partner-logo:hover .partner-logo__image {
  filter: grayscale(0);
  opacity: 1;
}

/* 有 Logo 圖時，名稱是圖下方的小字說明（單行、過長省略） */
.partner-logo__name {
  max-width: 100%;
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 沒上傳 Logo 只有名稱（㉗-1，照 v1 ㉖-1）：名稱是卡片唯一內容，放大成可讀字級、用內文色、可換行置中 */
.partner-logo__name:only-child {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
  white-space: normal;
  text-align: center;
}

/* ==========================================
   15. 頁尾 Footer：品牌＋社群／聯絡我們／產品分類／最新消息 四欄；下方版權列
   ========================================== */
.site-footer {
  background-color: var(--color-brand-deep);
  color: #FFFFFF;
}

.site-footer__main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-block: 4rem 6rem;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 480px) {
  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .site-footer__main {
    flex-direction: row;
    align-items: flex-start;
    gap: 6rem;
    padding-block: 5rem 5.5rem;
  }

  .footer-brand {
    flex: 0 0 20rem;
  }

  .footer-cols {
    flex: 1;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 2.5rem;
  }
}

/* 連結欄設滿 3 欄（064：固定的「聯絡我們」＋3 欄＝4 欄）：
   手機 1 欄 → 480 起 2×2 → 768 起 4 欄並排（3 欄格線會排成 3＋1）；
   桌機 4 欄文字＋社群放不進同一列，社群改到下一列靠左（原本 3 欄時社群是最右邊的 auto 欄） */
@media (min-width: 480px) {
  .footer-cols--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .footer-cols--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .footer-cols--4 {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .footer-cols--4 .footer-social {
    grid-column: 1 / -1;
  }
}

.footer-brand__logo {
  height: 4rem;
  width: auto;
  display: block;
  margin-bottom: 1.25rem;
}

.footer-brand__desc {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: #FFFFFF;
}

/* 品牌區公司名稱（㉕-2 #22）：Logo 與公司簡述之間，字級比簡述大一階、加粗，當簡述的標題 */
.footer-brand__company {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.5;
  color: #FFFFFF;
}

/* ㉓-8（PM 10/16）：< 1280 品牌欄佔滿整欄，說明與框架同寬（原本 22rem 不分寬度，手機框架比 352px 寬時右邊留白）；桌機維持原本的上限 */
@media (min-width: 1280px) {
  .footer-brand__desc {
    max-width: 22rem;
  }
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

@media (min-width: 1280px) {
  .footer-social {
    margin-top: 0;
  }
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background-color: #FFFFFF;
  color: var(--color-accent);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

/* ==========================================
   右下角浮動工具（P9，v1／v2 有）：社群連結＋回到頂端。HTML 在 partials/footer.php，行為在 script.js 的 initFloatTools。
   最上方撥打電話（㉟-1）一進頁面就顯示；其餘捲動超過 400px 才淡入（.is-visible）；社群清單點切換鈕才展開（.is-open），由下往上排在切換鈕上方。
   z-index 40：在內容之上、導覽列（50）與燈箱（200）之下。
   ========================================== */
.float-tools {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

/* ㉟-1：淡入改套在「電話以外」的按鈕上——電話一進頁面就顯示，其他（社群／AI 客服／分享／回頂）照舊捲 400px 才出現。
   沒出現時不佔位（display:none），電話貼在最下方；出現時由 @starting-style 淡入（不支援的瀏覽器直接出現）。 */
.float-tools > :not(.float-tools__call) {
  transition: opacity .25s ease, transform .25s ease, display .25s allow-discrete;
}

.float-tools:not(.is-visible) > :not(.float-tools__call) {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}

@starting-style {
  .float-tools.is-visible > :not(.float-tools__call) {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ㉟-1 撥打電話（直式膠囊）：和其他浮動鈕同寬，上方 Phone 圖示、下方文字直排（英文 Call Us 一併直排旋轉）。 */
.float-tools__call {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 2.75rem;
  padding: 0.875rem 0;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color .2s ease;
}

.float-tools__call:hover {
  background-color: var(--color-accent-on-dark);
}

.float-tools__call svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
}

.float-tools__call-text {
  writing-mode: vertical-rl;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.float-tools__btn,
.float-tools__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background-color .2s ease;
}

.float-tools__btn:hover,
.float-tools__social a:hover {
  background-color: var(--color-accent-on-dark);
}

.float-tools__btn svg,
.float-tools__social svg {
  width: 1.25rem;
  height: 1.25rem;
}

.float-tools__social {
  display: none;
  flex-direction: column;
  gap: 0.625rem;
}

.float-tools.is-open .float-tools__social {
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  .float-tools > :not(.float-tools__call) {
    transition: none;
  }
}

.footer-social a:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 1.5rem;
  height: 1.5rem;
}

.footer-col__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links a {
  font-size: 0.9375rem;
  color: #FFFFFF;
  transition: color .2s ease;
}

.footer-links a:hover {
  color: var(--color-accent-on-dark);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 連結欄「聯絡據點」（064）：每個據點＝名稱＋完整聯絡資訊（同固定「聯絡我們」欄的 .footer-contact），
   後台最多勾 2 筆，據點之間的距離比照欄標題下緣 */
.footer-locations {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-location__name {
  margin-bottom: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
}

.footer-location__name:last-child {
  margin-bottom: 0;
}

.footer-location__name a {
  color: #FFFFFF;
  transition: color .2s ease;
}

.footer-location__name a:hover {
  color: var(--color-accent-on-dark);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #FFFFFF;
}

.footer-contact svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: #FFFFFF;
}

.footer-contact a {
  transition: color .2s ease;
}

.footer-contact a:hover {
  color: var(--color-accent-on-dark);
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 1.25rem;
  font-size: 0.8125rem;
  color: #FFFFFF;
}

.site-footer__bottom-inner p {
  margin: 0;
}

.footer-bottom__link {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s ease;
}

.footer-bottom__link:hover {
  color: var(--color-accent-on-dark);
}

.footer-bottom__poweredby a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 767.98px) {
  .site-footer__bottom-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ==========================================
   16. 內頁橫幅 Page Hero：各內頁（關於我們／聯絡我們／產品／消息／403／404…）共用
   沿用首頁 Hero 的其中一張背景圖＋同一套深色遮罩語彙，固定導覽列覆蓋其上
   ========================================== */
.page-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--color-brand);
  min-height: 22rem;
  display: flex;
  align-items: center;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center 15%;
}

.page-hero__mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 21, 63, .2) 0%, rgba(9, 21, 63, .75) 100%);
}

.page-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 9rem;
  padding-bottom: 3rem;
  text-align: center;
}

@media (max-width: 767.98px) {
  .page-hero__inner {
    padding-top: 7.5rem;
    padding-bottom: 2.5rem;
  }
}

.page-hero__title {
  margin: 0.5rem 0 0;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: #FFFFFF;
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
}

.page-hero__lead {
  /* PM 2026-09-24：放寬（原 42rem）。頁面簡介由客戶在後台自行輸入、自己決定換行，
     太窄會把一兩個字單獨擠到下一行；60rem 在 1440px 下約是內容區的三分之二，仍保有置中版型的比例。
     ㉙（PM 10/27）已改成框架同寬，max-width 與上外距由檔尾「㉙」段蓋掉 */
  max-width: 60rem;
  margin: 1.25rem auto 0;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #EAF0FE;
}

/* ==========================================
   17. 產品型錄列表（/products）：左分類篩選／右搜尋列＋格線清單＋分頁
   ========================================== */
/* ㉕-6 分類介紹區（型錄頁／文章專區，PM 10/20）：Banner 下方、列表上方獨立一區，選了分類才出現（script.js renderCategoryIntro）。
   白卡＋陰影同站上卡片語彙；手機上圖下文，768 起左封面（1/3）右文字、垂直置中（封面是分類卡用的小圖，不撐大）；沒封面只出文字（㉖-5）。
   下方列表區自己有上內距，所以這一區只留上內距，兩區之間的距離＝一個 --space-section。 */
.cat-intro {
  position: relative;
  z-index: 1;   /* 卡片陰影要壓在下一區（同底色）上面，不然下緣陰影會被列表區的背景蓋掉 */
  padding-top: var(--space-section);
  background-color: var(--color-bg);
}

.cat-intro__card {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.cat-intro__media {
  aspect-ratio: 16 / 9;
}

.cat-intro__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-intro__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;   /* ㉖-5：副標題／名稱／說明之間的距離只由這裡提供，缺哪個元素都不會留空洞或疊加 */
  padding: 1.75rem 1.5rem 2rem;
}

/* 共用 .eyebrow 自帶 margin-bottom，在這裡歸零交給 gap（疊寫提權重，不靠順序） */
.cat-intro__body .cat-intro__eyebrow {
  margin: 0;
}

.cat-intro__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
  font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem);
  color: var(--color-text);
}

.cat-intro__desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-muted);
}

/* 只有有封面時才分左右兩欄；沒封面（㉖-5）就是單欄純文字卡 */
@media (min-width: 768px) {
  .cat-intro__card--media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: center;
  }

  .cat-intro__media {
    align-self: stretch;
    aspect-ratio: 4 / 3;
  }

  .cat-intro__body {
    padding: 2.5rem 3rem;
  }
}

.catalog {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.catalog__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* 側欄＋網格到 1280 才並排（平板改用上方的分類下拉，網格才放得下 3 欄，張數與全站一致） */
@media (min-width: 1280px) {
  .catalog__layout {
    grid-template-columns: 16rem 1fr;
    gap: 3rem;
    align-items: start;
  }
}

/* 側欄分類清單：只在桌機顯示，窄螢幕改用下方的下拉選單 */
.catalog__sidebar {
  display: none;
}

@media (min-width: 1280px) {
  .catalog__sidebar {
    display: block;
    position: sticky;
    top: 7rem;
  }
}

.catalog__sidebar-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text);
  margin: 0 0 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--color-border);
}

.catalog__cat-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog__cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}

.catalog__cat-item:active {
  background-color: transparent;
  color: var(--color-muted);
}

.catalog__cat-count {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: inherit;
  opacity: .6;
}

.catalog__cat-item.is-active {
  color: var(--color-accent);
  font-weight: 500;
}

/* 三層分類樹：每一層一個 .catalog__cat-row（展開箭頭＋可點的分類名稱），
   子層 .catalog__cat-sublist 預設收合（跟手機導覽選單的手風琴同一套 grid-template-rows 手法） */
.catalog__cat-row {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.catalog__cat-row .catalog__cat-item {
  flex: 1 1 auto;
}

.catalog__cat-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 1.75rem;
  height: 1.75rem;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ㉟-5：沒有子層的分類放同寬佔位，名稱和有展開鈕的列左緣對齊 */
.catalog__cat-toggle-ph {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
}

.catalog__cat-toggle:active {
  background-color: transparent;
}

.catalog__cat-toggle svg {
  width: 16px;
  height: 16px;
}

/* 十字（Lucide Plus）的兩條 path：第一條橫線固定不動，第二條直線收合時淡出／縮成 0，
   只留橫線＝變成「－」，展開時再轉回「＋」 */
.catalog__cat-toggle svg > :last-child {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .2s ease, opacity .2s ease;
}

.catalog__cat-toggle[aria-expanded="true"] svg > :last-child {
  transform: scaleY(0);
  opacity: 0;
}

.catalog__cat-sublist {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.75rem;
  transition: grid-template-rows .22s ease;
}

/* 展開／收合動畫的關鍵：grid 容器唯一的直接子節點是 <ul>（不是 <li>——那是 <ul> 裡面的），
   要讓 min-height:0／overflow:hidden 生效，一定要套在這個直接子節點上，
   套在 li 上選不到任何東西，0fr/1fr 動畫等於沒作用（箭頭點了也不會展開／收合） */
.catalog__cat-sublist>ul {
  min-height: 0;
  overflow: hidden;
}

.catalog__cat-sublist.is-open {
  grid-template-rows: 1fr;
}

.catalog__cat-sublist>ul>li::before {
  content: '';
  display: block;
  height: 0.25rem;
}

.catalog__cat-item--l2 {
  font-size: 1rem;
}

.catalog__cat-item--l3 {
  font-size: 1rem;
}

/* 分類下拉選單：只在窄螢幕（＜1280px）顯示 */
.catalog__cat-select-wrap {
  margin-bottom: 2.5rem;
}

@media (min-width: 1280px) {
  .catalog__cat-select-wrap {
    display: none;
  }
}

.catalog__cat-select {
  width: 100%;
  padding: 0.75rem 1.125rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* 工具列：搜尋列＋結果數量＋檢視切換 */
.catalog__toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .catalog__toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.catalog__search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1.125rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-muted);
}

@media (min-width: 640px) {

  /* 撐滿工具列剩餘寬度，不再卡在 24rem 的上限只占一半 */
  .catalog__search {
    flex: 1;
  }
}

.catalog__search svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.catalog__search input {
  width: 100%;
  border: 0;
  outline: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-text);
}

.catalog__toolbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.catalog__count {
  font-size: 0.875rem;
  color: var(--color-muted);
  white-space: nowrap;
}

.catalog__view-toggle {
  display: flex;
  gap: 0.375rem;
  padding: 0.375rem;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-sm);
}

.catalog__view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: none;
  border: 0;
  color: var(--color-muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.catalog__view-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.catalog__view-btn[aria-pressed="true"] {
  background-color: #FFFFFF;
  color: var(--color-accent);
  box-shadow: var(--shadow-md);
}

/* 商品格線：預設 grid（2/3 欄），切換清單檢視時改用 .catalog__grid--list */
.catalog__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 1.5rem;
}

/* .catalog__grid 自己設了 display:grid（author 規則），
   優先度天生就會蓋過瀏覽器內建的 [hidden]{display:none}（UA 規則，即使選擇器優先度更高也一樣輸），
   單純用 JS 切 hidden 屬性不會真的隱藏。這裡另外補一條 author 規則專門處理 [hidden] 狀態 */
.catalog__grid[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .catalog__grid {
    grid-template-columns: repeat(var(--per-view), 1fr);
  }
}

@media (min-width: 1280px) {
  .catalog__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, box-shadow .25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card__link {
  display: block;
  color: inherit;
}

.product-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.product-card:hover .product-card__media img {
  transform: scale(1.05);
}

.product-card__body {
  padding: 1.25rem 1.25rem 2.5rem;
}

.product-card__tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--color-accent);
}

.product-card__title {
  margin: 0.375rem 0 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text);
}

.product-card__sku {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-muted-light);
}

.product-card__desc {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 清單檢視：改用表格式的 .catalog-row（見下方「產品型錄清單檢視」區塊），
   這裡只需要把外層格線收成單欄，卡片本身的排版交給 .catalog-row 自己處理 */
.catalog__grid--list {
  grid-template-columns: 1fr;
  /* 每一列（.catalog-row）自己已經用 padding-block + border-bottom 撐出上下間距，
     這裡如果還吃 .catalog__grid 原本給卡片格線用的 gap，會變成兩層間距疊在一起，
     標題列跟第一列之間看起來特別空 */
  gap: 0;
}

/* 分頁（㉟-4：永遠一排、不換行；最多 5 個元素，320 也放得下） */
.catalog__pagination {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.catalog__page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding-inline: 0.5rem;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  color: var(--color-muted);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.catalog__page-btn:hover:not(:disabled) {
  border-color: var(--color-border);
}

.catalog__page-btn.is-active {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.catalog__page-btn:disabled {
  color: var(--color-muted-light);
  cursor: not-allowed;
}

/* ㉟-4 箭頭鈕（Chevron 圖示）與目前頁碼（點了跳頁）：結構見 script.js 的 paginationHtml()。 */
.catalog__page-btn svg {
  flex: none;
  width: 1rem;
  height: 1rem;
}

/* 目前頁碼：外觀是 active 頁碼鈕＋小 ChevronDown，寬度隨位數；上面疊一個同尺寸的透明原生 <select> 負責選頁 */
.catalog__page-current {
  position: relative;
  display: inline-flex;
  flex: none;
}

.catalog__page-current .catalog__page-btn {
  gap: 0.25rem;
  padding-inline: 0.75rem 0.5rem;
}

.catalog__page-current .catalog__page-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

.catalog__page-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  /* iOS 的 select 字小於 16px 時點開會放大整頁；透明看不到，字級只影響這件事 */
  font-size: 16px;
}

.catalog__page-current:has(.catalog__page-select:focus-visible) .catalog__page-btn {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* 頁數多時中間的省略號（P9，㉟-4 起只在目前頁與最後一頁之間） */
.catalog__page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 2.5rem;
  color: var(--color-muted-light);
}

/* 查無結果／找不到頁面等空狀態元件：全站共用（型錄／消息／詢價清單皆會用到） */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 2.5rem;
  color: var(--color-muted);
}

/* 同 .catalog__grid[hidden] 的道理：author 規則的 display:flex 天生蓋過瀏覽器內建的
   [hidden]{display:none}（UA 規則），這個元件全站共用、會一直用 JS 切 hidden 顯示/隱藏，
   沒有這條會變成永遠關不掉 */
.empty-state[hidden] {
  display: none;
}

/* 原本用 .empty-state svg（後代選擇器）統一套裝飾圖示的樣式，
   結果連按鈕裡的 .btn-arrow 箭頭圖示也是 .empty-state 的後代、一起被選到，
   兩個特異度相同時後寫的規則會贏，箭頭因此被硬蓋成裝飾圖示的樣子（尺寸、顏色都不對）。
   改成只鎖定裝飾圖示自己的 class，不再用後代選擇器往下掃到按鈕內部 */
.empty-state__icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.25rem;
  color: var(--color-muted-light);
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

/* ㉙-13（PM 10/27）：說明不設窄欄（原 26rem，比照置中文字和框架同寬）；
   說明 → 按鈕比照卡片內小標頭 24（原 40），由按鈕上距提供，沒有按鈕時下方不多留白 */
.empty-state p {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}
.empty-state > .btn { margin-top: var(--head-gap-action-sm); }

/* ==========================================
   18. 麵包屑列：貼在固定導覽列下方，商品／文章詳情頁共用
   ========================================== */
.crumb-bar {
  position: relative;
  overflow: hidden;
  padding-top: 7.5rem;
  padding-bottom: 1.5rem;
  background-color: var(--color-bg-alt);
}

@media (min-width: 768px) {
  .crumb-bar {
    padding-top: 8.5rem;
  }
}

/* 帶底圖的麵包屑列（目前商品詳情頁在用）：跟 .page-hero 同一套「底圖＋深色漸層遮罩」做法，
   高度比完整版 .page-hero 矮很多，純粹用來讓小小一條麵包屑列也有畫面，不是完整版的頁面主視覺。
   一定要給 min-height，align-items:flex-end 才有多餘空間可以把內容推到底部——
   容器本身沒有固定高度的話，內容區塊會剛好等於 padding+內容的總和，flex-end 等於沒作用 */
.crumb-bar--photo {
  display: flex;
  align-items: flex-end;
  min-height: 13rem;
  padding-bottom: 2rem;
}

.crumb-bar--photo .crumb-bar__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.crumb-bar--photo .crumb-bar__mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 21, 63, .55) 0%, rgba(9, 21, 63, .8) 100%);
}

.crumb-bar__inner {
  position: relative;
  z-index: 2;
}

.crumb-bar--photo .breadcrumb {
  color: rgba(255, 255, 255, .7);
}

.crumb-bar--photo .breadcrumb a {
  color: rgba(255, 255, 255, .9);
}

.crumb-bar--photo .breadcrumb a:hover {
  color: #FFFFFF;
}

.crumb-bar--photo .breadcrumb li[aria-current="page"] {
  color: #FFFFFF;
}

.crumb-bar--photo .breadcrumb li:not(:last-child)::after {
  color: rgba(255, 255, 255, .45);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  color: var(--color-muted-light);
}

/* 分類層彼此之間（不是各自獨立一頁，只是同一個型錄頁的篩選條件）用「·」，
   跟真正換頁的「/」區分開來，選擇器特異度故意疊三層蓋過上面那條 */
.breadcrumb li.breadcrumb__item--dot:not(:last-child)::after {
  content: '·';
}

.breadcrumb a {
  color: var(--color-muted);
  transition: color .2s ease;
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb li[aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

/* 內頁麵包屑列（PM 2026-09-24）：Banner 下方、內容區最上方靠左，淺底深字。
   原本放在 Banner 裡置中、標題上方，Banner 內容已經很多，移出來。HTML 見 partials/page-banner.php。
   底線把它和下面的內容區隔開——下一個區塊可能是不同底色，沒有線會像是浮在交界上。 */
.page-crumbs {
  padding-block: 1rem;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

/* ==========================================
   19. 產品詳情頁（/products/detail）
   ========================================== */
.pd-main {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.pd-main__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .pd-main__grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* 圖片相簿 */
.pd-gallery__main {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--color-bg-alt);
  box-shadow: var(--shadow-md);
}

.pd-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, .92);
  border: 0;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.pd-gallery__arrow:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.pd-gallery__arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

.pd-gallery__arrow--prev {
  left: 1rem;
}

.pd-gallery__arrow--next {
  right: 1rem;
}

.pd-gallery__zoom {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, .92);
  border: 0;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.pd-gallery__zoom:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.pd-gallery__zoom svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* 圖片燈箱：全螢幕深色背景＋置中圖片，跟主圖共用同一組上一張／下一張邏輯 */
.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: rgba(9, 21, 63, .92);
}

.pd-lightbox[hidden] {
  display: none;
}

.pd-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

/* 燈箱張數（P9）：畫面下緣置中 */
.pd-lightbox__count {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  z-index: 2;
  margin: 0;
  transform: translateX(-50%);
  font-size: 0.9375rem;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .85);
}

.pd-lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, .12);
  border: 0;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .2s ease;
}

.pd-lightbox__close:hover {
  background-color: rgba(255, 255, 255, .24);
}

.pd-lightbox__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.pd-lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, .12);
  border: 0;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .2s ease;
}

.pd-lightbox__arrow:hover {
  background-color: rgba(255, 255, 255, .24);
}

.pd-lightbox__arrow svg {
  width: 2.5rem;
  height: 2.5rem;
}

.pd-lightbox__arrow--prev {
  left: 1.5rem;
}

.pd-lightbox__arrow--next {
  right: 1.5rem;
}

@media (max-width: 640px) {
  .pd-lightbox {
    padding: 1rem;
  }

  .pd-lightbox__arrow {
    width: 2.5rem;
    height: 2.5rem;
  }
}

.pd-gallery__thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.6rem;
  overflow-x: auto;
}

.pd-gallery__thumb {
  flex: 0 0 5rem;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  transition: border-color .2s ease;
}

.pd-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-gallery__thumb[aria-selected="true"] {
  border-color: var(--color-accent);
}

/* 資訊面板 */
.pd-info__tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-accent);
}

.pd-info__name {
  margin: 0.5rem 0 0;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  font-size: clamp(2.5rem, 1.1rem + 1.6vw, 2.25rem);
}

.pd-info__code {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  color: var(--color-muted-light);
}

.pd-info__intro {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

.pd-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 1.75rem 0 0;
  padding: 1.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.pd-meta[hidden] {
  display: none;
}

/* ㉝-9（PM 10/28）：只剩 1 項（只有 MOQ 或只有交期）時單欄滿寬，不留右半邊空格；2 項維持兩欄 */
.pd-meta > :only-child {
  grid-column: 1 / -1;
}

.pd-meta dt {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.pd-meta dd {
  margin: 0.25rem 0 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
}

.pd-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* 加入詢價單維持跟數量調整器並排，只是尺寸比一般 .btn 縮小一點，
   不搶走上面規格資訊的視覺重量 */
.pd-order__submit {
  min-height: 2.5rem;
  padding: 0.7rem 1.56rem;
  font-size: 0.875rem;
}

.pd-order__submit:hover {
  transform: none;
}

/* ㉝-4（PM 10/28，三版統一，比照 v1 .pd-buy-row）：手機上數量欄旁放不下時，按鈕換到下一行並撐滿。
   flex-grow 只在 ≤767 開：換行後撐滿整行；放得下時（較寬的手機）就填滿數量欄右邊剩下的寬度。
   平板以上維持原本的自然寬度（不在那裡開，否則桌機按鈕會被拉成一長條） */
@media (max-width: 767.98px) {
  .pd-order__submit {
    flex: 1 1 auto;
  }
}

/* ㉟-2：沒開數量欄位（script.js 拿掉 .pd-qty、加 .pd-order--no-qty）→「加入詢價單」撐滿那一列（各寬度） */
.pd-order--no-qty .pd-order__submit {
  flex: 1 1 auto;
}

/* ㉟-2：開數量欄位但不限制最小訂購量時，數量欄旁的單位（沒填＝「件」） */
.pd-order__unit {
  font-size: 0.9375rem;
  color: var(--color-muted);
}

.pd-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pd-qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: none;
  border: 0;
  font-size: 1.25rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background-color .15s ease;
}

.pd-qty__btn:hover:not(:disabled) {
  background-color: var(--color-bg-alt);
}

.pd-qty input {
  /* ㉚：放得下「9,999,999」（7 位數＋逗號）；type=text，沒有瀏覽器上下箭頭（下方 spin-button 規則已不需要） */
  width: 7.5rem;
  height: 2.75rem;
  border: 0;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
}

.pd-order__moq {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* 分類型錄 PDF 下載鈕的容器（合流 P5）：連結本身沿用產品詳情「資料下載」的 .pd-download-link。
   沒有型錄時 script.js 留空，:empty 不產生上邊距，側欄底下才不會多一塊空白 */
.cat-catalog-dl {
  margin-top: 1.5rem;
}

.cat-catalog-dl:empty {
  margin-top: 0;
}

/* ==========================================
   規格選擇器（多維度產品，合流 P5；㊲-1 依序選擇，PM 11/05）
   只有設定了 options 的產品會出現。進頁只出第一層，選了才出下一層（.is-new 淡入）、只列搭得起來的選項；
   第一層標題列右側「重新選擇」。沒選完時 MOQ／交期框的位置放 .pd-pick-hint、數量欄 .is-off。
   色彩／圓角沿用右欄既有語彙。
   ========================================== */
.pd-opts {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pd-opts[hidden] {
  display: none;   /* flex 會蓋掉 hidden，要明寫 */
}

/* 標題列：維度名稱＋（第一層）右側「重新選擇」；間距由 margin-bottom 提供給下方選項 */
.pd-opt__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.625rem;
}

.pd-opt__label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.pd-opt__reset {
  flex: none;
  padding: 0;
  background: none;
  border: 0;
  font-size: 0.875rem;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pd-opt__reset:hover {
  color: var(--color-accent-dark);
}

.pd-opt__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pd-opt__chip {
  padding: 0.5rem 1rem;
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  color: var(--color-muted);
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.pd-opt__chip:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.pd-opt__chip.is-active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #FFFFFF;
}

/* 下一層剛出現時淡入（㊲-1①）；減少動態時不動畫 */
.pd-opt.is-new {
  animation: pd-opt-in .25s var(--ease-out) both;
}

@keyframes pd-opt-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ㊲-1③④ 沒選完時放在 MOQ／交期框位置的提示：外框和 .pd-meta 同一個位置與圓角，虛線表示「還沒有資料」；
   沒選完就按加入詢價單＝變紅（實線）並閃一下 */
.pd-pick-hint {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 1.75rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.pd-pick-hint::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-accent);
}

.pd-pick-hint[hidden] {
  display: none;   /* flex 會蓋掉 hidden，要明寫 */
}

.pd-pick-hint.is-warn {
  border-style: solid;
  border-color: var(--color-danger);
  color: var(--color-danger);
  animation: pd-hint-flash .45s ease 2;
}

.pd-pick-hint.is-warn::before {
  background-color: var(--color-danger);
}

@keyframes pd-hint-flash {
  50% { background-color: rgba(239, 68, 68, .08); }
}

/* ㊲-1⑤ 沒選完時數量欄淡掉、停用（欄位留著，選好時版面不跳） */
.pd-qty.is-off {
  opacity: .45;
}

.pd-qty input:disabled {
  background: none;
  cursor: not-allowed;
}

/* ㊲-1⑨ 規格參數分頁沒選完時的提示句 */
.pd-spec-hint {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-muted);
}

@media (prefers-reduced-motion: reduce) {
  .pd-opt.is-new,
  .pd-pick-hint.is-warn {
    animation: none;
  }
}

.pd-downloads {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* 合流 P5（B1）：沒有下載檔時 script.js 設 hidden，但上面的 display 宣告會蓋掉瀏覽器預設的
   [hidden]{display:none}，原本仍留 32px 空白。同檔其他元件早就補過同一條，這裡漏了。 */
.pd-downloads[hidden] {
  display: none;
}

.pd-download-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.9375rem;
  transition: background-color .15s ease;
}

.pd-download-link:hover {
  background-color: var(--color-bg-alt);
}

.pd-download-link svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* 規格詳情分頁 */
.pd-detail {
  padding-bottom: var(--space-section);
  background-color: var(--color-bg);
}

.pd-tabs[hidden] {
  display: none;
}

.pd-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
}

.pd-tab {
  padding: 0.8rem 1.25rem;
  border-radius: 6px 6px 0 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.pd-tab:hover {
  color: var(--color-text);
}

.pd-tab[aria-selected="true"] {
  font-weight: 600;
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.pd-panel {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

.pd-panel[hidden] {
  display: none;
}

.pd-spec-table {
  width: 100%;
  border-collapse: collapse;
}

.pd-spec-table th,
.pd-spec-table td {
  padding: 0.875rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

.pd-spec-table th {
  width: 14%;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-bg-alt);
}

.pd-spec-table tr:last-child th,
.pd-spec-table tr:last-child td {
  border-bottom: 0;
}

.pd-notes-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pd-notes-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Tailwind preflight 把 ul 的 list-style 重設成 none，這裡自己畫項目點，
   順便跟站上其他地方（如麵包屑分隔符）同一套小圓點語彙，不用瀏覽器預設的黑色實心圓 */
.pd-notes-list li::before {
  content: '';
  position: absolute;
  left: 0.3rem;
  top: 0.65rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background-color: var(--color-accent);
}

/* 相關產品輪播：手法與外觀比照首頁「熱門產品輪播」／「產品分類輪播」的側邊箭頭定位，
   底色也直接比照首頁那兩個區塊，同樣用 --color-bg-alt 淡藍底 */
.pd-related {
  padding-block: var(--space-section);
  background-color: var(--color-bg-alt);
}

.pd-related__head {
  max-width: 36rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.pd-related__carousel {
  position: relative;
}

.pd-related__viewport {
  overflow: hidden;
}

.pd-related__track {
  display: flex;
  gap: 1.5rem;
  transition: transform .45s var(--ease-out);
  will-change: transform;
}

/* 箭頭：外觀共用 .carousel-arrow（同產品展示）；垂直位置見「產品卡輪播的箭頭」，相關文章另見 .pd-related--articles */
.pd-related__nav--prev {
  left: -0.75rem;
}

.pd-related__nav--next {
  right: -0.75rem;
}

/* 相關產品不足一排時不輪播，箭頭以 hidden 收起；.carousel-arrow 的 display 會蓋過 [hidden]，這裡補回 */
.pd-related__nav[hidden] {
  display: none;
}

/* 找不到頁面的空狀態外層（403／404／找不到商品或文章皆共用） */
.empty-page {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

/* ==========================================
   24. 客製詢價頁（/inquiry/custom）：左服務流程／右表單
   ========================================== */
.custom-inquiry {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.custom-inquiry__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

/* 平板（< 1280）單欄：1024 時左欄只剩約 330px，還要塞兩欄的服務流程（v3 平板規則，見 :root 下方） */
@media (min-width: 1280px) {
  .custom-inquiry__grid {
    grid-template-columns: 1fr 1.8fr;
    gap: 4rem;
    align-items: start;   /* PM 2026-09-24：右側表單維持自己的高度，不被左欄服務流程一起拉高 */
  }
}

.custom-inquiry__desc {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

/* 2 欄＋十字分隔線，比照首頁「四個特色」（.feature-grid／.feature-card）同一套
   nth-child 分隔線手法，只是內距縮小很多——這裡是文字比較輕的步驟說明，不是滿版卡片 */
.custom-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: custom-step;
}

.custom-step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.custom-step:nth-child(odd) {
  padding-right: 2.5rem;
  border-right: 1px solid var(--color-border);
}

.custom-step:nth-child(even) {
  padding-left: 2.5rem;
}

/* 橫線畫在「每一列的上緣」（第 3 步起），不是「第一列的下緣」（PM 2026-09-24：原本只有 01、02 下面有線，
   步驟補到 6 筆時第二、三列之間沒有線）。手法同 .feature-card。 */
.custom-step:nth-child(n+3) {
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

/* 最後一列不留下緣內距 */
.custom-step:not(:nth-last-child(-n+2)) {
  padding-bottom: 2rem;
}

/* 手機：一步一列，直線拿掉（同 .feature-card 手機版） */
@media (max-width: 767.98px) {
  .custom-steps {
    grid-template-columns: 1fr;
  }

  .custom-step:nth-child(odd),
  .custom-step:nth-child(even) {
    padding-inline: 0;
    border-right: 0;
  }

  .custom-step:nth-child(n+2) {
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
  }

  .custom-step:not(:last-child) {
    padding-bottom: 1.5rem;
  }
}

.custom-step__num {
  margin-bottom: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
  background-color: var(--color-accent);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.custom-step__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.13rem;
  color: var(--color-text);
}

.custom-step__desc {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-muted);
}

.custom-inquiry__filenote {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 3rem;
  padding: 1.125rem 1.25rem;
  background-color: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-muted);
}

.custom-inquiry__filenote-title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.custom-inquiry__filenote svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--color-accent);
}

.custom-inquiry__form {
  padding: 2.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

/* 手機：外框內距縮小，欄位才不會被擠窄（375 寬時 2.5rem 內距＋品項卡片內距，欄位只剩一半）。
   詢價清單送出頁的 .inquiry-submit__form 是同一套外殼，一起縮 */
@media (max-width: 767.98px) {
  .custom-inquiry__form,
  .inquiry-submit__form {
    padding: 1.25rem;
  }
}

/* 詢價產品項目：可新增／刪除多筆客製品項 */
/* 表單裡兩段（基本資料／詢價產品項目）的區塊標題：圖示＋文字。
   .custom-inquiry__section-head--inline 給塞在 .custom-items__head 那顆（跟新增項目按鈕同一行），
   拿掉獨立那顆才有的下方留白，位置維持在原本的表頭列，不影響新增項目按鈕原本的排版 */
/* margin-bottom 不設在這裡——.custom-inquiry__form 是 flex column、gap: 1.5rem，
   每個直屬子項（標題／每一列欄位／分隔線／品項區塊）中間都已經有固定間距了，
   這裡如果自己再加 margin 會跟 gap 疊加，變成這一段間距特別大，跟其他欄位對不齊 */
.custom-inquiry__section-head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.custom-inquiry__section-head--inline {
  margin-bottom: 0;
  flex: 1 1 auto;   /* ㉙-12：標題吃滿按鈕以外的寬度，太長時換行、不擠到按鈕 */
  min-width: 0;
}

.custom-inquiry__section-head svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--color-accent);
}

.custom-inquiry__section-head h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--color-text);
}

/* 同理：margin 交給外層 .contact-form 的 gap 處理，這裡不再自己加，
   不然會跟基本資料／詢價產品項目之間的間距疊加成雙倍 */
.custom-inquiry__divider {
  margin: 14px 0px 14px 0px;
  border: 0;
  border-top: 1px solid var(--color-border);
}

.custom-items {
  margin-top: 0.5rem;
}

.custom-items__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--head-gap-action);   /* ㉙-12：側邊標頭，標題文字與按鈕之間的最小距離 */
  margin-bottom: 1rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
}

/* 新增項目：改成虛線外框樣式，位置維持在原本表頭列，沒有搬到卡片下方 */
.custom-items__add {
  flex: none;   /* ㉙-12：按鈕不被長標題壓縮 */
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background-color: #FFFFFF;
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-accent);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.custom-items__add:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
  border-color: var(--color-accent);
}

.custom-items__add svg {
  width: 1rem;
  height: 1rem;
}

.custom-items__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.custom-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  padding-right: 3rem;
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* 手機：同上，品項卡片內距縮小（右側保留刪除鈕的位置） */
@media (max-width: 767.98px) {
  .custom-item {
    padding: 1.25rem;
    padding-right: 2.75rem;
  }
}

.custom-item__label {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.13rem;
  color: var(--color-accent);
}

/* 「產品類型／預計數量」並排的子列，跟外層 .custom-item 的直向堆疊分開處理；
   間距跟基本資料的 .contact-form__row 統一用同一個值 */
.custom-item__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 480px) {
  .custom-item__row {
    grid-template-columns: 2fr 1fr;
  }

  /* 後台「產品項目欄位」（024）設定的半寬欄位：兩欄等寬（2:1 是固定欄位「產品類型／預計數量」專用的比例） */
  .custom-item__row--even {
    grid-template-columns: 1fr 1fr;
  }
}

.custom-item__field {
  display: flex;
  flex-direction: column;
  /* 跟 .contact-form__field 的 label→輸入框間距同一個值 */
  gap: 0.5rem;
}

.custom-item__field label {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
}

.custom-item__field input,
.custom-item__field select,
.custom-item__field textarea {
  width: 100%;
  /* 上下內距跟 .contact-form__field input 同一個 0.875rem，兩組欄位高度才會一致 */
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-text);
  background-color: #F3F7FE;
  border-radius: var(--radius-full);
  transition: border-color .2s ease;
}

.custom-item__field textarea {
  resize: vertical;
  min-height: 4rem;
  /* 跟下面的參考圖檔上傳框（.custom-item__upload）用同一個圓角，兩個區塊才會一致 */
  border-radius: var(--radius-sm);
}

/* 下拉箭頭自己畫，不用瀏覽器原生的（原生箭頭在部分瀏覽器會貼著邊框，
   跟這裡藥丸圓角的視覺不搭）；padding-right 讓文字跟箭頭圖示留出空間 */
.custom-item__field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6072' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.custom-item__field input:focus,
.custom-item__field select:focus,
.custom-item__field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* 參考圖檔上傳：用 <label> 包住隱藏的 <input type="file">，點擊整個框都能開檔案選取器。
   拖曳進來時加 .is-dragover（JS 控制），純視覺提示——這是純前端示範，沒有真的上傳後端 */
.custom-item__upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 1.75rem 1rem;
  background-color: #F3F7FE;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease;
}

.custom-item__upload:hover,
.custom-item__upload.is-dragover {
  border-color: var(--color-accent);
}

.custom-item__upload svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-accent);
}

.custom-item__upload-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

.custom-item__upload-note {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* 已選的附件清單（P9：每個品項最多 3 個，可逐檔移除） */
.custom-item__files {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.custom-item__files:empty {
  display: none;
}

.custom-item__file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--color-text);
}

.custom-item__file svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--color-accent);
}

.custom-item__file-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.custom-item__file-remove {
  display: inline-flex;
  padding: 0.25rem;
  border: 0;
  background: none;
  color: var(--color-muted);
  cursor: pointer;
}

.custom-item__file-remove:hover {
  color: var(--color-accent);
}

.custom-item__remove {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background: none;
  border: 0;
  color: var(--color-muted);
  cursor: pointer;
}

.custom-item__remove:hover {
  background-color: var(--color-bg-alt);
  color: #D2402D;
}

/* 同一批 [hidden] 覆寫：.custom-item__remove 自己有 display:inline-flex（author 規則），
   優先度天生蓋過瀏覽器內建的 [hidden]{display:none}（UA 規則），JS 切 hidden 屬性
   （只保留一筆品項時隱藏刪除鈕）不會真的隱藏，要另外補一條 author 規則 */
.custom-item__remove[hidden] {
  display: none;
}

.custom-item__remove svg {
  width: 1.125rem;
  height: 1.125rem;
}

.custom-inquiry__submit {
  /* 寬度跟著文字長短走（PM 2026-09-24：全站按鈕統一，原本 width:100% 撐滿整欄）；
     justify-self／align-self 讓它在 grid／flex 父層裡不被拉伸 */
  justify-self: start;
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* ==========================================
   25. 文章列表頁（/news）：分類篩選（按鈕列／下拉選單）＋卡片格線＋分頁
   ========================================== */
.news-list {
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.news-list__filter {
  margin-bottom: 2.5rem;
}

.news-list__filter-buttons {
  display: none;   /* 窄螢幕用下拉，768 起才顯示按鈕列（見下方 media query） */
  flex-direction: column;
  gap: 0.75rem;
}

/* 逐層展開的每一列（P9）：子分類列字小一階、上方以細線與主分類列區隔 */
.news-list__filter-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.news-list__filter-row--sub {
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.news-list__filter-row--sub .news-filter-btn {
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
}

/* 關鍵字搜尋框（外觀沿用型錄的 .catalog__search），置中、限寬 */
.news-list__search {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.news-list__filter-select-wrap select {
  width: 100%;
  padding: 0.75rem 1.125rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

@media (min-width: 768px) {
  .news-list__filter-buttons {
    display: flex;
  }

  .news-list__filter-select-wrap {
    display: none;
  }
}

.news-filter-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  background: none;
  border: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-muted);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.news-filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.news-filter-btn.is-active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #FFFFFF;
}

/* 卡片改用 .news-card-teaser（圖片＋內容左右並排的橫式卡），跟首頁「最新消息」
   預覽區塊同一套版型，欄數也比照那邊維持 2 欄——橫式卡片本來就不適合切到 3 欄，
   欄寬會擠得圖文比例跑掉 */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(var(--per-view), 1fr);   /* 平板：直式卡，張數同全站 */
    gap: 2rem;
  }
}

@media (min-width: 1280px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);   /* 桌機：橫式卡維持 2 欄 */
  }
}

.news-grid[hidden] {
  display: none;
}

.news-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, box-shadow .25s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-card__link {
  display: block;
  color: inherit;
}

.news-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.news-card:hover .news-card__media img {
  transform: scale(1.05);
}

.news-card__body {
  padding: 1.25rem 1.25rem 2.5rem;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.news-card__tag {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--color-accent);
}

.news-card__date {
  font-size: 0.8125rem;
  color: var(--color-muted-light);
}

.news-card__title {
  margin: 0.5rem 0 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text);
  line-height: 1.5;
}

.news-card__excerpt {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================
   26. 文章詳情頁（/news/detail）：左 sticky 目錄／右文章主體
   ========================================== */
.nd-main {
  display: block;
  padding-block: var(--space-section);
  background-color: var(--color-bg);
}

.nd-main[hidden] {
  display: none;
}

.nd-main__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .nd-main__grid {
    grid-template-columns: 16rem 1fr;
    gap: 4rem;
    /* 這裡故意不用 align-items: start——sticky 元素能貼多久，是看它「所在的格子」
       多高，不是看瀏覽器視窗。align-items:start 會讓左欄的格子直接縮到跟目錄
       本身一樣矮，矮格子瞬間就捲完了，目錄自然馬上被放出去跟著整頁一起捲走，
       跟完全沒有設 sticky 沒兩樣。維持預設的 stretch，讓左欄格子跟右邊文章一樣高，
       目錄才有「格子夠高」可以一路貼到文章捲完 */
  }
}

/* ㉚：內文沒有小標＝沒有目錄，左欄整個拿掉，內文單欄置中（寬度約等於有目錄時的內文欄） */
@media (min-width: 1024px) {
  .nd-main__grid--no-toc {
    grid-template-columns: minmax(0, 56rem);
    justify-content: center;
  }
}

/* 目錄：桌機常駐 sticky，窄螢幕收合成可展開按鈕 */
.nd-toc__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.875rem 1.125rem;
  background-color: var(--color-bg-alt);
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
  cursor: pointer;
}

.nd-toc__toggle svg {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform .25s ease;
}

.nd-toc__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nd-toc__nav {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows .25s ease;
}

.nd-toc__nav.is-open {
  grid-template-rows: 1fr;
}

/* 目錄不做成卡片，純粹是內容本身：不加底色／圓角／陰影，
   只留 margin-top 讓手機展開時跟上面的按鈕有點呼吸空間 */
.nd-toc__nav>div {
  min-height: 0;
  overflow: hidden;
  margin-top: 1rem;
}

.nd-toc__title {
  margin: 0 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--color-text);
}

.nd-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nd-toc__list li+li {
  margin-top: 0.75rem;
}

/* 子節「1-1. 1-2.」：縮排＋字級縮小＋顏色轉淡，跟大節「1. 2.」拉出層級差異 */
.nd-toc__sublist {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  list-style: none;
}

.nd-toc__sublist li+li {
  margin-top: 0.5rem;
}

.nd-toc__sublist a {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.nd-toc__nav a {
  display: block;
  font-size: 0.9375rem;
  color: var(--color-text);
  transition: color .15s ease;
}

.nd-toc__nav a:hover,
.nd-toc__nav a.is-active {
  color: var(--color-accent);
}

@media (min-width: 1024px) {
  .nd-toc__toggle {
    display: none;
  }

  .nd-toc__nav {
    display: block;
    position: sticky;
    top: 7rem;
    grid-template-rows: none;
    overflow: visible;
  }

  .nd-toc__nav>div {
    margin-top: 0;
  }
}

/* 文章主體 */
.nd-content__meta {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.nd-content__tag {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-accent);
}

.nd-content__date,
.nd-content__author {
  font-size: 1rem;
  color: var(--color-muted-light);
}

/* 文章 CTA 廣告區（P9）：內文讀完處的一張提示卡，淺底置中；外殼語彙同客製詢價的提示框 */
.nd-cta {
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background-color: var(--color-bg-alt);
  text-align: center;
}

.nd-cta__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--color-text);
}

.nd-cta__desc {
  margin: 0.75rem auto 0;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-muted);
}

.nd-cta .btn {
  margin-top: var(--head-gap-action-sm);   /* ㉙-12：卡片內小標頭 說明 → 按鈕 */
}

.nd-content__title {
  margin: 1rem 0 0;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  font-size: 2.5rem;
}

.nd-content__cover {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-md);
}

.nd-content__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 富文本內文：語意化標題／段落／清單／引言的排版節奏
   文章內文 .nd-body（含隱私權政策）與產品介紹 .pd-panel--rich 共用下面整組規則，不各寫一套。
   內文字級各自由容器決定（.nd-body 1.0625rem、.pd-panel 1rem），標題、間距、清單、分隔線、
   圖片、影片、連結都共用；產品區原本只有引用與表格，標題／段落／清單全被 Preflight 重置成內文樣子。 */
.nd-body {
  margin-top: 2.5rem;
  font-size: 1.0625rem;
  line-height: 2;
  color: var(--color-muted);
}

/* 第一個／最後一個區塊不再疊外距：產品分頁內容緊接在頁籤下方，文章容器本身已有 margin-top */
.nd-body > :first-child,
.pd-panel--rich > :first-child {
  margin-top: 0;
}

.nd-body > :last-child,
.pd-panel--rich > :last-child {
  margin-bottom: 0;
}

/* 標題 h2–h6：三版統一級距（PM 2026-10-01）——v1／v2／v3 與後台編輯器同一套數值，不各有一套。
   h2 24px／h3 20px／h4 18px／h5 16px／h6 15px；字重 600、行高 1.4 全部相同；
   外距 h2／h3 為 32px 0 12px、h4–h6 為 24px 0 12px（內文第一個標題由上方 :first-child 規則歸零）。
   字型、顏色一律用 v3 標題字型與標題色。原本 v3 自有一套（h2 22、h3 18、h4 17、行高 1.5、h6 加字距），已併掉。 */
.nd-body :is(h2, h3, h4, h5, h6),
.pd-panel--rich :is(h2, h3, h4, h5, h6) {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
}

.nd-body h2,
.pd-panel--rich h2 {
  margin-top: 2rem;
  font-size: 1.5rem;
}

.nd-body h3,
.pd-panel--rich h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.nd-body h4,
.pd-panel--rich h4 {
  font-size: 1.125rem;
}

.nd-body h5,
.pd-panel--rich h5 {
  font-size: 1rem;
}

.nd-body h6,
.pd-panel--rich h6 {
  font-size: 0.9375rem;
}

.nd-body p,
.pd-panel--rich p {
  margin: 0 0 1.25rem;
}

/* 清單：Preflight 的 ul,ol{list-style:none} 會把後台編輯器產出的清單符號拿掉，這裡補回 */
.nd-body ul,
.nd-body ol,
.pd-panel--rich ul,
.pd-panel--rich ol {
  margin: 0 0 1.25rem;
  padding-left: 2.5rem;
}

.nd-body ul,
.pd-panel--rich ul {
  list-style: disc;
}

.nd-body ol,
.pd-panel--rich ol {
  list-style: decimal;
}

.nd-body ul ul,
.pd-panel--rich ul ul {
  list-style: circle;
}

.nd-body li ul,
.nd-body li ol,
.pd-panel--rich li ul,
.pd-panel--rich li ol {
  margin: 0.5rem 0 0;
  padding-left: 1.5rem;
}

.nd-body li,
.pd-panel--rich li {
  margin-bottom: 0.5rem;
}

.nd-body li::marker,
.pd-panel--rich li::marker {
  color: var(--color-accent);
}

/* 分隔線：Preflight 的 *{border-width:0} 會讓 <hr> 完全看不見 */
.nd-body hr,
.pd-panel--rich hr {
  height: 0;
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--color-border);
}

/* 圖片：最寬到容器寬、不超過原尺寸（原本 width:100% 會把小圖放大成全寬而糊掉）；
   max-width／height 在檔尾 .nd-body img（overflow 那一組） */
.nd-body img,
.pd-panel--rich img {
  border-radius: var(--radius-sm);
  margin: 2.5rem 0;
}

/* 後台編輯器「貼影片連結」產出 <iframe data-rte-embed>，沒有寬高屬性，瀏覽器預設 300×150；
   比照後台編輯器 .ProseMirror iframe[data-rte-embed] 改成滿版 16:9。只套編輯器嵌入的 iframe */
.nd-body iframe[data-rte-embed],
.pd-panel--rich iframe[data-rte-embed] {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 2.5rem 0;
  border: 0;
  border-radius: var(--radius-sm);
}

.nd-body blockquote,
.pd-panel--rich blockquote {
  margin: 2.5rem 0;
  padding: 1rem 2.5rem;
  border-left: 3px solid var(--color-accent);
  background-color: var(--color-bg-alt);
  color: var(--color-text);
  font-style: italic;
}

/* 富文本的表格與行內程式碼（048：後台編輯器有「插入表格」「行內程式碼」，前台原本沒有樣式——
   表格沒有框線、程式碼沒有底色）。三版共用同一組規則：表格＝細框線＋表頭淡底、
   行內程式碼＝等寬字＋淡底圓角、引用＝左側色條＋淡底（見上一條）。
   文章內文 .nd-body（含隱私權政策）與產品介紹 .pd-panel--rich 同一份，不各寫一套。
   表格過寬時的橫向捲動在檔尾 .nd-body table／.pd-panel--rich table（display:block＋overflow-x）。 */
.nd-body table,
.pd-panel--rich table {
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.nd-body th,
.nd-body td,
.pd-panel--rich th,
.pd-panel--rich td {
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.nd-body th,
.pd-panel--rich th {
  font-weight: 600;
  color: var(--color-text);
  background-color: var(--color-bg-alt);
}

.nd-body code,
.pd-panel--rich code {
  padding: 0.125em 0.375em;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--color-text);
  background-color: var(--color-bg-alt);
  border-radius: 4px;
}

.nd-body a,
.pd-panel--rich a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ==========================================
   隱私權政策：政策內文沿用 .nd-body 的富文本排版，這裡只補版面寬度與間距
   ========================================== */
.privacy-content {
  padding-block: var(--space-section);
}

.privacy-content__inner {
  max-width: 860px;
  margin-inline: auto;
  margin-top: 0;
}

.privacy-content__updated {
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* ==========================================
   詳情頁底部 meta：所屬分類 → 標籤 → 分享（合流 P5，PM 版 I2⑧／I3⑧）
   產品與文章詳情共用；HTML 在 pages/product-detail.php、news-detail.php，內容由 script.js renderDetail* 填。
   分隔線掛在 .pd-foot 容器上（不是第一列），三列皆空整段 hidden、分隔線一起收掉。
   ========================================== */
.pd-foot {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.pd-foot[hidden],
.pd-foot__row[hidden] {
  display: none;
}

.pd-foot__row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem 1rem;
}

/* 所屬分類可能有多條路徑（一條一行），標籤對齊第一條，不要垂直置中在整串中間 */
.pd-foot__row--cats {
  align-items: baseline;
}

.pd-foot__label {
  flex: 0 0 auto;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* 🔴 多條路徑一條一行（PM 2026-08-17，I3⑧）：橫向排會分不出哪個「/」屬於哪一條。
   直排的是外層清單；路徑內部（主／子／細）仍橫向串接。 */
.pd-foot__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.pd-foot__path {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;   /* 三層＋長分類名在手機寬度會超過一行，允許路徑內部自己折行 */
  font-size: 0.9375rem;
}

.pd-foot__more-wrap {
  display: contents;   /* 展開後的路徑跟前三條同一個直排清單 */
}

.pd-foot__more-wrap[hidden] {
  display: none;
}

.pd-foot__link {
  color: var(--color-text);
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.pd-foot__link:hover {
  color: var(--color-accent);
  border-bottom-color: currentColor;
}

.pd-foot__sep {
  margin: 0 0.4rem;
  color: var(--color-muted);
}

.pd-foot__more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-accent);
}

.pd-foot__ico {
  width: 1rem;
  height: 1rem;
}

/* 標籤：可點，連回列表頁帶關鍵字搜尋。膠囊語彙沿用文章篩選列，小一號——輔助資訊不該比篩選列搶眼 */
.pd-foot__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pd-foot__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--color-muted);
  transition: color .15s ease, border-color .15s ease;
}

.pd-foot__tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* 分享按鈕（社群 ＋ 複製連結）：a 與 button 都要吃到 */
.nd-share__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.nd-share__buttons a,
.nd-share__buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background-color: var(--color-bg-alt);
  border: 0;
  color: var(--color-accent);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.nd-share__buttons a:hover,
.nd-share__buttons button:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.nd-share__buttons svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* 上一篇／下一篇（產品詳情的上一個／下一個產品共用） */
.nd-prevnext[hidden] {
  display: none;
}

.nd-prevnext {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .nd-prevnext {
    grid-template-columns: 1fr 1fr;
  }
}

.nd-prevnext__link--next {
  text-align: right;
}

.nd-prevnext__label {
  display: block;
  font-size: 0.9rem;
  color: var(--color-accent);
}

.nd-prevnext__title {
  display: block;
  margin-top: 0.375rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
}

.nd-prevnext__title:hover {
  color: var(--color-accent);
}

/* 文章卡：平板手機是直式卡，一次 --per-view 張（同全站）；桌機是左右並排的橫式卡，
   縮到 1/4 寬會太擠，跟文章專區一樣維持 2 張 */
.pd-related__track .news-card-teaser {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * 1.5rem) / var(--per-view));
}

@media (min-width: 1280px) {
  .pd-related__track .news-card-teaser {
    flex: 0 0 calc(50% - .75rem);
  }
}

/* ㉗-3（PM 10/22）：相關文章的箭頭高度比照首頁最新消息（同一張文章卡）——桌機橫式卡對齊整張卡正中；
   平板手機直式卡對齊圖片正中（圖片高＝卡片寬 × 10/16，1.5rem＝本軌道 gap）。
   原本沿用相關產品的 top:35%，平板手機會壓到卡片文字、桌機偏上 */
.pd-related--articles .pd-related__nav {
  top: 50%;
}

@media (max-width: 1279.98px) {
  .pd-related--articles .pd-related__nav {
    top: calc((100cqw - (var(--per-view) - 1) * 1.5rem) / var(--per-view) * 5 / 16);
  }
}

/* ==========================================
   27. 錯誤頁（/403／/404）：沿用 .page-hero 深色背景，加大高度撐滿版面
   ========================================== */
.error-hero {
  min-height: 100vh;
}

.error-hero__inner {
  padding-top: 7rem;
  padding-bottom: 7rem;
  max-width: 34rem;
  margin-inline: auto;
}

.error-hero__code {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  color: #FFFFFF;
  font-size: clamp(4rem, 2.5rem + 6vw, 7rem);
}

/* 跟首頁 Hero 標題強調字同一個藍（.hero-title .text-accent），
   那條規則限定要在 .hero-title 底下才生效，這裡另外补一條讓錯誤頁的「0」也能套用 */
.error-hero__code .text-accent {
  color: var(--color-accent-on-dark);
}

.error-hero__desc {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  line-height: 1.8;
  color: #FFFFFF;
}

.error-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.error-hero__link {
  font-size: 0.9375rem;
  color: #FFFFFF;
  text-decoration: none;
  transition: color .2s ease;
}

.error-hero__link:hover {
  color: #BFD0FF;
}

/* ==========================================
   28. 產品型錄清單檢視（/products list view）：表格式列
   （產品／規格參數／訂購詢價 三欄），套用站上既有的配色與元件語彙
   ========================================== */
.catalog-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 900px) {
  .catalog-row {
    grid-template-columns: 16rem 1fr 14rem;
    gap: 2rem;
    align-items: center;
  }
}

.catalog-row--head {
  display: none;
  padding-block: 0 1rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-text);
}

@media (min-width: 900px) {
  .catalog-row--head {
    display: grid;
  }
}

.catalog-row__product {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.catalog-row__media {
  display: block;
  flex: 0 0 5.5rem;
  width: 5.5rem;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.catalog-row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-row__info {
  min-width: 0;
}

.catalog-row__tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-accent);
}

.catalog-row__name {
  margin: 0.2rem 0 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.13rem;
  color: var(--color-text);
}

.catalog-row__sku {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-muted-light);
}

/* 規格參數：用多欄排版自動平衡分兩欄（跟設計稿一樣「左欄先填滿再排右欄」），
   不用手動把陣列切一半 */
.catalog-row__specs {
  column-count: 1;
  column-gap: 2rem;
}

@media (min-width: 540px) {
  .catalog-row__specs {
    column-count: 2;
  }
}

/* ㉚：沒有規格參數的產品，手機／平板單欄時不留空格子（桌機三欄要留著對齊表頭） */
@media (max-width: 899px) {
  .catalog-row__specs:empty {
    display: none;
  }
}

.catalog-row__spec {
  break-inside: avoid;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.catalog-row__spec-label {
  flex: 0 0 5.5rem;
  color: var(--color-muted);
}

.catalog-row__spec-value {
  color: var(--color-text);
  font-weight: 500;
}

.catalog-row__order {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.catalog-row__moq,
.catalog-row__lead {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.catalog-row__moq svg,
.catalog-row__lead svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--color-accent);
}

.catalog-row__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.7rem 1.25rem;
  background-color: var(--color-accent);
  border: 0;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .2s ease;
}

.catalog-row__add:hover {
  background-color: var(--color-accent-dark);
}

.catalog-row__add svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* ================================================
   17. 前台管理列（admin-bar）
   ================================================
   已登入後台的管理員瀏覽前台時，頁面最頂端的黑色工具列（見 assets/admin-bar.js）。
   整段由 style-v2/assets/style.css 逐字搬過來——管理列屬 admin 系統 UI，
   三個版型長相必須一致，不吃任何前台 token，所以這裡不做任何風格調整。
   唯一的各版型差異是「把固定導覽列往下推」那一條：本版型的導覽列是
   .site-nav.fixed.top-0（Tailwind 相容層的 utility），權重要壓過 .top-0。 */
:root{--admin-bar-h: 0px}html.has-admin-bar{--admin-bar-h: 40px}html.has-admin-bar body{padding-top:var(--admin-bar-h)}.admin-bar{--adminbar-bg: #100C08;--adminbar-text: #F3F4F5;--adminbar-muted: rgba(243, 244, 245, .5);--adminbar-accent: #FF9408;--adminbar-hover-bg: rgba(255, 255, 255, .06);--adminbar-live: #4ADE80;--adminbar-maintenance: #F5B23D;position:fixed;top:0;left:0;right:0;z-index:100000;height:var(--admin-bar-h);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;background-color:var(--adminbar-bg);border-bottom:1px solid rgba(255,255,255,.1);color:var(--adminbar-text);font-family:Noto Sans TC Variable,Noto Sans TC,system-ui,-apple-system,Segoe UI,sans-serif;font-size:14px;line-height:1.4;letter-spacing:.01em;-webkit-font-smoothing:antialiased}.admin-bar__group{display:flex;align-items:center;gap:8px;min-width:0}.admin-bar__item{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border:1px solid rgba(255,255,255,.14);border-radius:3px;background:transparent;color:var(--adminbar-text);font-size:14px;line-height:1;white-space:nowrap;cursor:pointer;transition:background-color .18s ease,border-color .18s ease,color .18s ease}.admin-bar__item:hover{background-color:var(--adminbar-hover-bg);border-color:#ff94088c;color:var(--adminbar-accent)}.admin-bar__ico{width:14px;height:14px;flex-shrink:0;display:inline-flex}.admin-bar__ico svg{width:100%;height:100%}.admin-bar__status{display:inline-flex;align-items:center;gap:6px;font-size:13px;letter-spacing:.04em;color:var(--adminbar-muted)}.admin-bar__dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}.admin-bar__status--live .admin-bar__dot{background:var(--adminbar-live);box-shadow:0 0 0 3px #4ade802e}.admin-bar__status--live{color:var(--adminbar-live)}.admin-bar__status--maintenance .admin-bar__dot{background:var(--adminbar-maintenance);box-shadow:0 0 0 3px #f5b23d33}.admin-bar__status--maintenance{color:var(--adminbar-maintenance)}.admin-bar__user{display:inline-flex;align-items:center;gap:6px;max-width:30vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--adminbar-muted)}.admin-bar__user .admin-bar__ico{opacity:.8}@media(max-width:560px){.admin-bar{padding:0 10px;gap:8px}.admin-bar__item{padding:0 8px}.admin-bar__user{max-width:22vw}}
html.has-admin-bar .site-nav{top:var(--admin-bar-h)}

/*
 * 沒有封面圖時卡片的圖片區。
 * imgTag() 在來源留白時不輸出 <img>（避免 src="" 破圖），但這些容器只有
 * aspect-ratio 沒有底色，空著會整塊透明、看起來像版面壞掉。
 * 給一個中性底色，讓「沒上傳封面」看起來是刻意留白。
 */
.product-card__media,
.news-card__media,
.catalog-row__media,
.product-card-teaser__media {
  background-color: var(--color-bg-alt);
}

/* 文章內文是後台富文本編輯器寫的，常夾著很長的網址（英文沒有空白可斷行）。
   沒有這條，網址會衝出內文欄、整頁被推歪——中文會自動斷行，所以只有英文版跑版
   （/en/articles/dry-carbon-fiber 就是一串 110 字元的網址）。
   用 anywhere 而不是 break-word：anywhere 也會算進 min-content，
   grid／flex 子項才不會被長字串撐開。 */
.nd-body{overflow-wrap:anywhere}
.nd-body img,.nd-body video,.nd-body iframe,.pd-panel--rich img,.pd-panel--rich video,.pd-panel--rich iframe{max-width:100%;height:auto}
.nd-body table,.pd-panel--rich table{display:block;max-width:100%;overflow-x:auto}
/* 表格改成 display:block 才能橫向捲動，但內容會縮成最窄；讓 tbody 自己當表格撐滿整欄（048），
   內容比欄寬時照樣撐開、由外層捲動。後台編輯器產出的表格只有 tbody（表頭是第一列 th）；
   有 thead 的表格（貼上來的）不套，否則 thead 與 tbody 各算各的欄寬會對不齊 */
.nd-body table:not(:has(>thead))>tbody,.pd-panel--rich table:not(:has(>thead))>tbody{display:table;width:100%;border-collapse:collapse}
.nd-content{min-width:0}

/* ==========================================
   網站維護頁（pages/maintenance.php，HTTP 503 擋站頁；合流 P7，PM 定案 C10）
   視覺照 PM 版 v3 的維護畫面：深靛藍放射漸層、白色 logo、MAINTENANCE 眉標、無導覽列／頁尾。
   ========================================== */
.maintenance-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background-color: var(--color-brand-deep);
  background-image: radial-gradient(circle at 50% 0%, var(--color-brand), var(--color-brand-deep) 62%);
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.maintenance-screen__inner {
  max-width: 42rem;
  margin-inline: auto;
}

.maintenance-screen__logo {
  height: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  width: auto;
  display: block;
  margin: 0 auto 2.75rem;
}

.maintenance-screen .eyebrow {
  margin-bottom: 0.75rem;
}

.maintenance-screen__title {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
}

.maintenance-screen__msg {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, .8);
}


/* Hero 影片投影片（#063）：填滿該張背景層 */
.hero-slide__video{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}

/* Banner 影片投影片：作用中的投影片疊在最上層；非作用中的影片本身也透明，避免 Safari／iOS 無視父層透明度把影片畫在最上面（播放／暫停見 public/assets/js/hero-video.js） */
.hero-slide.is-active{z-index:1}
/* Windows 的 Chrome 會把影片交給顯示卡疊加層（overlay）直接畫，不理會 opacity：淡出結束後再加 visibility:hidden 才真的藏得住 */
.hero-slide__video{transition:opacity 1.2s ease-in-out,visibility 0s linear 0s}
.hero-slide:not(.is-active) .hero-slide__video{opacity:0;visibility:hidden;transition:opacity 1.2s ease-in-out,visibility 0s linear 1.2s}
.hero-bg__mask{z-index:2}
/* AI 客服按鈕收進右下角浮動工具（見 script.js）：嵌入代碼原本那顆固定按鈕藏起來 */
/* 有 JS 時一開始就藏：等 script.js 換成浮動工具裡的客服鈕，原按鈕不會先閃一下 */
html.js [id^="chatbot-toggle-btn-"],body.has-chat-proxy [id^="chatbot-toggle-btn-"]{display:none!important}

/* 標題區留空（⑯，PM 10/07：前台文字欄位留空＝不輸出元素）：眉標＋標題都沒填時，左欄（__heading）整個不輸出。
   桌機兩欄的右欄（說明、按鈕、表單）因此固定指定在第二欄——不指定的話少了左欄，右欄會自動補位跑到左邊。
   有左欄時位置與原本相同（原本就是自動排進第二欄）。 */
@media (min-width: 1280px) {
  .contact-info__desc,
  .app-areas__desc,
  .category-band__text,
  .contact-form-section__grid > .contact-form { grid-column: 2; }
}

/* ㉓-2（PM 10/16）：「左標題／右說明」的標頭，右欄頂端對齊「標題」，不是眉標（Hero 同理，見 .hero__row）。
   做法一致：標頭網格分兩列——第 1 列只放眉標、第 2 列放標題與右欄；左欄（__heading）跨兩列並用 subgrid 把眉標／標題交給外層的列。
   眉標留空不輸出時第 1 列高度是 0，右欄直接對齊標題；左欄整個留空時右欄仍固定在第 2 欄第 2 列（⑯ 那條）。
   眉標 → 標題的距離改由眉標下外距提供（grid 裡外距不會合併；標題的上外距若留著，標題會比右欄低一截）：
   數值＝原本兩個外距合併後的結果（公司簡介／應用領域 .75rem，其他 10px）。
   這幾區沒有共用元件，各自的 CSS 只改了列距（row-gap: 0）；新增「左標題／右說明」區塊時把三個選擇器加進下面三條清單。
   被否決：右欄寫死 padding-top（眉標換行、留空就對不齊）。關於我們頁的沿革／認證／精選產品輪播不在這裡，改成上下排列（㉓-5）。 */
@media (min-width: 1280px) {
  .about-intro__grid > .about-intro__heading,
  .app-areas__heading,
  .category-band__heading,
  .contact-info__heading {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    display: grid;
    grid-template-rows: subgrid;
    align-content: start;
  }

  .about-intro__grid > .about-intro__heading > .eyebrow,
  .app-areas__heading > .eyebrow,
  .category-band__heading > .eyebrow,
  .contact-info__heading > .eyebrow {
    grid-row: 1;
    margin: 0 0 10px;
  }

  .about-intro__grid > .about-intro__heading > .eyebrow,
  .app-areas__heading > .eyebrow {
    margin-bottom: 0.75rem;
  }

  .about-intro__grid > .about-intro__heading > h2,
  .app-areas__top > .app-areas__heading > h2,
  .category-band__top > .category-band__heading > h2,
  .contact-info__head > .contact-info__heading > h2 {
    grid-row: 2;
    margin-top: 0;
  }

  .about-intro__grid > .about-intro__desc,
  .app-areas__desc,
  .category-band__text,
  .contact-info__desc {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }
}

/* ==========================================
   沒有圖片時的純色色塊（⑰，PM 2026-10-07：破圖比色塊難看）
   圖片網址空的時候不輸出 <img>，改放 <span class="img-placeholder" aria-hidden="true">。
   PHP 樣板直接寫這個 span；JS 由 imgTag()／swapImage() 產生，不要另寫一份。
   顏色沿用卡片圖區既有的底色 --color-bg-alt（同上方 .product-card__media 那條），不另造色值。
   用 :where() 把權重降到 0：尺寸由所在的圖位決定——放在有 aspect-ratio 的容器裡就填滿容器；
   掛著原本圖片的 class（.milestone__photo、.brand-logo…）時，那些 class 的尺寸規則照樣生效。
   ========================================== */
:where(.img-placeholder) {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-alt);
}

/* 公司沿革：圖本身就是欄位子層，比例由 .milestone__photo 的 aspect-ratio 決定 */
.milestone__photo.img-placeholder {
  height: auto;
}

/* Logo 色塊：高度沿用各自 logo 圖位的高度，寬度給固定值（圖片版是 width:auto，色塊沒有內容撐不出寬度） */
.brand-logo.img-placeholder {
  width: 7.5rem;
  border-radius: var(--radius-sm);
}

.footer-brand__logo.img-placeholder {
  width: 10rem;
  border-radius: var(--radius-sm);
}

.maintenance-screen__logo.img-placeholder {
  width: 8rem;
  border-radius: var(--radius-sm);
}

/* 選單項目放不下時（header.php 的 nav-fit 判斷）改用漢堡選單，避免不換行後蓋到 logo／右側按鈕（2026-10-15） */
@media (min-width: 1100px) {
  html.nav-collapsed .nav-desktop,
  html.nav-collapsed .btn.btn--nav-cta {
    display: none;
  }

  html.nav-collapsed .nav-burger {
    display: inline-flex;
  }

  html.nav-collapsed #mobile-menu {
    display: grid !important;
    max-width: calc(var(--container) - 40px);   /* 與膠囊同寬，見 .site-nav__bar */
    margin-inline: auto;
  }
}

/* 放不下時先縮小選單間距（nav-tight），仍放不下才切漢堡（nav-collapsed） */
@media (min-width: 1100px) {
  html.nav-tight .nav-desktop {
    gap: 1.5rem;
  }
}

/* ══ ㉙ 區塊標頭間距統一＋置中文字改框架同寬（PM 2026-10-27，比照 v1 6f77fad） ══════════════ */
/* ㉙-6 區塊標頭（眉標 → 標題 → 說明 → 按鈕 → 下方內容）每一段全站只有一個值，新區塊照這幾個變數寫，不要再另訂數字。
   值＝v3 全站量測（塞滿模擬站 1440／375）取多數：
   · 眉標 → 標題 10：原本多數 10；公司簡介／應用領域 12（.75rem）→ 10。
   · 標題 → 說明 16：原本多數 16（單欄堆疊的 --stack-head-gap）；CTA 32、精選產品／合作客戶／Banner 頁面簡介／客製詢價／404 20、聯絡表單桌機 40 → 16。
     直接沿用 --stack-head-gap，兩者是同一個值，不另寫數字。
   · 說明 → 按鈕 32：原本 .section-actions／CTA／精選產品按鈕列都是 2rem；404 40 → 32。
   · 標頭 → 下方內容 40：原本 40（公司簡介、精選分類、客製詢價、核心價值手機）最多，其次 48（應用領域、最新消息、相關產品／文章、聯絡表單手機）、
     64／平板手機 32（沿革、產品展示、聯絡據點，calc(var(--space-section) / 1.5)）、56（認證）、核心價值桌機 32／平板 24。
     統一 40，各寬度同值（v1 也是固定值）。公司簡介、合作客戶、精選產品原本就是 2.5rem，未改寫。
   例外：
   · 首頁大 Banner（.hero-*）特大標題維持原值：眉標 → 標題 16、說明 → 按鈕 24（PM 指示可維持）。
   · 卡片內的小標頭（分類介紹卡、文章 CTA 卡、詢價成功卡）字級小一級，標題 → 說明另一級 12（三處原本就都是 .75rem），用 --head-gap-desc-sm；
     說明 → 按鈕也小一級 24，用 --head-gap-action-sm（㉙-12：原本文章 CTA 卡 24、詢價成功卡 32，一處一票平手，取比區塊標頭 32 小一級的 24，
     比照 desc-sm 12 < desc 16；分類介紹卡沒有按鈕）。
   ㉙-12 區塊內容之後的置中按鈕（.section-actions--end、.news-teaser__actions）不是標頭，另一個值 --body-gap-action 40：
     原本 .section-actions--end 2.5rem（平板手機首頁 5 處）、.news-teaser__actions 3rem → 取多數 40，各寬度同值。
     放在有 gap 的容器裡時扣掉容器 gap 再補（見「按鈕系統」段）。 */
:root {
  --head-gap-title: 10px;
  --head-gap-desc: var(--stack-head-gap);
  --head-gap-action: 2rem;
  --head-gap-body: 2.5rem;
  --head-gap-desc-sm: .75rem;
  --head-gap-action-sm: 1.5rem;
  --body-gap-action: 2.5rem;
}

/* ㉙-12 側邊標頭（標題文字在一側、按鈕在另一側，例：客製詢價「詢價產品項目」＋新增項目）：
   文字欄 flex: 1 1 auto; min-width: 0 吃滿剩餘寬度、按鈕 flex: none，兩者之間的最小距離＝--head-gap-action（gap，寫在各元件上）。
   文字欄不設 max-width。v3 區塊級的標頭沒有這種排法（雙欄標頭是「左標題／右說明＋按鈕」，按鈕在說明下方）。 */

/* 眉標 → 標題：只由眉標下外距提供；標題自帶的上外距在緊接眉標時歸零（原本靠外距合併，標題的 .5rem／.75rem 比眉標大時會蓋過） */
.eyebrow { margin-bottom: var(--head-gap-title); }
.about-intro__heading .section-title,
.app-areas__heading .section-title,
.eyebrow + .page-hero__title,
.eyebrow + .category-band__title { margin-top: 0; }
@media (min-width: 1280px) {
  .about-intro__grid > .about-intro__heading > .eyebrow,
  .app-areas__heading > .eyebrow,
  .category-band__heading > .eyebrow,
  .contact-info__heading > .eyebrow { margin-bottom: var(--head-gap-title); }
}

/* 標題 → 說明 */
.cta-band__title { margin-bottom: var(--head-gap-desc); }
.page-hero__lead,
.product-teaser__desc,
.partners__desc,
.custom-inquiry__desc,
.contact-form-section__desc,
.error-hero__desc,
.news-teaser__desc,
.pd-related__desc { margin-top: var(--head-gap-desc); }
.cat-intro__body { gap: var(--head-gap-desc-sm); }
.nd-cta__desc,
.inquiry-success__desc { margin-top: var(--head-gap-desc-sm); }

/* 說明 → 按鈕。CTA：說明下外距與按鈕上外距同值，外距合併後恆為 32；說明留空時標題（16）與按鈕（32）合併也是 32 */
.section-actions--inline,
.product-teaser__actions,
.error-hero__actions,
.cta-band__actions { margin-top: var(--head-gap-action); }
.cta-band__desc { margin-bottom: var(--head-gap-action); }

/* 標頭 → 下方內容 */
.app-areas__body,
.news-teaser__carousel,
.custom-steps { margin-top: var(--head-gap-body); }
.milestones__head,
.product-showcase__head,
.contact-info__head,
.certs__head,
.category-band__top,
.pd-related__head { margin-bottom: var(--head-gap-body); }
.contact-form-section__grid { row-gap: var(--head-gap-body); }
/* 核心價值：標題獨佔一列時，標題與卡片之間是網格列距（手機 2.5rem、平板 1.5rem、桌機 2rem，也是卡片之間的距離不能動），
   用標題下外距補到 40。桌機標題與卡片同一列（沒有 --stacked-head）時沒有上下關係，不補 */
@media (min-width: 768px) and (max-width: 1279.98px) {
  .core-values__heading { margin-bottom: calc(var(--head-gap-body) - 1.5rem); }
}
@media (min-width: 1280px) {
  .core-values__grid--stacked-head .core-values__heading { margin-bottom: calc(var(--head-gap-body) - 2rem); }
}

/* ㉙-9 內容置中的區塊標頭、CTA 廣告區、各頁 Banner 頁面簡介、404／403：文字寬度和框架（.container）同寬，不另設窄欄。
   客戶習慣自己換行，窄欄自動折行＋客戶的換行疊在一起，小螢幕會變成好幾段短行（PM 10/27）。
   原本：CTA 60rem、最新消息標頭 48rem、Banner 頁面簡介 60rem、404／403 34rem、相關產品／文章標頭 36rem、文章 CTA 卡說明 36rem（卡片本身已受文章欄寬限制）。
   靠左的標頭本來就跟欄寬走，不在此列；數字統計標籤、空狀態、詢價成功卡、維護畫面是元件本身的寬度，不改。 */
.cta-band__inner,
.news-teaser__head,
.page-hero__lead,
.error-hero__inner,
.pd-related__head,
.nd-cta__desc { max-width: none; }

/* ㉝-2（PM 10/28，同合作客戶區規則）：精選產品（首頁）、精選產品輪播（關於）、相關產品 0 筆時不輸出輪播，標頭有填照常顯示。
   標頭下方沒有內容了，拿掉標頭 → 內容的下外距，區塊上下留白才對稱。
   首頁精選產品原本是「上半色塊、下半白底」（切齊點落在卡片上），沒卡片時切齊點會切過白字標頭 → 整區改成全色塊、上下 padding 相同；
   平板手機那顆實心藍按鈕（--end，落在白底用）不輸出，改顯示色塊上的白色按鈕（--inline），手機照 ㉓-3 撐滿。 */
.product-showcase__head:last-child,
.pd-related__head:last-child,
.milestones--empty .milestones__head,
.category-band--empty .category-band__top { margin-bottom: 0; }
/* 同一條也套到首頁應用產業、最新消息（0 筆不輸出照片＋清單／卡片區）：按鈕直接接在標頭後面，用「說明 → 按鈕」的距離 */
.news-teaser__head + .news-teaser__actions,
.app-areas__top + .section-actions--end { margin-top: var(--head-gap-action); }

.category-band--empty .category-band__mask { background: var(--color-brand); }
.category-band--empty .category-band__inner { padding-bottom: var(--space-section); }
.category-band--empty .section-actions--inline { display: flex; }
@media (max-width: 767.98px) {
  .category-band--empty .section-actions--inline {
    flex-direction: column;
    align-items: stretch;
  }
  .category-band--empty .section-actions--inline > .btn { width: 100%; }
}

/* ㉝-2b（PM 10/28）：首頁精選分類 0 筆（--empty，home.php 不輸出輪播、兩組箭頭與 --end 按鈕）。
   標頭下方只剩按鈕：用標頭裡那顆（__actions，原本 <1280 隱藏），距離照「說明 → 按鈕」；手機照 ㉓-3 撐滿。
   沒按鈕時 __actions 由上面「:not(:has(...))」那條收掉（權重較高），不留上外距。 */
.product-teaser--empty .product-teaser__actions { display: flex; }
@media (max-width: 767.98px) {
  .product-teaser--empty .product-teaser__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .product-teaser--empty .product-teaser__actions > .btn { width: 100%; }
}
/* ㉝-2c（PM 2026-11-02，提案頁比較後定案）：0 筆時桌機（≥1280）改側邊標頭——文字一側、按鈕另一側（同 CLAUDE.md 側邊標頭：說明不限寬、文字欄 minmax(0,1fr)、
   按鈕 auto、間距 --head-gap-action）。右側內距補回框架留白（原本 0 是讓輪播延伸到視窗右緣，0 筆時沒有輪播）。按鈕對齊文字底部；沒填按鈕時
   __actions 照舊被上面 :not(:has(...)) 收掉，文字自己撐滿。被否決：維持 34rem 左欄（右半邊整塊空白）、文字放寬但按鈕留在下方（說明短時右邊仍空、
   和下一區精選產品的左右標頭不一致）、置中標頭（首頁其他清單區都靠左）。 */
@media (min-width: 1280px) {
  .product-teaser--empty .product-teaser__row { padding-right: max(20px, calc((100vw - var(--container)) / 2 + 20px)); }
  .product-teaser--empty .product-teaser__text {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: auto;   /* 按鈕欄是隱式欄：沒按鈕（__actions 被收掉）就沒有第二欄，也不留 gap */
    column-gap: var(--head-gap-action);
  }
  .product-teaser--empty .product-teaser__text > * { grid-column: 1; }
  .product-teaser--empty .product-teaser__actions {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: end;
    margin-top: 0;
  }
}

/* ══ ㊱-8 長字自動換行（PM 2026-11-03：文字要自動換行，不可以超出框架）══════════
   客戶填的品名、型號、標題常有一長串不含空格的英數字（型號、網址、黏在一起的英文），
   瀏覽器預設不會在字中間斷行 → 撐破卡片、把整欄推出畫面（手機尤其明顯）。
   全站一條：塞不下時才在字中間斷行，一般有空格的英文照常在空格換行；
   用 anywhere 不用 break-word——anywhere 會讓 grid／flex 子項的最小寬度一起縮，欄位不會被長字撐寬。 */
body { overflow-wrap: anywhere; }
