:root {
  --ink: #23303a;
  --muted: #667884;
  --line: #e3e8ec;
  --paper: #fff;
  /* 取自舊站的藍：公告條為亮藍，品牌帶為較深的藍 */
  --bar: #29a9e0;
  --accent: #1d6fb8;
  --accent-soft: #eef5fb;
  --wrap: 75rem;
}

/* 視覺上隱藏但螢幕閱讀器讀得到。
   首頁的 h1 用這個 —— 版面上品牌視覺已經在圖上，不需要再壓一行標題，
   但輔助技術與搜尋引擎需要一個明確的頁面主題。 */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.8;
  font-size: 17px;
}

a { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }
/* <picture> 預設是 inline，會在下方留空隙 */
picture { display: block; }

/* 鍵盤使用者的跳過連結 */
.skip {
  position: absolute;
  left: -9999px;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ── 公告條 ─────────────────────────────── */
.announcement {
  background: var(--bar);
  text-align: center;
  font-size: .85rem;
}
.announcement a {
  display: block;
  padding: .55rem 1rem;
  color: #fff;
  text-decoration: none;
}
.announcement a:hover { text-decoration: underline; }

/* ── 頁首（沿用舊站：logo 左、水平選單右、白底細線） ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: .7rem 1.5rem;
}
.site-header .logo img { width: 150px; height: auto; }
.site-header nav ul {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-header nav a {
  text-decoration: none;
  font-size: .9rem;
  color: var(--ink);
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

/* 手機版選單：純 CSS，不需要 JavaScript */
.navtoggle { display: none; cursor: pointer; padding: .5rem; }
.navtoggle span,
.navtoggle span::before,
.navtoggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  content: "";
}
.navtoggle span::before { transform: translateY(-7px); }
.navtoggle span::after { transform: translateY(5px); }

/* ── 主體 ───────────────────────────────── */
main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}
/* 首頁是整幅圖片版面，不要左右留白 */
body.home main { max-width: none; padding: 0 0 4rem; }
body.home .lede,
body.home section { max-width: var(--wrap); margin-inline: auto; padding: 0 1.25rem; }

/* ── 首頁：hero 與品牌區塊 ──────────────── */
/* 舊站是全幅貼到底、區塊之間零間距，在寬螢幕上壓迫感很重。
   這裡限制最大寬度並加上垂直節奏，讓版面有呼吸空間 ——
   內容與順序不變，只是不再滿到邊。 */
body.home main > article {
  max-width: 90rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.hero { margin-bottom: 1.5rem; }
.hero img { width: 100%; height: auto; display: block; border-radius: 6px; }

/* 全幅橫幅。品牌帶在語意上是 h2，所以要把預設的標題樣式（字級、
   邊距、底線）全部清掉，讓它跟一般橫幅看起來完全一樣。 */
.band,
h2.band {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 0;
  line-height: 0;
}
/* 連續橫幅之間留一點縫 */
.band + .band { margin-top: 1rem; }
/* 品牌帶是新段落的開始，上方留更多 */
h2.band { margin-top: 3.5rem; }
.band img { width: 100%; height: auto; border-radius: 6px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}
.product-grid a {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s, transform .15s;
}
.product-grid a:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-grid img { width: 100%; height: auto; }
/* 產品名稱視覺上隱藏 —— 舊站的卡片下方沒有文字標籤，維持原樣。
   但連結需要可讀的文字（機型名稱已經印在圖上，AI 讀不到），
   所以保留在 DOM 裡給螢幕閱讀器與搜尋引擎。 */
.product-grid span {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }

h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.35;
  margin: 0 0 .75rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
  max-width: 48rem;
}

h2 {
  font-size: 1.25rem;
  margin: 2.75rem 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}

p { max-width: 46rem; }

/* ── 規格表 ─────────────────────────────── */
.specs {
  border-collapse: collapse;
  width: 100%;
  max-width: 46rem;
  margin: 1rem 0;
}
.specs th,
.specs td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.specs th {
  width: 40%;
  font-weight: 600;
  background: var(--accent-soft);
  white-space: nowrap;
}

/* ── 卡片 ───────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}
.cards a {
  display: block;
  height: 100%;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}
.cards a:hover { border-color: var(--accent); }
.cards strong { display: block; color: var(--accent); margin-bottom: .3rem; }
.cards span { font-size: .92rem; color: var(--muted); }

/* ── 聯絡資訊 ───────────────────────────── */
.contact { margin: 1rem 0; max-width: 40rem; }
.contact dt { font-weight: 600; margin-top: 1rem; }
.contact dd { margin: .2rem 0 0; }

/* ── 常見問題 ───────────────────────────── */
/* 用 <dl> 而不是手風琴：問答對在純文字抽取後仍然保持配對關係，
   AI 引擎與螢幕閱讀器讀到的順序跟視覺順序一致。 */
.faq dl { margin: 1rem 0; max-width: 46rem; }
.faq dt {
  font-weight: 600;
  margin-top: 1.4rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
  line-height: 1.5;
}
.faq dd {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--line);
  color: var(--ink);
}
.faq dt:first-child { margin-top: .5rem; }

/* ── 圖庫 ───────────────────────────────── */
.gallery .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}
.gallery img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

/* ── 頁尾 ───────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}
.site-footer p {
  max-width: var(--wrap);
  margin: .35rem auto;
  padding: 0 1.25rem;
  font-size: .92rem;
  color: var(--muted);
}
.site-footer p:first-child { padding-top: 2rem; }
.site-footer p:last-child { padding-bottom: 2.5rem; }
.site-footer .social a { margin-right: .25rem; }
/* 政策連結列：項目較多，手機上讓它自然斷行而不是擠成一條 */
.site-footer .legal { line-height: 1.9; }
.site-footer .legal a { white-space: nowrap; }

@media (max-width: 52rem) {
  body { font-size: 16px; }
  .specs th { width: auto; white-space: normal; }

  /* 手機版：選單收進漢堡鈕 */
  .navtoggle { display: block; }
  .site-header { flex-wrap: wrap; padding: .6rem 1rem; }
  .site-header nav {
    flex-basis: 100%;
    display: none;
  }
  #navtoggle:checked ~ nav { display: block; }
  .site-header nav ul {
    flex-direction: column;
    gap: 0;
    padding: .5rem 0 .25rem;
  }
  .site-header nav a {
    display: block;
    padding: .7rem .25rem;
    border-bottom: 1px solid var(--line);
  }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
