/* ==========================================================================
   Green Charger 公眾站樣式 — Classic 版式（08-25-02 全量重寫）
   照抄 green-charger.com 經典版式（設計要素主要依據 /tmp/gc-custom.css，行號標註於各區塊）
   架構：token 全走 :root 變數（D-8，未來可一行 link 續接主題）；零 bootstrap/jquery/swiper/統計腳本；
   GSAP+ScrollTrigger 保留驅動進場動效（用戶裁定 2026-08-25 推翻 D-2；動畫掛鉤 data-reveal/-group/-item）
   響應式三檔（D-3）：≥992 桌面 / 768–991.98 平板 / <768 手機，窄屏一律堆疊保留內容
   ========================================================================== */

:root {
  /* ---- 色彩 tokens（§1.4，取值實測自 gc-custom.css）---- */
  --accent: #4457ED;        /* 原站唯一強調色（css:8,13,30,119,129,146…） */
  --accent-side: #236CB8;   /* 內頁左欄菜單 hover/選中（css:53） */
  --accent-warm: #D97A00;   /* 提交鈕 hover（css:147） */
  --ink: #333;              /* 正文 */
  --ink-dim: #666;          /* 次級文字 */
  --ink-faint: #999;        /* 輔助文字（時間戳/版權） */
  --line: #DDD;             /* 分隔線、邊框（css:1,26,69） */
  --bg-page: #F5F5F5;       /* 內頁 nyMain 底（css:43） */
  --bg-panel: #E8E8E8;      /* 內頁左欄底（css:44） */
  --bg-card: #F3F3F3;       /* 首頁簡介/相冊塊底（css:64） */
  --footer-bg: #333333;     /* 頁尾導航底（css:97） */
  --footer-bar: #242424;    /* 版欄底（css:107） */

  /* ---- 頂部導航面板（08-26-03 淺色現代重設）---- */
  --nav-panel-bg: #fff;                              /* 下拉/mega 面板底 */
  --nav-panel-shadow: 0 12px 32px rgba(20, 30, 80, 0.12); /* 柔和投影 */
  --nav-panel-radius: 0 0 12px 12px;                 /* 僅下圓角，貼齊頭部底邊 */
  --nav-accent-bar: var(--accent);                   /* 面板頂部 2px 品牌條 */
  --nav-link-hover-bg: rgba(68, 87, 237, 0.06);      /* 子項 hover 淺藍底 */
  --nav-col-title: var(--ink);                       /* 一級分類標題色 */
  --nav-col-sub: var(--ink-dim);                     /* 二級子項色 */

  /* ---- 形狀 ---- */
  --radius-sm: 2px;         /* 輸入框（css:144） */
  --radius-md: 5px;         /* 語言框/分頁（css:10,128） */
  --radius-lg: 15px;        /* 產品分類圖/產品圖（css:86） */

  /* ---- 圖片 hover 動效（08-28-02：移進快/移出慢；transform 一律掛無 GSAP 標記的內層圖）---- */
  --img-zoom: 1.05;         /* 列表卡 hover 放大係數 */
  --dur-img-in: 0.25s;      /* 移進：快而有力 */
  --dur-img-out: 0.45s;     /* 移出：慢而優雅 */
  --img-ease: cubic-bezier(0.22, 1, 0.36, 1);              /* 輕微回緩 */
  --img-shadow: 0 10px 28px rgba(20, 30, 80, 0.14);        /* 詳情主圖 hover 柔和上浮投影 */

  /* ---- 版式 ---- */
  --header-h: 80px;         /* 頭部高度，nav 項 line-height 79px（css:1,7） */
  --container: 1170px;      /* 內容欄寬（Bootstrap3 @≥1200 檔） */
  --font-stack: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ============================== 基礎 ============================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.4; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 15px; }

.empty { padding: 24px 0; text-align: center; color: var(--ink-faint); font-size: 14px; }

/* ============================== 頭部（§1.5，css:1-13） ============================== */

.site-header {
  position: relative;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

/* 閱讀進度線（2026-08-25 用戶第二條裁定保留；頭部不吸頂故線体 fixed 於視口頂，
   ScrollTrigger scrub 直接映射滾動比例——功能性指示非裝飾動畫） */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 90;
  pointer-events: none;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  width: 205px;              /* 原站 logo 寬（css:3） */
  color: var(--accent);
}

.brand-mark { width: 26px; height: 26px; flex: none; }

/* 配置化 logo（08-27-08 FUN-003）：高度 32px 對齊 brand-mark viewBox 基準（圖含字標需更高）；
   max-width:100% + object-fit:contain 防撐破 .brand 205px 定寬 */
.brand-logo { width: auto; max-width: 100%; object-fit: contain; flex: none; }

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: stretch;
  height: 100%;
}

.site-nav > a,
.nav-item { height: 100%; }

.nav-link {
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-size: 16px;
  color: var(--ink);
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 0.15s, box-shadow 0.15s;
}

.site-nav > a:hover,
.nav-link:hover {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);   /* 原站 a:hover 底線（css:8） */
}

.nav-item { position: relative; display: flex; }
.nav-item-mega { position: static; }          /* mega 面板錨定 header 全幅 */

.acc-btn { display: none; }                  /* 僅 <992 抽屜內顯示 */

/* ---- 下拉/mega 面板（08-26-03 淺色現代重設：白底 + 柔和陰影 + 頂部2px品牌條）---- */

.drop-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 198px;
  padding: 8px 0;
  background: var(--nav-panel-bg);
  border-top: 2px solid var(--nav-accent-bar);
  border-radius: var(--nav-panel-radius);
  box-shadow: var(--nav-panel-shadow);
  text-align: left;
  visibility: hidden;
  opacity: 0;
  z-index: 60;
  transition: opacity 0.15s;
}

.nav-item:hover .drop-panel,
.nav-item:focus-within .drop-panel { visibility: visible; opacity: 1; }

.drop-panel a {
  display: block;
  padding: 8px 24px;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.drop-panel a:hover { background: var(--nav-link-hover-bg); color: var(--accent); }

/* ---- 產品 mega 面板（08-26-03：並排欄 + 二級子項常駐，刪側飛出與 :has() 不變式）---- */

.mega-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  transform: none;                           /* 蓄滅 .drop-panel 的 translateX(-50%) 殘留 */
  background: var(--nav-panel-bg);
  border-top: 2px solid var(--nav-accent-bar);
  border-radius: var(--nav-panel-radius);
  box-shadow: var(--nav-panel-shadow);
  visibility: hidden;
  opacity: 0;
  z-index: 60;
  transition: opacity 0.15s;
}

.nav-item-mega:hover .mega-panel,
.nav-item-mega:focus-within .mega-panel { visibility: visible; opacity: 1; }

.mega-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px 32px;
}

.mega-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  padding: 0;
}

.mega-item {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 260px;
  padding: 0;
}

.mega-head {
  display: block;
  padding: 8px 0;
  margin-bottom: 4px;
  color: var(--nav-col-title);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-bottom: 1px solid var(--line);
  transition: color 0.15s;
}

.mega-head:hover { color: var(--accent); }

.mega-sub {
  display: block;
  position: static;
  background: transparent;
  padding: 0;
}

.mega-sub li { list-style: none; }

.mega-sub a {
  display: block;
  padding: 6px 10px;
  color: var(--nav-col-sub);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.mega-sub a:hover { background: var(--nav-link-hover-bg); color: var(--accent); }

/* ---- 語言切換下拉（§1.5.3：click 展開 D-4 + SVG 旗幟 D-5；130px 圓角框形態 css:10）---- */

.lang { position: relative; flex: none; margin-left: 10px; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 130px;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 12px;
  color: var(--ink-faint);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
}

.lang-toggle:hover { color: var(--accent); }

.lang-name { letter-spacing: 0.04em; }

.lang-caret { width: 10px; height: 6px; margin-left: auto; flex: none; }

.flag {
  display: inline-block;
  width: 20px;
  height: 14px;
  flex: none;
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.flag svg { display: block; width: 100%; height: 100%; }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 130px;
  padding: 6px 0;
  background: var(--nav-panel-bg);
  border-top: 2px solid var(--nav-accent-bar);
  border-radius: var(--nav-panel-radius);
  box-shadow: var(--nav-panel-shadow);
  visibility: hidden;
  opacity: 0;
  z-index: 70;
}

.lang.is-open .lang-menu { visibility: visible; opacity: 1; }

.lang-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--ink);
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

.lang-menu a:hover { background: var(--nav-link-hover-bg); color: var(--accent); }
.lang-menu a.is-active { color: var(--accent); font-weight: 600; }   /* 當前語言項 */

/* ---- 漢堡鈕（<992 顯示，css:386-392 形態）---- */

.nav-toggle {
  display: none;
  flex: none;
  width: 40px;
  height: 40px;
  margin-left: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.nav-toggle span { display: block; width: 22px; height: 2px; border-radius: 1px; background: #888; transition: transform 0.3s; }

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================== 首頁 Banner 輪播（FUN-004-2 區塊 1） ============================== */

.banner {
  position: relative;
  height: clamp(200px, 30vw, 310px);
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-side)) center / cover no-repeat;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

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

.banner-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  text-align: center;
  padding: 0 8%;
}

.banner-title { font-size: clamp(26px, 4.5vw, 44px); }
.banner-sub { font-size: 15px; opacity: 0.85; letter-spacing: 0.1em; }

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 5;
}

.banner-dots button {
  width: 32px;
  height: 5px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.banner-dots button.is-active { background: #fff; }

/* ============================== 首頁通用（css:59-63） ============================== */

.main { display: block; }
.home-layer { margin-top: 25px; }

.home-title { font-size: 18px; font-weight: 700; margin-bottom: 15px; }

.home-title-line { border-bottom: 2px solid var(--line); padding-bottom: 8px; }

/* ---- 精品推薦橫向卡軌（D-9：scroll-snap + 箭頭，不做循環；css:16-21）---- */

.pro-strip { position: relative; }

.pro-track {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 5px 2px;
  scrollbar-width: thin;
}

.pro-card {
  flex: 0 0 calc((100% - 45px) / 4);       /* 桌面 4 卡/屏 */
  scroll-snap-align: start;
  background: #fff;
  text-align: center;
  padding: 0 12px;
  color: var(--ink);
}

.pro-card:hover .pro-name { color: var(--accent); }

.pro-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 10px;
  background: #fff center / contain no-repeat;
  transition: transform var(--dur-img-out) var(--img-ease);   /* 移出慢復位；移進節奏由 hover 態接手（08-28-02）*/
}

/* 圖 hover 動效（08-28-02）：掛內層 .pro-img——.pro-card 帶 data-reveal-item 殘留 GSAP inline transform，卡級 transform 會打架 */
.pro-card:hover .pro-img,
.pro-card:focus-within .pro-img,
.product-card:hover .pro-img,
.product-card:focus-within .pro-img {
  transform: scale(var(--img-zoom));
  transition: transform var(--dur-img-in) var(--img-ease);
}

.pro-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  min-height: 3em;
}

.strip-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  z-index: 5;
  width: 35px;
  height: 64px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.strip-arrow[data-strip-next] { left: auto; right: 0; }

.pro-strip:hover .strip-arrow,
.pro-strip:focus-within .strip-arrow { opacity: 1; }   /* 原站 hover 顯箭頭（css:17-18） */

/* ---- 企業簡介 + 工廠相冊（css:64-69：--bg-card 塊高 318px，圖左 270×320）---- */

.home-blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

.home-block-bd {
  margin-top: 20px;
  height: 318px;
  background: var(--bg-card);
  overflow: hidden;
  position: relative;
}

.home-about { display: flex; }

.home-about-img {
  display: block;
  flex: none;
  width: 270px;
  background: var(--bg-panel) center / cover no-repeat;
  transition: transform var(--dur-img-out) var(--img-ease);   /* 08-28-02 */
}

.home-about-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 26px;
}

.home-about-name { display: block; font-size: 16px; color: var(--ink); margin-bottom: 10px; }
.home-about-name:hover { color: var(--accent); }

.more-btn {                                    /* 90×35 白底描邊鈕（css:69） */
  align-self: flex-end;
  margin-top: auto;
  width: 90px;
  height: 35px;
  line-height: 33px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}

.more-btn:hover { border-color: var(--accent); color: var(--accent); }

.home-factory { display: block; background: var(--bg-panel) center / cover no-repeat; }

/* 相冊塊縮放層（08-28-02 評審返工）：.home-factory 自身即 .home-block-bd，overflow 與 transform 同元素時裁不到——
   圖層移 ::before（background: inherit 承接 inline background-image），標題條 span 不隨縮放；定位基準用 .home-block-bd 既有 position:relative */
.home-factory::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  transition: transform var(--dur-img-out) var(--img-ease);
}

/* 簡介/相冊塊 hover（08-28-02）：3% 克制放大——簡介圖掛自身（外層 .home-block-bd 裁切）；相冊塊掛 ::before（自身 overflow 裁切）*/
.home-about-img:hover,
.home-about-img:focus-within {
  transform: scale(1.03);
  transition: transform var(--dur-img-in) var(--img-ease);
}

.home-factory:hover::before,
.home-factory:focus-within::before {
  transform: scale(1.03);
  transition: transform var(--dur-img-in) var(--img-ease);
}

.home-factory-name {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 40px;
  line-height: 40px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 16px;
  text-indent: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 三欄新聞（css:74-79：hot 大圖 + 底部 40px 黑半透明標題條 + 行日期右浮）---- */

.news-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.news-col > h2 { font-size: 18px; }
.news-col > h2 a:hover { color: var(--accent); }

.news-col-bd { margin-top: 20px; }

.hot-news { display: block; position: relative; margin-bottom: 15px; overflow: hidden; }   /* overflow 防放大溢出（08-28-02）*/

.hot-news img {
  display: block;
  width: 100%;
  aspect-ratio: 370 / 223;
  object-fit: cover;
  transition: transform var(--dur-img-out) var(--img-ease);   /* 08-28-02 */
}

/* 大圖 hover 放大掛 img 本身——底部標題條為 sibling 不受影響（08-28-02）*/
.hot-news:hover img,
.hot-news:focus-within img {
  transform: scale(var(--img-zoom));
  transition: transform var(--dur-img-in) var(--img-ease);
}

.hot-news span {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 40px;
  line-height: 40px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 16px;
  text-indent: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 3px 0;
  color: var(--ink);
  font-size: 14px;
}

.news-line:hover { color: var(--accent); }

.news-line-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.news-line-date { flex: none; color: var(--ink-faint); font-size: 12px; }

/* ---- 成功案例圖牆（css:80-82：格寬 ~234px 自適應）---- */

.home-cases { margin-bottom: 50px; }

.case-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); justify-content: space-between;gap: 30px 0px; }

.case-wall li { overflow: hidden; }   /* hover 放大裁切（08-28-02；li 帶 data-reveal-item，transform 只掛內層 img）*/

.case-wall img {
  display: block;
  /*width: 100%;*/
  /*height: 160px;*/
  object-fit: cover;
  transition: transform var(--dur-img-out) var(--img-ease);   /* 08-28-02：opacity 語言升級為全站統一 scale */
}

.case-wall li:hover img {
  transform: scale(var(--img-zoom));
  transition: transform var(--dur-img-in) var(--img-ease);
}

/* ---- 友情鏈接（css:83-85：單行橫排 12px）---- */

.links-row { display: flex; flex-wrap: wrap; gap: 0 15px; padding: 15px 0; }

.links-row a { font-size: 12px; color: var(--ink-dim); }
.links-row a:hover { color: var(--accent); }

/* ============================== 內頁框（nybanner + 左欄 + 主區，css:42-54） ============================== */

.nybanner {
  height: 300px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-side)) center / cover no-repeat;
}

.ny-main { background: var(--bg-page); padding-bottom: 50px; }

.ny-grid {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 25px;
  align-items: start;
}

/* 左欄菜單（--bg-panel；h3 16px 三角 icon、項 14px，css:44-53）*/

.side-menu { background: var(--bg-panel); padding: 5px 0 25px; }

.side-menu h3 {
  position: relative;
  padding: 25px 10px 10px 36px;
  font-size: 16px;
  font-weight: 700;
}

.side-menu h3::before {                       /* 原站三角 icon（css:47） */
  content: "";
  position: absolute;
  left: 16px;
  top: 35%;
  margin-top: 14px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--accent-side);
}

.side-menu li { position: relative; }

.side-menu li::before {                       /* 項前小三角（css:50） */
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #BBB;
}

.side-menu li a {
  display: block;
  padding: 8px 10px 8px 36px;
  font-size: 14px;
  color: var(--ink);
}

.side-menu li a.on,
.side-menu li a:hover { color: var(--accent-side); }   /* css:53 */

.side-menu li a.on::before,
.side-menu li a:hover::before { content: ""; }

/* 主區 */

.page-content { background: #fff; padding: 20px 30px 50px; min-width: 0; }

.page-content-narrow { max-width: 860px; margin: 0 auto; }

.crumbs { font-size: 14px; color: var(--ink-faint); padding: 5px 0; }

.crumbs a { color: var(--ink-dim); }
.crumbs a:hover { color: var(--accent); }
.crumbs em { font-style: normal; color: var(--ink); }

.page-title {
  font-size: 25px;
  font-weight: 400;                          /* 原站 mbx-nav h2 weight 200（css:61） */
  padding: 15px 0 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 25px;
}

.page-title-center { text-align: center; }

/* 資訊詳情標題區（gc-about:213-217：居中 h1 + 發布日期行，css:121-123/130-133）*/

.detail-head {
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding: 25px 0 5px;
  margin-bottom: 25px;
}

.detail-head h1 { font-size: 25px; font-weight: 400; }

.news-date {
  display: block;
  margin-top: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: #888;
  line-height: 35px;
  /*border-top: 1px dashed var(--line);*/
  /*border-bottom: 1px dashed var(--line);*/
}

/* ============================== 富文本主體（.rich-body / .news-body；風險 2 兜底） ============================== */

.rich-body,
.news-body {
  line-height: 25px;                          /* css:123 */
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: break-word;
}

.rich-body h2, .rich-body h3, .rich-body h4,
.news-body h2, .news-body h3, .news-body h4 { margin: 1.4em 0 0.7em; }

.rich-body h4,
.news-body h4 { font-size: 18px; }            /* 原站系列標題形態 */

.rich-body p,
.news-body p { margin: 0.8em 0; }

.rich-body ul, .rich-body ol,
.news-body ul, .news-body ol { margin: 0.8em 0 0.8em 1.6em; list-style: revert; }

.rich-body img,
.news-body img { max-width: 100%; height: auto; }

.rich-body a,
.news-body a { color: var(--accent-side); text-decoration: underline; }

.rich-body table,
.news-body table {
  display: block;                            /* 窄屏橫向滾動兜底（風險 2） */
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.2em 0;
}

.rich-body th, .rich-body td,
.news-body th, .news-body td { border: 1px solid var(--line); padding: 6px 12px; font-size: 14px; text-align: left; }

.rich-body strong,
.news-body strong { color: var(--ink); }

/* ============================== 產品分類頁 fallback（D-12：chips + 卡網格 + 分頁） ============================== */

.subcat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 25px; }

.subcat-chip {
  padding: 7px 18px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.subcat-chip:hover { border-color: var(--accent); color: var(--accent); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 25px; }

.card-grid .pro-card { background: var(--bg-card); }

/* ============================== 二級分類系列區塊（08-25-05 FUN-002：三級系列 = h4 標題 + 左簡介右圖 + 產品表格） ============================== */

.series-block { padding: 25px 0; border-bottom: 1px solid var(--line); }

.series-block:first-child { padding-top: 0; }   /* 首塊緊接頁題 */

.series-title { margin-bottom: 12px; font-size: 18px; }   /* 原站系列 h4 18px 形態（同 .rich-body h4） */

.series-body { display: flex; gap: 25px; align-items: flex-start; margin-bottom: 18px; }

.series-intro { flex: 1; min-width: 0; }

.series-line { font-size: 15px; line-height: 25px; color: var(--ink-dim); }   /* 簡介規格行（08-25-07；margin 已由全域 * reset 歸零） */

.series-line strong { font-weight: 600; color: var(--ink); }   /* 首冒號前段加粗（FUN-001）；下方正文分支複用 .rich-body 既有排版 */

.series-photo {
  flex: none;
  width: 250px;
  aspect-ratio: 1 / 1;
  position: relative;                        /* 08-28-02 評審返工：::before 縮放層定位基準 */
  overflow: hidden;                          /* 裁切 ::before 放大（08-28-02 評審返工；transform 掛自身時此行裁不到）*/
  /*border: 1px solid var(--line);*/
  /*border-radius: var(--radius-lg);             !* 產品分類圖圓角形態（css:86） *!*/
  background: linear-gradient(135deg, var(--accent), var(--accent-side)) center / cover no-repeat;   /* 空圖漸層佔位（D-11） */
}

/* 系列塊縮放層（08-28-02 評審返工）：空元素 transform 掛自身時 overflow 裁不到，圖層移 ::before（承接 inline background-image）*/
.series-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  transition: transform var(--dur-img-out) var(--img-ease);
}

.series-photo:hover::before {                /* 08-28-02：系列塊 3% 克制放大 */
  transform: scale(1.03);
  transition: transform var(--dur-img-in) var(--img-ease);
}

/* 產品表格：橫向欄位表，視覺仿 .spec-table（橫線 + 斑馬紋） */
.model-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.model-table th,
.model-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.model-table thead th { background: var(--bg-page); font-weight: 600; white-space: nowrap; }

.model-table tbody tr:nth-child(even) { background: var(--bg-page); }

.model-table td a { color: var(--accent); white-space: nowrap; }

.model-table td a:hover { text-decoration: underline; }

/* ---- 分頁（FUN-005-4，D-5：Bootstrap .pagination 形態自寫，layout pager fragment 消費；零 bootstrap 引入）---- */

.pager-wrap { text-align: center; }

.pagination { display: inline-block; padding-left: 0; margin: 20px 0; border-radius: var(--radius-md); }

.pagination li { display: inline-block; }

.pagination li + li { margin-left: -1px; }     /* 相鄰項共邊 */

.pagination li:first-child a,
.pagination li:first-child span { border-radius: var(--radius-md) 0 0 var(--radius-md); }

.pagination li:last-child a,
.pagination li:last-child span { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

.pagination a,
.pagination span {
  display: block;
  min-width: 34px;
  padding: 6px 12px;
  line-height: 1.4;
  font-size: 14px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
}

.pagination a:hover { color: var(--accent); border-color: var(--accent); position: relative; z-index: 1; }

.pagination li.active span { background: var(--accent); border-color: var(--accent); color: #fff; }

.pagination li.disabled span { color: #999; cursor: not-allowed; }

/* ============================== 資訊分類列表行卡（FUN-005-5，D-6：原站 .row.news-item 形態——圖 370×223 + h2/日期/摘要/查看更多） ============================== */

.news-item {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 25px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.news-item-media {                            /* 空圖 accent 漸層佔位（H-2，DB 缺圖不破版） */
  display: block;
  aspect-ratio: 370 / 223;
  overflow: hidden;                           /* hover 放大裁切（08-28-02）*/
  background: linear-gradient(135deg, var(--accent), var(--accent-side));
}

.news-item-media img {
  width: 100%;
  aspect-ratio: 370 / 223;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-img-out) var(--img-ease);   /* 08-28-02 */
}

.news-item-media:hover img,                   /* 08-28-02：空圖漸層佔位不動，僅實圖放大 */
.news-item-media:focus-within img {
  transform: scale(var(--img-zoom));
  transition: transform var(--dur-img-in) var(--img-ease);
}

.news-item-title { font-size: 20px; font-weight: 300; }   /* 原站 h2 20px/weight300 */

.news-item-title a:hover { color: var(--accent); }

.news-item-date { display: block; margin: 8px 0; color: #888; font-size: 14px; }

.news-item-summary {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 25px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-actions { margin-top: 12px; display: flex; align-items: center; gap: 12px; }

.attach {                                     /* 附件 chip（data-attachment 委派點擊） */
  flex: none;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}

.attach:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================== 產品詳情（pro-detail，H-4） ============================== */

.pro-detail {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 35px;
  align-items: start;
  margin-bottom: 35px;
}

.pro-detail-photo {
  min-height: 360px;
  background: #fff center / contain no-repeat;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);            /* 原站產品圖圓角 15px（css:86） */
  transition: transform var(--dur-img-out) var(--img-ease),
              border-color var(--dur-img-out) var(--img-ease),
              box-shadow var(--dur-img-out) var(--img-ease);   /* 08-28-02 */
}

.pro-detail-photo:hover {                     /* 08-28-02：主圖小幅放大 + accent 描邊 + 柔和上浮 */
  transform: scale(1.02);
  border-color: var(--accent);
  box-shadow: var(--img-shadow);
  transition: transform var(--dur-img-in) var(--img-ease),
              border-color var(--dur-img-in) var(--img-ease),
              box-shadow var(--dur-img-in) var(--img-ease);
}

.pro-detail-side .model { font-size: 16px; color: var(--accent); margin-bottom: 12px; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }

.spec-table th,
.spec-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.spec-table tbody tr:nth-child(even) { background: var(--bg-page); }

.spec-table th { font-weight: 600; white-space: nowrap; width: 38%; }

.pdf-btn {                                    /* 提交鈕形態（css:146-147）：accent 底白字，hover warm */
  display: inline-block;
  margin-top: 18px;
  padding: 11px 28px;
  font-size: 14px;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
}

.pdf-btn:hover { background: var(--accent-warm); border-color: var(--accent-warm); }

.ghost-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 28px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ============================== 留言板（居中表單 css:141-147；契約不變只換皮） ============================== */

.gb-form { display: flex; flex-direction: column; align-items: center; gap: 25px; padding: 20px 0 10px; }

.gb-form label { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 400px; font-size: 14px; color: var(--ink-dim); }

.gb-form input,
.gb-form textarea {
  width: 100%;
  max-width: 400px;
  padding: 9px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #CCC;
  border-radius: var(--radius-sm);
}

.gb-form textarea { min-height: 100px; }

.gb-form input:focus,
.gb-form textarea:focus { border-color: var(--accent); outline: none; }

/* 驗證碼行（FUN-005-6，D-7：輸入框 + data URI 圖並排；點擊換圖為 JS 增強，無 JS 仍可讀碼提交） */
.captcha-row { display: flex; gap: 10px; align-items: center; }

.captcha-img { height: 40px; flex: none; border: 1px solid #CCC; border-radius: var(--radius-sm); cursor: pointer; }

.gb-submit {
  width: 100%;
  max-width: 400px;
  padding: 13px 12px;
  font-size: 16px;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.gb-submit:hover { background: var(--accent-warm); border-color: var(--accent-warm); }

/* 蜜罐欄位：對人類完全不可見（契約保留） */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.notice {
  max-width: 400px;
  margin: 0 auto 20px;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.notice-ok { color: var(--accent-side); background: rgba(35, 108, 184, 0.08); border: 1px solid var(--accent-side); }
.notice-err { color: #C0392B; background: rgba(192, 57, 43, 0.07); border: 1px solid #C0392B; }

/* ============================== 404 ============================== */

.notfound { text-align: center; padding: 60px 20px; }

.nf-code {
  font-size: clamp(70px, 14vw, 130px);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.nf-hint { color: var(--ink-dim); margin: 12px 0; }

.nf-actions { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }

/* ============================== 頁尾（FUN-004-1，照抄 gc-index:469-554 / css:97-115） ============================== */

.footer-nav { background: var(--footer-bg); color: #999; padding: 40px 0; }

.footer-inner { display: flex; gap: 53px; }

.footer-company { flex: none; width: 430px; }   /* css:108 */

.footer-company h3 { color: #fff; font-size: 18px; margin-bottom: 15px; }

.footer-company address { font-style: normal; }

.footer-company p { margin-bottom: 10px; font-size: 13px; line-height: 1.7; }

.footer-entry a { color: var(--accent); font-size: 13px; text-decoration: underline; }

.footer-cols { flex: 1; display: flex; justify-content: space-between; gap: 25px; min-width: 0; }

.footer-cols > li { min-width: 0; }

.col-title { display: block; color: #fff; font-size: 16px; padding: 10px 0; }

.footer-cols a { display: block; font-size: 12px; color: #999; padding: 7px 0 0; }
.footer-cols a:hover { color: #fff; }

.footer-copyright { background: var(--footer-bar); font-size: 12px; color: #999; text-align: center; padding: 10px 0; }

/* 返回頂部（css:417-419：fixed 右下常駐） */

.to-top {
  position: fixed;
  bottom: 40px;
  right: 15px;
  z-index: 80;
  padding: 6px 9px;
  font-size: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.to-top:hover { background: var(--accent); border-color: var(--accent); }

/* ============================== 響應式：平板 768–991.98（D-3：隱藏改堆疊） ============================== */

@media (max-width: 1199.98px) {
  .nav-link { padding: 0 9px; }               /* 原站窄屏收窄（css:320） */
}

@media (max-width: 991.98px) {
  /* 頭部：漢堡抽屜導航（08-26-03 淺色化：白底深字 + 柔和陰影，與桌面面板一致） */
  .nav-toggle { display: flex; }
  .lang { order: 2; margin-left: auto; }
  .nav-toggle { order: 3; }

  .site-nav {
    order: 4;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    background: var(--nav-panel-bg);
    box-shadow: var(--nav-panel-shadow);
    border-top: 2px solid var(--nav-accent-bar);
  }

  .site-nav.is-open { display: flex; }

  .site-nav > a,
  .nav-link {
    display: block;
    height: 44px;
    line-height: 44px;
    padding: 0 15px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
  }

  .nav-item { display: block; height: auto; }

  .acc-btn {
    display: block;
    position: absolute;
    right: 10px;
    top: 8px;
    width: 28px;
    height: 28px;
    color: var(--ink-dim);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
  }

  .acc-btn.is-open { transform: rotate(180deg); }

  /* 面板轉手風琴：僅 .is-open 展開（停用桌面 hover/focus-within 規則） */
  .site-nav .nav-item:hover .drop-panel,
  .site-nav .nav-item:focus-within .drop-panel { display: none; visibility: hidden; opacity: 0; }

  .drop-panel {
    position: static;
    transform: none;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    visibility: visible;
    opacity: 1;
    display: none;
  }

  .nav-item.is-open .drop-panel { display: block; }

  .drop-panel a {
    height: 40px;
    line-height: 40px;
    padding: 0 15px 0 24px;
    text-align: left;
    color: var(--ink-dim);
    border-bottom: 1px solid var(--line);
  }

  .drop-panel a:hover { background: var(--nav-link-hover-bg); color: var(--accent); }

  /* mega → 手風琴兩層（淺色化） */
  .mega-panel { position: static; box-shadow: none; border: 0; border-radius: 0; }
  .mega-inner { display: block; max-width: none; padding: 0; }
  .mega-cols { display: block; margin: 0; }
  .mega-item { width: auto; max-width: none; padding: 0; }

  .mega-head {
    width: auto;
    height: 44px;
    line-height: 44px;
    padding: 0 15px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-weight: 600;
  }

  .mega-sub { position: static; width: auto; background: transparent; display: none; padding: 0; }
  .mega-item.is-open .mega-sub { display: block; }

  .mega-sub a {
    height: 40px;
    line-height: 40px;
    padding: 0 15px 0 24px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  /* 首頁：卡軌 2 卡/屏；區塊堆疊保留（D-3） */
  .pro-card { flex-basis: calc((100% - 15px) / 2); }
  .home-blocks { grid-template-columns: 1fr; }
  .news-cols { grid-template-columns: 1fr; }
  .case-wall { grid-template-columns: repeat(4, 1fr); }

  /* 內頁：左欄轉內容區頂部堆疊組（內容保留，D-3） */
  .ny-grid { grid-template-columns: 1fr; }
  .pro-detail { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 20px; }   /* 平板檔不出橫向溢出（風險 6） */

  /* 頁尾：公司資訊全寬 + 四欄 2×2 */
  .footer-inner { flex-direction: column; gap: 25px; }
  .footer-company { width: auto; }
  .footer-cols { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ============================== 響應式：手機 <768 ============================== */

@media (max-width: 767.98px) {
  .brand { width: auto; }
  .brand-name { font-size: 15px; }
  .brand-logo { height: 26px; }

  .pro-card { flex-basis: 80%; }              /* 1.2 卡/屏 */
  .case-wall { grid-template-columns: repeat(2, 1fr); }

  .home-block-bd { height: auto; }
  .home-about { flex-direction: column; }
  .home-about-img { width: 100%; height: 200px; }
  .home-about-txt { padding: 15px; }
  .home-factory { height: 220px; }

  .news-item { grid-template-columns: 1fr; gap: 15px; }   /* 圖文堆疊（D-3） */
  .news-item-actions .attach { margin-left: auto; }

  .series-body { flex-direction: column; }      /* 系列區塊：簡介/圖堆疊（D-3） */
  .series-photo { width: 100%; max-width: 320px; }
  .model-table { display: block; overflow-x: auto; }   /* 窄屏橫向滾動兜底（同 .rich-body table） */

  .page-content { padding: 15px 15px 35px; }
  .ny-grid { gap: 15px; }

  .footer-cols { grid-template-columns: 1fr 1fr; gap: 15px; }

  .to-top { bottom: 70px; right: 10px; }
}

/* ============================== 降級與兜底 ============================== */

/* 觸控設備：卡軌箭頭常顯（無 hover；原生滑動可用） */
@media (hover: none) {
  .strip-arrow { opacity: 0.8; }

  /* 點按不殘留 sticky 放大（08-28-02；與 hover 態同特異性，靠後位取勝）*/
  .pro-card:hover .pro-img,
  .pro-card:focus-within .pro-img,
  .product-card:hover .pro-img,
  .product-card:focus-within .pro-img,
  .hot-news:hover img,
  .hot-news:focus-within img,
  .news-item-media:hover img,
  .news-item-media:focus-within img,
  .home-about-img:hover,
  .home-about-img:focus-within,
  .home-factory:hover::before,
  .home-factory:focus-within::before,
  .series-photo:hover::before,
  .pro-detail-photo:hover,
  .case-wall li:hover img { transform: none; }
}

/* reduced-motion：輪播不自動播（JS 側）、動畫/平滑滾動關閉 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .banner-slide { transition: none; }
  .nav-toggle span { transition: none; }
  .strip-arrow { transition: none; }
  .case-wall img { transition: none; }

  /* 圖片 hover 動效完全靜態（08-28-02）：過渡關閉 + hover 態 transform 歸零；:focus-within 保留瞬時縮放反饋
     （08-28-02 評審返工：focus-within 態自帶 transition 特異性更高會壓過上方 transition:none，故同特異性補列於此）*/
  .pro-img,
  .hot-news img,
  .news-item-media img,
  .home-about-img,
  .home-factory::before,
  .series-photo::before,
  .pro-detail-photo,
  .pro-card:focus-within .pro-img,
  .product-card:focus-within .pro-img,
  .hot-news:focus-within img,
  .news-item-media:focus-within img,
  .home-about-img:focus-within,
  .home-factory:focus-within::before { transition: none; }
  .pro-card:hover .pro-img,
  .product-card:hover .pro-img,
  .hot-news:hover img,
  .news-item-media:hover img,
  .home-about-img:hover,
  .home-factory:hover::before,
  .series-photo:hover::before,
  .pro-detail-photo:hover,
  .case-wall li:hover img { transform: none; }
}

/* 無 JS：導航/語言面板不依賴交互即可達（內容完整可見） */
/* 窄屏導航靜態展開（評審 MINOR-5）：僅作用於隱藏抽屜的 <992 檔——桌面不受影響（規則未激活）、
   JS 下 no-js 類已被移除亦不激活，抽屜行為不變；淺底縱向堆疊即無 JS 降級形態 */
@media (max-width: 991.98px) {
  .no-js .site-nav { position: static; display: flex; }
  .no-js .mega-item:first-child .mega-sub { display: block; }  /* 無 JS 窄屏第 1 項二級保持可達 */
}

.no-js .lang-menu {
  position: static;
  visibility: visible;
  opacity: 1;
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 5px 0;
}

.no-js .lang-menu a { color: var(--ink-dim); }
.no-js .lang-menu a.is-active { background: none; color: var(--accent); font-weight: 600; }
