/* ============================================================
   shared.css — 全站樣式（版面系統／字級／共用元件樣式）

   斷點只有兩個：
     ≥ 1024px  桌機｜完整版面：雙欄並排、完整導覽列
     768–1023  平板｜雙欄改單欄、間距與字級縮一級，資訊全部保留
     < 768px   手機｜單欄，次要說明隱藏

   元件內不寫版面用的 inline style（padding／maxWidth／grid／fontSize
   一律用下方的 class 與變數），顏色與一次性樣式才留在元件裡。

   目錄
     1. 基礎重置與全域元素
     2. 版面尺標（間距變數）
     3. 字級尺標
     4. 版面 class
     5. 顯示控制
     6. 各頁專用樣式
   ============================================================ */

/* ─── 1. 基礎重置與全域元素 ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans TC', sans-serif;
  background: #f7f8fa;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
}

/* 表單元素預設不繼承 body 字體，統一補上（元件內就不必逐一宣告） */
button, input, select, textarea { font-family: inherit; }

/* 標題一律襯線；非標題要襯線時掛 .serif */
h1, h2, h3, h4, .serif { font-family: 'Noto Serif TC', serif; }

/* 圖片與影音永遠不超出容器 */
img, svg, video { max-width: 100%; }

::selection { background: rgba(var(--c-primary-rgb), 0.3); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-darker); }
::-webkit-scrollbar-thumb { background: var(--c-primary); border-radius: 3px; }

/* 日期／時間欄位皆為白底，使用淺色配色與原生圖示 */
input[type="date"], input[type="time"] { color-scheme: light; }

a[href*="line.me"]:hover { opacity: 0.9; transform: translateY(-1px); }

/* ─── 2. 版面尺標（各斷點只改這幾個變數） ───────────── */
:root {
  --page-max: 1100px;   /* 內容最大寬度 */
  --gutter: 48px;       /* 左右留白 */
  --section-y: 80px;    /* 區塊上下留白 */
  --gap: 48px;          /* 主要欄距 */
  --gap-sm: 20px;       /* 卡片間距 */
  --hero-top: 140px;    /* 內頁標題區上方（避開固定導覽列） */
  --c-line: #06C755;    /* LINE 品牌綠 */

  /* 品牌尺度 —— 由 brands.js 的 style 逐站覆寫（見 initBrand）。
     四個站不只換顏色，連圓角、陰影、標題字重都不同，內頁也才不會長得一樣。
     這裡的值是沒設定時的預設。 */
  --radius: 12px;             /* 卡片、面板圓角 */
  --radius-sm: 6px;           /* 按鈕、小元件圓角 */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --heading-weight: 800;      /* 大標字重 */
  --heading-tracking: 0;      /* 大標字距 */
  --hero-paper: #F6F4EF;      /* 淺底型態 hero 的底色 */
}
@media (max-width: 1023px) {
  :root { --gutter: 32px; --section-y: 56px; --gap: 32px; --hero-top: 120px; }
}
@media (max-width: 767px) {
  :root { --gutter: 20px; --section-y: 44px; --gap: 24px; --gap-sm: 14px; --hero-top: 104px; }
}

/* ─── 3. 字級尺標 ──────────────────────────────────── */
/* 桌機值＝原設計值，平板／手機逐級縮小。
   三個大標題用 clamp 隨寬度連續縮放，其餘依斷點分三級。 */
:root {
  --fs-hero:    clamp(36px, 4.4vw, 52px);  /* 首頁主標（桌機上限收小，手機仍為 36px） */
  --fs-h1:      clamp(30px, 2.9vw, 36px);  /* 內頁 PageHero 標題（桌機上限收小，手機仍為 30px） */
  --fs-section: clamp(26px, 2.6vw, 32px);  /* 區塊大標 */
  --fs-h2:      30px;
  --fs-h3:      25px;
  --fs-h4:      22px;
  --fs-h5:      19px;
  --fs-lg:      18px;   /* 導言、重點句 */
  --fs-body:    16px;   /* 內文 */
  --fs-md:      15px;   /* 次內文、按鈕 */
  --fs-sm:      14px;   /* 清單、表格 */
  --fs-xs:      13px;   /* 註記 */
  --fs-2xs:     12px;   /* 小標籤 */
  --fs-3xs:     11px;   /* 全大寫微標 */
}
@media (max-width: 1023px) {
  :root {
    --fs-h2: 27px; --fs-h3: 23px; --fs-h4: 20px; --fs-h5: 18px;
    --fs-lg: 17px; --fs-body: 15px; --fs-md: 15px; --fs-sm: 14px;
    --fs-xs: 13px; --fs-2xs: 12px; --fs-3xs: 11px;
  }
}
@media (max-width: 767px) {
  :root {
    --fs-h2: 25px; --fs-h3: 21px; --fs-h4: 19px; --fs-h5: 18px;
    --fs-lg: 16px; --fs-body: 15px; --fs-md: 14px; --fs-sm: 13px;
    --fs-xs: 12px; --fs-2xs: 11px; --fs-3xs: 10px;
  }
}

/* ─── 4. 版面 class ────────────────────────────────── */
.section     { padding: var(--section-y) var(--gutter); }
.section-lg  { padding: calc(var(--section-y) * 1.25) var(--gutter); }
.wrap        { max-width: var(--page-max); margin: 0 auto; }
.wrap-narrow { max-width: 800px; margin: 0 auto; }
.card-pad    { padding: 48px; }                      /* 白底卡片（預約表單等） */

.grid        { display: grid; gap: var(--gap); }
.grid-cards  { display: grid; gap: var(--gap-sm); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2      { grid-template-columns: 1fr 1fr; }
.grid-2-wide { grid-template-columns: 1fr 1.5fr; }   /* 說明窄、內容寬 */
.grid-3      { grid-template-columns: repeat(3, 1fr); }
.grid-4      { grid-template-columns: 2fr 1fr 1fr 1fr; }

/* grid 子項預設 min-width:auto，內容一寬就會撐破版面；一律允許收縮 */
.grid > *, .grid-cards > * { min-width: 0; }

/* 表格等寬內容自行橫捲，頁面本身不出現橫捲軸 */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 平板：雙欄一律收成單欄，避免兩邊都太窄 */
@media (max-width: 1023px) {
  .grid-2, .grid-2-wide { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
/* 手機：全部單欄 */
@media (max-width: 767px) {
  .grid-3, .grid-4, .grid-cards { grid-template-columns: 1fr; }
  .card-pad { padding: 24px 20px; }
}

/* 下面兩條必須排在上面兩組 media 之後才會生效（同權重、後者勝） */
.grid-2-keep { grid-template-columns: 1fr 1fr; }                                    /* 短標籤永遠兩欄 */
@media (max-width: 767px) { .cards-2-mobile { grid-template-columns: 1fr 1fr; } }   /* 手機卡片兩欄 */
/* 六張一組的卡片：桌機鎖三欄（3×2），auto-fit 會排成 4+2 讓右下角落單。
   平板以下不套用，維持 .grid-cards 的自動欄數與手機兩欄 */
@media (min-width: 1024px) { .cards-3-desktop { grid-template-columns: repeat(3, 1fr); } }

/* 左右滑動列（CSS scroll-snap，不需 JS）
   桌機一次三張、平板兩張、手機一張，右側露出下一張當作可滑動的提示 */
.snap-row {
  display: flex; overflow-x: auto; gap: var(--gap-sm);
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; scrollbar-width: none;
}
.snap-row::-webkit-scrollbar { display: none; }
.snap-row > * { flex: 0 0 30%; scroll-snap-align: start; }
@media (max-width: 1023px) { .snap-row > * { flex-basis: 46%; } }
@media (max-width: 767px)  { .snap-row > * { flex-basis: 84%; scroll-snap-align: center; } }

/* ─── 5. 顯示控制 ──────────────────────────────────── */
.only-mobile { display: none; }
@media (max-width: 767px) {
  .only-mobile  { display: block; }
  .hide-mobile  { display: none !important; }
  .mobile-brief { display: none; }              /* 手機隱藏的次要說明文字 */
}

/* ─── 6. 各頁專用樣式 ──────────────────────────────── */

/* 頁面切換的淡入 */
.page-enter { animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 內頁標題橫幅 */
.page-hero { padding: var(--hero-top) var(--gutter) var(--section-y); }

/* ── 首頁 Hero ──────────────────────────────────────
   共用骨架在下方，三種型態（spotlight／editorial／cinematic）各自覆寫外觀。
   由 brands.js 的 hero.variant 決定用哪一種，見 HomePage.jsx 的 heroVariant()。

   內容一律上對齊，各裝置與導覽列的距離一致（約 90px）。
   若改成垂直置中，間距會隨視窗高度浮動 —— iPad 直放會空出 240px。
   只有「寬且橫向」的螢幕才滿版一屏，避免平板直放底部空一大塊。 */
.hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  min-height: 0;
  justify-content: flex-start;
  padding: 152px var(--gutter) var(--section-y);
}
@media (min-width: 1024px) and (orientation: landscape) { .hero { min-height: 100vh; } }
@media (max-width: 767px) {
  .hero { padding-top: 144px; }
  /* 深色型態的導覽列在頂端是透明的，需要多留白；淺色型態是深色實底，貼近一點比較不浪費畫面 */
  .hero--editorial { padding-top: 116px; }
  .hero-sub { margin-bottom: 32px; }
}

.hero-inner { position: relative; z-index: 1; width: 100%; max-width: var(--page-max); }
.hero-badge {
  display: inline-block; padding: 6px 20px; margin-bottom: 24px; border-radius: 20px;
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.18em;
}
.hero-title {
  font-size: var(--fs-hero); line-height: 1.2; margin: 0 0 20px;
  font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking);
}
.hero-title span { color: var(--c-primary); }
.hero-sub { font-size: var(--fs-lg); line-height: 1.7; margin: 0 0 48px; max-width: 34em; }
.hero-panel { padding: 32px 36px; text-align: left; border-radius: var(--radius); }
.hero-pick-label { font-size: var(--fs-3xs); font-weight: 700; letter-spacing: 0.14em; margin-bottom: 10px; }
.hero-pick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-pick-row button {
  padding: 8px 22px; cursor: pointer; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); font-weight: 700; transition: all 0.2s;
}
.hero-cta {
  width: 100%; margin-top: 20px; padding: 16px; cursor: pointer; border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
  color: var(--c-dark); font-size: var(--fs-body); font-weight: 800; letter-spacing: 0.1em;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--c-primary-rgb), 0.4); }
.hero-note { margin-top: 12px; font-size: var(--fs-xs); text-align: center; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 40px; flex-wrap: wrap; text-align: center; }
.hero-stat-n { font-size: var(--fs-h3); font-weight: 800; color: var(--c-primary); }
.hero-stat-l { font-size: var(--fs-xs); margin-top: 2px; }
/* 四項數據：手機排成 2×2，避免 3+1 落單 */
@media (max-width: 767px) {
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 12px; }
}

/* 型態一：spotlight —— 深底置中，服務卡緩慢浮動（親切活潑） */
.hero--spotlight {
  background: linear-gradient(160deg, var(--c-darker) 0%, var(--c-dark) 50%, var(--c-dark-4) 100%);
  text-align: center;
}
.hero--spotlight .hero-inner { max-width: 920px; }
.hero--spotlight .hero-badge {
  background: rgba(var(--c-primary-rgb), 0.15);
  border: 1px solid rgba(var(--c-primary-rgb), 0.35);
  color: var(--c-primary);
}
.hero--spotlight .hero-title { color: white; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.3); }
.hero--spotlight .hero-sub { color: rgba(255, 255, 255, 0.65); margin-left: auto; margin-right: auto; }
.hero--spotlight .hero-panel {
  background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--c-primary-rgb), 0.25);
  animation: heroFloat 7s ease-in-out infinite;
}
.hero--spotlight .hero-pick-label { color: rgba(255, 255, 255, 0.45); }
/* 卡片式：一格一張，附一行說明；與 cinematic 的膠囊、editorial 的清單明顯不同 */
.hero--spotlight .hero-pick-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
}
.hero--spotlight .hero-pick-cards button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 16px; cursor: pointer; text-align: left;
  border: 2px solid transparent; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.75);
  transition: all 0.2s;
}
.hero--spotlight .hero-pick-cards button:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.hero--spotlight .hero-pick-cards button.is-on {
  background: rgba(var(--c-primary-rgb), 0.16); border-color: var(--c-primary); color: white;
}
.hero-pick-name { font-size: var(--fs-md); font-weight: 700; }
.hero-pick-desc { font-size: var(--fs-2xs); line-height: 1.6; opacity: 0.7; }
.hero--spotlight .hero-note { color: rgba(255, 255, 255, 0.45); }
.hero--spotlight .hero-stat-l { color: rgba(255, 255, 255, 0.5); }
.hero-grid-bg {
  position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(var(--c-primary-rgb), 1) 0, rgba(var(--c-primary-rgb), 1) 1px, transparent 0, transparent 50%),
    repeating-linear-gradient(90deg, rgba(var(--c-primary-rgb), 1) 0, rgba(var(--c-primary-rgb), 1) 1px, transparent 0, transparent 50%);
  background-size: 60px 60px;
}
.hero--spotlight .hero-glow {
  position: absolute; top: 20%; right: 10%; width: 500px; height: 500px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--c-primary-rgb), 0.08) 0%, transparent 70%);
}
@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* 型態二：editorial —— 淺底左右分欄、直角細線、不用動效（穩重專業） */
.hero--editorial { background: var(--hero-paper); }
/* 左右分欄的內容比另外兩種型態矮，滿版一屏時上對齊會在底部空一大塊 —— 這一種改垂直置中。
   padding-top 保留 104px（導覽列 72px ＋ 餘裕），視窗變矮時內容也不會被導覽列蓋住。 */
@media (min-width: 1024px) and (orientation: landscape) {
  .hero--editorial { justify-content: center; padding-top: 104px; }
}
.hero--editorial .hero-cols {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--gap); align-items: center;
}
@media (max-width: 1023px) { .hero--editorial .hero-cols { grid-template-columns: 1fr; } }
.hero--editorial .hero-badge {
  background: none; border: none; border-bottom: 2px solid var(--c-primary);
  border-radius: 0; padding: 4px 0; color: var(--c-primary-dark);
}
.hero--editorial .hero-title { color: #1c1a17; }
.hero--editorial .hero-title span { color: var(--c-primary-dark); }
.hero--editorial .hero-sub { color: #5b5347; }
.hero--editorial .hero-panel {
  background: white; border: 1px solid rgba(0, 0, 0, 0.14); border-radius: 0; box-shadow: none;
}
.hero--editorial .hero-pick-label { color: #8a8073; }
.hero--editorial .hero-pick-row { display: grid; gap: 0; }
.hero--editorial .hero-pick-row button {
  border-radius: 0; text-align: left; padding: 12px 14px;
  background: white; color: #4b4437; border: 1px solid rgba(0, 0, 0, 0.14);
}
.hero--editorial .hero-pick-row button + button { border-top: none; }
.hero--editorial .hero-pick-row button.is-on { background: var(--c-dark); color: white; border-color: var(--c-dark); }
.hero--editorial .hero-cta { border-radius: 0; background: var(--c-dark); color: white; letter-spacing: 0.14em; }
.hero--editorial .hero-cta:hover { transform: none; box-shadow: none; background: var(--c-dark-2); }
.hero--editorial .hero-note { color: #8a8073; }
.hero--editorial .hero-stats {
  justify-content: flex-start; gap: 0; margin-top: 56px;
  border-top: 1px solid rgba(0, 0, 0, 0.14); padding-top: 24px; text-align: left;
}
.hero--editorial .hero-stats > div { flex: 1; padding-right: 24px; }
.hero--editorial .hero-stat-n { color: var(--c-dark); }
.hero--editorial .hero-stat-l { color: #8a8073; }
/* 手機改 2×2：上面的 gap:0 是給桌機單列用的，這裡要補回間距，否則四格黏在一起 */
@media (max-width: 767px) {
  .hero--editorial .hero-stats {
    gap: 18px 12px; margin-top: 40px; padding-top: 20px; text-align: center;
  }
  .hero--editorial .hero-stats > div { padding-right: 0; }
}

/* 型態三：cinematic —— 深底滿版、光暈緩慢飄移、寬字距（尊榮質感）
   結構刻意與另外兩種不同：沒有面板盒，選擇器與按鈕直接落在背景上，
   數據則貼齊畫面底部成為一條資訊帶。 */
.hero--cinematic {
  background: radial-gradient(120% 90% at 50% 0%, var(--c-dark-2) 0%, var(--c-darker) 62%);
  text-align: center;
  justify-content: center;
}
.hero--cinematic .hero-inner { max-width: 880px; }
.hero--cinematic .hero-bare { margin-top: 8px; }
.hero--cinematic .hero-pick { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hero--cinematic .hero-pick-row { justify-content: center; }
.hero--cinematic .hero-actions {
  display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; margin-top: 30px;
}
.hero--cinematic .hero-cta {
  width: auto; margin-top: 0; padding: 14px 46px;
  background: none; border: 1px solid var(--c-primary); color: var(--c-primary);
  letter-spacing: 0.22em;
}
.hero--cinematic .hero-cta:hover {
  background: var(--c-primary); color: var(--c-darker); transform: none; box-shadow: none;
}
/* 底部資訊帶：margin-top:auto 讓它在滿版一屏時貼齊底部 */
.hero--cinematic .hero-strip {
  position: relative; z-index: 1; width: 100%; margin-top: auto; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hero--cinematic .hero-strip .hero-stats { margin-top: 0; gap: 0; }
.hero--cinematic .hero-strip .hero-stats > div { flex: 1; }
@media (max-width: 767px) {
  .hero--cinematic .hero-strip { margin-top: 48px; padding-top: 20px; }
  .hero--cinematic .hero-strip .hero-stats { gap: 18px 12px; }
}
.hero--cinematic .hero-badge {
  background: none; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 0;
  color: rgba(255, 255, 255, 0.7); letter-spacing: 0.28em;
}
.hero--cinematic .hero-title { color: white; font-weight: 600; letter-spacing: 0.06em; }
.hero--cinematic .hero-title span {
  display: inline-block; margin-top: 12px; font-size: 0.62em; letter-spacing: 0.22em;
}
.hero--cinematic .hero-sub { color: rgba(255, 255, 255, 0.55); margin-left: auto; margin-right: auto; }
.hero--cinematic .hero-pick-label { color: rgba(255, 255, 255, 0.4); letter-spacing: 0.2em; }
/* 膠囊式：細框、寬字距，與 spotlight 的卡片、editorial 的清單一眼區分 */
.hero--cinematic .hero-pick-row button {
  background: none; border-color: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.7);
  border-radius: 999px; padding: 9px 26px; font-weight: 500; letter-spacing: 0.08em;
}
.hero--cinematic .hero-pick-row button.is-on { border-color: var(--c-primary); color: var(--c-primary); }
.hero--cinematic .hero-cta { background: var(--c-primary); color: var(--c-darker); letter-spacing: 0.2em; }
.hero--cinematic .hero-stat-l { color: rgba(255, 255, 255, 0.45); letter-spacing: 0.1em; }
/* 手機收窄字距：0.28em 在窄螢幕會把徽章擠成兩行，副標也會過寬 */
@media (max-width: 767px) {
  .hero--cinematic .hero-badge { letter-spacing: 0.14em; padding: 6px 14px; }
  .hero--cinematic .hero-title { letter-spacing: 0.02em; }
  .hero--cinematic .hero-title span { letter-spacing: 0.12em; }
}
.hero--cinematic .hero-glow {
  position: absolute; width: 620px; height: 620px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--c-primary-rgb), 0.10) 0%, transparent 70%);
}
.hero--cinematic .hero-glow--a { top: -10%; left: -8%; animation: heroDriftA 22s ease-in-out infinite; }
.hero--cinematic .hero-glow--b { bottom: -20%; right: -10%; animation: heroDriftB 28s ease-in-out infinite; }
@keyframes heroDriftA { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(60px, 40px); } }
@keyframes heroDriftB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50px, -30px); } }

/* 會暈的使用者一律關掉 hero 的持續動畫 */
@media (prefers-reduced-motion: reduce) {
  .hero--spotlight .hero-panel,
  .hero--cinematic .hero-glow { animation: none; }
}

/* 合作企業：桌機自由換行；手機三欄等寬（6 家＝兩列剛好填滿）。
   內距與字級寫在這裡，元件內不要用 inline，否則手機縮不下來。 */
.partner-tag { padding: 14px 28px; font-size: var(--fs-sm); }
@media (max-width: 767px) {
  .partners { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .partner-tag { text-align: center; padding: 12px 4px; font-size: var(--fs-2xs); white-space: nowrap; }
}

/* 分頁鈕列：服務介紹（切換服務）、車款介紹（切換車型）、費用查詢（切換價格欄位）三頁共用。
   選中的鈕加 .is-on；手機改 2×2 等寬，四個鈕不會擠成一長串 */
.type-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; scroll-margin-top: 88px; }
.type-tabs > button {
  padding: 10px 22px; border-radius: var(--radius-sm); cursor: pointer; background: white;
  color: #6b7280; font-size: var(--fs-sm); font-weight: 600;
  border: 2px solid transparent; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: all 0.2s;
}
.type-tabs > button.is-on {
  color: var(--c-dark); border-color: var(--c-primary);
  box-shadow: 0 4px 16px rgba(var(--c-dark-rgb), 0.12);
}

/* 費用查詢頁的工具列：①車型分頁 ＋ ②地點搜尋同一列，底部對齊（兩邊標籤高度相同） */
.pricing-toolbar { display: flex; gap: 12px 24px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; }
.pricing-toolbar .type-tabs { margin-bottom: 0; }
@media (max-width: 767px) {
  .type-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 28px; }
  .type-tabs > button { padding: 10px 8px; }
  .pricing-toolbar .type-tabs { flex: 1 0 100%; margin-bottom: 0; }
}

/* 費用查詢的地點搜尋：桌機貼右側；手機自成一行、輸入框撐滿 */
.pricing-search { margin-left: auto; }
@media (max-width: 767px) {
  .pricing-search { flex: 1 0 100%; margin-left: 0; }
  .pricing-search > input { width: 100%; }
}

/* 費用查詢的步驟標籤：小字淡色，只有數字圈用品牌色，讀起來是引導而不是標題 */
.pricing-step { display: flex; flex-direction: column; gap: 8px; }
.pricing-step-label {
  display: flex; align-items: center; gap: 8px;
  color: #6b7280; font-size: var(--fs-sm); font-weight: 600;
}
.pricing-step-no {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-primary); color: white; font-size: 12px; font-weight: 700; line-height: 1;
}
.pricing-step-hint { margin-bottom: 12px; }
@media (max-width: 767px) {
  .pricing-step { flex: 1 0 100%; }  /* 手機每步一行，車型鈕維持 2×2 撐滿 */
}

/* 費用查詢：計價說明（放在表格之前，讓人先看到「這是參考價」再看數字） */
.price-notice {
  margin-bottom: 24px; padding: 22px 26px;
  background: rgba(var(--c-primary-rgb), 0.07);
  border-radius: var(--radius);
}
.price-notice-title {
  color: var(--c-primary-dark); font-weight: 700;
  font-size: var(--fs-h5); margin-bottom: 10px; letter-spacing: 0.02em;
}
.price-notice ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.price-notice li { color: #4b5563; font-size: var(--fs-sm); line-height: 1.8; }
.price-notice-cars { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.price-notice-cars li::before { content: '・'; }
.price-notice-sub { margin: 6px 0 0; }
.price-notice b { color: #1f2937; }
.price-notice a { color: var(--c-primary-dark); font-weight: 700; text-decoration: underline; }
/* 手機收合用的一句話摘要與按鈕：桌機不顯示 */
.price-notice-brief, .price-notice-toggle { display: none; }
@media (max-width: 767px) {
  .price-notice { padding: 18px 18px; }
  .price-notice-brief { display: block; margin: 0; color: #4b5563; font-size: var(--fs-sm); line-height: 1.8; }
  .price-notice-toggle {
    display: inline-block; margin-top: 8px; padding: 0; background: none; border: 0; cursor: pointer;
    color: var(--c-primary-dark); font-family: inherit; font-size: var(--fs-sm); font-weight: 700; text-decoration: underline;
  }
  .price-notice:not(.is-open) ol { display: none; }
  .price-notice.is-open .price-notice-brief { display: none; }
  .price-notice.is-open ol { margin-top: 10px; }
}

/* 費用查詢：加價項目（scroll-margin-top 讓「定價表說明」連結捲過來時不被導覽列蓋住） */
.surcharge { margin-top: 40px; scroll-margin-top: 88px; }
.surcharge h3 { font-size: var(--fs-h4); color: var(--c-dark); margin: 0 0 8px; }
.surcharge-lead { color: #6b7280; font-size: var(--fs-sm); line-height: 1.8; margin: 0 0 20px; max-width: 46em; }
.surcharge-list {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.surcharge-row {
  display: flex; align-items: baseline; gap: 24px;
  padding: 16px 24px; border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.surcharge-row:last-child { border-bottom: 0; }
.surcharge-main { flex: 1; min-width: 0; }
.surcharge-item { color: var(--c-dark); font-weight: 700; font-size: var(--fs-md); }
.surcharge-note { color: #9ca3af; font-size: var(--fs-xs); line-height: 1.7; margin-top: 3px; }
.surcharge-fee {
  color: var(--c-primary-dark); font-weight: 700; font-size: var(--fs-md);
  text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.surcharge-foot { margin-top: 16px; color: #9ca3af; font-size: var(--fs-xs); line-height: 1.9; }
.surcharge-foot a { color: var(--c-primary-dark); font-weight: 700; text-decoration: underline; }
.surcharge-icon { display: none; }
/* 手機：一列只放「項目＋費用＋展開圖示」，說明點開才顯示（.surcharge-main 攤平，讓項目與說明各自進格線） */
@media (max-width: 767px) {
  .surcharge-row {
    display: grid; grid-template-columns: 1fr auto 14px; align-items: center; gap: 0 12px;
    padding: 14px 18px; cursor: pointer;
  }
  .surcharge-main { display: contents; }
  .surcharge-item { grid-area: 1 / 1; }
  .surcharge-fee { grid-area: 1 / 2; }
  .surcharge-icon { display: block; grid-area: 1 / 3; position: relative; width: 14px; height: 14px; }
  .surcharge-icon::before, .surcharge-icon::after {
    content: ''; position: absolute; left: 0; top: 6px; width: 14px; height: 2px;
    background: var(--c-primary-dark); transition: transform 0.2s;
  }
  .surcharge-icon::after { transform: rotate(90deg); }
  .surcharge-row.is-open .surcharge-icon::after { transform: rotate(0deg); }
  .surcharge-note { grid-area: 2 / 1 / 3 / 4; display: none; margin-top: 8px; }
  .surcharge-row.is-open .surcharge-note { display: block; }
}

/* 預約入口頁：預約流程（一律由上而下，四欄並排會太擠） */
.booking-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.booking-step { display: flex; gap: 14px; align-items: flex-start; }
.booking-step-no {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
  color: var(--c-dark); font-weight: 800; font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.booking-step-title {
  color: var(--c-dark); font-weight: 700; font-size: var(--fs-md);
  line-height: 1.5; margin-bottom: 4px;
}
.booking-step-desc { color: #6b7280; font-size: var(--fs-sm); line-height: 1.8; max-width: 46em; }
.booking-step-desc b { color: #374151; }

.booking-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.booking-start {
  flex: 1 1 280px; text-align: center; padding: 16px 28px;
  border-radius: var(--radius-sm); text-decoration: none;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-light));
  color: var(--c-dark); font-size: var(--fs-body); font-weight: 800; letter-spacing: 0.05em;
  transition: transform 0.2s, box-shadow 0.2s;
}
.booking-start:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(var(--c-primary-rgb), 0.35); }
.booking-start.is-off {
  background: #e5e7eb; color: #9ca3af; cursor: not-allowed;
  transform: none; box-shadow: none;
}
.booking-line {
  flex: 0 1 160px; text-align: center; padding: 16px 24px; border-radius: var(--radius-sm);
  background: var(--c-line); color: white; text-decoration: none;
  font-size: var(--fs-md); font-weight: 700;
}

/* ── 常見問題（FaqPage.jsx）：分類標題＋問題 Accordion ── */
.faq-intro { margin: 0 0 24px; color: #4b5563; font-size: var(--fs-body); line-height: 1.9; text-align: center; }
.faq-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-bottom: 40px; }
.faq-nav > button {
  padding: 8px 16px; border-radius: 20px; cursor: pointer;
  background: white; border: 1px solid rgba(var(--c-primary-rgb), 0.3);
  color: var(--c-dark); font-size: var(--fs-sm); font-weight: 600; transition: all 0.2s;
}
.faq-nav > button:hover { background: rgba(var(--c-primary-rgb), 0.1); }
.faq-group { margin-bottom: 40px; scroll-margin-top: 100px; }
.faq-group-title {
  margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--c-primary);
  color: var(--c-dark); font-size: var(--fs-h4);
}
.faq-item { background: white; border-radius: var(--radius-sm); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); margin-bottom: 10px; overflow: hidden; }
.faq-item.is-open { box-shadow: var(--shadow); }
.faq-q { margin: 0; font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: 0; }
.faq-q > button {
  display: flex; align-items: flex-start; gap: 14px; width: 100%;
  padding: 18px 20px; background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--c-dark); font-family: inherit; font-size: var(--fs-body); font-weight: 700; line-height: 1.6;
}
.faq-no { flex-shrink: 0; min-width: 2.4em; color: var(--c-primary-dark); }
.faq-q-text { flex: 1; min-width: 0; }
/* 展開圖示：＋ 轉成 － */
.faq-icon { position: relative; flex-shrink: 0; width: 14px; height: 14px; margin-top: 6px; }
.faq-icon::before, .faq-icon::after {
  content: ''; position: absolute; left: 0; top: 6px; width: 14px; height: 2px;
  background: var(--c-primary-dark); transition: transform 0.2s;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item.is-open .faq-icon::after { transform: rotate(0deg); }
.faq-a { padding: 0 20px 20px calc(20px + 2.4em + 14px); color: #4b5563; font-size: var(--fs-md); line-height: 1.9; }
.faq-a > :first-child { margin-top: 0; }
.faq-a > :last-child { margin-bottom: 0; }
.faq-a p { margin: 0 0 12px; }
.faq-a b { color: var(--c-dark); }
.faq-a a { color: var(--c-primary-dark); font-weight: 700; text-decoration: underline; }
.faq-a ul, .faq-a ol { margin: 0 0 14px; padding-left: 1.4em; }
.faq-a li { margin-bottom: 2px; }
/* 流程：一步一列，中間以箭頭連接 */
.faq-a .faq-steps { list-style: none; padding: 0; }
.faq-steps > li {
  position: relative; margin: 0 0 26px; padding: 10px 16px; border-radius: var(--radius-sm);
  background: #f7f8fa; border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--c-dark); font-weight: 600; text-align: center;
}
.faq-steps > li:not(:last-child)::after {
  content: '\2193'; position: absolute; left: 0; right: 0; bottom: -25px;
  color: var(--c-primary-dark); font-weight: 400; line-height: 24px;
}
.faq-steps > li:last-child { margin-bottom: 14px; }
.faq-table { width: 100%; min-width: 280px; border-collapse: collapse; margin: 0 0 14px; }
.faq-table th { padding: 10px 14px; background: var(--c-dark); color: var(--c-primary); font-size: var(--fs-xs); letter-spacing: 0.08em; text-align: left; }
.faq-table td { padding: 10px 14px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); font-size: var(--fs-sm); }
.faq-table td:first-child { color: var(--c-dark); font-weight: 600; white-space: nowrap; }
.faq-more { margin-top: 28px; color: #6b7280; font-size: var(--fs-sm); text-align: center; }
.faq-more a { margin: 0 4px; color: var(--c-primary-dark); font-weight: 700; text-decoration: underline; }
@media (max-width: 767px) {
  .faq-nav { justify-content: flex-start; margin-bottom: 28px; }
  .faq-intro { text-align: left; }
  .faq-q > button { gap: 10px; padding: 16px 14px; }
  .faq-a { padding: 0 14px 16px; }
}

/* 關於我們頁的集團旅行社：種類與字號排成一列標籤，手機自動換行 */
.partner-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.partner-facts > span {
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: white; border: 1px solid rgba(var(--c-primary-rgb), 0.25);
  color: var(--c-dark); font-size: var(--fs-sm); font-weight: 600;
}

/* ── 服務介紹的清單版型（ServicesCatalog.jsx，services.layout = 'catalog'）──
   服務項目多、以資訊為主的站台用。顏色、圓角、陰影全吃品牌變數，套到哪一站就是那一站的風格。
   沒選這個版型的站台不會輸出任何 .svc-* 元素，這一段對它們沒有影響。 */
.type-tabs.svc-filter { margin-bottom: 28px; }
.svc-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-sm); }
.svc-card {
  display: flex; flex-direction: column; min-width: 0;
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px;
  scroll-margin-top: 100px;
}
.svc-head { display: flex; align-items: flex-start; gap: 14px; }
.svc-no { color: var(--c-primary-dark); font-size: var(--fs-h3); font-weight: 700; line-height: 1.15; min-width: 1.5em; }
.svc-titles { flex: 1; min-width: 0; }
.svc-title { margin: 0; color: var(--c-dark); font-size: var(--fs-h5); line-height: 1.4; }
.svc-en { margin-top: 4px; color: #9ca3af; font-size: var(--fs-3xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.svc-desc { margin: 16px 0 0; color: #4b5563; font-size: var(--fs-sm); line-height: 1.9; }
.svc-body { flex: 1; display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.svc-label { margin-bottom: 8px; color: #9ca3af; font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.1em; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.svc-tags li {
  padding: 5px 10px; border-radius: var(--radius-sm);
  background: #f7f8fa; border: 1px solid rgba(0, 0, 0, 0.06);
  color: #374151; font-size: var(--fs-xs); line-height: 1.5;
}
.svc-note { margin: 0; color: #6b7280; font-size: var(--fs-xs); line-height: 1.8; }
@media (max-width: 1023px) { .svc-list { grid-template-columns: 1fr; } }
/* 手機：類別鈕改成自動換行的小標籤 */
@media (max-width: 767px) {
  .type-tabs.svc-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
  .type-tabs.svc-filter > button { padding: 8px 14px; }
  .svc-card { padding: 20px 18px; }
}

/* 頁尾 */
.footer-bottom { padding: 20px var(--gutter); }
.footer-links > a { line-height: 2.2; }
/* 手機版頁尾精簡：隱藏品牌長文案與兩欄重複連結（導覽列子選單已有），
   快速連結改兩欄並排、行距收緊 */
@media (max-width: 767px) {
  .footer-about { display: none; }
  .footer-col.is-secondary { display: none; }
  .footer-links { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .footer-links > a { line-height: 1.9; }
}

/* LINE 浮動按鈕：safe-area 讓開 iPad／iPhone 瀏覽器底部工具列，
   否則在實機上會被瀏覽器 UI 蓋住。捲到頁尾時的高度由 App.jsx 動態調整。 */
.line-fab {
  position: fixed;
  right: calc(28px + env(safe-area-inset-right, 0px));
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
}
