/* 印客邦报价前端 · 全局样式（手机优先，设计宽度 375px）
 * 全部颜色走 CSS 变量。配色：ChatGPT 方案（Claude 评审胜出）+ 裁判微调，已落地。
 * 备选（印客邦官网品牌）：主色藏青 #0F2A4D、行动蓝 #2563EB、纸白 #F8F6F2
 *   ——见 品牌视觉简报-印客邦.md，配色二选一后改这里即可全站生效。
 */
:root {
  /* 品牌配色：ChatGPT 方案胜出（Claude 评审 15:14），按裁判微调意见落地 */
  --brand-primary: #2463EB;   /* 品牌蓝：主按钮/选中/高亮 */
  --brand-primary-soft: #DBEAFE; /* 主色浅底（选中态背景） */
  --brand-dark: #0F2A4D;      /* 藏青：标题/深色区（延续 yinkebang.com） */
  --brand-action: #2563EB;    /* 行动蓝：链接/次要按钮 */
  --brand-cta: #FF8A34;       /* 报价橙：立即报价等转化按钮（裁判意见：按钮文字用深色） */
  --on-cta: #0F2A4D;          /* 橙色按钮上的文字色（对比度>6:1） */
  --price: #EA580C;           /* 总报价金额强调色（深橙，保证小字号可读） */
  --bg: #F8F6F2;              /* 页面纸白底（延续 yinkebang.com） */
  --card: #FFFFFF;             /* 卡片底 */
  --text: #172B4D;            /* 主文字（深蓝灰，不用纯黑） */
  --text-sub: #5B6B82;        /* 次级文字 */
  --text-mute: #8793A5;       /* 弱化文字 */
  --text-disable: #B4BDCA;    /* 禁用文字 */
  --line: #E2E8F0;            /* 分割线 */
  --pill-bg: #F1F1F1;         /* 未选中胶囊底 */
  --danger: #DC2626;
  --success: #16A34A;
  --warning: #D97706;
  --info: #2563EB;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(15, 42, 77, 0.07);
  --tabbar-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

.page { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + 16px); }
.page.no-tabbar { padding-bottom: 0; }

/* 演示版提示条 */
.demo-ribbon {
  background: var(--brand-dark); color: #fff;
  font-size: 11px; text-align: center; padding: 6px 12px; letter-spacing: 1px;
}

/* 顶栏 */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 6px; background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.brand-name { font-size: 17px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.searchbar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--card); border-radius: 999px; padding: 9px 14px;
  box-shadow: var(--shadow); color: var(--text-mute); font-size: 13px;
}
.searchbar svg { flex: none; }
.icon-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; color: var(--brand-dark);
}

/* 首页左右布局 */
.home-layout { display: flex; align-items: stretch; padding: 8px 0 0; }

/* 左侧大类边栏 */
.sidebar {
  flex: none; width: 86px; align-self: flex-start;
  position: sticky; top: 118px; max-height: calc(100vh - 200px); overflow-y: auto;
  padding: 4px 0 20px 8px;
}
.side-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 4px; border-radius: 10px 0 0 10px; color: var(--text-sub);
  font-size: 12px; text-align: center; line-height: 1.3; width: 100%;
}
.side-item .ico { font-size: 24px; line-height: 1; }
.side-item.active { background: var(--card); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.side-item.active::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px;
  border-radius: 4px; background: var(--brand-primary);
}

/* 右侧内容区 */
.main { flex: 1; min-width: 0; padding: 0 12px 0 6px; }

/* 子栏目胶囊 */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; padding: 8px 16px; border-radius: 999px; background: var(--pill-bg);
  font-size: 13px; color: var(--text-sub); white-space: nowrap;
}
.pill.active { background: var(--brand-primary); color: #fff; font-weight: 600; }

/* 产品分组 */
.group { margin-bottom: 18px; }
.group-title { font-size: 14px; font-weight: 600; color: var(--text-sub); margin: 6px 2px 10px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line); text-align: left; width: 100%;
}
.pcard .thumb { aspect-ratio: 1 / 1; background: #f4f4f4; overflow: hidden; }
.pcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pname { padding: 8px 10px 10px; font-size: 13px; }
.pcard .pstatus { display: inline-block; margin-left: 6px; font-size: 10px; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }
.pstatus.s-可报   { background: #E7F6EC; color: var(--success); }
.pstatus.s-转人工 { background: #FFF3E2; color: var(--warning); }
.pstatus.s-未接入 { background: #F1F1F1; color: var(--text-mute); }
.pstatus.s-待确认 { background: #EAF0FE; color: var(--brand-action); }

/* 底部导航 */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 480px; height: var(--tabbar-h);
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
       font-size: 11px; color: var(--text-mute); }
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--brand-primary); font-weight: 600; }

/* 订单页 */
.order-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 14px; background: var(--card);
              position: sticky; top: 0; z-index: 20; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.order-tabs::-webkit-scrollbar { display: none; }
.otab { flex: none; padding: 8px 12px; font-size: 13px; color: var(--text-sub); border-bottom: 2px solid transparent; white-space: nowrap; }
.otab.active { color: var(--brand-dark); font-weight: 700; border-bottom-color: var(--brand-primary); }
.order-list { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.order-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; border: 1px solid var(--line); }
.order-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-no { font-size: 12px; color: var(--text-mute); }
.badge { font-size: 11px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.b-待付款 { background: #FFF3E2; color: var(--warning); }
.badge.b-待生产 { background: #EAF0FE; color: var(--brand-action); }
.badge.b-生产中 { background: #E7F6EC; color: var(--success); }
.badge.b-已发货 { background: #E0F2F1; color: #0F766E; }
.badge.b-已取消 { background: #F1F1F1; color: var(--text-mute); }
.order-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.order-spec { font-size: 12px; color: var(--text-sub); margin-bottom: 8px; }
.order-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed var(--line); padding-top: 10px; }
.order-price { font-size: 17px; font-weight: 700; color: var(--danger); }
.order-price small { font-size: 11px; color: var(--text-mute); font-weight: 400; }
.link-btn { font-size: 13px; color: var(--brand-action); }

/* 用户中心 */
.user-header {
  background: linear-gradient(135deg, var(--brand-dark), #1E4A8A);
  color: #fff; padding: 26px 18px 20px; border-radius: 0 0 20px 20px;
}
.user-row { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none; width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}
.user-name { font-size: 17px; font-weight: 700; }
.user-level { display: inline-block; margin-top: 4px; font-size: 11px; background: rgba(255,255,255,.2);
              padding: 2px 10px; border-radius: 999px; }
.stat-row { display: flex; gap: 10px; padding: 14px; }
.stat-card { flex: 1; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
             padding: 14px; text-align: center; border: 1px solid var(--line); }
.stat-card .v { font-size: 20px; font-weight: 700; color: var(--brand-dark); }
.stat-card .k { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.func-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 4px 14px 14px; }
.func-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
             border: 1px solid var(--line); padding: 16px 4px 12px;
             display: flex; flex-direction: column; align-items: center; gap: 8px;
             font-size: 12px; color: var(--text); width: 100%; }
.func-item svg { width: 28px; height: 28px; color: var(--brand-dark); }
.section-title { padding: 6px 16px 10px; font-size: 14px; font-weight: 600; color: var(--text-sub); }

/* 报价详情页 */
.q-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card);
          border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.q-head .back { font-size: 20px; color: var(--text-sub); padding: 4px 8px; }
.q-head h1 { font-size: 16px; font-weight: 700; }
.q-hero { background: var(--card); padding: 14px; }
.q-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.q-status-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--text-sub); }
.spec-group { background: var(--card); margin-top: 10px; padding: 14px; }
.spec-group h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.spec-group h3 .req { color: var(--danger); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { padding: 8px 16px; border-radius: 999px; background: var(--pill-bg); font-size: 13px; color: var(--text-sub); border: 1px solid transparent; }
.opt.selected { background: var(--brand-primary-soft); color: var(--brand-dark); border-color: var(--brand-primary); font-weight: 600; }
.q-tip { margin: 10px 14px 0; font-size: 12px; color: var(--text-mute); background: #FFFBEF;
         border: 1px dashed var(--warning); border-radius: 8px; padding: 10px 12px; }
.price-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30;
  width: 100%; max-width: 480px; background: var(--card); border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.price-label { font-size: 12px; color: var(--text-sub); }
.price-value { font-size: 22px; font-weight: 800; color: var(--danger); }
.price-note { font-size: 10px; color: var(--text-mute); }
.btn-primary {
  flex: none; background: var(--brand-primary); color: #fff; font-size: 15px; font-weight: 700;
  padding: 12px 34px; border-radius: 999px; box-shadow: 0 4px 12px rgba(245, 166, 35, .4);
}
.btn-primary:active { transform: scale(.97); }
.q-body { padding-bottom: 110px; }

/* 空态 */
.empty { text-align: center; color: var(--text-mute); padding: 40px 20px; font-size: 13px; }

/* ---- 详情图轮播 ---- */
.q-carousel { position: relative; overflow: hidden; border-radius: 12px; background: var(--brand-bg-soft, #eef2f9); }
.q-track { display: flex; transition: transform .3s ease; }
.q-track img { width: 100%; flex: none; aspect-ratio: 1; object-fit: cover; }
.q-counter { position: absolute; right: 10px; bottom: 10px; background: rgba(15,42,77,.55); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 20px; }
.q-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.q-counter + .q-dots { bottom: 34px; }
.q-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); pointer-events: auto; cursor: pointer; }
.q-dot.active { background: #fff; width: 16px; border-radius: 4px; }

/* ---- 产品算价 / 印品介绍 tab ---- */
.q-tabs { display: flex; gap: 32px; justify-content: center; margin: 14px 0 4px; border-bottom: 1px solid var(--line); }
.q-tab { background: none; border: none; font-size: 15px; color: var(--text-sub); padding: 10px 4px; border-bottom: 3px solid transparent; cursor: pointer; }
.q-tab.active { color: var(--brand-dark); font-weight: 700; border-bottom-color: var(--brand-primary); }
.q-intro { font-size: 14px; line-height: 1.8; color: var(--text); padding: 6px 2px 20px; }
.q-intro img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.q-intro h4, .q-intro h5 { margin: 14px 0 6px; color: var(--brand-dark); }
.q-intro-empty { color: var(--text-mute); text-align: center; padding: 30px 0; }

/* 即将上线占位 */
.coming-soon { text-align: center; padding: 90px 24px; }
.cs-icon { font-size: 56px; margin-bottom: 16px; }
.cs-title { font-size: 20px; font-weight: 700; color: var(--brand-dark); margin-bottom: 8px; }
.cs-desc { font-size: 14px; color: var(--text-mute); }

/* 搜索输入 */
.searchbar input { border: 0; outline: 0; background: transparent; font-size: 14px; width: 100%; color: var(--text); }
.searchbar input::placeholder { color: var(--text-mute); }

/* 表单数字输入 */
.size-row { display: flex; align-items: center; gap: 8px; }
.size-row input { width: 90px; padding: 8px 10px; font-size: 14px; border: 1px solid #dfe3ea; border-radius: 8px; outline: none; }
.size-row input:focus { border-color: var(--brand-primary); }

/* 报价方式徽标 */
.pstatus.s-ok { background: #e8f5e9; color: #2e7d32; }
.pstatus.s-wait { background: #fff3e0; color: #e65100; }

/* 复制按钮 */
.link-btn { background: none; border: 0; color: var(--brand-primary); font-size: 14px; padding: 6px 0; cursor: pointer; }

/* 下拉与提示 */
.f-select { width: 100%; padding: 10px 12px; font-size: 14px; border: 1px solid #dfe3ea; border-radius: 8px; background: #fff; outline: none; }
.f-select:focus { border-color: var(--brand-primary); }
.f-hint { font-size: 12px; color: var(--text-mute); margin-top: 6px; }

/* 必填与错误态 */
.req { color: #e53935; }
.f-error { border-color: #e53935 !important; background: #fff5f5; }
.muted{color:#999;font-weight:400;font-size:12px;margin-left:4px}

/* 报不出价的弹窗（10-19） */
.fail-mask{position:fixed;inset:0;background:rgba(15,42,77,.45);display:flex;align-items:center;justify-content:center;z-index:999;padding:24px}
.fail-dlg{background:#fff;border-radius:14px;max-width:340px;width:100%;padding:20px 18px 16px;box-shadow:0 8px 30px rgba(0,0,0,.18)}
.fail-dlg h3{margin:0 0 10px;font-size:17px;color:#0F2A4D}
.fail-why{margin:0 0 8px;color:#EA580C;line-height:1.6;font-size:15px}
.fail-how{margin:0 0 14px;color:#444;line-height:1.6;font-size:14px}
.fail-btns{display:flex;gap:10px;justify-content:flex-end;align-items:center}

/* 10-20 Claude Code：选项旁的问号说明、工艺细项 */
.qm{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:5px;border-radius:50%;border:1px solid currentColor;font-size:11px;line-height:1;opacity:.7;cursor:pointer}
.help-img{display:block;max-width:100%;border-radius:8px;margin:0 0 14px}
.subs .sub-row{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:8px;font-size:13px;color:var(--text-sub)}
.subs select{font:inherit;padding:4px 6px;border:1px solid #ddd;border-radius:6px;background:#fff}
.opt.disabled{opacity:.35;text-decoration:line-through}

/* ---- 登录／注册（2026-10-21 会员账号） ---- */
.login-page { padding: 32px 16px 40px; }
.login-head { text-align: center; margin-bottom: 20px; }
.login-head .avatar { margin: 0 auto 10px; }
.login-title { font-size: 20px; font-weight: 800; color: var(--brand-dark); }
.login-sub { font-size: 13px; color: var(--text-sub); margin-top: 4px; }
.login-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.login-tab { flex: 1; padding: 10px 0; border-radius: 999px; background: var(--pill-bg); color: var(--text-sub); font-size: 15px; font-weight: 600; }
.login-tab.active { background: var(--brand-primary-soft); color: var(--brand-primary); }
.login-card { background: var(--card); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-sub); }
.login-card input { font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #fff; }
.login-card input:focus { outline: 2px solid var(--brand-primary-soft); border-color: var(--brand-primary); }
.login-btn { width: 100%; margin-top: 4px; }
.login-hint { font-size: 12px; color: var(--text-mute); text-align: center; }
.login-msg { margin-top: 14px; text-align: center; font-size: 14px; min-height: 20px; }
.login-msg.ok { color: var(--success); }
.login-msg.bad { color: var(--danger); }
.logout-btn { display: block; margin: 20px auto 0; padding: 10px 40px; border-radius: 999px; background: var(--pill-bg); color: var(--text-sub); font-size: 14px; }
.spec-group.is-off { opacity: .4; pointer-events: none; }  /* 用自定义尺寸时，固定尺寸那一栏变灰 */
.login-agree { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 12px !important; }
.login-agree input { width: 16px; height: 16px; padding: 0; }
.login-agree a, .doc a { color: var(--brand-action); }
.doc { background: var(--card); border-radius: 12px; padding: 16px; font-size: 14px; line-height: 1.8; color: var(--text); }
.doc h1 { font-size: 18px; margin: 0 0 8px; } .doc h2 { font-size: 15px; margin: 16px 0 4px; } .doc .draft { color: var(--warning); font-size: 12px; }

/* ---- 会员中心（2026-10-21） ---- */
.mc { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.mc-sec { background: var(--card); border-radius: 12px; padding: 12px 14px; display: block; color: var(--text); text-decoration: none; }
.mc-sec > summary { font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.mc-sec > summary::after { content: "›"; float: right; color: var(--text-mute); transition: transform .2s; }
.mc-sec[open] > summary::after { transform: rotate(90deg); }
.mc-link { font-size: 15px; font-weight: 600; }
.mc-body { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.mc-body label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-sub); }
.mc-body input { font-size: 16px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
.mc-btn { width: 100%; text-align: center; text-decoration: none; display: block; }
.mc-sub { font-size: 13px; font-weight: 700; color: var(--brand-dark); margin-top: 6px; }
.mc-note { font-size: 12px; color: var(--text-mute); margin: 0; }
.mc-item { border-top: 1px solid var(--line); padding: 8px 0; font-size: 13px; }
.mc-item button { font-size: 12px; padding: 4px 10px; margin: 6px 6px 0 0; border-radius: 999px; background: var(--pill-bg); color: var(--text-sub); }
.mc-list { max-height: 260px; overflow-y: auto; }
.mc-danger { color: var(--danger) !important; }
.mc-pre { white-space: pre-wrap; font-size: 12px; background: var(--bg); padding: 8px; border-radius: 8px; margin: 0; }
.price-inline { color: var(--price); font-weight: 700; margin-left: 6px; }
.muted { color: var(--text-mute); font-size: 12px; font-weight: 400; }
