/* ================= 基础变量 ================= */
:root {
  --primary: #111111;
  --primary-light: #EDEDEA;
  --accent: #5B21B6;
  --accent-light: #F1EBFB;
  --bg: #F5F4F0;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-sub: #55514C;
  --text-light: #6F6A63;
  --border: #E6E3DC;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 12px rgba(31, 41, 55, 0.06);
  --header-h: 52px;
  --toolbar-h: 118px;
  --max-w: 1600px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 12px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.icon { width: 20px; height: 20px; display: inline-block; flex: none; }

button { font-family: inherit; cursor: pointer; }

/* ================= 顶部导航（吸顶） ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}
.header-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-back {
  position: absolute;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  padding: 0 8px;
}
.header-back:hover { background: var(--primary-light); }
.header-back:active { transform: scale(0.97); }
.header-back .icon { width: 22px; height: 22px; }
.header-back[hidden] { display: none; }

/* 品牌切换 */
.brand-tabs {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 10px;
  padding: 2px 16px 12px;
}
.brand-tab {
  min-width: 44px;
  min-height: 44px;
  flex: 1;
  max-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 16px;
  transition: all 0.18s ease;
}
.brand-tab:hover { border-color: var(--accent); color: var(--accent); }
.brand-tab[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.18);
}
.brand-tab .brand-mark { width: 18px; height: 18px; }

/* ================= 主区域 ================= */
.main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px 48px;
  min-height: 70vh;
}
.page[hidden] { display: none !important; }

/* 吸顶工具栏：搜索 + 简介 + 分类 */
.toolbar {
  position: sticky;
  top: calc(var(--header-h) + 60px);
  z-index: 20;
  background: linear-gradient(to bottom, var(--bg) 88%, rgba(245, 244, 240, 0));
  padding: 10px 0 6px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s ease;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box .icon--search { color: var(--text-light); }
.search-box input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
  padding: 0 10px;
}
.search-box input::placeholder { color: var(--text-light); }
.search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  border-radius: 50%;
  color: var(--text-light);
}
.search-clear:hover { background: var(--primary-light); color: var(--text); }
.search-clear .icon { width: 18px; height: 18px; }
.search-clear[hidden] { display: none; }

/* 品牌简介：压缩为两行，尽早露出列表 */
.brand-intro {
  margin: 10px 2px 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 分类横向滚动 */
.cats-scroll { position: relative; margin-top: 10px; }
.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.cats::-webkit-scrollbar { display: none; }
.cat-chip {
  min-width: 44px;
  min-height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  scroll-snap-align: start;
  transition: all 0.18s ease;
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(91, 33, 182, 0.25);
}
.cats-hint {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 10px;
  width: 44px;
  font-size: 0;
  background: linear-gradient(to left, var(--bg) 35%, rgba(245, 244, 240, 0));
  pointer-events: none;
  opacity: 0.9;
}
@media (min-width: 768px) {
  .cats-hint { display: none; }
}

/* ================= 产品列表 ================= */
.product-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 6px;
}
@media (min-width: 768px) {
  .product-list { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .product-list { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}
@media (min-width: 1440px) {
  .product-list { grid-template-columns: repeat(5, 1fr); gap: 18px; }
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.1);
}
.product-card:active { transform: scale(0.985); }
.thumb-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  overflow: hidden;
  flex: none;
}
.product-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
@media (min-width: 768px) {
  .thumb-wrap { aspect-ratio: auto; height: 200px; }
}
@media (min-width: 1024px) {
  .thumb-wrap { height: 220px; }
}
@media (min-width: 1440px) {
  .thumb-wrap { height: 240px; }
}
.product-info { padding: 12px 14px 14px; }
.product-cat {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 6px;
  font-weight: 600;
}
.product-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-intro {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 加载更多 */
.load-more-wrap { text-align: center; margin-top: 20px; }
.load-more {
  min-width: 44px;
  min-height: 46px;
  padding: 0 32px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.18s ease;
}
.load-more:hover { border-color: var(--accent); color: var(--accent); }
.load-more:active { transform: scale(0.97); }

/* 空状态 */
.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-sub);
}
.empty .icon { width: 44px; height: 44px; color: var(--text-light); }
.empty-title { font-size: 17px; font-weight: 700; margin-top: 14px; color: var(--text); }
.empty-sub { font-size: 14px; margin-top: 6px; color: var(--text-light); }

/* ================= 详情页 ================= */
.detail-card { padding: 0 0 24px; }
.detail-hero {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.detail-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.detail-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 44px;
}
.detail-brand .icon { width: 16px; height: 16px; }
.detail-cat {
  font-size: 13px;
  color: var(--text-sub);
  background: var(--primary-light);
  border-radius: 999px;
  padding: 4px 12px;
}
.detail-hero img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}
.detail-title-wrap { padding: 16px 18px 4px; }
.detail-name { font-size: 21px; font-weight: 800; line-height: 1.35; color: var(--text); }
.detail-intro { margin-top: 8px; font-size: 14.5px; color: var(--text-sub); line-height: 1.7; }

/* 详情模块卡片 */
.detail-module {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}
.module-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.module-title .icon { width: 18px; height: 18px; color: var(--accent); }

/* 场景 */
.scenes { display: flex; flex-wrap: wrap; gap: 8px; }
.scene-chip {
  background: var(--primary-light);
  color: var(--text);
  font-size: 13px;
  border-radius: 10px;
  padding: 8px 12px;
}

/* 功效机制 */
.mechanism-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
}
.mechanism-group:last-child { margin-bottom: 0; }
.mechanism-title { font-size: 14.5px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.mechanism-points { list-style: none; }
.mechanism-points li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 6px;
  line-height: 1.65;
}
.mechanism-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.mechanism-highlight {
  margin-top: 10px;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.6;
}

/* 卖点 */
.feature {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feature:last-child { border-bottom: none; }
.feature-mark {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feature-mark .icon { width: 20px; height: 20px; }
.feature-body { min-width: 0; }
.feature-title { font-size: 14.5px; font-weight: 700; color: var(--text); }
.feature-desc { font-size: 13.5px; color: var(--text-sub); margin-top: 2px; line-height: 1.6; }

/* FAQ 手风琴 */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 0;
  border-radius: 8px;
}
.faq-q .faq-chevron {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--text-light);
  transition: transform 0.2s ease;
}
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); color: var(--accent); }
.faq-a {
  padding: 0 0 12px;
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* 话术 */
.transcript {
  white-space: pre-wrap;
  font-size: 14.5px;
  color: var(--text-sub);
  line-height: 1.8;
}

/* ================= 错误页 ================= */
.error-card {
  text-align: center;
  padding: 80px 24px;
}
.icon--error { width: 56px; height: 56px; color: var(--text-light); }
.error-title { font-size: 20px; font-weight: 800; margin-top: 16px; }
.error-sub { margin-top: 8px; color: var(--text-light); font-size: 14px; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 28px;
  margin-top: 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(17, 17, 17, 0.2); }
.btn-primary:active { transform: scale(0.97); }

/* ================= 焦点状态（键盘可访问性） ================= */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
button:focus-visible, input:focus-visible { outline-offset: 1px; }

/* ================= 页脚 ================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 16px 28px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-light);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
