/* ============================================================
   CH LADY · WOMEN'S FASHION — Brand Design System
   奶油白 #FFF9F2 / 裸粉 #F1DDD3 / 香檳金 #B68A55 / 深咖啡 #382920
   Mobile-first. Light theme only (精品感需要乾淨底色).
   ============================================================ */

:root {
  /* --- Brand palette --- */
  --cream:        #FFF9F2;
  --cream-deep:   #FBF1E7;
  --blush:        #F1DDD3;
  --blush-soft:   #F7EBE3;
  --champagne:    #B68A55;
  --champagne-lt: #CFA971;
  --champagne-dk: #96703F;
  --espresso:     #382920;
  --espresso-2:   #5A4638;
  --ink:          #2A1F18;

  /* --- Text (contrast-checked on cream) --- */
  --text:         #382920;   /* 13.4:1 on #FFF9F2 */
  --text-soft:    #6B5546;   /* 7.0:1 — 次要文字 */
  --text-mute:    #8E7768;   /* 4.6:1 — 標籤/說明，仍達 AA */
  --text-on-dark: #FFF9F2;

  /* --- Functional --- */
  --line:         #EADFD3;
  --line-soft:    #F3EAE0;
  --line-gold:    #E2CFB4;
  --danger:       #A8392F;
  --danger-bg:    #FDF1EF;
  --success:      #4A6B4F;
  --success-bg:   #F1F5F1;
  --warn:         #8A6430;
  --warn-bg:      #FBF4E8;
  --info-bg:      #F4F1EC;

  /* --- Type --- */
  --font-serif: "Cormorant Garamond", "Noto Serif TC", "Songti TC", "Times New Roman", serif;
  --font-sans:  "Inter", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* --- Layout --- */
  --page-max: 1240px;
  --gutter: 16px;
  --radius: 2px;
  --radius-lg: 4px;

  /* --- Motion --- */
  --ease: cubic-bezier(.4, 0, .2, 1);

  /* --- Elevation (極輕，避免厚重陰影) --- */
  --shadow-xs: 0 1px 2px rgba(56, 41, 32, .04);
  --shadow-sm: 0 2px 8px rgba(56, 41, 32, .05);
  --shadow-md: 0 6px 20px rgba(56, 41, 32, .07);
  --shadow-lg: 0 12px 36px rgba(56, 41, 32, .09);

  --header-h: 60px;
}

/* ============ Reset ============ */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; line-height: 1.3; }
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }

/* ============================================================
   全站背景紋路：一支手繪感的藤蔓小花枝

   聖輝回饋：上一版（菱形網格 + 斜向織紋）「太花」。
   這一版改成**單一元素**：每個 220px 方格裡只有一小枝
   「藤蔓 + 卷鬚 + 兩片葉 + 一朵五瓣小花」，其餘大面積留白。
   沒有網格、沒有織紋、沒有碎點 —— 元素變少，才會顯得簡潔。

   圖案是內嵌 SVG（data URI），所以仍然是零圖片請求、不影響效能。
   ============================================================ */
:root {
  /* 紋路濃淡：只想調深淺就改這一個值（0 = 完全關掉紋路） */
  --pattern-strength: .38;
}

/*
 * 為什麼畫在 body::before 而不是 body 背景：
 *   1) 不覆蓋 body 的 --cream，各頁既有底色與文字對比度完全不變（維持 AA）。
 *   2) 固定層（position: fixed）在手機上比 background-attachment: fixed
 *      穩定得多 —— 後者捲動時會閃、部分 iOS 版本直接失效。
 *   3) 有自己底色的區塊（深色頁尾、Banner）天然不受影響，不必逐一覆蓋。
 *   4) pointer-events: none 一定要有：全螢幕固定層若吃掉點擊，
 *      會重演「整頁點不動」那個災難。
 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--pattern-strength);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%23B68A55' stroke-width='1.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M74 164 C 90 164 100 148 94 134 C 88 120 100 106 116 104'/%3E%3Cpath d='M94 134 C 78 131 70 116 79 105 C 86 96 101 100 102 111'/%3E%3Cpath d='M80 158 C 91 150 104 153 108 161 C 98 166 87 165 80 158 Z'/%3E%3Cpath d='M104 124 C 101 112 90 104 81 107 C 86 117 93 125 104 124 Z'/%3E%3Cg transform='translate(124 94)'%3E%3Ccircle cx='0' cy='-8' r='4.6'/%3E%3Ccircle cx='7.6' cy='-2.5' r='4.6'/%3E%3Ccircle cx='4.7' cy='6.5' r='4.6'/%3E%3Ccircle cx='-4.7' cy='6.5' r='4.6'/%3E%3Ccircle cx='-7.6' cy='-2.5' r='4.6'/%3E%3C/g%3E%3C/g%3E%3Ccircle cx='124' cy='94' r='1.8' fill='%23B68A55'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  background-repeat: repeat;
}

/* 內容必須疊在紋路之上（紋路在 z-index: 0，內容抬到 1） */
header, main, footer, #app { position: relative; z-index: 1; }

/* 手機螢幕小、看得近，花枝再縮小一點、再淡一點，才不會顯得雜 */
@media (max-width: 640px) {
  :root { --pattern-strength: .30; }
  body::before { background-size: 176px 176px; }
}

/* ============ Typography scale ============ */
.t-display {
  font-family: var(--font-serif);
  font-size: clamp(26px, 7vw, 44px);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.25;
  color: var(--espresso);
}
.t-h1 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 5.4vw, 32px);
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--espresso);
}
.t-h2 {
  font-family: var(--font-serif);
  font-size: clamp(19px, 4.4vw, 26px);
  font-weight: 400;
  letter-spacing: .03em;
  color: var(--espresso);
}
.t-h3 {
  font-family: var(--font-serif);
  font-size: clamp(17px, 3.6vw, 21px);
  color: var(--espresso);
}
.t-label {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
}
.t-vi {
  font-size: .88em;
  color: var(--text-soft);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  display: block;
  margin-top: 2px;
  line-height: 1.5;
}
.t-mute { color: var(--text-mute); }
.t-soft { color: var(--text-soft); }
.t-gold { color: var(--champagne-dk); }

/* ------- 雙語模式（繁中 + 越南文）的介面文案 ------- */
/* 主導覽：越南文緊接在後，避免導覽列變成兩行 */
.nav-vi {
  display: inline;
  margin-left: 5px;
  font-size: .78em;
  font-style: italic;
  color: var(--text-soft);
  letter-spacing: 0;
  text-transform: none;
}
/* 徽章／標籤：維持單行，避免小標籤被撐高 */
.badge .t-vi, .chip .t-vi, .tag .t-vi {
  display: inline;
  margin: 0 0 0 4px;
  font-size: .82em;
}
/* 按鈕：兩行置中，按鈕高度自動撐開 */
.btn .t-vi { margin-top: 1px; line-height: 1.25; }
/* 表單標籤、表格標頭：副標更緊 */
.lbl .t-vi, th .t-vi { margin-top: 0; font-size: .8em; }

/* 金色髮絲分隔線 */
.gold-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--champagne);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
}
.gold-rule::before,
.gold-rule::after {
  content: "";
  flex: 1;
  max-width: 64px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--champagne-lt), transparent);
}
.gold-rule.left { justify-content: flex-start; }
.gold-rule.left::before { display: none; }

/* ============ Layout helpers ============ */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: 40px 0; }
.section-tight { padding: 24px 0; }
.stack   { display: flex; flex-direction: column; }
.row     { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.wrap-flex { flex-wrap: wrap; }
.grow { flex: 1; }
.center { text-align: center; }
.hidden { display: none !important; }
.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;
}

/* 區塊抬頭 */
.sec-head { margin-bottom: 18px; }
.sec-head.center { text-align: center; }
.sec-head .eyebrow {
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--champagne-dk);
  font-weight: 500;
  margin-bottom: 6px;
}
.sec-head h2 { margin-bottom: 4px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  text-align: center;
  transition: background .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease), opacity .22s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(.5px); }
.btn[disabled], .btn.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--champagne-dk);
  outline-offset: 2px;
}

/* 主按鈕：深咖啡底 + 奶油白字（對比 13.4:1） */
.btn-primary {
  background: var(--espresso);
  color: var(--text-on-dark);
  border-color: var(--espresso);
}
.btn-primary:hover { background: var(--espresso-2); border-color: var(--espresso-2); }

/* 金色按鈕：香檳金底 + 深咖啡字（對比 4.9:1，達 AA） */
.btn-gold {
  background: var(--champagne);
  color: #FFFBF3;
  border-color: var(--champagne);
}
.btn-gold:hover { background: var(--champagne-dk); border-color: var(--champagne-dk); }

.btn-outline {
  background: transparent;
  color: var(--espresso);
  border-color: var(--champagne-lt);
}
.btn-outline:hover { background: var(--blush-soft); border-color: var(--champagne); }

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--cream-deep); color: var(--espresso); }

.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 13px; }
.btn-xs { min-height: 32px; padding: 5px 10px; font-size: 12px; letter-spacing: .04em; }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 15px; }
.btn-block { width: 100%; }

/* 文字連結（帶底線動效） */
.link-u {
  color: var(--espresso);
  border-bottom: 1px solid var(--champagne-lt);
  padding-bottom: 1px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.link-u:hover { border-color: var(--champagne-dk); color: var(--champagne-dk); }

/* ============ Forms ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: .02em;
}
.field .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  /* 16px 防止 iOS 自動縮放 */
  font-size: 16px;
  line-height: 1.5;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: 0 0 0 3px rgba(182, 138, 85, .12);
}
.input::placeholder, .textarea::placeholder { color: #B7A99D; }
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%236B5546' stroke-width='1.4' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.field-error {
  font-size: 12.5px;
  color: var(--danger);
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.input.has-error, .select.has-error, .textarea.has-error {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.field-hint { font-size: 12.5px; color: var(--text-mute); }

.checkbox, .radio { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.checkbox input, .radio input {
  width: 18px; height: 18px; margin: 2px 0 0;
  accent-color: var(--champagne-dk);
  flex-shrink: 0;
}

/* ============ Cards ============ */
.card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-pad { padding: 16px; }
.card-soft { background: var(--cream-deep); border-color: var(--line); }

/* ============ Badges ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.6;
  white-space: nowrap;
}
.badge-gold { background: var(--champagne); color: #FFFBF3; }
.badge-cream { background: var(--blush-soft); color: var(--espresso); }
.badge-outline { border: 1px solid var(--line-gold); color: var(--champagne-dk); background: #fff; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--info-bg); color: var(--text-soft); }
.badge-demo {
  background: #FDF6E8;
  color: #8A6430;
  border: 1px dashed #D9BC85;
  font-size: 10.5px;
}

/* ============ Notice strips ============ */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.65;
  border: 1px solid;
}
.notice-warn { background: var(--warn-bg); border-color: #E8D8B8; color: var(--warn); }
.notice-info { background: var(--info-bg); border-color: var(--line); color: var(--text-soft); }
.notice-danger { background: var(--danger-bg); border-color: #F0D5D1; color: var(--danger); }
.notice-success { background: var(--success-bg); border-color: #D5E0D6; color: var(--success); }
.notice-gold { background: #FDF8F0; border-color: var(--line-gold); color: var(--champagne-dk); }

/* ============ Grids ============ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-5 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-auto { display: grid; grid-template-columns: 1fr; gap: 12px; }

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .grid-5 { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .grid-auto { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .section { padding: 56px 0; }
  body { font-size: 15.5px; }
}
@media (min-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .grid-5 { grid-template-columns: repeat(5, 1fr); gap: 18px; }
  .grid-auto { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .section { padding: 72px 0; }
}

/* ============ Skeleton / loading ============ */
@keyframes shimmer { 100% { background-position: -200% 0; } }
.sk {
  background: linear-gradient(90deg, #F5EDE4 25%, #FBF5EE 37%, #F5EDE4 63%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius);
}
.sk-text { height: 12px; margin-bottom: 8px; }
.sk-img { aspect-ratio: 2 / 3; width: 100%; }
.sk-card { border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }

/* ============ Empty state ============ */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-soft);
}
.empty .empty-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  color: var(--champagne-lt);
}
.empty h3 { margin-bottom: 6px; color: var(--espresso); }
.empty p { font-size: 14px; margin-bottom: 16px; }

/* ============ Breadcrumb ============ */
.crumbs {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-mute);
  padding: 12px 0;
}
.crumbs a:hover { color: var(--champagne-dk); }
.crumbs .sep { color: var(--line-gold); }

/* ============ Modal ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(42, 31, 24, .42);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn .2s var(--ease);
}
.modal {
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 10px 10px 0 0;
  padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  animation: slideUp .28s var(--ease);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-close {
  width: 34px; height: 34px; display: grid; place-items: center;
  color: var(--text-soft); border-radius: 50%;
}
.modal-close:hover { background: var(--cream-deep); color: var(--espresso); }
@media (min-width: 640px) {
  .modal-mask { align-items: center; padding: 24px; }
  .modal { border-radius: var(--radius-lg); padding: 24px 26px; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ============ Toast ============ */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 300;
  display: flex; flex-direction: column; gap: 8px;
  width: calc(100% - 32px);
  max-width: 400px;
  pointer-events: none;
}
.toast {
  background: var(--espresso);
  color: var(--text-on-dark);
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 13.5px;
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 9px;
  animation: slideUp .24s var(--ease);
}
.toast.ok  { background: #3A5340; }
.toast.err { background: #8E3229; }
.toast.warn { background: #7A5A2E; }

/* ============ Drawer (mobile nav) ============ */
/* 預設必須是完全不存在的狀態：沒有 .is-open 時不能佔位、不能攔點擊、
   也不能被螢幕閱讀器讀到。否則整層遮罩會蓋住網頁，造成「所有東西都點不動」。 */
.drawer-mask {
  position: fixed; inset: 0; z-index: 180;
  background: rgba(42, 31, 24, .4);
  display: none;
}
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 181;
  width: min(84vw, 320px);
  background: var(--cream);
  overflow-y: auto;
  padding: 20px 0 calc(24px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  display: none;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform .24s var(--ease), visibility 0s linear .24s;
}
/* 開啟時才出現，並播放滑入動畫 */
.drawer-mask.is-open { display: block; animation: fadeIn .18s var(--ease); }
.drawer.is-open {
  display: block;
  visibility: visible;
  transform: none;
  transition: transform .25s var(--ease), visibility 0s;
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .drawer.is-open { transition: none; animation: none; }
}
.drawer-brand { padding: 0 20px 16px; border-bottom: 1px solid var(--line); }
.drawer-brand img { height: 56px; width: auto; }
.drawer-nav a {
  display: flex; flex-direction: column;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}
.drawer-nav a:active { background: var(--blush-soft); }
.drawer-nav .vi { font-size: 12px; color: var(--text-mute); font-style: italic; }
.drawer-close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--text-soft);
  border-radius: 50%; cursor: pointer;
}
.drawer-close:hover { background: var(--blush-soft); color: var(--espresso); }

/* ============ Utilities ============ */
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.divider-soft { height: 1px; background: var(--line-soft); margin: 12px 0; border: 0; }
.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}
.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}
.mb-4{margin-bottom:4px}.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}
.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}.mb-32{margin-bottom:32px}
.p-16{padding:16px}.p-20{padding:20px}.p-24{padding:24px}
.fs-12{font-size:12px}.fs-13{font-size:13px}.fs-14{font-size:14px}
.fs-16{font-size:16px}.fs-18{font-size:18px}.fs-20{font-size:20px}
.fw-500{font-weight:500}.fw-600{font-weight:600}
.ellipsis { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.nowrap { white-space: nowrap; }
.full { width: 100%; }
.relative { position: relative; }

/* 價格顯示（台灣：漲紅跌綠不適用於商品價，用深咖啡） */
.price {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--espresso);
  letter-spacing: .01em;
}
.price-lg { font-size: 22px; }
.price-strike {
  font-size: 13px;
  color: var(--text-mute);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 7px;
}
.price-off {
  font-size: 11.5px;
  color: #A8392F;
  font-weight: 600;
  margin-left: 6px;
}

/* 雙語段落：上下排列，手機不擠 */
.bi p { margin-bottom: 10px; }
.bi .zh { color: var(--text); }
.bi .vi {
  color: var(--text-soft);
  font-size: .92em;
  border-left: 2px solid var(--line-gold);
  padding-left: 11px;
}
@media (min-width: 900px) {
  .bi-side { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
}

/* 可展開區塊 */
details.acc {
  border-bottom: 1px solid var(--line-soft);
}
details.acc > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--espresso);
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .chev {
  transition: transform .22s var(--ease);
  color: var(--champagne);
  flex-shrink: 0;
}
details.acc[open] > summary .chev { transform: rotate(180deg); }
details.acc .acc-body { padding-bottom: 16px; font-size: 14px; color: var(--text-soft); }

/* Scroll snap rails (橫向滑動) */
.rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: 0 0 auto; }

/* ============ App shell ============ */
#app { min-height: 100vh; display: flex; flex-direction: column; }
#view { flex: 1; }
.page-wrap { padding-bottom: 40px; }

/* 手機底部固定購買列：不遮擋內容 */
.sticky-buy {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 90;
  background: rgba(255, 249, 242, .97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  align-items: center;
}
.sticky-buy .price { font-size: 17px; }
.has-sticky-buy { padding-bottom: 96px; }

/* LINE 客服浮動按鈕：右下、避開購買列 */
.fab-line {
  position: fixed;
  right: 14px;
  bottom: calc(150px + env(safe-area-inset-bottom));
  z-index: 88;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #06C755;
  color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  transition: transform .2s var(--ease);
}
.fab-line:hover { transform: scale(1.06); }
@media (min-width: 900px) {
  .fab-line { bottom: calc(28px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
}

/* 回到頂端 */
.fab-top {
  position: fixed;
  right: 14px;
  bottom: calc(206px + env(safe-area-inset-bottom));
  z-index: 88;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text-soft);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
  .fab-top { bottom: calc(90px + env(safe-area-inset-bottom)); }
}

/* ============ Print (物流單/報表) ============ */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}
