/* ==========================================================================
   鲸渡 WHALEGO · 组件层
   ========================================================================== */

/* ==========================================================================
   1. 光标（桌面指针设备才启用）
   ========================================================================== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: var(--z-cursor);
  border-radius: 50%;
  opacity: 0;
}
.cursor-dot {
  width: 6px; height: 6px; background: var(--accent);
  transform: translate(-50%, -50%);
  transition: opacity 200ms, width 200ms, height 200ms, background 200ms;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid var(--accent-line);
  transform: translate(-50%, -50%);
  transition: opacity 200ms, width 260ms var(--ease-out), height 260ms var(--ease-out),
              border-color 260ms, background 260ms;
}
.cursor-ring.is-hover {
  width: 62px; height: 62px;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cursor-ring.is-press { width: 26px; height: 26px; }
/* 显隐由 JS 内联样式控制，此处不设 opacity，避免光标未移动时停在画面中央 */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ==========================================================================
   2. 顶部公告条
   ========================================================================== */
.topbar {
  background: var(--deep);
  color: var(--deep-muted);
  font-size: var(--fs-sm);
  position: relative; z-index: calc(var(--z-nav) + 1);
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); min-height: 42px; padding-block: 6px;
}
.topbar__marquee { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.topbar__track { display: inline-flex; gap: 3.5rem; white-space: nowrap; animation: marquee 42s linear infinite; }
.topbar__track span { display: inline-flex; align-items: center; gap: 8px; }
.topbar__track b { color: var(--deep-fg); font-weight: 500; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.topbar__links { display: flex; gap: var(--sp-4); align-items: center; flex-shrink: 0; }
.topbar__links a { color: var(--deep-muted); transition: color var(--dur-fast); }
.topbar__links a:hover { color: var(--deep-fg); }
@media (max-width: 900px) { .topbar__links { display: none; } }

/* ==========================================================================
   3. 主导航
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base);
}
.nav.is-stuck { box-shadow: var(--shadow-1); }
.nav.is-hidden { transform: translateY(-102%); }
.nav__inner {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: 72px;
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem; letter-spacing: -0.03em; font-weight: 600;
  flex-shrink: 0;
}
.nav__brand .mark { width: 30px; height: 30px; flex-shrink: 0; }
.nav__brand small {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.3em;
  color: var(--muted); display: block; line-height: 1; margin-top: 3px;
}
.nav__menu { display: flex; align-items: center; gap: 2px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav__item { position: relative; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-soft);
  transition: color var(--dur-fast), background var(--dur-fast);
  min-height: 40px;
  white-space: nowrap; /* 桌面菜单项禁止换行（被顶栏图标钮挤压时曾折成两行） */
}
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--ink); background: var(--accent-soft); }
.nav__link[aria-current="page"] { color: var(--accent); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav__chev { width: 9px; height: 9px; transition: transform var(--dur-fast); }
.nav__link[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

/* 下拉大面板 */
.megapanel {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: min(720px, calc(100vw - 3rem));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: var(--sp-5);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
}
.megapanel.is-open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.megapanel__col h6 {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 var(--sp-3); font-weight: 500;
}
.megapanel__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.megapanel__col a {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 10px; border-radius: var(--r-sm);
  transition: background var(--dur-fast);
}
.megapanel__col a:hover { background: var(--accent-soft); }
.megapanel__col a svg { width: 17px; height: 17px; margin-top: 3px; flex-shrink: 0; color: var(--accent); }
.megapanel__col strong { display: block; font-size: var(--fs-sm); font-weight: 600; }
.megapanel__col span { display: block; font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; }

.nav__actions { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; margin-left: auto; }
.nav__toggle {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer; color: var(--ink);
}
/* svg 无尺寸约束时部分移动内核渲染成空白框（真机踩坑） */
.nav__toggle svg { width: 20px; height: 20px; }
@media (max-width: 1180px) {
  .nav__menu { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__actions .btn--ghost-label { display: none; }
}
/* 宽屏下菜单已含「即時搜尋」「匯率」入口，隐藏顶栏图标钮为菜单项腾位
   （选择器带 .nav__actions 提权重：基础 .nav__iconbtn 定义在文件更后，同权重会被覆盖） */
@media (min-width: 1181px) {
  .nav__actions .nav__iconbtn { display: none; }
}
/* 窄屏：精简导航动作区，其余入口移入行动选单 */
@media (max-width: 620px) {
  .nav__inner { gap: var(--sp-3); }
  .nav__brand { font-size: 1.2rem; }
  /* 商家 logo 加大：统一在基础规则（.nav__brand .mark 48px）控制，此处不再覆盖 */
  .nav__actions { gap: 6px; }
  /* 语言切换：独立图标按钮直接放顶栏（客户要求，不藏进行动选单）
     选择器带 .lang-switch 提权重：基础 .lang-switch__btn 在 pages.css（更晚加载），同权重会覆盖 border:0 */
  .lang-switch { display: block; }
  .lang-switch .lang-switch__btn {
    width: 38px; height: 38px; min-height: 0; padding: 0;
    justify-content: center; gap: 0; border: 0; background: none;
  }
  .lang-switch .lang-switch__btn > span, .lang-switch .lang-switch__btn .nav__chev { display: none; }
  .lang-switch .lang-switch__btn svg { width: 19px !important; height: 19px !important; }
  .lang-switch__menu { min-width: 132px; }
  /* 汉堡钮与搜索/汇率图标钮同尺寸同去框（客户反馈：大小不一 + 外框要取消） */
  .nav__toggle { width: 38px; height: 38px; border: 0; background: none; }
  .nav__toggle svg { width: 19px; height: 19px; }
  /* 2026-10-21 購物車鈕上線後動作區在 375 寬會橫向溢出 44px：
     窄屏隱藏搜索/匯率兩個圖標鈕（行動選單與首頁大搜索框都有入口），
     保留 購物車 + 語言 + 漢堡 —— 購物車移動端可點是驗收項 */
  .nav__actions .nav__iconbtn { display: none; }
}
@media (max-width: 480px) {
  .nav__actions .btn--accent { display: none; }
}
/* 行动选单内的语言按钮 */
.drawer__langs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.drawer__langs button {
  padding: 9px 16px; min-height: 40px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: var(--fs-sm); color: var(--muted);
  transition: all var(--dur-fast);
}
.drawer__langs button:hover { color: var(--ink); border-color: var(--ink-soft); }
.drawer__langs button.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* 移动端抽屉 */
.drawer {
  position: fixed; inset: 0; z-index: var(--z-overlay);
  visibility: hidden; pointer-events: none;
  /* 收合时面板被 translateX(102%) 推到视口外；在此裁剪，
     避免它撑出横向溢出（body 不再设 overflow-x: hidden） */
  overflow: hidden;
}
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(6, 16, 28, 0.5);
  opacity: 0; transition: opacity var(--dur-base);
  backdrop-filter: blur(3px);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(420px, 90vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  padding: var(--sp-5) var(--sp-5) var(--sp-7);
  overflow-y: auto;
  transform: translateX(102%);
  transition: transform var(--dur-slow) var(--ease-out);
  box-shadow: var(--shadow-3);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-5); }
.drawer__group { border-top: 1px solid var(--line); padding-block: var(--sp-3); }
.drawer__group h6 {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 var(--sp-2); font-weight: 500;
}
.drawer__group a {
  display: block; padding: 12px 0; font-size: var(--fs-lg);
  font-family: var(--font-serif-cn); font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast), padding-left var(--dur-fast);
}
.drawer__group a:hover { color: var(--accent); padding-left: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer; color: inherit;
}

/* ==========================================================================
   4. 按钮
   ========================================================================== */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 12px 24px;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid transparent; border-radius: var(--r-sm);
  cursor: pointer; text-align: center; white-space: nowrap; flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base), color var(--dur-base);
  isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform var(--dur-base) var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--on-accent); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn--accent { --btn-bg: var(--accent); --btn-fg: var(--on-accent); }
.btn--accent::before { background: var(--ink); }
.btn--accent:hover { color: var(--bg); }
.btn--outline {
  --btn-bg: transparent; --btn-fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--outline::before { background: var(--ink); }
.btn--outline:hover { color: var(--bg); border-color: var(--ink); }
.section--deep .btn--outline { --btn-fg: var(--deep-fg); border-color: var(--deep-line); }
.section--deep .btn--outline::before { background: var(--deep-fg); }
.section--deep .btn--outline:hover { color: var(--deep); }
.btn--lg { min-height: 58px; padding: 17px 34px; font-size: var(--fs-base); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: var(--fs-xs); }
.btn--block { width: 100%; }
.btn--quiet {
  --btn-bg: transparent; --btn-fg: var(--ink);
  padding-inline: 10px;
}
.btn--quiet::before { display: none; }
.btn--quiet:hover { color: var(--accent); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.42; pointer-events: none; filter: saturate(0.4);
}
.btn--loading { pointer-events: none; color: transparent !important; }
.btn--loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--btn-fg);
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 文字链接 · 下划线扫过 */
.link-swipe {
  position: relative; display: inline-block;
  font-weight: 500; color: var(--accent);
}
.link-swipe::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--dur-base) var(--ease-out);
}
.link-swipe:hover::after { transform: scaleX(1); transform-origin: left; }

/* ==========================================================================
   5. 卡片与网格
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base), border-color var(--dur-base);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: transparent; }
.section--deep .card { background: var(--deep-2); border-color: var(--deep-line); }

/* 步骤卡 · 编号 + 航线节点 */
.stepcard {
  position: relative;
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--line-strong);
}
.stepcard__no {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.2em; color: var(--accent); margin-bottom: var(--sp-4);
  display: block;
}
.stepcard__node {
  position: absolute; top: -5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.section--deep .stepcard__node { box-shadow: 0 0 0 4px var(--deep); }
.stepcard h4 { margin-bottom: var(--sp-2); }
.stepcard p { font-size: var(--fs-sm); color: var(--muted); max-width: 34ch; }

/* 平台列表 */
.platform-row {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  align-items: center;
}
.platform-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px 9px 9px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-sm); font-weight: 500;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast), background var(--dur-fast);
}
.platform-chip:hover { transform: translateY(-2px); border-color: var(--accent-line); background: var(--accent-soft); }
.platform-chip__mark {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  color: #fff; flex-shrink: 0;
}

/* 数据条 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--bg); padding: var(--sp-5) var(--sp-4); }
.section--deep .stats { background: var(--deep-line); border-color: var(--deep-line); }
.section--deep .stat { background: var(--deep); }
.stat-value { font-size: var(--fs-3xl); font-weight: 500; line-height: 1; display: block; letter-spacing: -0.04em; }
.stat-label { font-size: var(--fs-sm); color: var(--muted); margin-top: 10px; display: block; }
.section--deep .stat-label { color: var(--deep-muted); }

/* ==========================================================================
   6. 表单
   ========================================================================== */
.field { margin-bottom: var(--sp-4); }
.field label, .field-label {
  display: block; font-size: var(--fs-sm); font-weight: 600;
  margin-bottom: 8px; color: var(--ink);
}
.field .hint { display: block; font-size: var(--fs-xs); color: var(--faint); margin-top: 6px; }
.section--deep .field label { color: var(--deep-fg); }

.input, .select, .textarea {
  width: 100%; min-height: 50px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-base);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-soft); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input:disabled, .select:disabled { background: var(--surface-2); opacity: 0.6; cursor: not-allowed; }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.select { appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234E5D6C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 11px;
}
[data-theme="dark"] .select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A9B8C6' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }

.input-group { display: flex; gap: var(--sp-2); }
.input-group .input { flex: 1; }
.field-error { font-size: var(--fs-xs); color: var(--danger); margin-top: 6px; display: none; }
.field.has-error .field-error { display: block; }

/* 复选 / 单选 */
.check { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; font-size: var(--fs-sm); min-height: 44px; padding: 10px 0; }
.check input { appearance: none; width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-xs); background: var(--surface);
  cursor: pointer; transition: all var(--dur-fast); position: relative; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.check input:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }

/* 分段控制 */
.segmented {
  display: inline-flex; padding: 4px; gap: 2px;
  background: var(--surface-2); border-radius: var(--r-sm); border: 1px solid var(--line);
}
.segmented button {
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: 9px 16px; min-height: 40px; border-radius: var(--r-xs);
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600;
  color: var(--muted); transition: all var(--dur-fast);
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

/* 范围滑块 */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; background: var(--line-strong); border-radius: 3px; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface); box-shadow: var(--shadow-1); cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent);
  border: 3px solid var(--surface); box-shadow: var(--shadow-1); cursor: grab;
}

/* ==========================================================================
   7. 手风琴 / 折叠
   ========================================================================== */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 22px 0; min-height: 44px;
  background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-serif-cn); font-size: var(--fs-lg); font-weight: 600;
  color: var(--ink); transition: color var(--dur-fast);
}
.acc__trigger:hover { color: var(--accent); }
.acc__icon { position: relative; width: 15px; height: 15px; flex-shrink: 0; }
.acc__icon::before, .acc__icon::after {
  content: ""; position: absolute; background: currentColor;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base);
}
.acc__icon::before { left: 0; top: 7px; width: 15px; height: 1.5px; }
.acc__icon::after { left: 7px; top: 0; width: 1.5px; height: 15px; }
.acc__trigger[aria-expanded="true"] .acc__icon::after { transform: rotate(90deg); opacity: 0; }
.acc__trigger[aria-expanded="true"] .acc__icon::before { transform: rotate(180deg); }
.acc__panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}
.acc__panel.is-open { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel p, .acc__panel ul { font-size: var(--fs-sm); color: var(--muted); padding-bottom: 22px; max-width: 74ch; }
.acc__panel ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* ==========================================================================
   8. 标签页
   ========================================================================== */
.tabs { display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 14px 2px; min-height: 44px;
  background: none; border: 0; cursor: pointer; white-space: nowrap;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600;
  color: var(--muted); transition: color var(--dur-fast);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.tabpanel { padding-top: var(--sp-5); }
.tabpanel[hidden] { display: none; }

/* ==========================================================================
   9. 表格
   ========================================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 760px; }
table.data th {
  text-align: left; padding: 14px 16px; white-space: nowrap;
  font-family: var(--font-mono); font-size: var(--fs-xs);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); font-weight: 500;
  border-bottom: 1px solid var(--line); background: var(--bg-2);
  position: sticky; top: 0; z-index: 2;
}
table.data td { padding: 15px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
/* 允许特定单元格换行 */
table.data td.wrap { white-space: normal; min-width: 220px; }
/* 带头像的复合单元格：防止列被内容挤塌 */
.cell-agent { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.cell-agent > div { min-width: 0; }
table.data tbody tr { transition: background var(--dur-fast); }
table.data tbody tr:hover { background: var(--accent-soft); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   10. 徽章与状态
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap;
}

/* 两栏工作区：窄屏必须塌陷成单列。
   原先写在内联 style 里，媒体查询覆盖不到 —— 英文文案拉长后
   后台在 375px 会横向溢出 19px。 */
.cols-split { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1080px) {
  .cols-split--6-4 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .cols-split--4-5 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
}
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--neutral { background: var(--surface-2); color: var(--muted); }
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge__dot--pulse { animation: pulse 2s var(--ease-in-out) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ==========================================================================
   11. 进度 / 时间轴（航线图）
   ========================================================================== */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 0;
  border-left: 2px dashed var(--line-strong);
}
.tl-item { position: relative; padding-bottom: var(--sp-5); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -34px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2.5px solid var(--line-strong);
  transition: all var(--dur-base);
}
.tl-item.is-done::before { background: var(--accent); border-color: var(--accent); }
.tl-item.is-current::before {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
  animation: pulse 2s var(--ease-in-out) infinite;
}
.tl-item time {
  font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--faint);
  display: block; margin-bottom: 4px;
}
.tl-item h5 { margin-bottom: 4px; }
.tl-item p { font-size: var(--fs-sm); color: var(--muted); }

/* 进度条 */
.progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--accent); border-radius: 3px; transition: width var(--dur-slow) var(--ease-out); }

/* ==========================================================================
   12. 跑马灯
   ========================================================================== */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: var(--sp-6); width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
.marquee__item {
  /* 客户要求缩小一倍（原 clamp(1.6rem,3.4vw,2.5625rem)），并配手绘平台 logo */
  font-family: var(--font-display); font-size: clamp(.85rem, 1.7vw, 1.3125rem);
  white-space: nowrap; display: flex; align-items: center; gap: var(--sp-6);
  color: var(--ink); opacity: 0.9;
}
.marquee__item::after { content: "◆"; font-size: 0.5em; color: var(--accent); }
.marquee__logo { width: 1.35em; height: 1.35em; border-radius: .3em; flex-shrink: 0; }

/* ==========================================================================
   13. 提示 / 吐司
   ========================================================================== */
.toasts {
  position: fixed; bottom: var(--sp-5); right: var(--sp-5);
  z-index: var(--z-overlay); display: grid; gap: 10px; max-width: min(400px, calc(100vw - 2rem));
}
.toast {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--ink); color: var(--bg);
  padding: 15px 18px; border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  animation: toast-in 420ms var(--ease-out);
  font-size: var(--fs-sm);
}
.toast.is-out { animation: toast-out 300ms var(--ease-out) forwards; }
.toast__icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--accent-bright); }
.toast strong { display: block; color: var(--bg); margin-bottom: 2px; }
.toast p { color: rgba(245, 240, 230, 0.76); font-size: var(--fs-xs); margin: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* 提示条 */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 18px; border-radius: var(--r-md); font-size: var(--fs-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.notice svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 3px; }
.notice--warn { border-color: var(--warn); background: var(--warn-soft); color: var(--ink); }
.notice--accent { border-color: var(--accent-line); background: var(--accent-soft); color: var(--ink); }
.section--deep .notice { background: var(--deep-2); border-color: var(--deep-line); color: var(--deep-muted); }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: var(--z-overlay); display: grid; place-items: center; visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal__scrim { position: absolute; inset: 0; background: rgba(6, 16, 28, 0.56); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--dur-base); }
.modal.is-open .modal__scrim { opacity: 1; }
.modal__box {
  position: relative; width: min(560px, calc(100vw - 2rem));
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-3); padding: var(--sp-5);
  transform: translateY(20px) scale(0.97); opacity: 0;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base);
  max-height: 88vh; overflow-y: auto;
}
.modal.is-open .modal__box { transform: none; opacity: 1; }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-5); }

/* ==========================================================================
   14. 页脚
   ========================================================================== */
/* 一比一复刻：页脚浅色化（对标 footer 白底灰字），局部覆盖深色令牌组 */
.footer {
  /* P1-9 客户指令：页脚深色底（对标站深色页脚），四栏标题品牌橙 */
  --deep: #1A1A1A;
  --deep-2: #111111;
  --deep-fg: #FFFFFF;
  --deep-muted: rgba(245, 240, 230, 0.66);
  --deep-line: rgba(245, 240, 230, 0.14);
  background: var(--deep);
  color: var(--deep-muted);
  padding-top: var(--sp-8);
  position: relative; overflow: hidden;
}
.footer__grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-4);
  padding-bottom: var(--sp-7);
}
.footer h6 {
  font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--deep-fg); margin: 0 0 var(--sp-4); font-weight: 500;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer a { font-size: var(--fs-sm); transition: color var(--dur-fast), padding-left var(--dur-fast); }
.footer a:hover { color: var(--deep-fg); padding-left: 5px; }
.footer__brand { font-family: var(--font-display); font-size: 1.6rem; color: var(--deep-fg); letter-spacing: -0.03em; margin-bottom: var(--sp-3); display: flex; align-items: center; gap: 10px; }
.footer__brand .mark { width: 32px; height: 32px; }
.footer__note { font-size: var(--fs-sm); max-width: 34ch; line-height: 1.75; }
.footer__bottom {
  border-top: 1px solid var(--deep-line); padding-block: var(--sp-4);
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--fs-xs);
}
.footer__bottom nav { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.footer__word {
  font-family: var(--font-display);
  font-size: clamp(4rem, 17vw, 15rem);
  line-height: 0.82; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 1px rgba(242, 236, 224, 0.13);
  text-align: center; user-select: none; padding-bottom: var(--sp-4);
  white-space: nowrap; overflow: hidden;
}
@media (max-width: 1024px) { .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); } .footer__brand-col { grid-column: 1 / -1; } }
@media (max-width: 620px) { .footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ==========================================================================
   15. 通用网格
   ========================================================================== */
.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 268px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grid--5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 172px), 1fr)); }

/* 强制两列：用于窄栏中需要保持并排的内容（步驟卡、QC 照片等） */
.grid--2c { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3c { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 620px) {
  .grid--2c, .grid--3c { grid-template-columns: minmax(0, 1fr); }
}

/* 分栏 */
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.split--7-5 { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.split--5-7 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.split--even { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
@media (max-width: 900px) { .split--7-5, .split--5-7 { grid-template-columns: minmax(0, 1fr); } }

/* 粘性侧栏 */
.sticky-col { position: sticky; top: 96px; }
@media (max-width: 900px) { .sticky-col { position: static; } }

/* 数字列表 */
.deflist { display: grid; gap: 0; }
.deflist__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-4);
  padding: 13px 0; border-bottom: 1px dashed var(--line);
}
.deflist__row:last-child { border-bottom: 0; }
.deflist__row dt { font-size: var(--fs-sm); color: var(--muted); }
.deflist__row dd { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: var(--fs-md); font-weight: 500; }
.deflist__row--total { border-top: 1px solid var(--line-strong); border-bottom: 0; margin-top: var(--sp-2); padding-top: var(--sp-4); }
.deflist__row--total dt { font-weight: 600; color: var(--ink); font-size: var(--fs-base); }
.deflist__row--total dd { font-size: var(--fs-xl); color: var(--accent); }

/* ==========================================================================
   16. 空态 / 加载骨架
   ========================================================================== */
.empty {
  text-align: center; padding: var(--sp-7) var(--sp-4);
  border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  color: var(--muted);
}
.empty svg { width: 44px; height: 44px; color: var(--line-strong); margin-bottom: var(--sp-3); }
.empty h4 { margin-bottom: 8px; }
.empty p { font-size: var(--fs-sm); margin-inline: auto; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-xs);
  color: transparent !important;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* 头像 */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 600;
  color: var(--on-accent); background: var(--accent);
  border: 2px solid var(--surface);
}
.avatar--sm { width: 30px; height: 30px; font-size: var(--fs-xs); }
.avatar--lg { width: 52px; height: 52px; font-size: var(--fs-md); }

/* 分隔带 */
.band { border-block: 1px solid var(--line); padding-block: var(--sp-3); overflow: hidden; }

/* 深色区块内的平台 chips：白上白 → 深底浅字 */
.section--deep .platform-chip {
  background: rgba(245, 245, 244, 0.07);
  border-color: var(--deep-line);
  color: var(--deep-fg);
}
.section--deep .platform-chip:hover {
  background: rgba(245, 245, 244, 0.13);
  border-color: rgba(245, 245, 244, 0.35);
}

/* 顶栏链接：字号与对比度提升（用户反馈不显眼） */
.topbar__links a {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(245, 245, 244, 0.95);
}
.topbar__links a:hover { color: #fff; }

/* ==========================================================================
   yibazaar · 品牌 logo 与悬浮客服（客户整改 2026-10-14）
   ========================================================================== */
.nav__brand .mark { width: 48px; height: 48px; object-fit: contain; } /* 客户要求加大 */
.footer__brand .mark { width: 48px; height: 48px; object-fit: contain; }
.drawer .nav__brand .mark { width: 34px; height: 34px; }

.brand-name {
  display: flex; flex-direction: column; line-height: 1;
  font-weight: 800; letter-spacing: .02em; color: var(--ink);
  font-size: 1.02rem;
}
.brand-name b {
  font-weight: 600; font-size: .56em; letter-spacing: .42em;
  color: var(--accent); margin-top: 3px;
}

/* ---------- 悬浮客服 / 电话下单：fixed 随滚动始终可见 ---------- */
.fab-stack {
  position: fixed;
  right: clamp(14px, 2.5vw, 28px);
  bottom: clamp(20px, 5vh, 44px);
  z-index: 130;
  display: flex; flex-direction: column; gap: 14px;
  /* iOS 滚动中 fixed 跑位（同 tabbar），强制合成层 */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.fab {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.22);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 12px 30px rgba(17, 24, 39, 0.28); }
.fab svg { width: 26px; height: 26px; }
.fab--wa  { background: #22B358; }          /* WhatsApp 绿 · 在线客服 */
.fab--tel { background: var(--accent); }    /* 品牌橙 · 电话下单 */

/* 呼吸光环（提示可点） */
.fab--wa::before, .fab--tel::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid currentColor; opacity: .5;
  animation: fabPulse 2.6s var(--ease-out) infinite;
}
@keyframes fabPulse {
  0%   { transform: scale(1);   opacity: .45; }
  70%  { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* 悬停文字标签 */
.fab__tip {
  position: absolute; right: calc(100% + 12px); top: 50%; translate: 0 -50%;
  background: var(--ink); color: var(--bg);
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  padding: 7px 12px; border-radius: var(--r-sm);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.fab:hover .fab__tip, .fab:focus-visible .fab__tip { opacity: 1; }

@media (max-width: 640px) {
  .fab { width: 50px; height: 50px; }
  .fab svg { width: 23px; height: 23px; }
  .fab__tip { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fab--wa::before, .fab--tel::before { animation: none; opacity: 0; }
  .fab { transition: none; }
}

/* ---------- 导航图标快捷钮（对标 cncartgo 顶部图标组） ---------- */
.nav__iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  color: var(--ink); transition: background var(--dur-fast);
}
.nav__iconbtn:hover { background: var(--accent-soft); }
.nav__iconbtn svg { width: 20px; height: 20px; }
@media (max-width: 620px) {
  .nav__iconbtn { width: 38px; height: 38px; }
  .nav__iconbtn svg { width: 19px; height: 19px; }
}

/* ---------- 購物車鈕 + 角標（2026-10-21 购物车功能） ----------
   不用 .nav__iconbtn 类名：宽屏有 .nav__actions .nav__iconbtn { display:none } 隐藏规则，
   购物车任何宽度都要可见可点（移动端点得到是验收项）。 */
.nav__cartbtn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  color: var(--ink); transition: background var(--dur-fast);
}
.nav__cartbtn:hover { background: var(--accent-soft); }
.nav__cartbtn svg { width: 20px; height: 20px; }
.cart-badge {
  position: absolute; top: 2px; right: 0;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 17px; text-align: center;
  font-style: normal; font-family: var(--font-body);
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.tabbar .cart-badge { top: 4px; right: calc(50% - 20px); }
@media (max-width: 620px) {
  .nav__cartbtn { width: 38px; height: 38px; }
  .nav__cartbtn svg { width: 19px; height: 19px; }
}

/* ---------- 移动端底部 tab 栏（首頁/優惠/購物車/個人資料） ---------- */
.tabbar { display: none; }
@media (max-width: 768px) {
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0;
    /* 抽屉/模态(is-locked)打开时整条隐藏，不挡面板 */
    z-index: 2147483000;
    /* iOS 滚动中 fixed 元素会跟手跳动（客户反馈：滑动时底下会跑），强制独立合成层修复 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    display: flex; align-items: stretch;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 16px rgba(17, 24, 39, 0.06);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 7px 0 6px; min-height: 54px;
    font-size: .6563rem; line-height: 1; color: var(--muted); text-decoration: none;
  }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a[aria-current="page"] { color: var(--accent); font-weight: 600; }
  /* 抽屉/模态打开：收起 tab 栏，不挡面板 */
  body.is-locked .tabbar { display: none; }
  /* 内容底部留出 tabbar 高度，底部信息不再被挡（客户反馈：往上挪） */
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  /* 补丁10：旧客服脚本已下线，死规则清除；三钮竖排定位见 #crisp-stack-fix */
}
.marquee__item b { font-weight: 600; font-family: inherit; }

/* ---------- 自家客服 FAB（旧版，已停用——在线客服由 Crisp 接管） ---------- */
.fab--chat {
  background: #1FA855; color: #fff;
}
.fab--chat svg { width: 26px; height: 26px; }
/* 未读红点 */
.fab__badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: #E5484D; color: #fff;
  font-size: .6875rem; font-weight: 700; line-height: 20px;
  text-align: center; box-shadow: 0 2px 6px rgba(229, 72, 77, .4);
}

/* ===== 對標 cookie 同意彈窗（分類開關版） ===== */
.cookieconsent {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  z-index: 2147483400; max-width: 560px; margin: 0 auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(17, 24, 39, .18);
  padding: 20px 22px;
}
.cookieconsent[hidden] { display: none; }
.cookieconsent h5 { margin: 0 0 6px; font-size: 1.0625rem; color: var(--ink); }
.cookieconsent p { margin: 0 0 14px; font-size: .8125rem; color: var(--muted); line-height: 1.55; }
.cookieconsent__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.cookieconsent__detail { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.cookieconsent__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0;
}
.cookieconsent__row + .cookieconsent__row { border-top: 1px solid var(--line); }
.cookieconsent__row b { display: block; font-size: .875rem; color: var(--ink); }
.cookieconsent__row span { display: block; font-size: .75rem; color: var(--muted); }
.cookieconsent__lock {
  font-size: .6875rem; color: var(--muted); background: var(--surface-2);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.cookieconsent__detail .btn { margin-top: 8px; }
.cookieconsent__switch {
  appearance: none; -webkit-appearance: none; width: 40px; height: 22px;
  border-radius: 999px; background: var(--line); position: relative;
  cursor: pointer; transition: background var(--dur-fast); flex-shrink: 0;
}
.cookieconsent__switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform var(--dur-fast); box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.cookieconsent__switch:checked { background: var(--accent); }
.cookieconsent__switch:checked::after { transform: translateX(18px); }
@media (max-width: 620px) {
  .cookieconsent { left: 0; right: 0; bottom: 0; border-radius: 16px 16px 0 0; padding: 16px 18px 20px; }
}

/* ===== P1-5 移动端 toast 顶部化 + fab-stack 让位 tab 栏 ===== */
@media (max-width: 768px) {
  .toasts {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    bottom: auto; right: 12px; left: 12px;
    max-width: none; justify-items: stretch;
  }
  .toast { animation-name: toast-in-top; }
  .toast.is-out { animation-name: toast-out-top; }
}
@keyframes toast-in-top { from { opacity: 0; transform: translateY(-16px) scale(0.97); } }
@keyframes toast-out-top { to { opacity: 0; transform: translateY(-14px); } }

/* ===== P1-4 悬浮【立刻購買】按鈕 · 补丁9 P0-3/4 重做 =====
   旧版 transform:translateX(calc(100%+40px)) 屏外藏匿是 PC 端横向撑宽元凶
   （1440 视口实测 scrollWidth=1553，差值 113px 恰为屏外位移量）。
   新版：右缘半嵌入（与 wa-fab 同款视觉，竖排两格：上 WhatsApp 客服 / 下 立刻購買），
   入场改为「屏内小位移 + 透明度」，任何时刻都不越过视口右缘 6px 探出线。 */
.fab-cta {
  /* UI_FIX_20261120：原来 right:-6px 会把自己顶到屏幕外、右侧文字被裁；
     再加缺 white-space:nowrap，窄屏会把 Buy now 折成两行。
     现在贴边 0、强制单行，padding 右留足。 */
  position: fixed; right: 0; bottom: 16px; z-index: 70;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  padding: 13px 26px 13px 20px; border: 0; border-radius: 999px 0 0 999px;
  background: var(--accent); color: #fff;
  font-size: .9375rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: -6px 10px 28px rgba(255, 132, 41, .45);
  cursor: pointer; text-decoration: none;
  opacity: 0; transform: translateX(-16px);   /* 屏内入场，杜绝屏外撑宽 */
  transition: transform .45s var(--ease-out), opacity .45s var(--ease-out), box-shadow var(--dur-fast);
}
.fab-cta.is-in { opacity: 1; transform: translateX(0); }
.fab-cta:hover { box-shadow: -6px 14px 34px rgba(255, 132, 41, .58); }
/* UI_FIX_20261120b：这里原来只写 flex-shrink:0，但 SVG 没有 width/height 属性，
   浏览器按 viewBox 撑成巨图 → 图标吃掉整个按钮宽度，把 "Buy now" 挤到右边缘被裁。
   必须写死尺寸。 */
.fab-cta svg { width: 20px; height: 20px; flex-shrink: 0; display: block; }
@media (max-width: 768px) {
  .fab-cta {
    right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 148px);
    padding: 11px 22px 11px 16px; font-size: .875rem;
  }
  .fab-cta svg { width: 17px; height: 17px; }
}

/* 补丁9 P0-4：cookie 同意弹窗出现时，右缘竖排两钮让位（隐藏，保存选择后随 body 类移除自动恢复） */
body.cookie-open .fab-cta,
body.cookie-open .wa-fab { opacity: 0 !important; pointer-events: none; }

/* ===== P1-9 页脚深色化补充：橙色栏目标题 + WhatsApp/邮箱卡片 ===== */
.footer h6 { color: var(--accent-bright) !important; }
.footer a { color: var(--deep-muted); transition: color var(--dur-fast); }
.footer a:hover { color: var(--accent-bright); }
.footer__cards { display: grid; gap: 10px; margin-top: 18px; max-width: 340px; }
.footer__card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--deep-line);
  border-radius: 12px; background: rgba(245, 240, 230, 0.05);
  text-decoration: none; transition: border-color var(--dur-fast), background var(--dur-fast);
}
.footer__card:hover { border-color: var(--accent); background: rgba(255, 132, 41, 0.1); }
.footer__card-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.footer__card-ico svg { width: 17px; height: 17px; }
.footer__card-txt { display: flex; flex-direction: column; min-width: 0; }
.footer__card-txt b { color: var(--deep-fg); font-size: .875rem; word-break: break-all; }
.footer__card-txt span { font-size: .71875rem; color: var(--deep-muted); }

/* ===== P1-16 导航字体加粗加大（客户指令：菜单 16px/600、active 700 橙下划线、logo 24px/700） ===== */
.nav__menu .nav__link { font-size: 1rem; font-weight: 600; color: var(--ink); }
.nav__menu .nav__link[aria-current="page"],
.nav__menu .nav__link.is-active { font-weight: 700; color: var(--accent-ink); }
.nav__menu .nav__link[aria-current="page"]::after,
.nav__menu .nav__link.is-active::after { content: ""; display: block; height: 2.5px; border-radius: 2px; background: var(--accent); margin-top: 3px; }
.nav__brand { font-size: 1.5rem; font-weight: 700; }
.nav__brand .mark { width: 52px; height: 52px; }
.topbar__links a, .topbar__marquee b { font-size: .8438rem; font-weight: 600; }
@media (max-width: 768px) {
  .nav__menu .nav__link { font-size: .9688rem; }
  .nav__brand { font-size: 1.3125rem; }
}

/* Cookie 升级补充：功能 Cookie 行 + 左重置右保存 */
.cookieconsent__actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.cookieconsent__actions .btn { flex: 1; }

/* 补丁 11：页脚 WhatsApp QR 卡 */
.footer__card--wa { align-items: center; }
.footer__card-qr {
  width: 52px; height: 52px; border-radius: 10px; background: #fff;
  padding: 4px; flex-shrink: 0; display: block;
}

/* ===== 客户补丁 10：横向容器根治手机横向滑动（390 视口 scrollWidth 撑宽） ===== */
.topbar__marquee, .marquee, .ob-notice, .ob-belt-wrap {
  overflow: hidden; max-width: 100%;
}
.topbar__track, .marquee__track, .ob-notice__track, .ob-belt {
  max-width: none; /* 轨道本身允许超宽（由 transform 位移），但必须被外层裁剪 */
}
@supports (overflow: clip) {
  .topbar__marquee, .marquee, .ob-notice, .ob-belt-wrap { overflow: clip; }
}

/* ===== 补丁4：WhatsApp 唤起式悬浮钮 =====
   fixed 右缘半嵌入（探出 6px），屏内触控区 ≥50px；
   品牌绿 #25D366 描边；点击直达 wa.me/qr 短链唤起 App，不弹模态不挂卡。 */
.wa-fab {
  position: fixed; right: -6px; bottom: 92px; z-index: 60;
  will-change: transform;
  width: 62px; height: 62px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 14px 0 0;               /* 视觉中心左移，图标留在屏内 */
  background: #FFFFFF; color: #1FAF54;
  border: 1px solid #25D366; border-right: none;
  border-radius: 999px 0 0 999px;
  box-shadow: -6px 10px 24px rgba(37, 211, 102, .30);
  transform: translateX(120%);        /* 默认藏在屏外，渲染后滑入 */
  transition: transform .4s ease, box-shadow .25s ease;
}
.wa-fab.is-in { transform: translateX(0); }
.wa-fab:hover { box-shadow: -6px 10px 30px rgba(37, 211, 102, .55); }
.wa-fab svg { width: 30px; height: 30px; flex-shrink: 0; }
@media (max-width: 768px) {
  .wa-fab { bottom: 84px; width: 56px; height: 56px; }
  .wa-fab svg { width: 28px; height: 28px; }
}

/* 补丁4-③：横向滚动根治——四个横滚轨道本体也裁一刀（双保险） */
.topbar__track, .marquee__track, .ob-notice__track, .ob-belt {
  max-width: 100%;
}
@supports (overflow: clip) {
  .topbar__marquee, .marquee, .ob-notice, .ob-belt-wrap { overflow: clip; }
}

/* 补丁4-③ 根治：reveal--right 入场前 translate3d(30px) 的初始位移
   会把未入场区块的滚动溢出区撑出 ~8px（390 视口实测 sw=398>390）。
   overflow:clip 不生成滚动容器、不破坏 sticky，只把溢出裁掉。 */
@media (max-width: 768px) {
  main { overflow-x: clip; }
}

/* ===== CART_HIDDEN_FIX_20261106 =====
   HTML 的 hidden 属性自带 display:none，但会被 .cartpage-grid{display:grid}
   这类显式 display 规则盖掉 —— 结果购物车提交成功后，旧的清单和结算表单
   还留在页面上（客户会重复提交）。这里统一兜底，比逐处改内联样式可靠。 */
[hidden] { display: none !important; }

/* ===== PAY_WIDTH_HINT_20261106 =====
   Onlypay 托管收银台内部有 832px 的死宽度（实测 <832 必横向滚动），
   跨域改不了。这里在窄屏给一句静态提示，免得客户以为页面坏了。 */
/* UA_FIX_20261106：這條提示是誤報，已刪。
   起因：OnlyPay 收銀台是「依 UA 分版」——真手機拿到的是自適應移動版（實測 iPhone UA 390px，
   scrollWidth=390，零溢出），只有「桌面 UA + 窄窗口」才會落到 832px 的 PC 版被裁。
   既然真手機沒問題，就不能在手機上掛一條「請左右滑動」嚇客戶。 */

/* ==========================================================================
   LOGO_20261120 · 客户换标（yibazaar）
   新标的字标是圆润无衬线，而 .nav__brand 继承的是 Fraunces（衬线display），
   直接用会跟图标调性打架 —— 品牌名改用正文无衬线、加粗、收紧字距。
   ========================================================================== */
.brand-name{
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.12rem;
  text-transform: lowercase;
}
.drawer .nav__brand .brand-name{ font-size: 1rem; }
