/* ==========================================================================
   产品中心 —— 共享样式（手机优先 / mobile-first）
   使用说明：本站点不使用框架；如需引入公共资源，请优先使用 CDN（见 README）。
   ========================================================================== */
:root {
  --header-h: 48px;
  --primary: #1677ff;
  --text: #1f2937;
  --text-2: #6b7280;
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
  --max-w: 640px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------------- 顶部栏 ---------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  height: var(--header-h);
  padding: 0 12px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
@supports (padding-top: env(safe-area-inset-top)) {
  .app-header { padding-top: env(safe-area-inset-top); }
}

.title-center {
  min-width: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.header-side.left { justify-self: start; }
.header-side.right { justify-self: end; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  color: var(--text);
}
.icon-btn:active { background: #f0f2f5; }

/* 语言切换按钮：单击中英文互切（无需语言列表） */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  white-space: nowrap;
}
.lang-toggle:active { opacity: 0.7; }

/* ---------------- 页面容器 ---------------- */
.page { max-width: var(--max-w); margin: 0 auto; }

/* ---------------- 产品列表 ---------------- */
.list-pane { padding: 12px 12px 28px; }

.product-list { list-style: none; }

.product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
  transition: transform 0.12s ease;
}
.product-item:active { transform: scale(0.98); }

.product-item .thumb {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: #eef1f5;
}
.product-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-item .name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-all;
}

.product-item .chevron {
  flex: none;
  color: #c3c8d1;
  font-size: 18px;
}

/* ---------------- 产品手册（长图） ---------------- */
.manual-pane { background: #ffffff; padding-bottom: 40px; }

.manual-canvas { position: relative; }

.manual-img {
  width: 100%;
  height: auto;
  display: block;
}

.manual-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50vh;
  background: #ffffff;
  color: var(--text-2);
  font-size: 13px;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

body.loaded .manual-img { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- 状态提示（加载中 / 空 / 错误） ---------------- */
.state {
  padding: 72px 24px;
  text-align: center;
  color: var(--text-2);
  list-style: none;
}
.state .state-icon { font-size: 44px; margin-bottom: 12px; }
.state .state-text { font-size: 14px; line-height: 1.9; }
.state .state-text strong { color: var(--text); font-weight: 600; }
.state .spinner { margin: 0 auto 12px; }

.state-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 9px 24px;
  font-size: 14px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
}
.state-btn:active { opacity: 0.85; }

/* iOS 底部安全区 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .manual-pane { padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
}
