/*!
 * 印刷在线报价系统 · 前台样式（对照大雄印刷标准名片报价页版式重做）
 * 纯手写 CSS，零依赖、零外部资源（字体/图片/图标全部本地或内联）
 */

/* ===================== 设计变量 ===================== */
:root {
  --yellow: #ffd900;
  --yellow-dark: #f0c800;
  --cta: #1f2430;          /* 主操作按钮（黑） */
  --cta-hover: #0d1119;
  --brand: #2f54eb;        /* 选中描边 / 链接 */
  --brand-dark: #1d39c4;
  --brand-soft: #eef2ff;
  --brand-line: #c7d2fe;

  --ink: #1c2333;
  --ink-2: #4b5567;
  --ink-3: #8b93a7;
  --ink-4: #a9b0bf;

  --page: #f4f5f7;
  --card: #ffffff;
  --line: #e8eaee;
  --line-2: #eff1f5;
  --label-bg: #f3f4f6;

  --ok: #12a150;
  --ok-soft: #e8f8ef;
  --warn: #c47f0a;
  --warn-soft: #fff7e6;
  --danger: #e5484d;
  --danger-soft: #fdeced;

  --radius: 10px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 66, .05);
  --shadow: 0 2px 8px rgba(20, 32, 66, .06);
  --shadow-lg: 0 16px 48px rgba(16, 26, 58, .18);

  --topbar-h: 70px;
  --catbar-h: 54px;
  --fs: 14px;
}

/* ===================== 基础 ===================== */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; max-width: 100%; }

/* 横向溢出兜底：任何意外超宽都不出现横向滚动条。
   hidden 只加在 body 上（加在 html 上会让 body 变成滚动容器，sticky 失效）；
   html 用 clip，clip 不生成滚动容器，sticky 不受影响。 */
body { overflow-x: hidden; }
@supports (overflow-x: clip) {
  html { overflow-x: clip; }
  body { overflow-x: clip; }
}

img { max-width: 100%; }
svg { max-width: 100%; }

[hidden] { display: none !important; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--brand); text-decoration: none; }
b, strong { font-weight: 700; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.ic {
  width: 16px; height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =====================================================================
 * 防横向溢出：flex/grid 子项默认 min-width:auto，遇到长串内容会拒绝收缩
 * 把容器顶宽；overflow-wrap:anywhere 连 min-content 一起算小，收缩才生效。
 * ===================================================================== */
.brand, .brand-text, .brand-text b, .topnav,
.search, .topbar-in, .btn-top,
.catbar-in, .tab,
.layout, .content, .card, .card-head, .card-title, .card-sub,
.steps, .step,
.prod-row, .prod-card, .prod-text, .prod-name,
.form, .form-row, .form-label, .ctrl, .ctrl-btns, .ctrl-radios, .ctrl-checks, .ctrl-cards,
.pcard, .pcard-text, .pcard-name,
.calc-row, .calc-lab, .tiers, .calc-custom,
.price-card, .pc-main, .pc-price, .pc-label, .pc-actions,
.df, .df-grid,
.dropzone, .file-item, .file-main,
.sum, .sum-row, .sum-val,
.succ, .ft-grid, .ft-col { min-width: 0; }

.prod-desc, .pcard-name, .ctext, .rtext, .sbtn,
.calc-lab, .pc-label, .pc-unit, .pc-alert, .line-label, .note,
.sum-val, .df-tip, .dz-sub, .file-name, .faq-body, .ft-notice, .ft-list b, .ft-list a,
.tip-bubble, .toast-msg, .form-alert, .empty {
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

/* ===================== 按钮 ===================== */
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 22px;
  border: 1px solid var(--cta);
  border-radius: 6px;
  background: var(--cta);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background .16s, border-color .16s, transform .1s;
}
.btn-dark:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn-dark:active { transform: translateY(1px); }
.btn-dark[disabled] { opacity: .55; cursor: not-allowed; }
.btn-lg { min-height: 50px; font-size: 16px; border-radius: 8px; }
.btn-block { width: 100%; }

.link-btn {
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
}
.link-btn:hover { background: var(--brand-soft); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-soft); }

/* ===================== 黄色顶栏 ===================== */
.topbar {
  background: var(--yellow);
  color: var(--ink);
  border-bottom: 1px solid var(--yellow-dark);
}
.topbar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  min-height: var(--topbar-h);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.brand-logo svg { width: 34px; height: 34px; }
.lg-back { fill: #ffdc4d; }
.lg-front { fill: var(--cta); }
.lg-line { fill: none; stroke: #ffd900; stroke-width: 1.8; stroke-linecap: round; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text b { font-size: 19px; line-height: 1.2; letter-spacing: .3px; }
.brand-text small { color: #5a5340; font-size: 12px; line-height: 1.3; }

.topnav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.topnav a {
  padding: 8px 14px;
  border-radius: 6px;
  color: #2b2b2b;
  font-size: 15px;
  font-weight: 600;
}
.topnav a:hover { background: rgba(255, 255, 255, .55); color: #000; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 320px;
  max-width: 100%;
  flex: 0 1 320px;
}
.search .sic {
  position: absolute;
  left: 14px;
  width: 18px; height: 18px;
  fill: none;
  stroke: #9aa0aa;
  stroke-width: 1.9;
  stroke-linecap: round;
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 42px;
  border: 1px solid #fff;
  border-radius: var(--radius-pill);
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  -webkit-appearance: none;
  appearance: none;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 84, 235, .18); }
.search input::placeholder { color: #a7adb8; }
.search-clear {
  position: absolute;
  right: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f0f1f4;
  color: #6b7280;
}
.search-clear:hover { background: #e3e5ea; color: var(--ink); }
.search-clear .ic { width: 14px; height: 14px; stroke-width: 2.2; }

.btn-top {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--cta);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-top:hover { background: var(--cta-hover); color: #fff; }
.btn-top .ic { width: 17px; height: 17px; }

/* ===================== 类目 Tab 行 ===================== */
.catbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20, 32, 66, .03);
  transition: border-color .3s, box-shadow .3s;
}
/* 后台改价后前台静默同步完成的小提示 */
.catbar.is-synced {
  border-bottom-color: var(--ok);
  box-shadow: 0 2px 10px rgba(18, 161, 80, .16);
}
.catbar-in {
  display: flex;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: var(--catbar-h);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.catbar-in::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tab svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--cta); }
.skel-tab { display: inline-block; width: 104px; height: 20px; margin: 17px 8px 0 0; }

/* ===================== 页面骨架 ===================== */
.page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 16px; }
.layout { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 16px; align-items: start; }
.content { display: flex; flex-direction: column; gap: 16px; }

/* ===================== 左侧步骤条 ===================== */
.steps {
  position: sticky;
  top: calc(var(--catbar-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.step {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: #f4f5f7;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background .16s, color .16s;
}
.step:hover { background: #eceef1; color: var(--ink); }
.step.is-on { background: var(--cta); color: #fff; }

/* ===================== 卡片 ===================== */
.card {
  padding: 18px 20px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--catbar-h) + 12px);
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 14px;
}
.card-title {
  position: relative;
  padding-left: 12px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
}
.card-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 4px; height: 17px;
  margin-top: -8px;
  border-radius: 2px;
  background: var(--yellow);
}
.card-sub { color: var(--ink-3); font-size: 12.5px; }
.req { color: var(--danger); font-style: normal; }

/* ===================== 产品（子类）卡片行 ===================== */
.prod-row { display: flex; flex-wrap: wrap; gap: 10px; }
.prod-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 320px;
  max-width: 420px;
  padding: 10px 34px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: left;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.prod-card:hover { border-color: var(--brand-line); box-shadow: var(--shadow); }
.prod-card.is-on {
  border-color: var(--brand);
  background: linear-gradient(180deg, #f7f9ff, #fff);
  box-shadow: 0 0 0 2px rgba(47, 84, 235, .13);
}
.prod-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 76px; height: 76px;
  border-radius: 6px;
  overflow: hidden;
  background-color: #e9ebef;
  background-image:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .5) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    linear-gradient(135deg, rgba(255, 255, 255, .6), rgba(0, 0, 0, .06));
}
.prod-thumb img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.prod-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.prod-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; font-weight: 700; }
.badge {
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: #fff3e6;
  color: #b45309;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.prod-desc {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-3); font-size: 12px; }
.prod-check {
  position: absolute;
  top: 8px; right: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #eef0f4;
  color: transparent;
  pointer-events: none;
}
.prod-check svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.prod-card.is-on .prod-check { background: var(--brand); color: #fff; }

/* ===================== 表单行 ===================== */
.form { margin-top: 16px; }
/* 凯江式分区标题（封面封底/内页）：淡灰底、小标签，横贯整行 */
.form-section {
  margin: 14px 0 2px;
  padding: 9px 14px;
  background: #f5f6f8;
  border-radius: 6px;
  border-left: 3px solid #4f6b9a;
}
.form-section-title { font-size: 13px; font-weight: 700; color: #333; letter-spacing: 0.5px; }
/* 内页段块（画册凯江式）：内页1/2/3 各自成块，浅底描边，标题行带删除 */
.inner-section {
  margin: 8px 0;
  padding: 8px 12px 2px;
  background: #fbfcfe;
  border: 1px dashed #c9d4e6;
  border-radius: 8px;
}
.inner-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eef1f6;
}
.inner-section-title { font-size: 12px; font-weight: 700; color: #4f6b9a; }
.link-btn {
  border: 0;
  background: transparent;
  color: #b14e4e;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
}
.link-btn:hover { text-decoration: underline; }
.inner-add { margin: 4px 0 10px; }
.inner-add-btn { cursor: pointer; }
/* 凯江式内页页签：内页1 固定；已激活段=页签（可点击切换）；未激活=「增加内页N」链接 */
.inner-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
}
/* 画册内页「内容相同」勾选框（凯江式）：独立 label 样式，不能用 .cbox（那是16px方框，会把文字挤竖排） */
.content-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333a49;
  white-space: nowrap;
}
.content-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--cta);
}
.inner-tab {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  background: #eef2f8;
  color: #4f6b9a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.inner-tab.active {
  background: #4f6b9a;
  color: #fff;}
.inner-add-link {
  display: inline-block;
  padding: 3px 10px;
  border: 1px dashed #a9b8d0;
  border-radius: 999px;
  color: #6b7a93;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.inner-add-link:hover { border-color: #4f6b9a; color: #4f6b9a; }
/* 画册内页 P数（可自定义输入）：数字输入框 + 红字校验提示 */
.pages-ctrl { display: flex; align-items: center; gap: 8px; }
.pages-input {
  width: 110px;
  padding: 6px 8px;
  border: 1px solid #ccd4e0;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.pages-input:focus { border-color: #4f6b9a; }
.pages-hint { font-size: 12px; color: #c0392b; }
/* 装订规则提示（老板 2026-10-10：手工锁线 <28P / 手工骑马钉 超内页总克重上限 → 灰掉 + 把原因写清） */
.bind-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #c0392b; }
.form-row {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 8px 16px;
  padding: 13px 0;
  border-top: 1px dashed #e9ebf0;
}
.form-row:first-child { border-top: 0; }
/* 颜色三组并排：正面颜色/反面颜色/正反面内容（合版/专版/数码单页） */
.color-row { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.color-row .color-col { flex: 1 1 0; min-width: 200px; display: flex; align-items: center; gap: 6px; }
/* 封面印面+封面印色并排（画册，凯江式两列一行；间距稍近但不贴死） */
.side-row { display: flex; flex-wrap: wrap; gap: 8px 10px; }
/* 老板 2026-10-08：精装画册/数码画册的材料+印色（没有"克重"那一列）要跟画册一样**排在同一行**。
   原来这里是 flex:1 1 0 + min-width:200px —— 列数少时每列各占一行；改成按内容宽（与 .side-row-gram 一致）。 */
.side-row .color-col { flex: 0 0 auto; min-width: 0; display: flex; align-items: center; gap: 6px; }
.side-row .ctrl select { width: auto; min-width: 148px; }
/* 封面材料+封面克重一行：两列都按内容宽，克重下拉紧贴材料下拉（凯江式：材料 | 铜版纸 | 铜版纸250克） */
.side-row-gram { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.side-row-gram .color-col { flex: 0 0 auto; min-width: 0; }
.side-row-gram .ctrl-gram-inline { flex: 0 0 auto; }
.side-row-gram .ctrl select { width: auto; min-width: 148px; }
.color-row .color-col .form-label { margin-bottom: 0; flex: 0 0 auto; }
.color-row .color-col .ctrl { display: flex; align-items: center; flex-wrap: nowrap; flex: 1 1 auto; }
.color-row .color-col .label-box { min-width: auto; }
.color-row .color-col .sel { min-width: 118px; width: 100%; }
.form-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.label-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-width: 88px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--label-bg);
  color: #333a49;
  font-size: 13.5px;
  line-height: 1.25;
  text-align: center;
}
.tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 16px; height: 16px;
  border: 1px solid #c9ccd3;
  border-radius: 50%;
  color: #9aa0aa;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}
.tip:hover, .tip.is-on { border-color: var(--brand); color: var(--brand); }
.ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-height: 40px; }
/* 尺寸类：一排按钮 */
.ctrl-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sbtn {
  min-height: 40px;
  padding: 0 22px;
  border: 1px solid #d9dce2;
  border-radius: 6px;
  background: #fff;
  color: #333a49;
  font-size: 14px;
  transition: background .14s, border-color .14s, color .14s;
}
.sbtn:hover { border-color: #b9bec8; }
.sbtn.is-on { background: var(--cta); border-color: var(--cta); color: #fff; font-weight: 600; }
.custom-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; }
.custom-line label { color: var(--ink-2); font-size: 13px; }
.custom-input {
  width: 220px;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d9dce2;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}
.custom-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 84, 235, .12); }
.custom-hint {
  flex: 1 1 100%;
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.5;
}

/* 单选：圆形 radio */
.ctrl-radios { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
/* 克重等短选项：横排小方块（老板 2026-10-09：竖排太占地方）
   ⚠️ 两个坑都要压住：① 窄屏响应式规则会把容器改成列方向 ② 父级（.ctrl-gram-inline）会被压到 100 多像素，
   容器一窄、方块就变成"一行一个"。所以：行方向 + 按内容宽（max-content）但不超父级。 */
.ctrl-chips {
  display: flex !important; flex-direction: row !important; flex-wrap: wrap !important;
  align-items: center; gap: 8px 10px;
  flex: 0 0 auto !important;              /* 不被父级压扁（否则方块会一行一个） */
  width: max-content !important; max-width: 100%;
}
/* 克重那一行的父容器：撑满整行，别缩成 100 多像素 */
.ctrl.ctrl-gram-inline { flex: 1 1 auto !important; min-width: 0; }
/* 真正的原因：这一行是"标签 | 控件"两列网格，控件列被算成 auto（只有 136px）→ 方块只能一行一个。
   含克重控件的行，把控件列改成 1fr（占满剩余宽度）。 */
.form-row:has(.ctrl-gram-inline) { grid-template-columns: auto minmax(0, 1fr) !important; }
/* 兜底：让克重控件自己横跨第 2 列到最后一列并占满宽度（不管网格怎么设） */
.form-row > .ctrl.ctrl-gram-inline { grid-column: 2 / -1 !important; width: 100% !important; }
.form-row > .ctrl.ctrl-gram-inline .ctrl-chips { width: 100% !important; max-width: none; }
.chip {
  display: inline-flex !important; flex: 0 0 auto !important; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 14px;
  border: 1px solid #dfe5ee; border-radius: 8px; background: #fff;
  font-size: 13px; color: #33456b; cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: #c9d4e4; }
.chip.is-on { border-color: #c8102e; background: #fff5f6; color: #c8102e; font-weight: 600; }
.chip[disabled], .chip.is-off { opacity: .45; cursor: not-allowed; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: #333a49;
  font-size: 14px;
  text-align: left;
}
.rdot {
  position: relative;
  flex: 0 0 auto;
  width: 16px; height: 16px;
  border: 1.5px solid #c9ccd3;
  border-radius: 50%;
  background: #fff;
  transition: border-color .14s;
}
.radio.is-on .rdot { border-color: var(--cta); }
.radio.is-on .rdot::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--cta);
}
.radio.is-on .rtext { font-weight: 600; color: var(--ink); }
.radio:hover .rdot { border-color: #9aa0aa; }

/* 多选：方形 checkbox */
.ctrl-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: #333a49;
  font-size: 14px;
  text-align: left;
}
.cbox {
  position: relative;
  flex: 0 0 auto;
  width: 16px; height: 16px;
  border: 1.5px solid #c9ccd3;
  border-radius: 3px;
  background: #fff;
  transition: background .14s, border-color .14s;
}
.check.is-on .cbox { background: var(--cta); border-color: var(--cta); }
.check.is-on .cbox::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
.check:hover .cbox { border-color: #9aa0aa; }
.check.is-on .ctext { font-weight: 600; color: var(--ink); }

/* 工艺子项（参照凯江）：勾选工艺后行内出现的下拉/录入 */
.subctrl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dashed #d8dbe2;
  border-radius: 6px;
  background: #f7f8fa;
  font-size: 13px;
}
.subctl-name { font-weight: 600; color: #333a49; }
.subctl-label { color: #5a6270; white-space: nowrap; }
.subctrl .subopt {
  min-width: 110px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #c9ccd3;
  border-radius: 5px;
  background: #fff;
  color: #333a49;
  font-size: 13px;
}
.subctrl .subinput {
  width: 90px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #c9ccd3;
  border-radius: 5px;
  background: #fff;
  color: #333a49;
  font-size: 13px;
}

/* 纸张卡片 */
.ctrl-cards { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.pcard {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 176px;
  max-width: 260px;
  padding: 6px 30px 6px 6px;
  border: 1px solid #e2e5ea;
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: left;
  transition: border-color .16s, box-shadow .16s;
}
.pcard:hover { border-color: var(--brand-line); }
.pcard.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(47, 84, 235, .14); }
.pcard-swatch {
  position: relative;
  flex: 0 0 auto;
  width: 54px; height: 46px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .06);
  background-color: hsl(var(--ph, 40), var(--ps, 12%), var(--pl, 78%));
  background-image:
    repeating-linear-gradient(112deg, rgba(255, 255, 255, .55) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
    repeating-linear-gradient(22deg, rgba(0, 0, 0, .045) 0 1px, rgba(0, 0, 0, 0) 1px 5px),
    linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(0, 0, 0, .07));
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .05);
}
.pcard-swatch img { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pcard-name { font-size: 13.5px; font-weight: 600; color: #333a49; line-height: 1.35; }
.pcard-weight { color: var(--ink-3); font-size: 11.5px; }
.pcard-check {
  position: absolute;
  top: 5px; right: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  opacity: 0;
  transition: opacity .14s;
}
.pcard-check svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.pcard.is-on .pcard-check { opacity: 1; }

/* 款式组（画册，凯江式）：上图下文竖排小卡，一行均分放满 */
.ctrl-cards.style-cards .pcard {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 8px 8px;
  text-align: center;
}
.ctrl-cards.style-cards .pcard-swatch { width: auto; height: 86px; border: none; border-radius: 0; background: none; box-shadow: none; overflow: visible; display: flex; align-items: center; justify-content: center; }
.ctrl-cards.style-cards .pcard-swatch img { position: static; width: auto; height: auto; object-fit: contain; }
.ctrl-cards.style-cards .pcard-name { font-size: 12.5px; line-height: 1.4; }

/* 下拉（每盒张数等紧凑单选组） */
.sel {
  height: 40px;
  min-width: 148px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid #d9dce2;
  border-radius: 6px;
  background: #fff;
  color: #333a49;
  font-size: 14px;
}
.sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 84, 235, .12); }
.ctrl-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* =====================================================================
 * 变灰（后台勾了「不可选」）的选项
 * 照常显示，名称和加价都还在，但整体灰掉、点不动：
 *   - 文字统一 #9aa3b2 级别的灰，opacity .72（不压到看不清）
 *   - 去掉 hover 反馈，cursor: not-allowed
 *   - 纸张卡片整卡 grayscale(1)，去掉选中蓝框和右上角蓝勾
 *   - 同时输出 disabled / aria-disabled，键盘与读屏用户也能感知
 * ===================================================================== */
.sbtn.is-off,
.radio.is-off,
.check.is-off,
.pcard.is-off {
  cursor: not-allowed;
  opacity: .72;
}
.sbtn.is-off,
.sbtn.is-off:hover {
  border-color: #e6e8ec;
  background: #f5f6f8;
  color: #9aa3b2;
  font-weight: 400;
}
.sbtn.is-off.is-on { border-color: #e6e8ec; background: #f5f6f8; color: #9aa3b2; }

.radio.is-off .rtext,
.check.is-off .ctext { color: #9aa3b2; font-weight: 400; }
.radio.is-off .rdot,
.radio.is-off:hover .rdot {
  border-color: #d8dce3;
  background: #f4f5f7;
}
.radio.is-off .rdot::after { display: none; }

.check.is-off .cbox,
.check.is-off:hover .cbox {
  border-color: #d8dce3;
  background: #f4f5f7;
}
.check.is-off .cbox::after { display: none; }

.pcard.is-off,
.pcard.is-off:hover {
  border-color: #e6e8ec;
  background: #f7f8fa;
  box-shadow: none;
  filter: grayscale(1);
}
.pcard.is-off .pcard-name { color: #9aa3b2; }
.pcard.is-off .pcard-weight { color: #b0b7c3; }
.pcard.is-off .pcard-swatch { box-shadow: none; }
.pcard.is-off .pcard-check { opacity: 0; }

/* 下拉里的灰项：原生渲染，能做的是灰字 + 明确禁用 */
select.sel option:disabled { color: #9aa3b2; }

/* 多选的 ? 气泡放在按钮外层：按钮 disabled 之后气泡仍然点得开 */
.check-wrap { display: inline-flex; align-items: center; gap: 7px; }

/* 款数 */
.designs-input {
  width: 180px;
  max-width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d9dce2;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
}
.designs-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 84, 235, .12); }

/* ===================== 产品算价 ===================== */
.ship-to { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.ship-to .ic { width: 15px; height: 15px; color: var(--ink-3); }
.ship-to b { color: var(--ink); font-weight: 600; }

.calc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 2px 0 16px;
}
.calc-lab { flex: 0 0 auto; min-width: 92px; color: #333a49; font-size: 14px; font-weight: 600; }
.tiers { display: flex; flex-wrap: wrap; gap: 10px; }
.tier {
  min-width: 76px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #fafbfc;
  color: #333a49;
  font-size: 14.5px;
  transition: background .14s, border-color .14s, color .14s;
}
.tier:hover { border-color: #c6cbd4; background: #fff; }
.tier.is-on { background: var(--cta); border-color: var(--cta); color: #fff; font-weight: 600; }
.calc-custom { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13.5px; }
.calc-custom input {
  width: 96px;
  height: 44px;
  padding: 0 8px;
  border: 1px solid #d9dce2;
  border-radius: 6px;
  background: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  -moz-appearance: textfield;
}
.calc-custom input::-webkit-outer-spin-button,
.calc-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-custom input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 84, 235, .12); }
.calc-go { margin-left: auto; }

/* ===================== 价格卡片 ===================== */
.price-card {
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
}
.pc-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pc-price { flex: 1 1 260px; min-width: 0; }
.pc-label { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12.5px; }
.pc-calc { display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-weight: 600; }
.spin {
  width: 13px; height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 14 44;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pc-total {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 2px 0;
  border-radius: 6px;
  color: var(--ink);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}
.pc-cur { font-size: 20px; font-weight: 700; color: var(--ink-2); }
.pc-unit { color: var(--ink-2); font-size: 13px; }

/* 自定义尺寸徽标：占几个名片位 + 自动加模切的原因 */
.pc-size-tag {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin: 4px 0 2px;
  padding: 6px 10px;
  border: 1px solid #f6e3bd;
  border-radius: 6px;
  background: var(--warn-soft);
  color: #8a5b06;
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}
.pc-size-tag b { font-weight: 700; }
.pc-size-tag span { opacity: .92; }

/* 自定义尺寸不合法时的红字提示（放在吸底条可见区域，不放进折叠的明细里） */
.pc-errors {
  flex: 1 1 100%;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #f7c9cb;
  border-radius: 6px;
  background: var(--danger-soft);
  color: #a8272b;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}
.pc-errors b { display: block; margin-bottom: 2px; }
.pc-errors .pc-err-item { display: block; padding-left: 10px; position: relative; }
.pc-errors .pc-err-item::before { content: "·"; position: absolute; left: 0; }
.price-card.is-loading .pc-total, .price-card.is-loading .pc-unit { opacity: .5; }
.price-card.is-flash .pc-total { animation: priceFlash .75s ease-out; }
@keyframes priceFlash {
  0% { background: #fff3cd; transform: scale(1.03); }
  100% { background: transparent; transform: scale(1); }
}
.pc-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pc-calc-btn { display: none; }
.pc-toggle { display: none; }
.pc-body { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.pc-alert {
  padding: 9px 12px;
  border: 1px solid #f7d3d4;
  border-radius: 6px;
  background: var(--danger-soft);
  color: #a8272b;
  font-size: 12.5px;
  margin-bottom: 10px;
}
.pc-lines { display: flex; flex-direction: column; }
.line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  color: var(--ink-2);
  font-size: 12.5px;
}
.line-label { min-width: 0; }
.line-amt { flex: 0 0 auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.line-x { flex: 0 0 auto; color: var(--brand-dark); font-weight: 700; }
.line-base .line-amt { font-weight: 700; }
.line-multiplier .line-label, .line-multiplierSum .line-label, .line-designs .line-label { color: var(--brand-dark); }
/* kind:'note' 之类的纯说明行：灰字、无金额 */
.line-note { color: var(--ink-3); font-size: 12px; }
.line-note .line-label { color: var(--ink-3); }
.line-total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.line-total .line-amt { font-size: 15px; }
.pc-notes { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.note {
  display: flex;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--warn-soft);
  color: #8a5b06;
  font-size: 12px;
  line-height: 1.5;
}
.note .ic { width: 14px; height: 14px; margin-top: 2px; }
.pc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  background: #f2f5fa;
  font-size: 12.5px;
  color: var(--ink-3);
}
.pc-meta b { color: var(--ink); }

/* ===================== 交货信息 ===================== */
.df-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.df-wide { grid-column: 1 / -1; }
.df { display: flex; flex-direction: column; gap: 6px; }
.df label { color: #444c5c; font-size: 13px; font-weight: 600; }
.df input, .df select, .df textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dfe2e8;
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  transition: border-color .14s, box-shadow .14s;
}
.df textarea { min-height: 68px; resize: vertical; line-height: 1.5; }
.df input:focus, .df select:focus, .df textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 84, 235, .12);
}
.df.has-error input, .df.has-error textarea { border-color: var(--danger); background: #fffafa; }
.df-tip { margin-top: 14px; color: var(--ink-3); font-size: 12px; }
.form-alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: #a8272b;
  font-size: 13px;
  margin-bottom: 12px;
}

/* ===================== 上传文件 ===================== */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26px 18px;
  border: 2px dashed #d8dce3;
  border-radius: var(--radius-sm);
  background: #fafbfc;
  text-align: center;
  transition: border-color .16s, background .16s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dz-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #eef1f6;
  color: var(--ink-2);
}
.dropzone.is-over .dz-ico { background: #fff; color: var(--brand); }
.dz-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dz-main { color: var(--ink-2); font-size: 14px; }
.dz-main b { color: var(--brand); }
.dz-sub { color: var(--ink-3); font-size: 12px; }
.file-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.file-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}
.file-main { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.file-name { font-size: 13.5px; word-break: break-all; }
.file-size { color: var(--ink-3); font-size: 12px; }
.file-state { flex: 0 0 auto; color: var(--ink-3); font-size: 12px; }
.file-state.is-ok { color: var(--ok); }
.file-state.is-err { color: var(--danger); }

/* ===================== 下单汇总 ===================== */
.sum {
  padding: 4px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
}
/* 汇总里的红字（自定义尺寸不合法时） */
.sum-error {
  margin: 8px 0 2px;
  padding: 9px 11px;
  border-radius: 6px;
  background: var(--danger-soft);
  color: #a8272b;
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}
.sum-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed #e9ebf0;
  font-size: 13.5px;
}
.sum-row:first-child { border-top: 0; }
.sum-key { flex: 0 0 auto; color: var(--ink-3); min-width: 74px; }
.sum-val { flex: 1 1 auto; min-width: 0; text-align: right; color: var(--ink); }
.sum-val .muted { color: var(--ink-3); }
.sum-row.sum-total { border-top: 1px solid var(--line); }
.sum-row.sum-total .sum-val { color: var(--brand-dark); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sum-spec { display: flex; flex-direction: column; gap: 2px; text-align: right; color: var(--ink-2); font-size: 12.5px; }
.sum-spec-inline { color: var(--ink-2); font-size: 12.5px; }
.sum-spec-inline .sum-sep { font-style: normal; color: var(--ink-4); margin: 0 24px; }
.sum-metrics { border-top: 1px solid var(--line); padding: 0; }
.sum-metric { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 10px 14px 10px 0; }
.sum-metric + .sum-metric { padding-left: 14px; border-left: 1px dashed #e9ebf0; }
.sum-mk { font-size: 12px; color: var(--ink-3); }
.sum-mv { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sum-metric-total .sum-mv { color: var(--brand-dark); font-size: 20px; font-weight: 800; }
.form-tip { margin-top: 12px; color: var(--ink-4); font-size: 11.5px; line-height: 1.55; }
.skel-line { height: 34px; margin-bottom: 8px; }
.skel-line.short { height: 26px; width: 62%; }

/* 下单成功 */
.succ { padding: 16px 6px 6px; text-align: center; }
.succ-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  margin-bottom: 12px;
}
.succ-ico svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.succ h3 { font-size: 20px; margin-bottom: 6px; }
.succ > p { color: var(--ink-2); font-size: 13.5px; }
.succ-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
  margin: 16px auto 0;
  text-align: left;
}
.succ-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13.5px;
}
.succ-line span { color: var(--ink-3); }
.succ-line b { font-size: 17px; color: var(--brand-dark); letter-spacing: .4px; }
.succ-line.total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.succ-contact { margin-top: 14px; color: var(--ink-2); font-size: 13px; line-height: 1.9; }
.succ-contact a { font-weight: 600; }
.succ-actions { display: flex; flex-direction: column; gap: 8px; max-width: 460px; margin: 16px auto 0; }

/* ===================== 常见问题 ===================== */
.page-sec { margin-top: 24px; }
.page-sec-head { margin-bottom: 12px; }
.page-sec-head h2 { font-size: 19px; }
.page-sec-head p { color: var(--ink-3); font-size: 13px; margin-top: 3px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  position: relative;
  padding: 14px 44px 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  top: 50%; right: 18px;
  width: 8px; height: 8px;
  margin-top: -5px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform .18s;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item summary:hover { background: #fafbfc; }
.faq-body { padding: 0 16px 14px; color: var(--ink-2); font-size: 13.5px; }
.faq-body p + p { margin-top: 8px; }

/* ===================== 页脚 ===================== */
.ft { margin-top: 24px; background: #fff; border-top: 1px solid var(--line); }
.ft-in { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 16px 28px; }
.ft-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ft-col h3 { font-size: 16px; margin-bottom: 4px; }
.ft-col h4 { font-size: 13.5px; color: var(--ink-2); margin-bottom: 8px; }
.ft-site { color: var(--ink-3); font-size: 12.5px; }
.ft-notice {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: #8a5b06;
  font-size: 12.5px;
  line-height: 1.6;
}
.ft-list { display: flex; flex-direction: column; gap: 6px; }
.ft-list li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.ft-list em { flex: 0 0 40px; font-style: normal; color: var(--ink-3); font-size: 12.5px; }
.ft-list b, .ft-list a { font-weight: 600; min-width: 0; }
.ft-copy { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); color: var(--ink-4); font-size: 12px; }

/* ===================== 提示气泡 / toast ===================== */
.tip-bubble {
  position: fixed;
  z-index: 400;
  max-width: 260px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(31, 36, 48, .96);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.55;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.toast-wrap {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 460px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #1f2740;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s;
  pointer-events: auto;
}
.toast.on { opacity: 1; transform: translateY(0); }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast-ic { display: inline-flex; }
.toast-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.toast-ok .toast-ic { color: #5ee9a0; }
.toast-warn .toast-ic { color: #ffd27a; }
.toast-err .toast-ic { color: #ff9a9d; }
.toast-msg { min-width: 0; }

/* ===================== 骨架屏 / 空态 ===================== */
.skel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #e9edf3;
}
.skel::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .7), rgba(255, 255, 255, 0));
  animation: shimmer 1.25s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-prod { flex: 1 1 320px; max-width: 420px; height: 96px; }
.skel-row { height: 62px; margin-bottom: 8px; }
.empty {
  flex: 1 1 100%;
  padding: 22px 16px;
  border: 1px dashed #dbe1ec;
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  color: var(--ink-3);
  text-align: center;
  font-size: 13px;
}
.load-error {
  flex: 1 1 100%;
  padding: 24px 20px;
  border: 1px dashed #d8dfec;
  border-radius: var(--radius-sm);
  background: #fff;
  text-align: center;
}
.load-error p { color: var(--ink-2); margin-bottom: 12px; }
.load-error .err-detail { color: var(--ink-3); font-size: 12px; margin-top: -6px; }

/* ===================== 响应式 ===================== */
@media (max-width: 1140px) {
  .topnav a { padding: 8px 10px; font-size: 14px; }
  .search { flex: 0 1 260px; width: 260px; }
  .layout { grid-template-columns: 132px minmax(0, 1fr); }
  .form-row { grid-template-columns: 124px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  :root { --catbar-h: 50px; }

  /* 顶栏：导航隐藏，搜索占满第二行 */
  .topnav { display: none; }
  .topbar-in { gap: 10px; padding: 10px 12px; }
  .brand-text b { font-size: 17px; }
  .search { order: 3; flex: 1 1 100%; width: 100%; }
  .btn-top { margin-left: auto; padding: 0 12px; }
  .btn-top span { display: none; }

  /* 步骤条 → 横向可滚动 */
  .layout { display: block; }
  .steps {
    position: static;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex: 0 0 auto; min-width: 96px; min-height: 40px; }

  .page { padding: 12px; }
  .card { padding: 14px 14px 16px; }
  .prod-card { flex: 1 1 100%; max-width: 100%; }

  /* 表单行 → 标签在上，控件在下 */
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 0; }
  .label-box { padding: 7px 12px; }

  .calc-row { gap: 10px; }
  .calc-lab { flex: 1 1 100%; min-width: 0; }
  .calc-custom { flex: 1 1 100%; }
  .calc-custom input { flex: 1 1 auto; width: auto; min-width: 0; }
  .calc-go { flex: 1 1 100%; margin-left: 0; }
  .tier { flex: 1 1 auto; min-width: 72px; padding: 0 8px; }

  .df-grid { grid-template-columns: minmax(0, 1fr); }

  /* 价格卡片 → 底部吸底条（可能多出「尺寸徽标 / 红字」两行，底部留白跟着放大） */
  body { padding-bottom: 118px; }
  body.is-done { padding-bottom: 12px; }
  .price-card {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: auto;
    z-index: 60;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 12px 12px 0 0;
    background: #fff;
    box-shadow: 0 -8px 28px rgba(16, 26, 58, .16);
    max-height: 76vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .price-card.is-off { display: none; }
  .pc-main { flex-wrap: wrap; gap: 8px; }
  .pc-price { flex: 1 1 130px; }
  .pc-total { font-size: 24px; margin: 0; }
  .pc-cur { font-size: 15px; }
  .pc-unit { font-size: 12px; }
  .pc-label { font-size: 12px; }
  #pcSubName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pc-actions { flex: 0 0 auto; margin-left: auto; }
  .pc-calc-btn { display: inline-flex; }
  .pc-toggle { display: inline-flex; }
  .pc-body { display: none; }
  .price-card.open .pc-body { display: block; }

  .ft-grid { grid-template-columns: minmax(0, 1fr); }
  .sum-row { flex-wrap: wrap; }
  .sum-val { text-align: left; }
  .sum-spec { text-align: left; }
}

@media (max-width: 620px) {
  .page { padding: 10px; }
  .card { padding: 12px 12px 14px; }
  .catbar-in { padding: 0 10px; }
  .tab { padding: 0 10px; font-size: 13.5px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-logo svg { width: 28px; height: 28px; }
  .brand-text small { display: none; }
  .card-title { font-size: 16px; }
  .pcard { flex: 1 1 100%; min-width: 0; max-width: 100%; }
  .custom-input { width: 100%; }
  .designs-input { width: 100%; }
  .sel { width: 100%; }
  .pc-actions .btn-dark { padding: 0 14px; font-size: 13.5px; }
  .pc-toggle { padding: 0 6px; }
  .tier { min-width: 62px; }
  .dropzone { padding: 20px 12px; }
  .btn-lg { min-height: 48px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

@media (max-width: 620px) {
  .sum-metrics { flex-wrap: wrap; }
  .sum-metric { flex: 1 1 100%; padding: 8px 0; }
  .sum-metric + .sum-metric { padding-left: 0; border-left: 0; border-top: 1px dashed #e9ebf0; }
}
/* 画册↔数码画册 工艺对比建议（2026-10-10） */
.pc-alt { margin-top: 10px; }
.pc-alt-card { border: 1px dashed #c9d4e4; border-radius: 8px; background: #f7faff; padding: 10px 12px; }
.pc-alt-tip { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.5; }
.pc-alt-tip .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; color: #2f6fed; }
.pc-alt-details { margin-top: 8px; font-size: 13px; }
.pc-alt-details summary { cursor: pointer; color: #2f6fed; font-size: 13px; }
.pc-alt-lines { margin-top: 6px; padding-left: 4px; }
.pc-alt-lines .line { margin: 3px 0; font-size: 13px; }