/* ============================================================
   HAASH 翔馳企業｜共用樣式 v1（圖稿驅動原型）
   規則依據：seo-site-build-rules-v1（1-F 設計值 / RGB triplet tokens）
   特效依據：lumiglow88 effects specs → 全數 CSS-first 轉譯
   ============================================================ */

/* ---------- 0. Design Tokens（RGB channel triplets） ---------- */
:root {
  --bg:            10 11 10;    /* 全站底色 near-black */
  --bg-2:          15 16 15;    /* 區塊交錯底色 */
  --surface:       21 23 21;    /* 卡片底 */
  --surface-2:     30 32 30;    /* 卡片 hover / 次層 */
  --line:          255 255 255; /* 邊線，搭配 /8 /12 使用 */
  --text:          235 237 233; /* 主文字（對 --bg 對比 > 4.5:1）*/
  --muted:         158 164 156; /* 次要文字 */
  --brand:         140 198 63;  /* #8CC63F 品牌萊姆綠（icon/連結/描邊）*/
  --brand-bright:  174 226 66;  /* #AEE242 CTA 實心底 */
  --brand-deep:    38 66 28;    /* 深綠（glow / 底紋）*/
  --red-glow:      214 40 40;   /* 尾燈紅（僅裝飾光暈 / 圖位氛圍）*/
  --radius: 10px;
  --header-h: 72px;
}

/* ---------- 1. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; } /* 用 clip 不用 hidden，保 position:sticky（鐵則）*/
body {
  margin: 0;
  background: rgb(var(--bg));
  color: rgb(var(--text));
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
:focus-visible { outline: 2px solid rgb(var(--brand)); outline-offset: 2px; } /* a11y focus */

.container { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.section { padding: 72px 0; }
.section.alt { background: rgb(var(--bg-2)); }

/* 區塊標題：綠短槓 + 標題（about 圖稿慣例）*/
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.sec-head::before { content: ""; width: 4px; height: 26px; background: rgb(var(--brand)); border-radius: 2px; }
.sec-head h2 { margin: 0; font-size: 26px; letter-spacing: .06em; }
.sec-head .more { margin-left: auto; font-size: 14px; color: rgb(var(--muted)); display: inline-flex; align-items: center; gap: 6px; }
.sec-head .more:hover { color: rgb(var(--brand)); }
.eyebrow { color: rgb(var(--brand)); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; margin-bottom: 12px; }

/* ---------- 2. Reveal 系統（CSS-first + html.js gating，防陷阱 A） ----------
   JS 關閉 → html 無 .js → 一律可見（SEO / no-JS fallback）
   動態插入的節點【禁止】掛 .reveal（鐵則 1-D）              */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
html.js .reveal[data-reveal="left"]  { transform: translateX(-22px); }
html.js .reveal[data-reveal="right"] { transform: translateX(22px); }
html.js .reveal[data-reveal="scale"] { transform: scale(.96); }
html.js .reveal.in { opacity: 1; transform: none; }
/* stagger：交錯延遲 */
html.js .reveal.d1 { transition-delay: .08s; }
html.js .reveal.d2 { transition-delay: .16s; }
html.js .reveal.d3 { transition-delay: .24s; }
html.js .reveal.d4 { transition-delay: .32s; }
html.js .reveal.d5 { transition-delay: .40s; }
html.js .reveal.d6 { transition-delay: .48s; }

/* ---------- 3. Header（雙層：utility bar + 主列；sticky + scroll blur）----------
   收合機制＝transform（非 height）：外層固定總高 108px（佔位不變，杜絕收合→layout shift→
   scrollY 變動→狀態翻轉的回饋迴路）。.is-scrolled 時整個 header 上移 36px，utility 滑出視窗、
   主列貼頂。搭配 JS 40~120px 遲滯閾值，徹底消除捲動震盪。 */
.site-header { position: sticky; top: 0; z-index: 50; height: 108px; transition: transform .25s ease; will-change: transform; }
.site-header.is-scrolled { transform: translateY(-36px); }

/* Utility bar（36px 固定；收合改由外層 transform 滑出，utility 本身不做 height 過渡）*/
.utility-bar {
  height: 36px; overflow: hidden;
  background: rgb(var(--bg-2)); border-bottom: 1px solid rgb(var(--line) / .08);
}
.utility-inner { height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12px; color: rgb(var(--muted)); }
.utility-bar .u-right { white-space: nowrap; }
.utility-bar a { color: inherit; transition: color .2s; }
.utility-bar a:hover { color: rgb(var(--brand)); }

/* 主列（72px；scrolled 保留 blur 行為）*/
.header-main {
  height: var(--header-h);
  background: rgb(var(--bg) / .82); border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
.site-header.is-scrolled .header-main {
  background: rgb(var(--bg) / .92); backdrop-filter: blur(10px);
  border-bottom-color: rgb(var(--line) / .08);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }

/* Logo：萊姆綠燈束 SVG mark + 斜體字標（移除舊兩行公司名）*/
.logo { display: flex; align-items: center; gap: 10px; }
.logo .beam { display: inline-flex; filter: drop-shadow(0 0 4px rgb(var(--brand) / .4)); }
.logo .beam svg { height: 28px; width: auto; display: block; }
.logo .beam path { fill: rgb(var(--brand)); }
.logo-mark { font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: .05em; color: rgb(var(--text)); line-height: 1; }
.logo-mark b { color: rgb(var(--brand)); font-weight: 900; } /* A 字母綠斜線感 */

/* Nav：6 連結，桌機不換行 */
.main-nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.nav-link {
  position: relative; font-size: 15px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; flex-shrink: 0; padding: 6px 0; color: rgb(var(--text) / .88);
}
.nav-link::after { /* 綠色底線展開（spec：0.24s）*/
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: rgb(var(--brand)); transition: width .24s ease;
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { width: 100%; }
.nav-link[aria-current="page"] { color: rgb(var(--brand)); }

/* 右側動作區：展開式搜尋 + 實心 CTA */
.header-actions { display: flex; align-items: center; gap: 12px; }

/* 展開式搜尋：預設 icon-only，點擊以 width 過渡展開（JS 只切 .open）*/
.header-search { display: flex; align-items: center; }
.header-search input {
  width: 0; opacity: 0; padding: 0; margin: 0; border: 0; outline: 0; height: 40px;
  background: rgb(var(--surface)); color: rgb(var(--text)); font-size: 14px; border-radius: 999px;
  transition: width .28s ease, opacity .2s ease, padding .28s ease, border-color .2s ease, box-shadow .2s ease;
}
.header-search.open input { width: 210px; padding: 0 16px; opacity: 1; border: 1px solid rgb(var(--line) / .14); }
.header-search.open input:focus { border-color: rgb(var(--brand)); box-shadow: 0 0 0 3px rgb(var(--brand) / .16); }
.search-toggle {
  width: 40px; height: 40px; flex: 0 0 40px; margin-left: 6px;
  display: grid; place-items: center; border-radius: 999px;
  background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .12); color: rgb(var(--brand));
  transition: border-color .2s, background .2s, transform .18s;
}
.search-toggle:hover { border-color: rgb(var(--brand)); }
.search-toggle:active { transform: scale(.94); }

/* CTA（聯絡我們，實心，置最右）— 用 .header-actions 前綴提高權重，蓋過 .btn 的 display */
.header-actions .header-cta { padding: 10px 22px; }

.menu-toggle { display: none; background: none; border: 1px solid rgb(var(--line) / .15); border-radius: 8px; color: rgb(var(--text)); padding: 8px 10px; }

/* drawer 專用項目（桌機隱藏）— 前綴 .main-nav 提高權重，確保蓋過 .btn 的 display:inline-flex */
.main-nav .nav-mobile-only, .main-nav .nav-mobile-cta { display: none; }

/* mobile drawer（<1024）*/
.main-nav.open { display: flex; }
@media (max-width: 1023px) {
  .utility-bar { display: none; }
  /* utility bar 隱藏 → 僅 72px 主列，無收合位移（撤銷桌機的 108px 佔位與 translateY）*/
  .site-header { height: var(--header-h); transition: none; }
  .site-header.is-scrolled { transform: none; }
  .header-actions .header-cta { display: none; }
  .header-actions { margin-left: auto; }
  .main-nav {
    display: none; position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0; background: rgb(var(--bg) / .98);
    border-bottom: 1px solid rgb(var(--line) / .1); padding: 8px 24px 22px;
  }
  .main-nav .nav-link { padding: 14px 4px; border-bottom: 1px solid rgb(var(--line) / .06); }
  .menu-toggle { display: block; }
  .main-nav .nav-mobile-only { display: flex; align-items: center; gap: 8px; color: rgb(var(--brand)); }
  .main-nav .nav-mobile-only .ic { width: 18px; height: 18px; color: rgb(var(--brand)); flex: 0 0 18px; }
  .main-nav .nav-mobile-cta { display: inline-flex; justify-content: center; margin-top: 16px; }
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 26px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn .arrow { transition: transform .18s ease; }
.btn:hover { transform: translateY(-2px); }        /* spec：hover 上浮 2px */
.btn:hover .arrow { transform: translateX(4px); }  /* spec：箭頭右移 4px */
.btn:active { transform: scale(.96); }
.btn-solid { background: rgb(var(--brand-bright)); color: #0c1206; }
.btn-solid:hover { box-shadow: 0 6px 22px rgb(var(--brand) / .35); }
.btn-outline { border-color: rgb(var(--brand)); color: rgb(var(--brand)); }
.btn-outline:hover { background: rgb(var(--brand) / .1); }
.btn-ghost { color: rgb(var(--brand)); padding: 12px 6px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* ---------- 5. 圖位 Placeholder（素材待供應表 / seo-image-pipeline 補入）---------- */
.ph {
  position: relative; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(60% 80% at 72% 62%, rgb(var(--red-glow) / .16), transparent 62%),
    radial-gradient(50% 60% at 22% 28%, rgb(var(--brand) / .07), transparent 60%),
    linear-gradient(145deg, #191b19, #0b0c0b);
  color: rgb(var(--muted) / .65); font-size: 12px; letter-spacing: .1em;
  border: 1px solid rgb(var(--line) / .06);
}
.ph::after { content: attr(data-label); }
.ph--filled::after { content: none; } /* 已補圖：關閉佔位文字，容器與 ratio 保留（CLS=0）*/
.ratio-16x9 { aspect-ratio: 16/9; } .ratio-4x3 { aspect-ratio: 4/3; }
.ratio-1x1 { aspect-ratio: 1/1; }  .ratio-21x9 { aspect-ratio: 21/9; }

/* ---------- 6. Hero（首頁 / 內頁 page-hero + 呼吸光暈）---------- */
/* Hero 滿版：底圖鋪滿 + 上蓋漸層保可讀性（依 mockup）*/
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 78vh, 820px);
  display: flex; align-items: center;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.hero-bg.is-active { opacity: 1; } /* crossfade：僅 active 張顯示 */
.hero-overlay { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(var(--bg) / .92) 0%, rgb(var(--bg) / .6) 40%, transparent 100%); }
@keyframes heroGlow {
  from { transform: translate3d(-8px, 0, 0) scale(1); opacity: .6; }
  to   { transform: translate3d(8px, 6px, 0) scale(1.04); opacity: 1; }
}
.hero-copy { max-width: 640px; }
.hero h1 { font-size: clamp(30px, 4.2vw, 52px); letter-spacing: .08em; }
.hero .lede { font-size: 18px; color: rgb(var(--brand)); margin-bottom: 14px; }
.hero .desc { color: rgb(var(--muted)); max-width: 44ch; }
.hero-dots { display: flex; gap: 10px; margin-top: 42px; }
.hero-dots button { width: 26px; height: 4px; border: 0; padding: 0; border-radius: 2px; background: rgb(var(--line) / .18); cursor: pointer; transition: background .2s, width .2s; }
.hero-dots button:hover { background: rgb(var(--line) / .4); }
.hero-dots button.on { background: rgb(var(--brand)); width: 34px; }
@media (max-width: 640px) {
  .hero { align-items: flex-end; min-height: clamp(520px, 82vh, 720px); }
  .hero .container { padding-bottom: 44px; }
  .hero-overlay { background: linear-gradient(180deg, transparent 0%, rgb(var(--bg) / .5) 42%, rgb(var(--bg) / .96) 100%); }
  .hero-copy { max-width: none; }
}

.page-hero { position: relative; overflow: hidden; padding: 84px 0; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, rgb(var(--bg)) 30%, rgb(var(--bg) / .35)),
              linear-gradient(145deg, #161816, #0a0b0a); }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 82% 55%, rgb(var(--red-glow) / .2), transparent 36%);
  animation: heroGlow 14s ease-in-out infinite alternate; }
.page-hero h1 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: .12em; }
.page-hero .desc { color: rgb(var(--muted)); max-width: 52ch; }
.page-hero .bar { width: 64px; height: 4px; background: rgb(var(--brand)); border-radius: 2px; margin-top: 20px; }

/* ---------- 7. Cards ---------- */
.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }
.cols-7 { grid-template-columns: repeat(7, 1fr); }
@media (max-width: 1023px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-5, .cols-7 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .cols-5, .cols-7 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .08);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgb(var(--brand) / .45); box-shadow: 0 12px 30px rgb(0 0 0 / .45); }
.card-media { overflow: hidden; }
.card-media .ph { transition: transform .45s ease, filter .45s ease; }
.card:hover .card-media .ph { transform: scale(1.035); filter: brightness(1.06); } /* spec：image scale 1.035 */
.card-body { padding: 20px 22px 24px; }
.card-body h3 { font-size: 17px; margin-bottom: 8px; }
.card-body h3 a:hover { color: rgb(var(--brand)); }
.card-body .meta { font-size: 13px; color: rgb(var(--muted)); display: flex; gap: 14px; flex-wrap: wrap; }
.card-body .sub { font-size: 14px; color: rgb(var(--muted)); }
.tag { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 4px; background: rgb(var(--brand-deep) / .6); color: rgb(var(--brand)); letter-spacing: .06em; }
.tag.solid { background: rgb(var(--brand)); color: #0c1206; font-weight: 700; }

/* icon 分類卡（首頁產品分類 / 404 推薦入口）*/
.icon-card { text-align: center; padding: 30px 16px 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.icon-card .ic { width: 52px; height: 52px; color: rgb(var(--brand)); transition: transform .25s ease, color .25s ease; }
.icon-card:hover .ic { transform: translateY(-2px); }
.icon-card h3 { font-size: 15px; margin: 4px 0 0; }
.icon-card .sub { font-size: 12.5px; color: rgb(var(--muted)); line-height: 1.6; margin: 0; }
.icon-card .go { color: rgb(var(--brand)); margin-top: auto; transition: transform .2s ease; }
.icon-card:hover .go { transform: translateX(4px); }

/* 橫向優勢卡（首頁翔馳優勢 / about 信念）*/
.adv-card { display: flex; gap: 14px; padding: 22px; align-items: flex-start; }
.adv-card .ic { flex: 0 0 40px; width: 40px; height: 40px; color: rgb(var(--brand)); }
.adv-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.adv-card p { font-size: 13px; color: rgb(var(--muted)); margin: 0; line-height: 1.7; }

/* ---------- 8. 文章頁元素 ---------- */
.breadcrumb { font-size: 13px; color: rgb(var(--muted)); display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0; }
.breadcrumb a:hover { color: rgb(var(--brand)); }
.breadcrumb .sep { opacity: .45; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 44px; align-items: start; }
.article-layout > * { min-width: 0; } /* 防同類裁切：格軌可縮到 0，內部長表格/程式碼由 .table-wrap 自行捲動 */
@media (max-width: 1023px) { .article-layout { grid-template-columns: minmax(0, 1fr); } }

.article-body h2 { font-size: 22px; margin: 44px 0 18px; padding-left: 14px; border-left: 4px solid rgb(var(--brand)); }
.article-body h2 .no { color: rgb(var(--brand)); margin-right: 10px; font-style: italic; }
.article-body p { color: rgb(var(--text) / .92); }
.article-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13.5px; color: rgb(var(--muted)); margin: 14px 0 26px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }

.chip-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
@media (max-width: 767px) { .chip-row { grid-template-columns: repeat(2, 1fr); } }
.chip { background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .08); border-radius: var(--radius); padding: 16px 14px; display: flex; gap: 12px; align-items: center; transition: border-color .25s; }
.chip:hover { border-color: rgb(var(--brand) / .5); }
.chip .ic { width: 34px; height: 34px; color: rgb(var(--brand)); flex: 0 0 34px; }
.chip b { display: block; font-size: 14px; }
.chip small { color: rgb(var(--muted)); font-size: 12px; line-height: 1.5; display: block; }

table.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 22px 0; }
table.spec th, table.spec td { padding: 12px 16px; border: 1px solid rgb(var(--line) / .1); text-align: left; }
table.spec thead th { background: rgb(var(--brand-deep) / .55); color: rgb(var(--brand)); letter-spacing: .04em; }
table.spec tbody tr:nth-child(even) { background: rgb(var(--surface)); }
table.spec td.hl { color: rgb(var(--brand)); }
.table-wrap { overflow-x: auto; } /* RWD：表格保留 table + 外層滑動（G-8）*/

blockquote.pull {
  margin: 34px 0; padding: 26px 30px; border-radius: var(--radius);
  background: rgb(var(--surface)); border-left: 4px solid rgb(var(--brand));
  font-size: 17px; position: relative;
}
blockquote.pull::before { content: "“"; position: absolute; top: 2px; left: 14px; font-size: 48px; color: rgb(var(--brand) / .5); font-family: Georgia, serif; }
blockquote.pull p { margin: 0; padding-left: 26px; }

.share-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 36px 0; }
.share-row .lbl { font-size: 14px; color: rgb(var(--muted)); margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 16px; border-radius: 6px; background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .1); transition: transform .2s, border-color .2s; }
.share-btn:hover { transform: translateY(-2px); border-color: rgb(var(--brand) / .5); color: rgb(var(--brand)); }

.pn-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0; }
@media (max-width: 640px) { .pn-nav { grid-template-columns: 1fr; } }
.pn-nav a { padding: 18px 20px; background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .08); border-radius: var(--radius); font-size: 14px; transition: border-color .25s; }
.pn-nav a:hover { border-color: rgb(var(--brand) / .5); }
.pn-nav small { display: block; color: rgb(var(--muted)); margin-bottom: 6px; }
.pn-nav .next { text-align: right; }

/* ---------- 9. Sidebar widgets ---------- */
.widget { background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .08); border-radius: var(--radius); padding: 24px; margin-bottom: 26px; }
.widget h2, .widget h3 { font-size: 17px; margin-bottom: 16px; padding-left: 12px; border-left: 3px solid rgb(var(--brand)); }
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li { border-bottom: 1px solid rgb(var(--line) / .06); }
.widget-list li:last-child { border-bottom: 0; }
.widget-list a { display: flex; justify-content: space-between; align-items: center; padding: 11px 4px; font-size: 14px; color: rgb(var(--text) / .88); transition: color .2s, padding-left .2s; }
.widget-list a:hover, .widget-list a.on { color: rgb(var(--brand)); padding-left: 10px; }
.widget-list .cnt { color: rgb(var(--muted)); font-size: 13px; }
.hot-item { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid rgb(var(--line) / .06); }
.hot-item:last-child { border-bottom: 0; }
.hot-item .ph { border-radius: 6px; transition: filter .3s; }
.hot-item:hover .ph { filter: brightness(1.15); }
.hot-item h3, .hot-item h4 { font-size: 13.5px; margin: 0 0 6px; font-weight: 500; }
.hot-item:hover h3, .hot-item:hover h4 { color: rgb(var(--brand)); }
.hot-item time { font-size: 12px; color: rgb(var(--muted)); }
.widget-cta { text-align: left; }
.widget-cta .ph { border-radius: 8px; margin-top: 18px; }

/* ---------- 10. 搜尋頁 ---------- */
.search-box { display: flex; background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .12); border-radius: 10px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.search-box:focus-within { border-color: rgb(var(--brand)); box-shadow: 0 0 0 3px rgb(var(--brand) / .16); }
.search-box input { flex: 1; background: none; border: 0; outline: 0; color: rgb(var(--text)); padding: 14px 18px; font-size: 15px; }
.search-box button { background: rgb(var(--brand-bright)); color: #0c1206; border: 0; padding: 0 30px; font-weight: 700; letter-spacing: .1em; }
.kw-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; font-size: 13px; }
.kw-chips .lbl { color: rgb(var(--muted)); }
.kw-chips a { padding: 5px 14px; border: 1px solid rgb(var(--line) / .15); border-radius: 999px; transition: transform .16s, border-color .16s, color .16s; }
.kw-chips a:hover { transform: translateY(-2px); border-color: rgb(var(--brand)); color: rgb(var(--brand)); }

.result-tabs { display: flex; gap: 26px; border-bottom: 1px solid rgb(var(--line) / .1); margin: 30px 0 20px; font-size: 14.5px; overflow-x: auto; overflow-y: hidden; }
.result-tabs.band { margin: 0 auto; border-bottom: 0; } /* 置於全幅色帶內：margin:0 auto 復原 .container 水平置中（.result-tabs 的 margin shorthand 會把左右歸零），並去除上下邊距與重複邊線 */
.result-tabs a { padding: 12px 2px; position: relative; color: rgb(var(--muted)); white-space: nowrap; }
.result-tabs a .cnt { color: rgb(var(--brand)); margin-left: 6px; font-size: 12.5px; }
.result-tabs a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: rgb(var(--brand)); transition: width .24s; }
.result-tabs a.on { color: rgb(var(--text)); }
.result-tabs a.on::after, .result-tabs a:hover::after { width: 100%; }

.result-item { display: grid; grid-template-columns: 230px 1fr; gap: 24px; padding: 22px; background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .08); border-radius: var(--radius); margin-bottom: 18px; transition: border-color .3s, transform .3s; }
.result-item:hover { border-color: rgb(var(--brand) / .5); transform: translateY(-2px); }
.result-item .thumb { position: relative; }
.result-item .thumb .ph { border-radius: 8px; }
.result-item .thumb .tag { position: absolute; top: 10px; left: 10px; }
.result-item h2, .result-item h3 { font-size: 17px; margin-bottom: 4px; }
.result-item h2 a:hover, .result-item h3 a:hover { color: rgb(var(--brand)); }
.result-item .code { font-size: 12.5px; color: rgb(var(--muted)); letter-spacing: .06em; margin-bottom: 8px; }
.result-item .desc { font-size: 14px; color: rgb(var(--muted)); margin-bottom: 12px; }
.result-item .foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 13px; color: rgb(var(--muted)); }
.result-item .foot .act { margin-left: auto; color: rgb(var(--brand)); display: inline-flex; gap: 6px; align-items: center; }
.result-item .foot .act:hover .arrow { transform: translateX(4px); }
.result-item mark { background: none; color: rgb(var(--brand)); font-weight: 700; }
@media (max-width: 767px) { .result-item { grid-template-columns: 1fr; } }

/* ---------- 11. 分頁 ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; border: 1px solid rgb(var(--line) / .12); font-size: 14px; transition: transform .18s, border-color .18s, background .18s; }
.pagination a:hover { transform: translateY(-2px); border-color: rgb(var(--brand)); color: rgb(var(--brand)); }
.pagination .on { background: rgb(var(--brand)); border-color: rgb(var(--brand)); color: #0c1206; font-weight: 700; }
.pagination .dots { border: 0; }

/* ---------- 12. Timeline（about）---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: rgb(var(--brand) / .35); }
.timeline li { position: relative; padding: 0 0 22px 18px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 8px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgb(var(--brand)); background: rgb(var(--bg)); }
.timeline .yr { color: rgb(var(--brand)); font-weight: 700; font-size: 18px; margin-right: 14px; font-style: italic; }
.timeline p { display: inline; color: rgb(var(--muted)); font-size: 14.5px; }

/* ---------- 13. 數據 Count-up（about）---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
@media (max-width: 767px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat b { font-size: 38px; color: rgb(var(--brand)); font-style: italic; letter-spacing: .02em; }
.stat b .plus { font-size: 26px; }
.stat span { display: block; color: rgb(var(--muted)); font-size: 14px; margin-top: 4px; }

/* 認證 badges */
.badge-row { display: flex; flex-wrap: wrap; gap: 16px; }
.badge { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .1); border-radius: var(--radius); transition: border-color .25s; }
.badge:hover { border-color: rgb(var(--brand) / .5); }
.badge .ic { width: 38px; height: 38px; color: rgb(var(--brand)); }
.badge b { font-size: 14.5px; display: block; }
.badge small { color: rgb(var(--muted)); font-size: 12px; }

/* ---------- 14. 訂閱區 ---------- */
.newsletter { background: linear-gradient(120deg, rgb(var(--brand-deep) / .55), rgb(var(--surface))); border: 1px solid rgb(var(--brand) / .25); border-radius: var(--radius); padding: 34px 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 26px; }
.newsletter .txt { flex: 1 1 320px; }
.newsletter h2 { font-size: 20px; margin-bottom: 6px; }
.newsletter p { color: rgb(var(--muted)); font-size: 14px; margin: 0; }
.newsletter form { display: flex; gap: 12px; flex: 1 1 380px; }
.newsletter input { flex: 1; background: rgb(var(--bg) / .6); border: 1px solid rgb(var(--line) / .15); border-radius: 8px; padding: 12px 16px; color: rgb(var(--text)); transition: border-color .2s, box-shadow .2s; }
.newsletter input:focus { outline: none; border-color: rgb(var(--brand)); box-shadow: 0 0 0 3px rgb(var(--brand) / .16); }
.newsletter .note { flex-basis: 100%; font-size: 13px; color: rgb(var(--brand)); display: none; margin: 0; }
.newsletter .note.show { display: block; }
@media (max-width: 640px) { .newsletter form { flex-direction: column; } }

/* ---------- 15. 聯絡橫幅 + Footer ---------- */
.contact-band { position: relative; overflow: hidden; padding: 64px 0; background: rgb(var(--bg-2)); isolation: isolate; }
.contact-band .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 1023px) { .contact-band .grid2 { grid-template-columns: 1fr; } }
.contact-list { display: flex; flex-wrap: wrap; gap: 28px; margin: 20px 0 28px; font-size: 15px; }
.contact-list a { display: inline-flex; align-items: center; gap: 10px; }
.contact-list .ic { width: 20px; height: 20px; color: rgb(var(--brand)); transition: color .2s; }
.contact-list a:hover { color: rgb(var(--brand)); }
.contact-list small { display: block; color: rgb(var(--muted)); font-size: 12px; }

.site-footer { background: #070807; border-top: 1px solid rgb(var(--line) / .06); padding: 56px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.3fr; gap: 34px; padding-bottom: 40px; }
/* 平板/行動：品牌跨兩欄置頂，四欄以 2×2 左右排列 */
@media (max-width: 1023px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 28px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 640px)  { .footer-grid { gap: 26px 22px; } .footer-contact { grid-column: 1 / -1; } } /* 聯絡資訊跨兩欄置底 */
.footer-grid h3 { font-size: 15px; margin-bottom: 16px; color: rgb(var(--text)); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-link { position: relative; color: rgb(var(--muted)); font-size: 13.5px; }
.footer-link::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1px; background: rgb(var(--brand)); transition: width .24s ease; }
.footer-link:hover { color: rgb(var(--text)); }
.footer-link:hover::after { width: 100%; }
.footer-brand p { color: rgb(var(--muted)); font-size: 13px; }
.footer-contact address { font-style: normal; display: grid; gap: 10px; color: rgb(var(--muted)); font-size: 13.5px; }
.footer-contact address a { display: inline-flex; gap: 8px; align-items: center; }
.footer-contact address a:hover { color: rgb(var(--brand)); }
.footer-contact .ic { width: 16px; height: 16px; color: rgb(var(--brand)); flex: 0 0 16px; }
.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-row a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgb(var(--line) / .15); color: rgb(var(--muted)); transition: transform .2s, color .2s, border-color .2s; }
.social-row a:hover { transform: translateY(-2px); color: rgb(var(--brand)); border-color: rgb(var(--brand)); }
.footer-bottom { border-top: 1px solid rgb(var(--line) / .06); padding: 18px 0; display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: space-between; color: rgb(var(--muted)); font-size: 12.5px; }
.footer-bottom nav { display: flex; gap: 10px; align-items: center; margin-left: auto; } /* © 靠左、政策連結靠右（行動版換行仍靠右）*/
.footer-bottom .sep { color: rgb(var(--muted) / .45); }
@media (max-width: 640px) { .footer-bottom nav { flex-wrap: wrap; justify-content: flex-end; } }

/* ---------- 16. Back to top ---------- */
.back-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid rgb(var(--brand) / .4);
  background: rgb(var(--surface) / .9); color: rgb(var(--brand));
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { transform: translateY(-2px) scale(1.06); }

/* ---------- 17. 404 ---------- */
.err-code { font-size: clamp(96px, 16vw, 180px); font-weight: 900; font-style: italic; line-height: 1; letter-spacing: .02em;
  background: linear-gradient(180deg, #e8eae6, #6a6f68); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 10px; }
.err-hash { display: flex; gap: 5px; margin: 16px 0 26px; }
.err-hash i { width: 18px; height: 7px; background: rgb(var(--brand)); transform: skewX(-24deg); }
.err-hash i:nth-child(even) { opacity: .45; }

/* ---------- 19. 精選產品輪播（scroll-snap 水平軌道 + 拖曳）---------- */
.feat-news-grid { display: grid; grid-template-columns: minmax(0,1.9fr) minmax(0,1fr); gap: 44px; align-items: start; }
.feat-news-grid > * { min-width: 0; } /* 讓格軌可縮到 0，內部 overflow 輪播才會裁切而非撐寬（行動版裁切根因）*/
.carousel { min-width: 0; }
@media (max-width: 1023px) { .feat-news-grid { grid-template-columns: minmax(0, 1fr); } }
.carousel {
  display: flex; gap: 22px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  touch-action: pan-x;                 /* 鎖 Y：拖曳時頁面不上下捲 */
  -ms-overflow-style: none; scrollbar-width: none; /* 隱藏捲軸 */
  cursor: grab; padding-bottom: 4px;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel.dragging { cursor: grabbing; scroll-behavior: auto; }
.carousel.dragging a { pointer-events: none; }  /* 拖曳中不誤觸連結 */
.carousel > .card { flex: 0 0 calc(50% - 11px); scroll-snap-align: start; }
@media (max-width: 640px) { .carousel > .card { flex: 0 0 82%; } }
.carousel-dots { display: flex; gap: 10px; margin-top: 18px; justify-content: center; }
.carousel-dots button { width: 26px; height: 4px; border-radius: 2px; border: 0; padding: 0; background: rgb(var(--line) / .18); cursor: pointer; transition: background .2s; }
.carousel-dots button.on { background: rgb(var(--brand)); }

/* ---------- 20. 產品卡格線（products）---------- */
.prod-cats { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 34px; }
.prod-cats a { padding: 8px 18px; border: 1px solid rgb(var(--line) / .15); border-radius: 999px; font-size: 14px; color: rgb(var(--muted)); white-space: nowrap; transition: border-color .2s, color .2s; }
.prod-cats a:hover { border-color: rgb(var(--brand)); color: rgb(var(--brand)); }
.prod-cat-head { scroll-margin-top: 72px; }
#lamps, #sources, #accessories, #exterior, #ev, #semi { scroll-margin-top: 72px; } /* 錨點跳轉避開 sticky header：以收合後主列高度 72px 為準統一 */
.prod-card .card-body { display: flex; flex-direction: column; gap: 4px; }
.prod-card .model { font-size: 13px; color: rgb(var(--brand)); letter-spacing: .04em; }
.prod-card .btn-inquire { margin-top: 12px; align-self: flex-start; }

/* ---------- 21. 詢價 CTA banner（取代假訂閱）---------- */
.inquiry-cta { background: linear-gradient(120deg, rgb(var(--brand-deep) / .55), rgb(var(--surface))); border: 1px solid rgb(var(--brand) / .25); border-radius: var(--radius); padding: 34px 36px; text-align: center; }
.inquiry-cta h2 { font-size: 22px; margin-bottom: 8px; }
.inquiry-cta p { color: rgb(var(--muted)); font-size: 14.5px; margin: 0 auto 22px; max-width: 52ch; }
.inquiry-cta .cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- 22. 國際展會足跡卡（about）---------- */
.exhibit-card { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px; min-height: 118px; }
.exhibit-card .region { font-size: 12px; color: rgb(var(--brand)); letter-spacing: .1em; }
.exhibit-card h3 { font-size: 16px; margin: 0; }
.exhibit-card .go { margin-top: auto; color: rgb(var(--muted)); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.exhibit-card:hover .go { color: rgb(var(--brand)); }

/* ---------- 23. VSCC 認證表（分組列）---------- */
.cert-table caption { caption-side: top; font-size: 15px; color: rgb(var(--text)); padding: 0 0 14px; letter-spacing: .04em; text-align: left; }
.cert-table td.grp { background: rgb(var(--brand-deep) / .5); color: rgb(var(--brand)); text-align: center; font-size: 13.5px; letter-spacing: .1em; }

/* ---------- 26. RWD 收合修正：search 2 欄、index 優勢卡窄幅單欄 ---------- */
.search-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 44px; align-items: start; padding: 44px 0 72px; }
.search-layout > * { min-width: 0; } /* 同 feat-news-grid：格軌可縮到 0，內部 overflow（result-tabs）才會裁切而非撐寬（行動版元素裁切根因）*/
@media (max-width: 1023px) { .search-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .adv-grid { grid-template-columns: 1fr; } } /* 優勢卡 ≤640 單欄，避免文字擠成直排 */

/* ---------- 25. 分類 Tabs 前端篩選：空狀態 + 可點 tab 游標 ---------- */
.result-tabs a[data-filter] { cursor: pointer; }
.tab-empty { grid-column: 1 / -1; text-align: center; color: rgb(var(--muted)); padding: 44px 0; margin: 0; }

/* ---------- 24. about 版面：2 欄容器窄幅收合 + 信念卡（icon 上、不直排）---------- */
.about-split  { display: grid; gap: 48px; align-items: start;  grid-template-columns: 1.05fr 1fr; }
.belief-grid  { display: grid; gap: 34px; align-items: center; grid-template-columns: 1fr 1.6fr; }
.about-2col-a { display: grid; gap: 36px; align-items: center; grid-template-columns: 1.4fr 1fr; }
.about-2col-b { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr 1fr; }
@media (max-width: 1023px) { .about-split, .belief-grid, .about-2col-a, .about-2col-b { grid-template-columns: 1fr; } }

.belief-cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.belief-card { display: flex; flex-direction: column; gap: 10px; padding: 24px 20px; align-items: flex-start; }
.belief-card .ic { width: 40px; height: 40px; color: rgb(var(--brand)); flex: 0 0 auto; }
.belief-card h3 { font-size: 16px; margin: 0; white-space: normal; }        /* 不直排 */
.belief-card p { font-size: 14px; color: rgb(var(--muted)); margin: 0; line-height: 1.7; }

/* ---------- 27. 法遵頁（隱私權政策 / 網站使用條款）一欄內文 ---------- */
.legal-body { max-width: 820px; padding: 8px 0 76px; }
.legal-body .updated { color: rgb(var(--muted)); font-size: 13.5px; margin: 0 0 22px; }
.legal-body h2 { font-size: 20px; margin: 40px 0 14px; padding-left: 14px; border-left: 4px solid rgb(var(--brand)); letter-spacing: .04em; }
.legal-body h2 .no { color: rgb(var(--brand)); font-style: italic; margin-right: 10px; }
.legal-body h3 { font-size: 16px; margin: 22px 0 10px; }
.legal-body p, .legal-body li { color: rgb(var(--text) / .9); font-size: 15px; line-height: 1.85; }
.legal-body ul { padding-left: 22px; margin: 0 0 16px; display: grid; gap: 8px; }
.legal-body li::marker { color: rgb(var(--brand)); }
.legal-body address { font-style: normal; background: rgb(var(--surface)); border: 1px solid rgb(var(--line) / .08); border-radius: var(--radius); padding: 18px 22px; display: grid; gap: 8px; margin: 14px 0 8px; }
.legal-body address a { display: inline-flex; align-items: center; gap: 8px; }
.legal-body address a:hover { color: rgb(var(--brand)); }
.legal-body address .ic { width: 16px; height: 16px; color: rgb(var(--brand)); flex: 0 0 16px; }

/* ---------- 28. 行動版 rail（統一水平卡片軌道，≤640；桌機維持 grid）+ about ≤640 微修 ---------- */
@media (max-width: 640px) {
  /* 通用 rail：edge-bleed 至視窗、卡片定寬、右緣露下一張、scroll-snap x（.carousel 為桌機+行動皆用之獨立軌道，不併入以免改變行為）*/
  .rail {
    display: flex; flex-wrap: nowrap; gap: 14px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; touch-action: pan-x;
    -ms-overflow-style: none; scrollbar-width: none;
    margin-inline: calc(50% - 50vw); padding-inline: 24px; scroll-padding-inline: 24px; /* 對齊 .container 的 24px */
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { flex: 0 0 80vw; min-width: 0; scroll-snap-align: start; } /* 80vw → 右緣露出下一張 ~12% */

  /* A2 信念卡 ≤640 橫排：icon 左 40px、右標題+一行文、卡高一致 */
  .belief-card { flex-direction: row; align-items: center; gap: 14px; }
  .belief-card .ic { flex: 0 0 40px; width: 40px; height: 40px; }
  .belief-card > div { min-width: 0; }
  .belief-card h3 { margin-bottom: 2px; }
  .belief-card p { display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

  /* A3 認證統計 ≤640：數字與 + 同行不斷行、2×2 置中 */
  .stat b { display: inline-flex; align-items: baseline; justify-content: center; white-space: nowrap; font-size: 32px; }
}

/* ---------- 29. rail 滑動提示 + 右緣漸層 scrim（僅 ≤640）---------- */
.rail-hint { display: none; } /* 桌機（>640）不顯示 */
@keyframes railHintArrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@media (max-width: 640px) {
  /* 標題列右側提示：「滑動查看更多 →」，箭頭呼吸 */
  .rail-hint { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 13px; color: rgb(var(--brand)); white-space: nowrap; transition: opacity .3s ease, visibility 0s .3s; }
  .rail-hint.hide { opacity: 0; visibility: hidden; } /* 首次滑動後淡出 */
  .rail-hint .rh-arrow { display: inline-block; animation: railHintArrow 1.2s ease-in-out infinite; }
  /* 右緣 scrim：sticky 貼視窗右緣、32px、不擋觸控、持續暗示（不淡出）*/
  .rail { padding-right: 0; scroll-padding-right: 0; } /* 去右內距，讓 scrim 貼齊視窗右緣 */
  .rail > .rail-scrim { flex: 0 0 0; width: 0; position: sticky; right: 0; align-self: stretch; pointer-events: none; scroll-snap-align: none; }
  .rail > .rail-scrim::before { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 32px; background: linear-gradient(to left, rgb(var(--bg)) 0%, transparent 100%); }
}
@media (prefers-reduced-motion: reduce) { .rail-hint .rh-arrow { animation: none !important; transform: none; } } /* 停動畫留靜態文字 */

/* ---------- 18. prefers-reduced-motion（全站政策，鐵則 1-F）---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .hero::before, .page-hero::after { animation: none !important; }
  html.js .reveal { opacity: 1 !important; transform: none !important; }
  .site-header { transition: none !important; } /* header 收合無過渡，直接切 */
}
