/* ==========================================================================
   Homeline Supply — wholesale catalogue prototype
   Light editorial theme · deep green accent · USD pricing
   ========================================================================== */

:root {
  --bg: #fbfaf7;
  --bg-2: #f3f1ea;
  --surface: #ffffff;
  --ink: #141a18;
  --ink-2: #37403c;
  --muted: #727d78;
  --line: #e5e3db;
  --line-2: #d6d3c8;
  --accent: #1d4a3c;
  --accent-2: #2f6b56;
  --accent-soft: #edf3ef;
  --clay: #a9522f;
  --clay-soft: #fbf0ea;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 26, 24, 0.05);
  --shadow: 0 12px 32px -18px rgba(20, 26, 24, 0.35);
  --wrap: 1200px;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* ---------- announcement ---------- */
.announce {
  background: var(--ink);
  color: #e9ece7;
  font-size: 12.5px;
  letter-spacing: 0.01em;
}
.announce-inner {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 32px; align-items: center;
}
.announce strong { color: #fff; font-weight: 600; }
.announce-right { color: #a9b3ad; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  display: flex; align-items: center; gap: 20px;
  height: 74px;
}
.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo-mark {
  /* 2026-11-01：logo 换成老板给的通店标（透明底 + 主色绿），容器不再要白底和描边，
     否则透明 logo 外面还套一块白方块。尺寸 44px 让山形+波浪在小尺寸下还能辨认。 */
  width: 44px; height: 44px; border-radius: 9px;
  background: transparent; color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 19px; font-weight: 600;
  letter-spacing: -0.03em;
  overflow: hidden;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; background: transparent; }
/* logo 文件缺失时降级为文字标记（img 的 onerror 加 .txt；img 本身用 CSS 强制隐藏，
   不依赖 onerror 里的 remove —— 动态重建的节点上它不总是生效） */
.logo-mark.txt { background: var(--accent); }
.logo-mark.txt > img { display: none !important; }
.logo-mark.txt::before { content: "C"; color: #fff; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text strong { font-size: 13.5px; letter-spacing: 0.04em; font-weight: 600; }
.logo-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 0.05em; text-transform: uppercase; }

/* flex:0 0 auto + nowrap：导航曾被右侧两个下拉和两个按钮挤成"每个字一行"，
   "How pricing works" 竖排三行把页头撑高。导航不参与收缩，宁可让右侧按钮先挤。 */
.nav { display: flex; gap: 17px; margin-left: 4px; flex: 0 0 auto; }
.nav a { white-space: nowrap; }
.nav a {
  font-size: 13.5px; color: var(--ink-2); padding: 6px 0;
  border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--accent); }
.nav a.active { color: var(--accent); border-color: var(--accent); }

.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* 1200 栅格放不下「导航+语言+货币+两个按钮」时，先砍重复的 Chat 入口
   （悬浮球和页脚都有），避免页头被挤出横向滚动条 */
@media (max-width: 1260px) {
  .head-actions .btn-ghost { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid transparent; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all .16s ease; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #163a2f; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); background: #fff; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 0 10px; height: 34px; }
.btn-quiet:hover { color: var(--clay); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.badge {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px;
  padding: 0 5px; border-radius: 999px;
  background: #fff; color: var(--accent); font-size: 11px; font-weight: 700;
  line-height: 1;
}
.badge[data-empty="true"] { display: none; }

.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px;
  border: 1px solid var(--line-2); border-radius: 8px; background: transparent;
  cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--ink); margin: 3.5px auto; }

/* ---------- role bar ---------- */
.role-bar {
  background: var(--accent-soft);
  border-bottom: 1px solid #dbe6df;
  font-size: 12.5px; color: #23503f;
}
.role-bar .wrap { display: flex; align-items: center; gap: 10px; padding: 8px 32px; }
.role-bar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.role-bar a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- generic sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 44px 0; }
.eyebrow {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.h1 { font-family: var(--serif); font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -0.025em; line-height: 1.06; font-weight: 600; }
.h2 { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.02em; font-weight: 600; }
.h3 { font-size: 17px; font-weight: 600; }
.lede { font-size: 16.5px; color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fbfaf7 0%, #f6f3ec 100%); }
/* 2026-11-05：右侧「价格示例」卡整体去掉，hero 改单栏。
   左栏排版顺延到右侧空出来的位置：标题放宽到 ~1040px（3 行→2 行），
   正文仍限 56ch 保证易读，按钮/脚注跟在正文下面。 */
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 0;
  padding: 64px 0 58px; align-items: start;
}
.hero-grid.solo { grid-template-columns: 1fr; }
.hero-grid.solo .hero-copy { max-width: 1040px; }
.hero-copy .lede { max-width: 60ch; }
/* 宽屏：标题放大一档（56→64px），左栏排版真正铺到右侧空出来的位置 */
@media (min-width: 1100px) {
  .hero-grid.solo .hero-copy .h1 { font-size: clamp(48px, 4.4vw, 64px); }
}
.hero-copy .lede { margin-top: 20px; }
.hero-cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { margin-top: 22px; font-size: 12.5px; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; }
.tick { width: 14px; height: 14px; flex: none; }

.hero-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-title { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.price-demo { display: grid; gap: 12px; }
.price-demo-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fcfbf8;
}
.price-demo-row.is-dist { border-color: #cfe0d5; background: var(--accent-soft); }
.price-demo-row .label { font-size: 13px; color: var(--ink-2); }
.price-demo-row .label b { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.price-demo-row .amount { font-family: var(--serif); font-size: 22px; letter-spacing: -0.02em; }
.price-demo-row.is-dist .amount { color: var(--accent); }
.price-demo-foot { margin-top: 16px; font-size: 12px; color: var(--muted); }
.strike { text-decoration: line-through; color: var(--muted); font-size: 13px; margin-right: 6px; }

/* ---------- trust strip ---------- */
.trust { border-bottom: 1px solid var(--line); background: #fff; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { padding: 26px 24px; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.trust-item span { font-size: 12.5px; color: var(--muted); }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 30px; }
.cat-tile {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: 20px; min-height: 132px; display: flex; flex-direction: column;
  justify-content: space-between; transition: all .18s ease;
}
.cat-tile:hover { border-color: var(--accent-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.cat-tile b { font-size: 14px; }
.cat-tile span { font-size: 12px; color: var(--muted); }
.cat-tile .cat-count {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
/* 注意：上面的 color 必须限定在 .cat-tile 里。以前是裸 .cat-count，会把分类大卡
   （.catcard-info 里白底上的计数）也染成深绿 → 深绿字压深绿渐变等于隐形。 */

/* ---------- product cards ---------- */
.grid-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.link-more { font-size: 13px; color: var(--accent); border-bottom: 1px solid #b9cfc3; padding-bottom: 1px; }
.link-more:hover { border-color: var(--accent); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--line-2); }
.card-media { position: relative; aspect-ratio: 1 / 1; background: var(--bg-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-tag {
  position: absolute; left: 12px; top: 12px;
  background: rgba(255,255,255,.92); border: 1px solid rgba(20,26,24,.07);
  padding: 4px 9px; border-radius: 999px; font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
}
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-sku { font-size: 11px; letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase; }
.card-moq { white-space: nowrap; }   /* 窄屏换行时整段“MOQ 1 pcs”一起换，不拆字 */
.card-name {
  font-size: 15px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; text-overflow: ellipsis;
  min-height: 2.7em;            /* 恒定两行位：短标题不留凹坑，同行卡价格块对齐 */
  overflow-wrap: anywhere;
}
.card-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 6px; }

.price { line-height: 1.2; }
.price .amount { font-family: var(--serif); font-size: 21px; letter-spacing: -0.02em; }
.price .unit { font-size: 11.5px; color: var(--muted); margin-left: 3px; }
.price .sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.price .sub .locked { color: var(--clay); }

.lock-pill {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px dashed var(--line-2); border-radius: 999px;
  padding: 4px 9px; font-size: 10.5px; color: var(--muted); background: #fcfbf8;
}
.lock-pill svg { width: 11px; height: 11px; }

/* ---------- pricing model band ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 34px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px;
}
.panel.accent { background: #f7faf8; border-color: #d8e5dc; }
.panel h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 4px; }
.panel .kicker { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.panel ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.panel li { display: flex; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.panel li svg { width: 15px; height: 15px; flex: none; margin-top: 3px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 36px; border-top: 1px solid var(--line); }
.step { padding: 26px 26px 26px 0; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step-no { font-family: var(--serif); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.step h4 { margin: 8px 0 6px; font-size: 15px; }
.step p { font-size: 13px; color: var(--muted); }

/* ---------- catalog layout ---------- */
.catalog-head { padding: 40px 0 0; }
.catalog-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: nowrap;
  padding: 16px 0 18px; border-bottom: 1px solid var(--line);
}
/* 分类条：单行横向滑动（2026-11-05）。原来 flex-wrap 换行，手机上 11 个分类
   铺成 5 行、吃掉近 300px，首屏看不到产品；改成一整行可左右滑，
   手指一划就换类，末端加渐隐暗示"后面还有"。 */
.chips {
  display: flex; gap: 8px; flex-wrap: nowrap; align-items: center;
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-behavior: smooth;
  padding: 2px 0;
}
.chips::-webkit-scrollbar { display: none; width: 0; height: 0; }
.chips.is-scroll {
  mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
}
[dir="rtl"] .chips.is-scroll {
  mask-image: linear-gradient(270deg, #000 calc(100% - 24px), transparent);
  -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 24px), transparent);
}
.chip {
  flex: 0 0 auto; white-space: nowrap;
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; font-size: 12.5px; cursor: pointer; color: var(--ink-2);
  transition: all .15s ease;
}
.chip:hover { border-color: var(--ink-2); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
/* 产品数量：小号浅色上标，不再用括号，分类名读起来更干净 */
.chip-n { margin-left: 5px; font-size: 10.5px; opacity: .55; font-variant-numeric: tabular-nums; }
.chip.on .chip-n { opacity: .8; }
.search {
  margin-left: 0; display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  border: 1px solid var(--line-2); border-radius: 999px; height: 36px; padding: 0 14px;
  background: #fff; min-width: 250px; max-width: 280px;
}
.search input { border: 0; outline: 0; font-size: 13px; width: 100%; background: transparent; }
.search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.select {
  height: 36px; border-radius: 999px; border: 1px solid var(--line-2);
  background: #fff; font-size: 12.5px; padding: 0 12px; color: var(--ink-2); cursor: pointer;
}
.catalog-meta { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-size: 12.5px; color: var(--muted); }
.catalog-grid { padding-bottom: 80px; }

/* ---------- product detail ---------- */
.crumbs { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 24px 0; }
.crumbs a:hover { color: var(--accent); }
.detail { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 50px; padding-bottom: 64px; }
.detail-media { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.detail-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.thumb-row { display: flex; gap: 10px; margin-top: 12px; }
.thumb { width: 68px; height: 68px; border-radius: 8px; border: 1px solid var(--line); overflow: hidden; background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info .card-sku { margin-bottom: 8px; }
.detail-info h1 { font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.025em; line-height: 1.15; }
.detail-desc { margin-top: 16px; font-size: 14.5px; color: var(--ink-2); }
.detail-facts { display: flex; gap: 10px; margin-top: 18px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); flex-wrap: wrap; align-items: baseline; }
.detail-facts .fact { display: inline; font-size: 13.5px; }
.detail-facts .fact b { display: inline; font-size: 14px; font-weight: 700; }
.detail-facts .fact-sep { color: var(--muted); }

.price-box { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; }
.price-row + .price-row { border-top: 1px solid var(--line); }
.price-row.retail { background: #fff; }
.price-row.wholesale { background: #f7faf8; }
.price-row .who { font-size: 13px; }
.price-row .who b { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.price-row .val { font-family: var(--serif); font-size: 24px; letter-spacing: -0.02em; white-space: nowrap; }
.price-row.wholesale .val { color: var(--accent); }
.price-row .val small { font-family: var(--sans); font-size: 11.5px; color: var(--muted); margin-left: 3px; }
.price-row .val.locked-val { color: var(--muted); font-size: 15px; font-family: var(--sans); }

.buy-row { display: flex; gap: 12px; margin-top: 20px; align-items: stretch; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; height: 44px; background: #fff; }
.qty button { width: 38px; height: 100%; border: 0; background: transparent; cursor: pointer; font-size: 16px; color: var(--ink-2); }
.qty button:hover { background: var(--bg-2); }
.qty input { width: 62px; height: 100%; border: 0; text-align: center; font-size: 14px; outline: 0; font-family: inherit; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row .btn { height: 44px; }
.pd-ask-row { margin-top: 10px; }
.pd-ask-row .btn { width: 100%; height: 44px; justify-content: center; }
.pd-ask-row .btn svg { width: 16px; height: 16px; flex: none; }
.hint { margin-top: 10px; font-size: 12px; color: var(--muted); }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
.spec-table th { width: 38%; color: var(--muted); font-weight: 400; }
.spec-block { margin-top: 34px; }

/* ---------- quote page ---------- */
.quote-layout { display: grid; grid-template-columns: 1.55fr 1fr; gap: 36px; padding: 12px 0 80px; align-items: start; }
.line {
  display: grid; grid-template-columns: 84px 1fr auto; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center;
}
.line-img { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line-name { font-size: 14px; font-weight: 600; }
.line-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.line-right { text-align: right; }
.line-total { font-family: var(--serif); font-size: 19px; }
.line-unit { font-size: 11.5px; color: var(--muted); }
.line-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; align-items: center; }
.mini-qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; height: 30px; background: #fff; }
.mini-qty button { width: 26px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 14px; }
.mini-qty input { width: 46px; border: 0; text-align: center; font-size: 12.5px; outline: 0; font-family: inherit; }
.remove { font-size: 11.5px; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.remove:hover { color: var(--clay); }

.summary { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.sum-row { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; color: var(--ink-2); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 15px; font-weight: 600; color: var(--ink); }
.sum-row.total .amount { font-family: var(--serif); font-size: 24px; }
.sum-note { font-size: 11.5px; color: var(--muted); margin-top: 12px; line-height: 1.55; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; height: 40px; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 0 12px; font-size: 13.5px; font-family: inherit; background: #fff; outline: 0;
  color: var(--ink);
}
.field textarea { height: 78px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(47,107,86,.09); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.empty { text-align: center; padding: 72px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: #fff; }
.empty h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }

.success { padding: 40px 32px; background: #f7faf8; border: 1px solid #d8e5dc; border-radius: var(--radius); }
.ref { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 12px; display: inline-block; margin-top: 8px; }
pre.quote-text {
  white-space: pre-wrap; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.65; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 16px; margin-top: 20px; max-height: 340px; overflow: auto; color: var(--ink-2);
}

/* ---------- program page ---------- */
.prose { max-width: 68ch; }
.prose p + p { margin-top: 14px; }
.prose h3 { margin-top: 34px; font-family: var(--serif); font-size: 21px; }
.table-basic { width: 100%; border-collapse: collapse; margin-top: 14px; }
.table-basic th, .table-basic td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.table-basic th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #eef1ed; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 46px 32px; flex-wrap: wrap; }
.cta-band h2 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); color: #fff; }
.cta-band p { color: #a9b3ad; font-size: 13.5px; margin-top: 6px; }
.cta-band .btn-primary { background: #fff; color: var(--ink); }
.cta-band .btn-primary:hover { background: #e9ece7; }

/* ---------- footer ---------- */
.site-foot { background: #f6f4ee; border-top: 1px solid var(--line); padding: 56px 0 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
/* grid 子项默认 min-width:auto，会被「CHUCI SANITARY WARE + 副标题」这行不换行的文字撑到
   308px，在 320px 视口（折叠屏外屏 / iPhone SE 一代）直接溢出。允许收缩后副标题自动换行。 */
.foot-col { min-width: 0; }
.foot-col h5 { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.foot-col a, .foot-col p { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 9px; }
.foot-col a:hover { color: var(--accent); }
/* 页脚分类列：10 个类目单列排会把页脚拉得很长（手机上尤其明显），改两列 */
#footCats { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
#footCats a { margin-bottom: 8px; }
.foot-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(18, 24, 22, 0.42);
  display: grid; place-items: center; padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 430px; background: #fff; border-radius: 18px;
  padding: 30px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.5); position: relative;
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-card h3 { font-family: var(--serif); font-size: 23px; margin-bottom: 6px; }
.modal-card p { font-size: 13px; color: var(--muted); }
.modal-close { position: absolute; right: 16px; top: 14px; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.field-error { color: var(--clay); font-size: 12px; margin-top: 8px; display: none; }
.field-error.show { display: block; }
.code-input {
  width: 100%; height: 46px; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 0 14px; font-size: 15px; letter-spacing: 0.14em; text-align: center;
  font-family: ui-monospace, Menlo, Consolas, monospace; outline: 0; margin-top: 16px; background: #fcfbf8;
}
.code-input:focus { border-color: var(--accent-2); background: #fff; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: var(--ink); color: #fff; font-size: 13px; padding: 11px 20px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 200;
  box-shadow: 0 14px 30px -14px rgba(0,0,0,.6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 52px 0 48px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(2) { border-right: 0; }
  .trust-item:nth-child(1), .trust-item:nth-child(2) { border-bottom: 1px solid var(--line); }
  .detail { grid-template-columns: 1fr; gap: 32px; }
  .quote-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* 头部窄屏布局：≤1000px 一律切成「第一行 logo + 汉堡，第二行操作区满宽」。
   为什么不是 760：桌面布局（logo 308 + 4 项导航 + 操作区 403 + 间距）实测要 ~965px
   才放得下，768/820 的平板、以及 961~999px 的窄窗口一直横向溢出到 965px（内容被切、
   能横向拖动），是最明显的接缝。取 1000 是为了把溢出区间整段盖住。 */
@media (max-width: 1000px) {
  /* 头部拆两行：第一行 logo + 汉堡，第二行操作区满宽右对齐（修复 ≤760px 横向溢出） */
  .head-inner {
    flex-wrap: wrap; height: auto; min-height: 74px;
    column-gap: 13px; row-gap: 4px;
    padding-top: 9px; padding-bottom: 9px;
  }
  /* 2026-11-05：导航不再折叠进汉堡抽屉，改成页头第三行的横排（左对齐、可横向滚动）。
     原因：手机端最常点的就是这 4 个入口，收进抽屉要多一次点击，且抽屉会盖住首屏文案。
     一行放不下时（英文/俄文更长）横向滚动，不折行、不外溢。 */
  .nav {
    position: static; order: 3; flex: 1 0 100%; width: 100%;
    flex-direction: row; gap: 18px; margin: 0; padding: 2px 0 0;
    background: transparent; border: 0; border-top: 1px solid var(--line);
    box-shadow: none; display: flex;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  /* 内容比一行宽时才加「末端」渐隐（.is-scroll 由 fitNav() 打）：中文 4 项放得下就不加；
     LTR 淡出右边、RTL 淡出左边，起点一侧保持清晰，免得首个入口看起来像没渲染好。 */
  .nav.is-scroll {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 14px), transparent 100%);
  }
  [dir="rtl"] .nav.is-scroll {
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(to left, #000 calc(100% - 14px), transparent 100%);
  }
  .nav a { padding: 7px 0 6px; border-bottom: 0; font-size: 13px; }
  .nav a.active { border-bottom: 1.5px solid var(--accent); }
  [dir="rtl"] .nav a { margin-left: 0; margin-right: 0; }
  /* 导航常驻后汉堡没有意义，直接收掉，省出右上角空间给 logo */
  .nav-toggle { display: none; }
  /* 品牌块原本 flex-shrink:0、宽度被副标题撑到 308px，在 360px 机型上直接压到汉堡按钮上
     （实测重叠 32px）。这里允许收缩，副标题单行省略，主名保持完整。 */
  .logo { flex-shrink: 1; min-width: 0; max-width: 100%; }
  .logo-text { min-width: 0; }
  .logo-text strong, .logo-text em {
    min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .head-actions {
    width: 100%; margin-left: 0; justify-content: flex-end;
    gap: 8px; flex-wrap: nowrap; min-width: 0;
  }
  [dir="rtl"] .head-actions { justify-content: flex-start; }
  .head-actions .select { max-width: 96px; min-width: 0; font-size: 12px; padding: 0 8px; }
  .head-actions .btn-ghost { display: none; }
}

/* 极窄屏（≤560px）：副标题「Ceramic Sanitaryware · Chaozhou, China」既放不下也不该被
   截成「CHAOZHO…」——那个省略号比不显示更糙。直接隐藏，只留品牌主名；
   产地信息在首页文案 / 关于页 / 页脚都还有，不靠这一行承担。 */
@media (max-width: 560px) {
  .logo-text em { display: none; }
}
@media (max-width: 380px) {
  .logo-text strong { font-size: 13px; letter-spacing: 0.03em; }
}

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  /* 详情页「同类更多产品」：桌面 8 个全展示，手机端只留前 4 个（DOM 仍渲染 8 个，不额外请求） */
  .rel-grid > .card:nth-child(n+5) { display: none; }
  .announce-inner { padding: 8px 20px; font-size: 11.5px; }
  .announce-right { display: none; }
  .section { padding: 48px 0; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid, .product-grid.cols-4 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 0; }
  .field-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .catalog-bar { gap: 10px; }
  .search { margin-left: 0; width: 100%; min-width: 0; }
  .line { grid-template-columns: 64px 1fr; }
  .line-img { width: 64px; height: 64px; }
  .line-right { grid-column: 1 / -1; text-align: left; display: flex; align-items: center; justify-content: space-between; }
  .line-actions { margin-top: 0; }
  .price-demo-row .amount { font-size: 19px; }
  .hero-panel { padding: 20px; }
}

/* ==========================================================================
   v2 — three-tier pricing, currency switcher, category imagery
   ========================================================================== */

/* header currency select */
.cur-sel { min-width: 92px; text-align: center; }

/* home category cards */
.cat-cards {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 30px;
}
.catcard {
  grid-column: span 2; position: relative; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2);
  border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease;
}
/* 2026-11-01 老板定：9 个分类统一 3×3 等大，不再有「前两张做大卡」（原 .catcard.wide 已移除） */
.catcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.catcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.catcard:hover img { transform: scale(1.04); }
/* 分类图缺失兜底：img 404 时 onerror 给父元素加 .noimg，用深色渐变顶替，
   避免破图图标和一片空白。图片放回 assets/img/cat-<key>.jpg 后自动恢复。 */
.catcard.noimg { background: linear-gradient(135deg, #2f6b56 0%, #1d4a3c 100%); }
.catcard.noimg:nth-child(3n + 2) { background: linear-gradient(135deg, #6b7f76 0%, #36443f 100%); }
.catcard.noimg:nth-child(3n + 3) { background: linear-gradient(135deg, #a9522f 0%, #6d3419 100%); }
/* 无图时遮罩要比有图时更早变深，否则压在渐变上的白色小字（SKU 计数）看不清 */
.catcard.noimg .catcard-info { background: linear-gradient(180deg, rgba(16,22,20,0) 0%, rgba(16,22,20,.82) 58%); }
.catcard.noimg .cat-count { opacity: .92; }
.cat-banner.noimg { background: linear-gradient(135deg, #2f6b56 0%, #16241f 100%); }
.catcard-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  /* 右边留 52px 给右下角的箭头按钮（30px + 右侧 14px + 余量），
     否则长分类名会压到箭头上（葡语「Chuveiros e torneiras」实测会叠在一起） */
  padding: 46px 60px 16px 18px; color: #fff;
  /* 2026-11-04：分类图改成「白底卡片+产品」后，底部是亮区，
     原来的 .72 遮罩在卡片下沿只剩很淡一层，白字快看不见 → 加深并加文字投影 */
  background: linear-gradient(180deg, rgba(16,22,20,0) 0%, rgba(16,22,20,.55) 42%, rgba(16,22,20,.92) 100%);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 2px;
}
.catcard-info b { font-size: 16.5px; letter-spacing: -0.01em; }
.catcard-info > span:not(.cat-count):not(.catcard-go) { font-size: 12px; opacity: .82; }
.cat-count { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.catcard-go {
  position: absolute; right: 14px; bottom: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.16); backdrop-filter: blur(4px);
  display: grid; place-items: center;
}
.catcard-go svg { width: 14px; height: 14px; }

/* category banner on catalog page */
/* 2026-11-04：分类图是「米色底 + 白卡片 + 产品」的成品图，
   满幅 cover 会把产品放大裁掉一半；压暗当背景又灰蒙蒙。
   改成杂志式：左边深绿面板放标题，右边把成品图当"相框图"整张贴上（不裁切）。 */
.cat-banner {
  position: relative; height: 220px; overflow: hidden;
  background: linear-gradient(100deg, #1b2723 0%, #26352f 55%, #35443d 100%);
}
.cat-banner img {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  height: 168px; width: auto;
  border-radius: 14px; box-shadow: 0 14px 34px rgba(0,0,0,.38);
}
[dir="rtl"] .cat-banner img { right: auto; left: 36px; }
.cat-banner-info {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 420px 26px 32px; color: #fff;
  background: linear-gradient(90deg, rgba(10,16,14,.42) 0%, rgba(10,16,14,.18) 46%, rgba(10,16,14,0) 72%);
}
.cat-banner-info h1 { font-family: var(--serif); font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; }
.cat-banner-info p { font-size: 13px; opacity: .85; }
.cat-banner-info .eyebrow { color: #dfe8e2 !important; }
/* 中等屏：图小一号，正文少留白 */
@media (max-width: 1000px) {
  .cat-banner img { height: 140px; right: 22px; }
  [dir="rtl"] .cat-banner img { left: 22px; right: auto; }
  .cat-banner-info { padding: 0 300px 22px 24px; }
}
/* 手机：相框图会压到标题上，直接不显示（分类图在首页卡片和列表里都有） */
@media (max-width: 760px) {
  .cat-banner { height: auto; min-height: 148px; }
  .cat-banner img { display: none; }
  .cat-banner-info { position: static; padding: 22px 18px 20px; background: none; }
}

/* three-tier price rows */
.tiers3 { grid-template-columns: repeat(3, 1fr); }
.tier-mult {
  display: inline-block; margin: 8px 0 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600;
  letter-spacing: .02em;
}
.price-row.tier-core { background: #faf7ef; }
.price-row .val .val-ref { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted); margin-top: 2px; }
.locked-amt { color: var(--line-2); display: inline-flex; }
.locked-amt svg { width: 18px; height: 18px; }
.price-demo-row[data-tier="core"] { border-style: dashed; }
.price-demo-row[data-tier="distributor"] { border-color: #cfe0d5; background: var(--accent-soft); }

.linklike {
  background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer;
  font-size: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.linklike:hover { color: var(--accent-2); }

@media (max-width: 1080px) {
  /* 9 个分类正好 3×3：保持 6 列网格，不要降成 4 列（降了每行只剩 2 个，最后一行落单） */
  .cat-cards { grid-template-columns: repeat(6, 1fr); }
  .catcard { grid-column: span 2; aspect-ratio: 4 / 3; }
  .tiers3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .catcard { grid-column: span 1; }
  .cur-sel { min-width: 74px; }
  .cat-banner { height: 170px; }
  .cat-banner-info { padding: 0 20px 18px; }
}

/* ==========================================================================
   v3 — one-to-one price ratio, chat CTA, sales console
   ========================================================================== */

/* price card (product page + hero panel) */
.price-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
  padding: 20px 22px; margin-top: 24px;
}
.hero-panel .price-card { margin-top: 0; padding: 4px 0 0; border: 0; background: transparent; }
.price-card-head { display: flex; align-items: center; gap: 10px; }
.pc-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
}
.pc-amt {
  font-family: var(--serif); font-size: 40px; letter-spacing: -0.03em; line-height: 1.1;
  margin-top: 8px; color: var(--ink);
}
.pc-amt small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.pc-ref { display: block; font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: 0; }
.pc-sub { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.pc-sub .strike { margin-right: 6px; }
.pc-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.ratio-chip {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
}
.ratio-chip.ghost { background: #f2f1ec; color: var(--muted); font-weight: 500; }
.save-pill {
  margin-left: auto; font-size: 11px; color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: 3px 9px; letter-spacing: .02em;
}

/* ratio scale */
.ratio-scale { margin: 18px 0 4px; }
.rs-track {
  position: relative; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, #d9e5dd 0%, #e8e3d7 100%);
}
.rs-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  transition: width .18s ease;
}
.rs-dot {
  position: absolute; top: 50%; width: 14px; height: 14px; margin-left: -7px;
  transform: translateY(-50%); border-radius: 50%; background: #fff;
  border: 2.5px solid var(--accent); box-shadow: 0 2px 6px rgba(20,26,24,.18);
  transition: left .18s ease;
}
.rs-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--muted); }

/* personalized role bar */
.role-bar.personal { background: #f7f3e8; border-bottom-color: #e6ddc6; color: #6a5528; }
.role-bar.personal .dot { background: #b08a4a; }

/* price button when personalized */
#priceBtn.is-personal { border-color: #cbb98d; background: #fbf7ec; color: #6a5528; }

/* modal note */
.modal-note {
  margin-top: 16px; padding: 12px 14px; border-radius: 10px;
  background: var(--accent-soft); font-size: 12.5px; color: #23503f; line-height: 1.6;
}

/* sales console */
.console-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 22px; margin-top: 26px; align-items: start; }
.console .panel { padding: 24px; }
.ratio-editor { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.ratio-editor input[type="range"] {
  flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, var(--accent) 0%, #dcd6c6 100%);
  border-radius: 999px; outline: none;
}
.ratio-editor input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--accent); cursor: grab;
  box-shadow: 0 2px 8px rgba(20,26,24,.2);
}
.ratio-editor input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 2.5px solid var(--accent); cursor: grab;
}
.ratio-value { display: flex; align-items: center; gap: 4px; }
.ratio-value input {
  width: 68px; height: 40px; border: 1px solid var(--line-2); border-radius: 9px;
  text-align: center; font-size: 16px; font-family: inherit; font-weight: 600; outline: 0;
}
.ratio-value span { font-size: 14px; color: var(--muted); }
.ratio-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.ratio-presets .chip { height: 30px; padding: 0 11px; font-size: 12px; }
.console-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.issued { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.issued-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; }
.code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: .12em;
  background: var(--ink); color: #fff; padding: 4px 10px; border-radius: 7px;
}
.link-box {
  width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: 9px;
  padding: 0 10px; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--ink-2); background: #fcfbf8; outline: 0;
}
.preview-table { font-size: 12.5px; }
.preview-table th, .preview-table td { padding: 9px 8px; }
.preview-table td:nth-child(3), .preview-table td:nth-child(4),
.preview-table td:nth-child(5), .preview-table td:nth-child(6) { text-align: right; white-space: nowrap; }
.preview-table th:nth-child(3), .preview-table th:nth-child(4),
.preview-table th:nth-child(5), .preview-table th:nth-child(6) { text-align: right; }

@media (max-width: 1080px) {
  .console-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pc-amt { font-size: 32px; }
  .console .panel { padding: 18px; }
  .preview-table { display: block; overflow-x: auto; }
}

/* ---------- RTL（阿拉伯语）基础适配 ---------- */
html[dir="rtl"] { direction: rtl; }
html[dir="rtl"] .hero-copy, html[dir="rtl"] .lede, html[dir="rtl"] p, html[dir="rtl"] li { text-align: right; }
html[dir="rtl"] .catcard-info { text-align: right; }
html[dir="rtl"] .card-sku, html[dir="rtl"] .card-name { text-align: right; }
html[dir="rtl"] .crumbs { direction: rtl; }
html[dir="rtl"] .steps { direction: rtl; }
html[dir="rtl"] .trust-grid, html[dir="rtl"] .grid-head { direction: rtl; }
html[dir="rtl"] .nav a { margin-left: 22px; margin-right: 0; }

/* ==========================================================================
   v7 — SKU chips, gallery thumbs, expired-link banner
   ========================================================================== */
.gal-thumbs {
  display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap;
}
.gal-thumb {
  width: 62px; height: 62px; object-fit: cover; border-radius: 8px;
  border: 2px solid var(--line); cursor: pointer; opacity: .75; transition: opacity .15s ease;
}
.gal-thumb.on, .gal-thumb:hover { opacity: 1; border-color: var(--ink); }

/* SKU 每个占一整行 */
.sku-chips { display: flex; flex-direction: column; gap: 10px; }
.sku-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; text-align: left; transition: border-color .15s ease, box-shadow .15s ease;
}
.sku-chip img { width: 42px; height: 42px; object-fit: cover; border-radius: 7px; background: var(--bg-2); }
.sku-chip span { display: flex; flex-direction: column; gap: 1px; }
.sku-chip b { font-size: 13px; font-weight: 600; }
.sku-chip i { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.sku-chip.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
/* SKU 列表价格下方的包装数据行（纯数字/单位，强制 LTR 防止阿语 RTL 下乱序） */
.sku-chip em.sku-pack { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .01em; direction: ltr; unicode-bidi: isolate; display: inline-block; }
/* MOQ/SKU 单行信息：阿语下保持数字块顺序 */
.detail-facts .fact { unicode-bidi: isolate; }

.role-bar.expired { background: #f6efe3; border-bottom: 1px solid #e5d5b8; }
.role-bar.expired .dot { background: #b98a2f; }
.role-bar.expired a { color: #8a6a1f; font-weight: 600; }

.detail-facts { display: flex; gap: 26px; }

/* ==========================================================================
   v8 — 产品详情页：桌面左图右信息 / 手机上图下信息
   ========================================================================== */
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.pd-media { position: sticky; top: 76px; }
.pd-media > img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
}
/* 视频：不强制正方形，保持原始比例居中播放 */
.pd-media > video {
  display: block; width: 100%; max-height: 80vh; margin: 0 auto;
  aspect-ratio: auto; object-fit: contain;
  border-radius: 14px; background: #000; border: 1px solid var(--line);
}

/* 视频小图（主图小图第一位）：首图做底 + 播放按钮 */
.gal-thumb.gal-video {
  position: relative; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
}
.gal-thumb.gal-video::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); border-radius: 6px; }
.gal-play {
  position: relative; z-index: 1; color: #fff; font-size: 16px; line-height: 1;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); border-radius: 50%; padding-left: 3px;
}
.pd-info h1 { margin: 8px 0 6px; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; }
.pd-cat a {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.pd-cat a:hover { color: var(--ink); }

.pd-price { margin: 18px 0 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pd-price-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-price-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.pd-best {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: #8a5a25; text-decoration: none;
  background: #faf3e7; border: 1px solid #ecdcc0; border-radius: 999px; padding: 4px 12px;
}
.pd-best:hover { background: #f5ead4; }
.pd-price-amt { font-size: 27px; font-weight: 700; letter-spacing: -.01em; margin-top: 6px; }
.pd-price-amt small { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 6px; }
.pd-dash { margin: 0 6px; color: var(--ink-2); font-weight: 500; }

.pd-video { margin-top: 18px; }

.pd-details { max-width: 900px; margin: 40px auto 0; }
.pd-details img { width: 100%; display: block; margin: 0; border: 0; border-radius: 0; }
.pd-details img:first-of-type { margin-top: 14px; }
.pd-details-text p { margin-top: 12px; color: var(--ink-2); }

@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; gap: 22px; }
  .pd-media { position: static; }
  .pd-price-amt { font-size: 23px; }
}

/* ---------- 在线客服：网页内实时聊天 ---------- */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; }
.fab-btn {
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.22); position: relative;
  transition: transform .15s ease, background .15s ease;
}
.fab-btn:hover { transform: translateY(-2px); }
.fab-btn.on { background: var(--ink); }
.fab-btn svg { width: 26px; height: 26px; }
/* 在线聊天按钮正下方的 WhatsApp 直达钮：官方绿 + 白色字形，
   与聊天钮同宽对齐（列布局 align-items 已由 .chat-fab 控制） */
.fab-wa {
  width: 58px; height: 58px; margin-top: 10px; border-radius: 50%; cursor: pointer;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
  transition: transform .15s ease, background .15s ease;
}
.fab-wa:hover { transform: translateY(-2px); background: #1fbe59; }
.fab-wa svg { width: 30px; height: 30px; }
.fab-dot {
  position: absolute; top: 4px; right: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: #e5484d; border: 2px solid #fff;
}
body.chat-open .fab-dot { display: none; }

/* 分类 / 购物车悬浮钮（2026-11-05，参照京东右侧悬浮列）：
   白底 + 浅描边 + 轻投影的圆钮，图标为深色线性 26px —— 与聊天钮 26/58 同一比例；
   悬浮列顺序：在线沟通（最上）→ 分类 → 购物车 → WhatsApp，间距靠 margin-top 10px。 */
.fab-mini {
  width: 58px; height: 58px; padding: 0; margin-top: 10px;
  border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  display: grid; place-items: center; position: relative; cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 26, 24, .16);
  transition: transform .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.fab-mini:hover { transform: translateY(-2px); border-color: var(--ink); }
.fab-mini:active { transform: scale(.96); }
.fab-mini svg { width: 26px; height: 26px; }
.fab-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; border: 2px solid #fff;
  font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}
/* 0 件时角标转灰：数字还在（一眼看到"购物车有几件"），但不抢视线 */
.fab-count[data-empty="true"] { background: #a8b0ac; }
[dir="rtl"] .fab-count { right: auto; left: -4px; }
/* 购物车左上角的小 "+"：提示客户"这是加购/询价车"。带 data-act="fabCart"，
   整个圆点（含悬出按钮外的部分）都能点，行为与购物车钮一致 = 打开询价车；
   数量角标在右上角、二者错开不重叠。 */
.fab-plus {
  position: absolute; top: -3px; left: -3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); color: #fff; border: 2px solid #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; line-height: 1;
  cursor: pointer;
}
/* RTL 时数量角标镜像到左上，"+" 也跟着镜像到右上，保持错开 */
[dir="rtl"] .fab-plus { left: auto; right: -3px; }

/* 分类小卡片：挂在悬浮列正上方（与聊天面板同一挂点），点分类图标弹出、
   点外面 / Esc / 换页自动收起；选中项高亮，右侧是产品数。 */
.cat-pop {
  width: 240px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px -10px rgba(20, 26, 24, .30);
  overflow: hidden; animation: chatIn .16s ease-out;
}
.cat-pop[hidden] { display: none; }
.cat-pop-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--accent); color: #fff; flex: 0 0 auto;
}
.cat-pop-h b { font-size: 13px; font-weight: 600; }
.cat-pop-x {
  border: 0; background: transparent; color: #fff; font-size: 18px; line-height: 1;
  cursor: pointer; padding: 0 2px;
}
.cat-pop-list { max-height: min(400px, calc(100vh - 400px)); overflow-y: auto; padding: 6px; }
.cat-pop-it {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
  font-size: 13px; color: var(--ink); text-align: left; font-family: inherit;
}
.cat-pop-it:hover { background: #f2f0ea; }
.cat-pop-it.on { background: #e6eee8; color: var(--accent); font-weight: 600; }
.cat-pop-it i { font-style: normal; font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }
.cat-pop-it.on i { color: var(--accent); }
[dir="rtl"] .cat-pop-it { text-align: right; }

/* ---------- 手机端主图轮播（2026-11-05） ----------
   主图 + 全部主图变左右滑动（scroll-snap），缩略图条整个不再输出；
   左右浅色半透明圆钮只做引导（到头自动消失），底部小圆点报位置。 */
.pd-media.gal-car { position: relative; }
.gal-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: center; min-width: 0; }
.gal-slide img, .gal-slide video {
  display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2);
}
.gal-slide video { aspect-ratio: auto; max-height: 80vh; object-fit: contain; }
/* 浅色半透明引导箭头：浮在图上，白底 55% + 深色细箭头；到头/到尾自动隐藏 */
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 34px; border: 0; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  color: rgba(28, 34, 30, .72); display: grid; place-items: center; cursor: pointer;
  transition: opacity .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.gal-nav:hover { background: rgba(255, 255, 255, .8); }
.gal-nav svg { width: 18px; height: 18px; }
.gal-nav[disabled] { opacity: 0; pointer-events: none; }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
[dir="rtl"] .gal-prev { left: auto; right: 10px; }
[dir="rtl"] .gal-next { right: auto; left: 10px; }
/* 底部小圆点：当前张拉长成小胶囊（京东同款） */
.gal-dots {
  position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2;
  display: flex; justify-content: center; gap: 5px; pointer-events: none;
}
.gal-dots i {
  width: 6px; height: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .65); box-shadow: 0 0 3px rgba(0, 0, 0, .28);
  transition: width .15s ease, background .15s ease;
}
.gal-dots i.on { width: 16px; background: #fff; }

/* 上下箭头：上箭头贴顶（导航栏下方居中），下箭头贴底居中，两者分开不挨着 */
.scrollnav {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 900;
  pointer-events: none;   /* 隐藏时不挡下方内容点击 */
}
.scrollnav.sc-top { top: 88px; }
.scrollnav.sc-bottom { bottom: 24px; }
.totop {
  position: relative;
  width: 28px; height: 28px; border-radius: 50%; padding: 0; border: 0;
  background: rgba(251, 250, 247, .86);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 26, 24, .10);
  opacity: 0; pointer-events: none; transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.totop::after {          /* 透明热区：视觉仍是 28px，实际可点 44px */
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
}
.totop.on { opacity: 1; pointer-events: auto; transform: none; }
.totop:hover { background: var(--surface); box-shadow: 0 3px 10px rgba(20, 26, 24, .16); }
.totop:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.totop svg { width: 13px; height: 13px; }
@media (prefers-reduced-motion: reduce) { .totop { transition: none; } }

/* 停留提示气泡（在圆球上方，不自动开面板） */
.chat-nudge {
  position: relative; margin-bottom: 10px;
  max-width: min(258px, calc(100vw - 36px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 34px -10px rgba(20, 26, 24, .28);
  animation: nudgeIn .22s ease-out;
}
.chat-nudge[hidden] { display: none; }
@keyframes nudgeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-nudge-t {
  display: block; width: 100%; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; line-height: 1.5; color: var(--ink-2);
  text-align: start; padding-block: 12px; padding-inline: 14px 44px;
  border-radius: 14px;
}
.chat-nudge-t:hover { color: var(--ink); }
.chat-nudge-x {
  position: absolute; top: 0; inset-inline-end: 0;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1; border-start-end-radius: 14px;
}
.chat-nudge-x:hover { color: var(--ink); background: var(--bg-2); border-radius: 12px; }

.chat-panel {
  width: 352px; height: min(560px, calc(100vh - 130px)); margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 26px 60px -14px rgba(20, 26, 24, .34);
  display: flex; flex-direction: column; overflow: hidden;
  animation: chatIn .18s ease-out;
}
.chat-panel[hidden] { display: none; }   /* display:flex 会盖过 hidden 属性 */
@keyframes chatIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--accent); color: #fff; flex: 0 0 auto; }
.chat-ava { width: 36px; height: 36px; border-radius: 50%; background: #fff; object-fit: contain; padding: 3px; flex: 0 0 36px; }
.chat-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.chat-id b { font-size: 14px; font-weight: 600; }
.chat-id i { font-style: normal; font-size: 11px; opacity: .88; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.chat-id i .chat-live { width: 7px; height: 7px; border-radius: 50%; background: #94a3a0; flex: 0 0 7px; }
.chat-id i.on .chat-live { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .22); }
.chat-x {
  border: none; background: rgba(255,255,255,.14); color: #fff; width: 28px; height: 28px;
  border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; flex: 0 0 28px;
}
.chat-x:hover { background: rgba(255,255,255,.28); }

.chat-body {
  flex: 1 1 auto; overflow-y: auto; padding: 13px 13px 8px; background: var(--bg);
  display: flex; flex-direction: column; gap: 9px; overscroll-behavior: contain;
}
.chat-welcome { display: flex; flex-direction: column; gap: 9px; }
.chat-welcome[hidden] { display: none; }
.chat-msgs { display: flex; flex-direction: column; gap: 9px; }
.chat-line { display: flex; flex-direction: column; max-width: 88%; }
.chat-line.me { align-self: flex-end; align-items: flex-end; }
.chat-who { font-size: 10.5px; color: var(--muted); margin: 0 0 3px 4px; }
.chat-bub {
  padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5;
  word-break: break-word; overflow-wrap: anywhere; max-width: 100%;
}
.chat-bub.them { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; color: var(--ink-2); }
.chat-bub.me { background: var(--accent); color: #fff; border-bottom-right-radius: 5px; }
.chat-time { font-size: 10px; color: var(--muted); margin-top: 3px; }
.chat-line.fail .chat-bub { opacity: .6; box-shadow: inset 0 0 0 1px #d94a3d; }
.chat-line.fail .chat-time { color: #c0392b; }

.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-chip {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--accent);
  border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.chat-chip:hover { background: var(--accent-soft); border-color: var(--accent); }

.chat-dead { font-size: 11.5px; color: #8a3b2c; background: #fbf0ea; border: 1px solid #f0d8cd; border-radius: 9px; padding: 7px 9px; }
.chat-dead[hidden] { display: none; }

.chat-qr { background: var(--surface); border: 1px dashed var(--line-2); border-radius: 12px; padding: 12px; text-align: center; }
.chat-qr[hidden] { display: none; }
.chat-qrbox img, .chat-qrbox canvas { margin: 0 auto; display: block; }
.chat-qr p { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }

.chat-compose { display: flex; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--line); background: #fff; align-items: flex-end; flex: 0 0 auto; }
.chat-compose textarea {
  flex: 1; resize: none; border: 1px solid var(--line-2); border-radius: 12px;
  padding: 9px 11px; font-size: 13.5px; font-family: inherit; line-height: 1.45;
  max-height: 140px; outline: none; background: #fff; color: var(--ink);
}
.chat-compose textarea:focus { border-color: var(--accent); }
.chat-send {
  width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--accent);
  color: #fff; cursor: pointer; display: grid; place-items: center; flex: 0 0 38px;
  transition: background .12s ease;
}
.chat-send:hover { background: var(--accent-2); }
.chat-send svg { width: 17px; height: 17px; }

.chat-chans { display: flex; gap: 6px; padding: 0 12px 10px; background: #fff; flex: 0 0 auto; }
.chat-chan-a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 4px; border: 1px solid var(--line); border-radius: 9px; font-size: 11px;
  color: var(--ink-2); background: #fff; cursor: pointer; text-decoration: none;
}
.chat-chan-a:hover { background: var(--bg-2); }
.ca-ico {
  width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center;
  font-size: 10px; color: #fff; flex: 0 0 16px; font-weight: 700;
}
.ca-ico svg { width: 11px; height: 11px; }
.ca-wa { background: #25d366; }
.ca-wx { background: #07c160; }
.ca-mail { background: #64748b; font-family: var(--serif); }

[dir="rtl"] .chat-fab { right: auto; left: 22px; align-items: flex-start; }
[dir="rtl"] .chat-bub.them { border-bottom-left-radius: 14px; border-bottom-right-radius: 5px; }
[dir="rtl"] .chat-bub.me { border-bottom-right-radius: 14px; border-bottom-left-radius: 5px; }
[dir="rtl"] .chat-who { margin: 0 4px 3px 0; }
[dir="rtl"] .chat-line.me { align-self: flex-start; align-items: flex-start; }

@media (max-width: 640px) {
  /* 手机端左右留白向京东看齐（2026-11-05）：整页 20px → 12px，
     产品网格再外扩 4px 做成 8px 边距 + 8px 间距，接近京东那种「几乎贴边」的密度，
     一屏能看到更多内容，正文也不会贴到屏幕上（12px 仍是可读的呼吸量） */
  .wrap { padding: 0 12px; }
  .announce-inner { padding: 8px 12px; }
  .cat-banner-info { padding: 0 12px 18px; }

  /* 页头压缩（2026-11-05）：品牌块改竖排 —— logo 在上、公司名在下，右侧腾出宽度，
     语言 / 币种 / 询价三个控件并到同一行，页头从 125px 收到 ~85px，首屏多出 40px 给内容 */
  /* .head-inner 本身就是 .wrap（同一个元素），所以水平内边距要在这里写回来，不能只写上下 */
  .head-inner { padding: 7px 12px; column-gap: 8px; row-gap: 3px; min-height: 0; }
  .logo { flex-direction: column; align-items: flex-start; gap: 3px; max-width: 46%; }
  .logo-mark { width: 26px; height: 26px; border-radius: 7px; }
  .logo-text strong { font-size: 10px; letter-spacing: .03em; line-height: 1.1; }
  .logo-text em { display: none; }
  .head-actions { width: auto; margin-left: auto; gap: 5px; }
  .head-actions .select {
    max-width: 66px; height: 30px; font-size: 11px; padding: 0 4px; border-radius: 8px;
  }
  .head-actions .btn-sm { height: 30px; padding: 0 10px; font-size: 11px; }
  .head-actions .badge { min-width: 16px; height: 16px; font-size: 10px; }
  .nav { padding-top: 1px; }
  .nav a { padding: 6px 0 5px; font-size: 12.5px; }

  /* 页头恒定 55px 吸顶（2026-11-05 三改）：
     导航行由 app.js 的 layoutNav() 挪到 </header> 后面的 #navBar，随页面滚走。
     页头高度滚动前后一致 → 页面不再上下跳；品牌和语言/币种/询价始终在顶上。 */
  .head-inner .nav { display: none; }          /* 挪走之前先不显示，避免闪一下 */
  #navBar { display: block; background: var(--bg); border-bottom: 1px solid var(--line); }
  #navBar .wrap { padding: 0 12px; overflow: hidden; }
  #navBar .nav { width: 100%; border-top: 0; padding: 0; }
  /* 上箭头避开 55px 的吸顶页头 */
  .scrollnav.sc-top { top: 66px; }

  /* 目录页：分类条独占一行横向滑动，搜索 + 排序并到下一行同一行（原来各占一行） */
  .catalog-bar { flex-wrap: wrap; gap: 8px; padding: 12px 0 14px; }
  .chips { flex: 1 0 100%; order: -1; gap: 6px; }
  .chip { height: 31px; padding: 0 12px; font-size: 12px; }
  .catalog-bar .search { flex: 1 1 0; min-width: 0; max-width: none; height: 34px; order: 1; }
  .catalog-bar > .select { flex: 0 0 auto; height: 34px; order: 2; }

  /* 手机端产品网格一行两个（2026-11-05）：目录页 + 首页「本季热卖」都用 .grid-2up。
     原来 1 个占满屏，一眼只能看一件；外扩 4px + 8px 间距，接近京东的密度 */
  .product-grid.grid-2up { grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 -4px; }
  .grid-2up .card-body { padding: 10px 10px 12px; gap: 6px; }
  .grid-2up .card-sku { font-size: 9.5px; letter-spacing: .02em; }
  .grid-2up .card-name { font-size: 12.5px; line-height: 1.4; min-height: 2.8em; }
  .grid-2up .card-tag { left: 8px; top: 8px; padding: 3px 7px; font-size: 9.5px; }
  .grid-2up .card-foot { gap: 6px; }
  /* 价格整段不折行（原来 "¥945.00 /" 和 "件" 会被拆成两行），字号略收；
     "查看详情" 在 2 列窄卡里没必要（整张卡就是链接），隐藏后价格有足够宽度 */
  .grid-2up .price { white-space: nowrap; }
  .grid-2up .price .amount { font-size: 17px; }
  .grid-2up .price .unit { font-size: 10.5px; margin-left: 2px; }
  .grid-2up .price .sub { font-size: 10.5px; }
  .grid-2up .card-foot > .small { display: none; }

  .chat-fab { right: 14px; bottom: 14px; }
  .fab-btn, .fab-wa, .fab-mini { width: 52px; height: 52px; }
  .fab-mini svg { width: 24px; height: 24px; }
  .fab-wa svg { width: 27px; height: 27px; }
  .totop { width: 26px; height: 26px; }
  .totop svg { width: 12px; height: 12px; }
  .scrollnav.sc-bottom { bottom: calc(16px + env(safe-area-inset-bottom)); }
  body.chat-open .scrollnav { display: none; }
  .chat-panel {
    position: fixed; left: 0; right: 0; top: 0; bottom: 0; width: auto;
    height: 100%; height: 100dvh; max-height: none; margin: 0;
    border-radius: 0; border: none;
    animation: chatUp .2s ease-out;
  }
  @keyframes chatUp { from { transform: translateY(3%); opacity: .6; } to { transform: none; opacity: 1; } }
  .chat-head { padding: 14px 14px 12px; padding-top: max(14px, env(safe-area-inset-top)); }
  .chat-compose { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .chat-compose textarea { font-size: 16px; }   /* 16px 以上 iOS 不会自动放大 */
  body.chat-open { overflow: hidden; }
  body.chat-open .fab-btn { display: none; }
  /* 手机端聊天面板是全屏，WhatsApp 钮不收起来会压住输入框 */
  body.chat-open .fab-wa { display: none; }
  /* 同上：全屏面板下分类/购物车也收起来，避免压在输入框和发送键上 */
  body.chat-open .fab-mini { display: none; }
  body.chat-open .cat-pop { display: none; }
  /* 手机上分类卡片撑满一行更清爽 */
  .cat-pop { width: calc(100vw - 28px); }
  [dir="rtl"] .chat-fab { left: 14px; right: auto; }
}

/* ---- 包装重量&尺寸表 ---- */
.pd-packing { margin: 34px 0 8px; }
.pack-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pack-table th, .pack-table td { border: 1px solid #e3ded6; padding: 9px 12px; text-align: left; white-space: nowrap; }
.pack-table th { background: #f4f1ec; font-weight: 600; }
.pack-table tbody tr:nth-child(even) { background: #faf8f5; }

/* 产品卡悬停：Chat for your price 扫光引导 */
@keyframes chatShimmer { 0% { background-position: -140% 0; } 100% { background-position: 240% 0; } }
.card .linklike[data-act="chat"] { position: relative; }
.card:hover .linklike[data-act="chat"], .card:focus-within .linklike[data-act="chat"] {
  background: linear-gradient(100deg, currentColor 38%, #6ee7b7 50%, currentColor 62%) 0 0 / 240% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: chatShimmer 1.6s linear infinite;
  text-decoration-color: #6ee7b7;
}
@media (prefers-reduced-motion: reduce) {
  .card:hover .linklike[data-act="chat"] { animation: none; }
}

/* ==========================================================================
   语种排版适配（2026-11-04：新增 id / vi / th 后补的坑）
   作用域全部挂在 html[lang=xx] 上，由 app.js 在切语言时写 documentElement.lang，
   不影响英文/俄语等其他语种。
   ========================================================================== */

/* 泰语 —— 两个问题：
   1) 词与词之间没有空格，浏览器按"词"找不到断点，会把整段顶成一行撑破容器，
      所以必须按字符断行（break-all）。
   2) 泰文字形比拉丁字母高，且 Delphi/Segoe 系列在部分 Windows 上缺泰文字母，
      给一套明确带泰文子集的字体栈兜底（Leelawadee UI / Thonburi 是系统自带泰文字）。 */
html[lang="th"] {
  --sans: "Inter", "Noto Sans Thai", "Leelawadee UI", "Sukhumvit Set", "Thonburi",
          "Segoe UI", Tahoma, sans-serif;
}
html[lang="th"] body { word-break: break-all; overflow-wrap: anywhere; }
/* 例外：短标签里夹着英文单词（型号、FOB Shenzhen、How to Order 这类），
   整段 break-all 会把 "Order" 切成 "Ord/er"，比溢出一行还难看。
   这些元素按整词换行，真放不下时再逐字断（break-word）。 */
html[lang="th"] .nav a,
html[lang="th"] .crumbs,
html[lang="th"] .btn,
html[lang="th"] .sku-name,
html[lang="th"] .pd-title,
html[lang="th"] .announce,
html[lang="th"] .select { word-break: normal; overflow-wrap: break-word; }
/* 泰语标签比英文长，导航项允许换行会变成"วิธีคิด / ราคา"两行，撑高页头 → 锁单行 */
html[lang="th"] .nav a { white-space: nowrap; }
/* 包装表单元格原本 white-space:nowrap，泰语表头长，手机端会横向溢出 */
html[lang="th"] .pack-table th,
html[lang="th"] .pack-table td { white-space: normal; }

/* 越南语 —— 拉丁扩展附加区（Latin Extended Additional：ị ữ ợ ẩ ỹ …）。
   Georgia / Palatino 这类老衬线对这些"基字母 + 两层变音符号"的组合覆盖不全，
   缺字时会掉成豆腐块或退化成无符号字母（Khách → Khach，客户会当成拼写错误）。
   Inter 自带越南语子集；再往下的 Segoe UI（Win）/ Noto Sans（Android·ChromeOS）/
   Helvetica Neue（macOS）都完整支持，保证三层系统都有兜底。 */
html[lang="vi"] {
  --sans: "Inter", "Segoe UI", "Noto Sans", "Helvetica Neue", "Liberation Sans", Arial, sans-serif;
  --serif: "Iowan Old Style", "Noto Serif", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}
