@charset "UTF-8";
/* ==========================================================================
   ANPING 安平 — 前台樣式
   品牌色（2026-09-14 統一）：近黑 #0b0d10（頁首、主視覺、深色區塊、頁尾）、
           品牌紅 #e50012（主要行動、提示線）、深紅 #c1000f（白底上的連結與文字強調）、
           黑色 #15181d（選取狀態）。藍綠只留給潛點圖示與呼吸訓練器的光球。
   所有顏色先在裸 :root 定義完整一套，深色只覆寫，不在元件裡寫死色碼。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design token
   -------------------------------------------------------------------------- */
:root {
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 20px;  --space-6: 24px;  --space-8: 32px;  --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;

  --text-xs: 12px;  --text-sm: 14px;  --text-base: 16px;
  --text-lg: 20px;  --text-xl: 26px;  --text-2xl: 34px; --text-3xl: 44px;

  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 18px;

  --maxw: 1240px;
  --header-h: 68px;

  --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Helvetica Neue",
               Arial, "Segoe UI", system-ui, sans-serif;
  --font-word: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* 淺色（預設） */
  --bg:            #ffffff;
  --bg-subtle:     #f4f5f7;
  --surface:       #ffffff;
  --surface-alt:   #eef0f3;
  --border:        #dfe2e6;
  --border-strong: #7a828c;   /* 對白底 3.9:1，控制項邊界 */
  --text:          #15181d;   /* 17.9:1 */
  --text-muted:    #5a626c;   /*  6.2:1 */
  /* 品牌紅「當文字與線條」用的深一階（連結、強調字、hover 邊框），對白底 6.2:1 */
  --brand:         #c1000f;
  --brand-deep:    #95000b;
  --brand-bright:  #e50012;
  --on-brand:      #ffffff;
  /* 選取狀態（篩選 chip、分頁目前頁）：黑底白字，紅色留給行動 */
  --select:        #15181d;
  --on-select:     #ffffff;

  /* 品牌紅：主要行動色，白字 4.9:1 */
  --action:        #e50012;
  --action-hover:  #c1000f;
  --on-action:     #ffffff;
  --action-ink:    #c1000f;
  /* 深色底上的紅字（頁首目前頁、主視覺小標、頁尾標語），對 #0b0d10 6.1:1 */
  --action-on-deep:#ff4d5c;

  --accent:        #e50012;
  --accent-ink:    #c1000f;

  --deep-sea:      #0b0d10;
  --deep-sea-2:    #16191f;
  --on-deep:       #f2f4f6;
  --on-deep-muted: #a9b0b9;
  --shop:          #cf3d1a;   /* 蝦皮橘，白字 4.8:1 */
  --shop-hover:    #b83414;
  --focus-inner:   #ffffff;
  --focus-outer:   #0b0d10;
  --shadow-sm:     0 1px 2px rgb(11 13 16 / .08);
  --shadow:        0 2px 4px rgb(11 13 16 / .06), 0 8px 24px rgb(11 13 16 / .08);
  --shadow-lg:     0 8px 16px rgb(11 13 16 / .10), 0 24px 48px rgb(11 13 16 / .14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0b0d10;
    --bg-subtle:     #121419;
    --surface:       #14171c;
    --surface-alt:   #1b1f26;
    --border:        #2a2f37;
    --border-strong: #6e7682;
    --text:          #eceef1;
    --text-muted:    #a7aeb8;
    --brand:         #ff5c68;
    --brand-deep:    #ff8a93;
    --brand-bright:  #ff5c68;
    --on-brand:      #15181d;
    --select:        #eceef1;
    --on-select:     #15181d;
    --action:        #e50012;
    --action-hover:  #c1000f;
    --on-action:     #ffffff;
    --action-ink:    #ff5c68;
    --action-on-deep:#ff4d5c;
    --accent:        #ff4d5c;
    --accent-ink:    #ff6b78;
    --deep-sea:      #07080a;
    --deep-sea-2:    #121419;
    --shop:          #ff6a45;
    --shop-hover:    #ff845f;
    --shadow-sm:     0 1px 2px rgb(0 0 0 / .5);
    --shadow:        0 2px 8px rgb(0 0 0 / .5);
    --shadow-lg:     0 12px 32px rgb(0 0 0 / .6);
  }
}

:root[data-theme="dark"] {
  --bg:            #0b0d10;
  --bg-subtle:     #121419;
  --surface:       #14171c;
  --surface-alt:   #1b1f26;
  --border:        #2a2f37;
  --border-strong: #6e7682;
  --text:          #eceef1;
  --text-muted:    #a7aeb8;
  --brand:         #ff5c68;
  --brand-deep:    #ff8a93;
  --brand-bright:  #ff5c68;
  --on-brand:      #15181d;
  --select:        #eceef1;
  --on-select:     #15181d;
  --action:        #e50012;
  --action-hover:  #c1000f;
  --on-action:     #ffffff;
  --action-ink:    #ff5c68;
  --action-on-deep:#ff4d5c;
  --accent:        #ff4d5c;
  --accent-ink:    #ff6b78;
  --deep-sea:      #07080a;
  --deep-sea-2:    #121419;
  --shop:          #ff6a45;
  --shop-hover:    #ff845f;
  --shadow-sm:     0 1px 2px rgb(0 0 0 / .5);
  --shadow:        0 2px 8px rgb(0 0 0 / .5);
  --shadow-lg:     0 12px 32px rgb(0 0 0 / .6);
}

/* --------------------------------------------------------------------------
   2. Reset 與基礎
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, picture, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  line-height: 1.3; margin: 0 0 var(--space-4); font-weight: 700; letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(26px, 4.4vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 34px); }
h3 { font-size: var(--text-lg); }
p  { margin: 0 0 var(--space-4); }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }

/* 雙色焦點框：內圈白、外圈深海藍，任何底色至少有一圈對比夠高 */
:focus-visible {
  outline: 2px solid var(--focus-outer);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--focus-inner);
}
.site-header :focus-visible,
.hero :focus-visible,
.section--deep :focus-visible,
.video-sec :focus-visible,
.brand-quote :focus-visible {
  outline-color: var(--focus-inner);
  box-shadow: 0 0 0 3px var(--focus-outer);
}

/* header 是 sticky 的，Tab 到剛好在它下面的元素時焦點會被蓋住，留出高度 */
a, button, input, select, textarea, summary, [tabindex] { scroll-margin-top: calc(var(--header-h) + 12px); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 200;
  background: var(--brand); color: var(--on-brand);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-4); color: var(--on-brand); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 768px) { .wrap { padding-inline: var(--space-6); } }

/* 圖示：跟著文字走，對齊交給容器的 flex */
.icon { width: 1.1em; height: 1.1em; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   3. 頁首
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--deep-sea);
  border-bottom: 1px solid rgb(255 255 255 / .10);
  color: var(--on-deep);
}
.site-header__bar { display: flex; align-items: center; gap: var(--space-4); min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; flex: 0 0 auto; color: var(--on-deep); }
.brand:hover { color: #fff; }
.brand__logo { display: block; height: 50px; width: auto; }
@media (max-width: 639px) { .brand__logo { height: 44px; } }
.brand__sub {
  display: none;
  font-size: var(--text-xs); color: var(--on-deep-muted); line-height: 1.2;
  letter-spacing: .08em; white-space: nowrap;
  padding-left: var(--space-3); border-left: 1px solid rgb(255 255 255 / .22);
}
@media (min-width: 640px) { .brand__sub { display: block; } }

.nav-toggle {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: 1px solid rgb(255 255 255 / .35);
  border-radius: var(--radius); color: var(--on-deep); cursor: pointer;
}
.nav-toggle:hover { background: rgb(255 255 255 / .12); }
@media (min-width: 1120px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 22px; height: 22px; }

.site-nav { margin-left: auto; }
@media (max-width: 1119px) {
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--deep-sea); border-bottom: 1px solid rgb(255 255 255 / .12);
    padding: var(--space-3) var(--space-4) var(--space-5);
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-nav[hidden] { display: none; }
  /* 沒有 JS：漢堡鍵按不動，fixed 的選單會永遠蓋住主視覺。退回一般區塊。 */
  .no-js .site-header__bar { flex-wrap: wrap; }
  .no-js .site-nav {
    position: static; inset: auto; flex: 0 0 100%; margin-left: 0;
    padding: 0 0 var(--space-3); max-height: none; overflow: visible; box-shadow: none; border-bottom: 0;
  }
  .no-js .site-nav__list { flex-direction: row; flex-wrap: wrap; }
}
.no-js .nav-toggle, .no-js .theme-toggle { display: none; }

.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
@media (min-width: 1120px) { .site-nav__list { flex-direction: row; align-items: center; gap: 2px; } }
.site-nav__link {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-2) var(--space-3);
  border-radius: var(--radius); text-decoration: none;
  color: var(--on-deep); font-weight: 500; font-size: var(--text-sm);
}
.site-nav__link:hover { background: rgb(255 255 255 / .10); color: #fff; }
/* 目前位置：青色加底線加粗體，不只靠顏色 */
.site-nav__link[aria-current="page"] {
  color: var(--action-on-deep); font-weight: 700; background: transparent;
  box-shadow: inset 0 -2px 0 var(--action); border-radius: 0;
}
.site-nav__link--ext::after { content: "↗"; font-size: var(--text-xs); color: var(--on-deep-muted); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 auto;
  background: none; border: 1px solid rgb(255 255 255 / .35);
  border-radius: var(--radius); color: var(--on-deep); cursor: pointer;
}
.theme-toggle:hover { background: rgb(255 255 255 / .12); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* --------------------------------------------------------------------------
   4. 品牌緞帶
   -------------------------------------------------------------------------- */
.notice { background: var(--deep-sea-2); color: #fff; font-size: var(--text-sm); border-bottom: 2px solid var(--accent); }
.notice__inner {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-3); min-height: 36px; padding-block: var(--space-1);
  text-align: center;
}
.notice__item { margin: 0; }
.notice__item--en { font-size: var(--text-xs); font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   5. 主視覺輪播
   所有張數都在 DOM 裡，用 opacity 交叉淡入。沒有 JS 第一張也正常顯示。
   -------------------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; background: var(--deep-sea); display: grid; color: #fff; }
.hero__slide {
  grid-area: 1 / 1; position: relative; isolation: isolate;
  opacity: 0; visibility: hidden;
  transition: opacity .7s ease, visibility 0s linear .7s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s ease, visibility 0s; }
.hero__pic { display: block; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
/* 海底照片本來就暗，漸層只需要把文字區壓深一點 */
.hero__slide::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgb(8 9 12 / .62) 0%, rgb(8 9 12 / .32) 55%, rgb(8 9 12 / .08) 100%);
}
@media (max-width: 599px) {
  .hero__slide::after { background: linear-gradient(180deg, rgb(8 9 12 / .25) 0%, rgb(8 9 12 / .78) 100%); }
}
.hero__inner {
  padding-block: clamp(64px, 12vw, 132px) clamp(88px, 13vw, 156px);
  max-width: 60ch;
}
.hero__eyebrow {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--action-on-deep);
  display: flex; align-items: center; gap: var(--space-3);
}
.hero__eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--action); flex: 0 0 auto; }
.hero__eyebrow:lang(zh-Hant-TW) { letter-spacing: .12em; text-transform: none; }
.hero__title {
  color: #fff; font-size: clamp(28px, 4.6vw, 48px); font-weight: 700; line-height: 1.25;
  letter-spacing: -.01em; text-wrap: balance; margin: 0 0 var(--space-4);
  text-shadow: 0 2px 16px rgb(0 0 0 / .4);
}
.hero__lead { font-size: clamp(16px, 2.1vw, 19px); color: #dbe8f0; margin-bottom: var(--space-6); max-width: 52ch; text-shadow: 0 1px 8px rgb(0 0 0 / .4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.hero__controls {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: clamp(14px, 2.4vw, 28px); z-index: 3;
  display: flex; align-items: center; gap: var(--space-1);
}
.hero__nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: 0 0 auto; padding: 0;
  border: 0; background: none; color: #fff; border-radius: 50%; cursor: pointer;
  opacity: .55; transition: opacity .15s ease, background-color .15s ease;
}
.hero__nav:hover, .hero__nav:focus-visible { opacity: 1; background: rgb(8 9 12 / .5); }
.hero__nav svg { width: 16px; height: 16px; filter: drop-shadow(0 1px 3px rgb(0 0 0 / .6)); }
.hero__nav--play { opacity: .4; }
.hero__nav--play[aria-pressed="true"] { opacity: .9; }
.hero__nav--play .icon-play { display: none; }
.hero__nav--play[aria-pressed="true"] .icon-pause { display: none; }
.hero__nav--play[aria-pressed="true"] .icon-play { display: block; }
.hero__dots { display: flex; gap: 0; list-style: none; margin: 0; padding: 0 var(--space-1); }
.hero__dot { width: 30px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hero__dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: rgb(255 255 255 / .5); box-shadow: 0 1px 3px rgb(0 0 0 / .5);
  transition: background-color .2s ease, width .2s ease;
}
.hero__dot:hover::before { background: rgb(255 255 255 / .85); }
.hero__dot.is-active::before { background: var(--action); width: 22px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .hero__slide { transition: none; } }

/* --------------------------------------------------------------------------
   6. 按鈕
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-3) var(--space-5);
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-size: var(--text-sm); font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn--primary { background: var(--action); color: var(--on-action); font-weight: 700; }
.btn--primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn--brand { background: var(--brand); color: var(--on-brand); }
.btn--brand:hover { background: var(--brand-deep); color: var(--on-brand); }
.btn--shop { background: var(--shop); color: #fff; }
.btn--shop:hover { background: var(--shop-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--bg-subtle); color: var(--text); }
.btn--onhero { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .55); backdrop-filter: blur(6px); }
.btn--onhero:hover { background: rgb(255 255 255 / .22); color: #fff; }
.btn--lg { min-height: 52px; font-size: var(--text-base); padding-inline: var(--space-6); }
.btn__ext { width: 1em; height: 1em; flex: 0 0 auto; opacity: .85; }
/* 深色底區塊裡的幽靈鍵 */
.section--deep .btn--ghost, .video-sec .btn--ghost { color: var(--on-deep); border-color: rgb(255 255 255 / .5); }
.section--deep .btn--ghost:hover, .video-sec .btn--ghost:hover { background: rgb(255 255 255 / .12); color: #fff; }

/* --------------------------------------------------------------------------
   7. 區塊
   -------------------------------------------------------------------------- */
.section { padding-block: clamp(44px, 7vw, 88px); }
.section--tint { background: var(--bg-subtle); }
.section--deep { background: var(--deep-sea); color: var(--on-deep); }
.section--deep h2, .section--deep h3 { color: #fff; }
.section--deep p { color: var(--on-deep-muted); }
.section--deep a:not(.btn) { color: var(--action-on-deep); }
.wrap > .section--tint { margin-inline: calc(var(--space-4) * -1); padding-inline: var(--space-4); }
@media (min-width: 768px) { .wrap > .section--tint { margin-inline: calc(var(--space-6) * -1); padding-inline: var(--space-6); } }

.section__head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-6);
}
.section__head h2 { margin: 0; }
.section__lead { color: var(--text-muted); margin: var(--space-2) 0 0; max-width: 62ch; text-wrap: pretty; }

/* 小標眉：紅短線 + 英文小字 */
.eyebrow {
  display: flex; align-items: center; gap: var(--space-3);
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); flex: 0 0 auto; }
.eyebrow--light { color: var(--action-on-deep); }
.eyebrow--light::before { background: var(--action); }

.cat-slogan {
  font-size: clamp(18px, 2.2vw, 22px); font-weight: 700; color: var(--brand);
  letter-spacing: .03em; margin: calc(var(--space-2) * -1) 0 var(--space-2);
}
.page-note { font-size: var(--text-sm); color: var(--text-muted); max-width: 68ch; margin: var(--space-3) 0 0; }
.page-note--light { color: var(--on-deep-muted); }

.page-head { padding-block: var(--space-4) var(--space-8); }
.page-head h1 { margin-bottom: var(--space-3); }

/* --------------------------------------------------------------------------
   8. 品牌價值
   -------------------------------------------------------------------------- */
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px)  { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .values { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); } }
.value {
  padding: var(--space-5) var(--space-5) var(--space-6);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
}
.value__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
  margin-bottom: var(--space-4);
}
.value__icon .icon { width: 24px; height: 24px; }
.value__name { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--space-2); font-size: var(--text-lg); }
.value__en { font-size: var(--text-xs); font-weight: 500; letter-spacing: .08em; color: var(--text-muted); text-transform: uppercase; }
.value__desc { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }
.values--cards .value { border-top: 3px solid var(--brand); }

/* --------------------------------------------------------------------------
   9. 品牌金句
   -------------------------------------------------------------------------- */
.brand-quote { background: var(--deep-sea-2); color: #fff; padding-block: clamp(40px, 6vw, 72px); text-align: center; border-block: 1px solid rgb(255 255 255 / .06); }
.brand-quote__text {
  /* ch 是以「0」的寬度算的，中文字約兩倍寬，24ch 只放得下 12 個字，
     「安全與平靜，是潛水最重要的追求。」會在「追」後面斷行。放寬並用 balance 讓兩行等長。 */
  margin: 0 auto var(--space-3); max-width: 36ch; text-wrap: balance;
  font-size: clamp(22px, 3.6vw, 36px); font-weight: 700; line-height: 1.45; letter-spacing: .01em;
}
.brand-quote__by { margin: 0; font-size: var(--text-sm); letter-spacing: .2em; opacity: .85; }

/* --------------------------------------------------------------------------
   10. 商品格線與卡片
   -------------------------------------------------------------------------- */
.product-grid {
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none; margin: 0; padding: 0;
}
@media (min-width: 700px)  { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); } }
@media (min-width: 1024px) { .product-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.card:focus-within { border-color: var(--brand); box-shadow: var(--shadow); }
/* 商品圖完整顯示不裁切；底色白，因為商品照多是白底 */
.card__media { position: relative; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; display: grid; place-items: center; }
.card__media img { width: 100%; height: 100%; object-fit: contain; }
.card__media .card__placeholder { width: 64px; height: 64px; opacity: .25; }
.card__body { padding: var(--space-3) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.card__cat { font-size: var(--text-xs); color: var(--text-muted); letter-spacing: .02em; margin: 0; }
.card__title { margin: 0; font-size: var(--text-sm); font-weight: 600; line-height: 1.45; }
@media (min-width: 700px) { .card__title { font-size: var(--text-base); } }
.card__title a {
  color: var(--text); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__title a:hover { color: var(--brand); }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__meta { margin: auto 0 0; font-size: var(--text-xs); color: var(--text-muted); display: flex; gap: var(--space-2); flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px var(--space-2); border-radius: 999px;
  font-size: var(--text-xs); font-weight: 600; line-height: 1.6;
  background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border);
}
.badge--brand { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }

/* --------------------------------------------------------------------------
   11. 影片區
   -------------------------------------------------------------------------- */
.video-sec { background: var(--deep-sea-2); color: var(--on-deep); padding-block: clamp(44px, 7vw, 88px); }
.video-sec h2 { color: #fff; }
.video-sec .section__lead { color: var(--on-deep-muted); margin-bottom: var(--space-6); }
.video-sec__grid { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .video-sec__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: var(--space-12); } }
.video-frame { border-radius: var(--radius-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-lg); border: 1px solid rgb(255 255 255 / .12); }
.video-frame video { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }

/* --------------------------------------------------------------------------
   12. 分類入口
   -------------------------------------------------------------------------- */
/* 一定要用 minmax(0, 1fr)，不能只寫 1fr（.entry__desc 是 nowrap，1fr 的最小值會被撐開） */
.entry-grid { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px)  { .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.entry {
  display: flex; align-items: center; gap: var(--space-4);
  min-height: 88px; padding: var(--space-4) var(--space-5);
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.entry:hover { border-color: var(--action); border-left-color: var(--action); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.entry__no { font-size: var(--text-sm); font-weight: 700; letter-spacing: .08em; color: var(--text-muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.entry__body { flex: 1; min-width: 0; }
.entry__name { display: block; font-weight: 700; font-size: var(--text-lg); line-height: 1.3; }
.entry__desc { display: block; font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry__count { flex: 0 0 auto; font-size: var(--text-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.entry__arrow { flex: 0 0 auto; color: var(--action-ink); display: inline-flex; }

/* --------------------------------------------------------------------------
   13. 呼吸訓練器宣傳卡
   -------------------------------------------------------------------------- */
.toolcard { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 760px) { .toolcard { grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-12); } }
.toolcard__art { display: flex; justify-content: center; }
.toolcard__ring { width: 180px; height: 180px; }
.toolcard__ring-bg { fill: none; stroke: rgb(255 255 255 / .12); stroke-width: 8; }
.toolcard__ring-fg {
  fill: none; stroke: var(--action); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 98;
  transform: rotate(-90deg); transform-origin: 50% 50%;
}
.toolcard__ring-t { fill: #fff; font-size: 22px; font-weight: 700; text-anchor: middle; font-family: var(--font-word); }
@media (prefers-reduced-motion: no-preference) {
  .toolcard__ring-fg { animation: ring 6s ease-in-out infinite alternate; }
  @keyframes ring { from { stroke-dashoffset: 300; } to { stroke-dashoffset: 40; } }
}
.toolcard__body h2 { margin-bottom: var(--space-3); }
.toolcard__body > p { max-width: 58ch; }
.toolcard__body .btn { margin-top: var(--space-2); }

/* --------------------------------------------------------------------------
   14. 篩選列、列表版面
   -------------------------------------------------------------------------- */
.searchbar { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); }
.searchbar__field { position: relative; flex: 1; }
.input {
  width: 100%; min-height: 44px; padding: var(--space-2) var(--space-4);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 999px;
  font: inherit; font-size: var(--text-base);
}
.input::placeholder { color: var(--text-muted); }
.label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 40px; padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-size: var(--text-sm); font-weight: 500; text-decoration: none; white-space: nowrap;
}
.chip:hover { background: var(--bg-subtle); color: var(--text); border-color: var(--brand); }
.chip[aria-current="true"] { background: var(--select); color: var(--on-select); border-color: var(--select); font-weight: 700; }
.chip__count { font-size: var(--text-xs); opacity: .8; font-variant-numeric: tabular-nums; }
.result-count { color: var(--text-muted); font-size: var(--text-sm); }

.catalog { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.catalog__side { margin-bottom: var(--space-2); }
@media (min-width: 1024px) {
  .catalog { grid-template-columns: 216px minmax(0, 1fr); gap: var(--space-8); align-items: start; }
  .catalog__side { position: sticky; top: calc(var(--header-h) + var(--space-4)); margin-bottom: 0; }
  .cat-rail__list { flex-direction: column; align-items: stretch; gap: var(--space-1); }
  .cat-rail__list .chip { justify-content: space-between; width: 100%; border-radius: var(--radius); border-color: transparent; background: transparent; padding-inline: var(--space-3); }
  .cat-rail__list .chip:hover { background: var(--bg-subtle); border-color: var(--border); }
  /* 選中態必須同時寫 background 與 color（上面那條把 background 撞成透明了） */
  .cat-rail__list .chip[aria-current="true"] { background: var(--select); color: var(--on-select); border-color: var(--select); }
  .cat-rail__list .chip[aria-current="true"]:hover { background: var(--select); color: var(--on-select); }
}

.pagination { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; align-items: center; margin-top: var(--space-10); list-style: none; padding: 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding-inline: var(--space-3);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  text-decoration: none; color: var(--text); font-size: var(--text-sm); font-variant-numeric: tabular-nums;
}
.pagination a:hover { background: var(--bg-subtle); border-color: var(--brand); color: var(--text); }
.pagination [aria-current="page"] { background: var(--select); color: var(--on-select); border-color: var(--select); font-weight: 700; }
.pagination .is-gap { border: 0; min-width: auto; color: var(--text-muted); }

.empty {
  text-align: center; padding: var(--space-16) var(--space-4);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface);
}
.empty h1, .empty h2 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.empty p { color: var(--text-muted); max-width: 52ch; margin-inline: auto; }
.empty__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; margin-top: var(--space-6); }

.breadcrumb { padding-block: var(--space-4); font-size: var(--text-sm); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "／"; color: var(--text-muted); margin-right: var(--space-2); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------------------
   15. 商品詳情
   -------------------------------------------------------------------------- */
/* 手機單欄必須寫 minmax(0, 1fr)，否則隱式欄的最小寬是內容的 min-content，整頁會變寬 */
.product { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-8); padding-bottom: var(--space-12); }
@media (min-width: 900px) { .product { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-12); align-items: start; } }
@media (min-width: 900px) and (min-height: 800px) { .gallery { position: sticky; top: calc(var(--header-h) + var(--space-4)); } }

.gallery { display: flex; flex-direction: column; gap: var(--space-3); }
.gallery__viewport {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  scrollbar-width: none;
}
.gallery__viewport::-webkit-scrollbar { display: none; }
.gallery__viewport.is-single { overflow: hidden; }
.gallery__slide {
  flex: 0 0 100%; scroll-margin-top: var(--header-h);
  scroll-snap-align: center; scroll-snap-stop: always;
  margin: 0; aspect-ratio: 1 / 1;
}
.gallery__slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery__counter { margin: 0; text-align: center; font-size: var(--text-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .gallery__counter { display: none; } }
.no-js .gallery__counter { display: none; }
.gallery__thumbs { display: flex; gap: var(--space-2); flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.gallery__thumb {
  display: block; width: 68px; height: 68px; padding: 0; overflow: hidden;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; text-decoration: none;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb[aria-current="true"] { border-color: var(--brand); }
.gallery__thumb:hover { border-color: var(--brand-bright); }

.product__cat { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-2); }
.product h1 { font-size: clamp(22px, 3vw, 32px); margin-bottom: var(--space-4); }

.spec { margin-bottom: var(--space-6); }
.spec h2 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.spec-list { margin: 0 0 var(--space-5); }
.spec-list__row { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.spec-list__row:first-child { border-top: 1px solid var(--border); }
.spec-list dt { color: var(--text-muted); font-size: var(--text-sm); margin: 0; }
.spec-list dd { margin: 0; min-width: 0; word-break: break-word; }
.spec-id { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.specs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); padding: 0; list-style: none; }

.factbox {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3);
  padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4);
  border: 1px solid var(--border-strong); border-left: 3px solid var(--action);
  border-radius: var(--radius); background: var(--surface); font-size: var(--text-sm);
}
.factbox__k { color: var(--text-muted); white-space: nowrap; }
.factbox__v { font-weight: 600; }

.buybox { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-alt); padding: var(--space-5); margin-bottom: var(--space-6); }
.buybox__title { font-size: var(--text-lg); margin: 0 0 var(--space-4); }
.buybox__note { font-size: var(--text-sm); color: var(--text-muted); margin: var(--space-4) 0 0; }
.buybox__actions { display: flex; flex-direction: column; gap: var(--space-3); }
@media (min-width: 560px) { .buybox__actions { flex-direction: row; } .buybox__actions .btn { flex: 1; } }

.desc { font-size: var(--text-base); }
.desc h2 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.desc__body { white-space: pre-wrap; word-break: break-word; color: var(--text); max-width: 68ch; line-height: 1.85; }

/* --------------------------------------------------------------------------
   16. 品牌故事
   -------------------------------------------------------------------------- */
.story-hero { padding-block: clamp(24px, 5vw, 56px) clamp(32px, 5vw, 64px); border-bottom: 1px solid var(--border); }
.story-hero__grid { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 860px) { .story-hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-12); } }
.story-hero__eyebrow { font-size: var(--text-sm); letter-spacing: .22em; font-weight: 700; color: var(--accent-ink); margin-bottom: var(--space-4); }
.story-hero h1 { max-width: 20ch; margin-bottom: var(--space-6); }
.story-hero__lead { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.9; color: var(--text-muted); max-width: 46ch; margin: 0; }
.story-hero__fig { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); max-width: 520px; justify-self: center; }

.story { max-width: 56ch; font-size: clamp(16px, 1.8vw, 18px); line-height: 1.95; }
.story h2 { margin-bottom: var(--space-5); }
.story > p { margin-bottom: var(--space-5); }
.story__punch { font-size: clamp(19px, 2.6vw, 24px); font-weight: 700; line-height: 1.7; color: var(--brand); padding-top: var(--space-2); }

.about-split { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 860px) { .about-split { grid-template-columns: 320px minmax(0, 1fr); gap: var(--space-12); } }
.about-split__fig { margin: 0; max-width: 320px; justify-self: center; }
.about-split__fig img { width: 100%; }
:root[data-theme="dark"] .about-split__fig img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .about-split__fig img { filter: invert(1) hue-rotate(180deg); } }

.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--space-10); font-size: var(--text-xl); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.4em; }
.prose li { margin-bottom: var(--space-2); }

/* --------------------------------------------------------------------------
   17. 合作夥伴
   -------------------------------------------------------------------------- */
.partner-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px)  { .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .partner-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); } }
.partner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.partner__photo { aspect-ratio: 4 / 5; background: var(--surface-alt); display: grid; place-items: center; overflow: hidden; }
.partner__photo img { width: 100%; height: 100%; object-fit: cover; }
.partner__noimg { color: var(--text-muted); opacity: .5; }
.partner__noimg .icon { width: 48px; height: 48px; }
.partner__body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-1); }
.partner__name { font-size: var(--text-lg); margin: 0; }
.partner__title { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }
.partner__note { margin: var(--space-2) 0 0; font-size: var(--text-sm); }
.partner__link { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); font-weight: 600; font-size: var(--text-sm); text-decoration: none; min-height: 32px; }
.partner__link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   18. 聯絡與常見問題
   -------------------------------------------------------------------------- */
.contact-grid { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px)  { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); } }
.contact-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--radius);
}
.contact-card__icon { grid-row: 1 / 3; align-self: center; display: inline-flex; color: var(--brand); }
.contact-card__icon .icon { width: 26px; height: 26px; }
.contact-card__k { font-size: var(--text-xs); color: var(--text-muted); }
.contact-card__v { font-weight: 600; word-break: break-all; min-height: 28px; display: inline-flex; align-items: center; }

.qalist { display: flex; flex-direction: column; gap: var(--space-2); }
.qa { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.qa > summary {
  padding: var(--space-4) var(--space-5); cursor: pointer; font-weight: 600; line-height: 1.6;
  list-style: none; position: relative; padding-right: 2.75em;
}
.qa > summary::-webkit-details-marker { display: none; }
.qa > summary::after {
  content: ""; position: absolute; right: var(--space-5); top: 1.35em;
  width: .55em; height: .55em;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); transform-origin: center;
}
.qa[open] > summary::after { transform: rotate(-135deg); }
.qa > summary:hover { background: var(--bg-subtle); }
.qa > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.qa__body { padding: 0 var(--space-5) var(--space-4); font-size: var(--text-sm); line-height: 1.85; }
.qa__body > p { margin: 0 0 var(--space-3); max-width: 68ch; }
@media (prefers-reduced-motion: no-preference) { .qa > summary::after { transition: transform .2s ease; } }

/* --------------------------------------------------------------------------
   19. 頁尾
   -------------------------------------------------------------------------- */
.site-footer { background: var(--deep-sea); color: var(--on-deep-muted); padding-block: var(--space-12) var(--space-6); margin-top: var(--space-16); }
.footer-grid { display: grid; gap: var(--space-8); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.site-footer h2 { font-size: var(--text-base); margin-bottom: var(--space-3); color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer a { color: var(--on-deep-muted); text-decoration: none; font-size: var(--text-sm); display: inline-flex; min-height: 32px; align-items: center; gap: var(--space-2); }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__brand p { font-size: var(--text-sm); max-width: 44ch; }
.site-footer__logo { display: block; height: 68px; width: auto; margin-bottom: var(--space-3); }
.site-footer__slogan { color: var(--action-on-deep) !important; font-size: var(--text-base) !important; font-weight: 700; letter-spacing: .04em; }
.social { flex-direction: row !important; flex-wrap: wrap; gap: var(--space-2) var(--space-4) !important; margin-top: var(--space-3) !important; }
.site-footer__en { display: block; letter-spacing: .18em; margin-top: var(--space-1); }
@media (min-width: 700px) { .site-footer__en { display: inline; margin-left: var(--space-3); } }
.site-footer__bottom {
  margin-top: var(--space-10); padding-top: var(--space-5); border-top: 1px solid rgb(255 255 255 / .12);
  display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between;
  font-size: var(--text-xs);
}
.site-footer__bottom p { margin: 0; }

/* --------------------------------------------------------------------------
   20. 進場動態（尊重 prefers-reduced-motion）
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .38s cubic-bezier(.22,.8,.3,1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
