/* ============================================================
   next.html 專用樣式（v2 樣本）。不動 home.css，只加兩塊新東西：
   1. 任務分流卡（招牌互動）
   2. 經銷據點「更多條件」收合
   ============================================================ */

/* ---------- 任務分流（二輪：卡片 → 編輯式服務索引，ChatGPT 審查結論） ----------
   三張白色圓角卡像 SaaS onboarding 模板，不像長期經營的日本品牌總代理。
   改成數字＋標題＋一行說明＋細分隔線，不用卡片、不用陰影，招牌互動留給
   「三種確定感」那一區（premium-web-page 第 2 節：每頁只有一個招牌互動）。 */
.sx-fanout__grid {
  display: flex;
  flex-direction: column;
}
.sx-fanout__card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-height: 44px; /* 手機點擊區，見 premium-web-page 第 4 節 */
  padding: 24px 4px;
  border-bottom: 1px solid var(--sx-line);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.sx-fanout__card:first-child { border-top: 1px solid var(--sx-line); }
.sx-fanout__card::after {
  content: "→";
  flex: 0 0 auto;
  align-self: center;
  font-size: 18px;
  color: var(--sx-ink-3);
  transition: transform .2s var(--sx-ease), color .2s var(--sx-ease);
}
.sx-fanout__card:hover::after,
.sx-fanout__card:focus-visible::after {
  transform: translateX(4px);
  color: var(--sx-ink);
}
.sx-fanout__n {
  flex: 0 0 32px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--sx-ink-3);
  padding-top: 3px;
}
.sx-fanout__body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sx-fanout__t { font-size: 18px; font-weight: 700; }
.sx-fanout__d { font-size: 14px; color: var(--sx-ink-2); line-height: 1.6; }

/* 手機沒有 hover：用 tap 的視覺回饋即可，不加 blur、不加動態效果 */
@media (max-width: 560px) {
  .sx-fanout__card:active { background: var(--sx-bg-2); }
}
@media (prefers-reduced-motion: reduce) {
  .sx-fanout__card::after { transition: none; }
}

/* ---------- 經銷據點：更多條件收合 ---------- */
.sx-facet-adv__toggle {
  width: 100%;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sx-facet-adv__toggle::after {
  content: "▾";
  font-size: 11px;
  transition: transform .2s var(--sx-ease);
}
.sx-facet-adv__toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.sx-facet-adv { padding-top: 2px; }

/* 關閉鈕只在手機 bottom sheet 模式用；桌機 inline 收合不需要，用
   next.js 的 JS 判斷結果加 class 控制顯示（見下方 .sx-sheet-mode）。 */
.sx-facet-adv__close { display: none; }

/* ---------- 經銷據點：手機真正的 bottom sheet（Codex 高）----------
   ≤680px、面板展開時：固定在視窗底部，蓋住地圖與結果，而不是把它們往下推。
   桌機完全不受影響，維持側欄內的 inline 收合。 */
@media (max-width: 680px) {
  .sx-facet-adv.sx-sheet-mode:not([hidden]) {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    max-height: 78vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--sx-bg);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 34px rgba(0,0,0,.22);
    margin: 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  }
  .sx-facet-adv.sx-sheet-mode .sx-facet-adv__close {
    display: block;
    width: 100%;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: var(--sx-ink-2);
    background: none;
    border: none;
    padding: 10px 4px 14px;
    position: sticky;
    top: 0;
    background: var(--sx-bg);
  }
}

/* 遮罩：點擊可關閉面板，同時鎖住底層捲動——不鎖的話手指滑過面板邊緣
   會連同整頁一起捲，使用者會以為面板沒反應。next.js 動態插入／控制顯示。 */
.sx-sheet-scrim {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, .42);
  z-index: 55;
}
.sx-sheet-scrim[hidden] { display: none; }
html.sx-sheet-lock,
html.sx-sheet-lock body { overflow: hidden; }

/* ---------- 2026-11-12 Google 商家檔案導流：首屏快速查詢 ----------
   客人從 Google 商家檔案點「網站」進來，手機第一屏只看得到探索品牌／
   查詢經銷據點兩顆按鈕，雨刷篩選器等實用工具在 5.5 屏之外。這裡加一排
   可橫向捲動的 chip，第 1 顆（PIAA 雨刷精靈）用品牌藍實心凸顯，
   手機不換行、不擠版；桌機寬度夠就不用捲，直接 wrap 成一排。
   連結是完整網址寫死在 HTML，不用 JS 生成，Google 才爬得到。 */
.sx-quicklinks { margin-top: 22px; }
.sx-quicklinks__label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: #9fb2c9; font-weight: 700; margin: 0 0 10px;
}
.sx-quicklinks__row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.sx-quicklinks__item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.26);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .2s var(--sx-ease), opacity .2s var(--sx-ease),
              background .2s var(--sx-ease);
}
.sx-quicklinks__item:hover,
.sx-quicklinks__item:focus-visible {
  transform: translateY(-1px);
  background: rgba(255,255,255,.16);
}
.sx-quicklinks__item--primary {
  background: var(--sx-piaa);
  border-color: var(--sx-piaa);
  font-weight: 700;
}
.sx-quicklinks__item--primary:hover,
.sx-quicklinks__item--primary:focus-visible {
  background: var(--sx-piaa);
  opacity: .88;
}
/* 桌機／寬螢幕：寬度夠，不用橫向捲動，讓 chip 自己換行排好 */
@media (min-width: 681px) {
  .sx-quicklinks__row {
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
  }
}
/* 手機：右下角固定圓形「音樂開關」（bgm.js，44px）蓋住第一屏 chip 列右端。
   bgm.js 自己的 data-bgm-avoid 偏移邏輯只認得 .sx-hero__meta，不認得這排 chip，
   所以改用壓低整排高度＋縮小間距，讓 chip 列整體往上移、低於音樂鈕的頂端（方案 A：
   chip 列閃開音樂鈕，不是音樂鈕閃 chip）。2026-11-13 核可上線前量測修正。 */
@media (max-width: 680px) {
  .sx-quicklinks { margin-top: 14px; }
  .sx-quicklinks__row { gap: 8px; padding-bottom: 4px; }
  .sx-quicklinks__item {
    min-height: 32px;
    padding: 5px 13px;
    font-size: 12.5px;
  }
}

/* ---------- 首屏數字列：5 格縮成 4 格，手機排 2×2（使用者核可修正 4） ----------
   home.css 的 .sx-hero__meta 是 flex-wrap，格數奇偶不同時手機會排得七零八落
   （4 格換成 2+2 才整齊；原本 5 格會變成 2+2+1）。這裡強制 2×2 網格。 */
@media (max-width: 640px) {
  .sx-hero__meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 24px;
  }
}

/* 蝦皮好評從首屏搬到這裡（為什麼可以信區），跟其他可信度證明放一起，
   不單獨做成卡片——它是補充資訊，不是這一區的招牌互動。 */
.sx-proof__shopee {
  margin-top: 4px !important;
  font-size: 13px !important;
}
.sx-proof__shopee a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.32);
  padding-bottom: 1px;
  transition: border-color .2s var(--sx-ease);
}
.sx-proof__shopee a:hover,
.sx-proof__shopee a:focus-visible { border-color: #fff; }

/* ============================================================
   修正 2：手機「橫向露半張」的卡片列改成直排／網格
   ------------------------------------------------------------
   home.css 把 .sx-tools／.sx-lines／.sx-new／.sx-rail__track 在手機寬度
   改成橫向捲動＋露出下一張的邊（本意是省直向高度），但使用者核可的修正
   是「手機不用橫滑就看得完」。不改 home.css（會連動改壞 index.html 正式版），
   在 next.css 用 ID + class 的選擇器權重覆寫同一組規則，只影響 next.html。
   參考賣場「選購指南」風格（brand-guide.css）：細分隔線、無厚重白卡、
   名稱 14–15px/600、說明 12–13px、右側小箭頭、觸控 ≥44px。 ============== */

/* 系列商品／最近上架：圖片是這兩區的重點（去背商品照），改 2 欄網格
   保留圖，不降成清單。 */
@media (max-width: 560px) {
  #lineGrid.sx-lines,
  #arrivalGrid.sx-new {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    overflow: visible !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    padding-bottom: 0 !important;
  }
  #lineGrid.sx-lines > .sx-line,
  #arrivalGrid.sx-new > .sx-newcard {
    flex: none !important;
  }
}

/* 選購工具：九張卡文字量大（分類標籤＋標題＋說明），改成賣場「選購指南」
   風格的清單——小縮圖在左、文字在右、細分隔線，不用卡片不用陰影。 */
@media (max-width: 560px) {
  #toolGrid.sx-tools {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    overflow: visible !important;
    gap: 0 !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    padding-bottom: 0 !important;
  }
  #toolGrid.sx-tools > .sx-tool {
    flex: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px;
    border: none !important;
    border-bottom: 1px solid var(--sx-line);
    border-radius: 0 !important;
    min-height: 44px;
    padding: 14px 2px;
  }
  #toolGrid.sx-tools > .sx-tool:first-child { border-top: 1px solid var(--sx-line); }
  #toolGrid.sx-tools > .sx-tool:hover { transform: none; border-color: var(--sx-line); }
  #toolGrid.sx-tools .sx-tool__media {
    flex: 0 0 68px;
    width: 68px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
  }
  #toolGrid.sx-tools .sx-tool__body { flex: 1; padding: 0; min-width: 0; }
  #toolGrid.sx-tools .sx-tool__kind {
    font-size: 11px;
    padding: 2px 8px;
    margin-bottom: 4px;
  }
  #toolGrid.sx-tools .sx-tool__title { font-size: 15px; margin: 0 0 2px; }
  #toolGrid.sx-tools .sx-tool__desc { font-size: 12.5px; line-height: 1.5; }
}

/* 在別人的鏡頭裡（YouTube 影片牆）：同樣的清單處理——小縮圖＋文字，
   home.css 在 ≤900px 把導覽箭頭藏起來、只留橫滑，手機完全看不出能滑到底。
   next.html 把原本平鋪的 tag/ch/title 包進 .sx-voice__text（見 HTML 註解），
   這裡補一條不分裝置都要的規則：那層包裝要維持直向堆疊，跟改版前視覺一致。 */
.sx-voice__text { display: flex; flex-direction: column; min-width: 0; }

@media (max-width: 900px) {
  .sx-rail__track {
    display: flex !important;
    flex-direction: column !important;
    grid-auto-columns: unset !important;
    overflow: visible !important;
    gap: 0 !important;
  }
  .sx-voice {
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px;
    border-bottom: 1px solid var(--sx-line);
    padding: 14px 2px;
    min-height: 44px;
  }
  .sx-rail__track .sx-voice:first-child { border-top: 1px solid var(--sx-line); }
  .sx-voice__img { flex: 0 0 96px; width: 96px; }
  .sx-voice__text { flex: 1; gap: 3px; }
  .sx-voice__tag,
  .sx-voice__ch,
  .sx-voice__title { margin-top: 0; }
  .sx-voice__title { font-size: 13.5px; line-height: 1.5; }
}

/* ============================================================
   修正 3：選購工具拿掉縮圖，改成純文字索引（2026-10-17）
   ------------------------------------------------------------
   那批黑白線稿只是重複標題說的話，又不是有質感的黑白，放著反而降格。
   這一區的工作是「讓人一眼找到該點哪個工具」，靠的是分類＋標題，不是圖。
   圖片仍由 home.js 產生（正式站共用），這裡只在 next.html 把它藏起來。
   桌機：3 欄、頂部細線分隔，不用卡片；手機：沿用上面的單欄清單。 ======== */
#toolGrid.sx-tools .sx-tool__media { display: none !important; }
#toolGrid.sx-tools > .sx-tool {
  background: transparent;
  border: none;
  border-top: 1px solid var(--sx-line);
  border-radius: 0;
  box-shadow: none;
  position: relative;
}
#toolGrid.sx-tools > .sx-tool:hover { transform: none; }
#toolGrid.sx-tools > .sx-tool:hover .sx-tool__title { text-decoration: underline; text-underline-offset: 4px; }
#toolGrid.sx-tools .sx-tool__body { padding: 18px 28px 22px 0; }
#toolGrid.sx-tools .sx-tool__kind {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--sx-ink-2);
  margin-bottom: 6px;
}
#toolGrid.sx-tools > .sx-tool::after {
  content: "→";
  position: absolute;
  right: 4px;
  top: 20px;
  color: var(--sx-ink-2);
  font-size: 15px;
}
@media (min-width: 561px) {
  #toolGrid.sx-tools { column-gap: 32px; row-gap: 0; }
}
@media (max-width: 560px) {
  #toolGrid.sx-tools > .sx-tool { padding: 0 2px; border-bottom: 1px solid var(--sx-line) !important; }
  #toolGrid.sx-tools > .sx-tool:first-child { border-top: 1px solid var(--sx-line) !important; }
  #toolGrid.sx-tools .sx-tool__body { padding: 12px 28px 12px 0; }
  #toolGrid.sx-tools .sx-tool__kind { margin-bottom: 2px; }
  #toolGrid.sx-tools > .sx-tool::after { top: 50%; transform: translateY(-50%); }
}

/* ============================================================
   修正 4：三品牌區改成編輯式品牌索引（2026-10-17，ChatGPT 審查後定案）
   一品牌一張原廠主視覺＋文字，細線分隔、無外框卡片。 ============== */
.nx-bh span { display: block; text-wrap: balance; }
.nx-bh { letter-spacing: -.02em; line-height: 1.3; }
.nx-blead {
  max-width: 34em; margin: 18px 0 0; font-size: 16px; line-height: 1.85;
  letter-spacing: .015em; color: var(--sx-ink-2); text-wrap: pretty;
}
.nx-brandlist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 36px; margin-top: 48px; }
.nx-brand {
  display: flex; flex-direction: column; color: inherit; text-decoration: none;
  border-top: 1px solid var(--sx-ink); padding-top: 22px;
}
.nx-brand__kv { aspect-ratio: 1800 / 772; overflow: hidden; background: #0a0a0a; border-radius: 4px; }
.nx-brand__kv img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--sx-ease); }
.nx-brand:hover .nx-brand__kv img { transform: scale(1.02); }
.nx-brand__meta {
  display: flex; gap: 14px; margin-top: 18px; font-size: 11.5px; letter-spacing: .14em;
  color: var(--sx-ink-2); font-variant-numeric: tabular-nums;
}
.nx-brand__meta span:first-child { color: var(--brand); font-weight: 700; }
.nx-brand__claim { margin-top: 10px; font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--sx-ink); }
.nx-brand__cat { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: var(--brand); }
.nx-brand__desc { margin: 12px 0 0; font-size: 14.5px; line-height: 1.75; color: var(--sx-ink-2); text-wrap: pretty; }
.nx-brand { position: relative; }
.nx-brand__links { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nx-brand__go { min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 700; color: inherit; text-decoration: none; }
/* 整張卡都可點到品牌站；官網連結疊在覆蓋層之上 */
.nx-brand__go::after { content: ""; position: absolute; inset: 0; }
.nx-brand__jp { position: relative; z-index: 1; min-height: 44px; display: flex; align-items: center; font-size: 13px; color: var(--sx-ink-2); text-decoration: none; }
.nx-brand__jp:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.nx-brand:hover .nx-brand__go { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 900px) {
  .nx-brandlist { grid-template-columns: 1fr; gap: 0; margin-top: 36px; }
  .nx-brand { padding: 22px 0 10px; border-top: 1px solid var(--sx-line); }
  .nx-brand:first-child { border-top-color: var(--sx-ink); }
  .nx-brand__claim { font-size: 22px; }
}
.nx-blead span { display: block; }

/* 品牌區：數字證據帶＋「怎麼做到」錨點（2026-10-30） */
.nx-proof{display:grid;grid-template-columns:repeat(3,1fr);margin:28px 0 18px;border-top:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9}
.nx-proof>div{padding:18px 12px 16px}
.nx-proof>div+div{border-left:1px solid #e5e5e5}
.nx-proof b{display:block;font-size:clamp(28px,6vw,44px);font-weight:700;letter-spacing:-.02em;line-height:1.1;color:#111}
.nx-proof small{font-size:.42em;font-weight:600;margin-left:2px;color:#555}
.nx-proof span{display:block;margin-top:6px;font-size:13px;line-height:1.45;color:#666}
.nx-how{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 36px;font-size:14px}
.nx-how span{color:#888;margin-right:4px}
.nx-how a{padding:6px 14px;border:1px solid #cfcfcf;border-radius:999px;color:#222;text-decoration:none}
.nx-how a:hover{border-color:#111}
.nx-nowrap{display:inline-block}
