/* =========================================================================
 * app.css — 展示端（index.html）专属样式 · 费乐 FEELO 风
 * 图纸：居中标题 + 彩色横幅卡 + 分类 + 双列产品卡
 * 教程：搜索框 + 左侧分类栏 + 右侧列表
 * 书架：收藏网格  我的：资料卡 + 统计 + 菜单
 * 详情：导航 + 信息卡 + 3D / 平面 切换
 * ========================================================================= */

/* ---------- 图标按钮 ---------- */
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.1s, color 0.15s;
}

.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; }

/* =========================================================================
 * 图纸页
 * ======================================================================= */
.home-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-4) var(--space-3);
}

.home-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.home-head .icon-btn {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
}

.home-head .icon-btn:active { transform: translateY(-50%) scale(0.94); }

/* ---- 彩色横幅卡 ---- */
.banner-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-2);
}

.banner-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  min-height: 116px;
  box-shadow: var(--shadow-card);
  transition: transform 0.12s;
}

.banner-card:active { transform: scale(0.985); }

.banner-card .bc-inner {
  position: relative;
  height: 100%;
  min-height: 116px;
  padding: 18px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-card .bc-txt {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.banner-card .bc-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

.banner-card .bc-sub {
  margin-top: 6px;
  font-size: var(--fs-caption);
  opacity: 0.92;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.banner-card .bc-no {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.banner-card .bc-img {
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow: 0 6px 18px rgba(31, 41, 55, 0.12);
}

.banner-card .bc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-card .bc-img .ph {
  width: 46px;
  height: 46px;
  opacity: 0.35;
}

/* 色彩主题 */
.bc-yellow { background: linear-gradient(120deg, #FFEFB8 0%, #FFC53D 100%); }
.bc-yellow .bc-title { color: #6B4E00; }
.bc-yellow .bc-sub { color: #7A5C00; }
.bc-yellow .bc-no { color: #8A6A00; }

.bc-blue { background: linear-gradient(120deg, #B7C9FF 0%, #3B6CFF 100%); }
.bc-blue .bc-title { color: #fff; }
.bc-blue .bc-sub { color: rgba(255, 255, 255, 0.92); }
.bc-blue .bc-no { color: var(--accent-blue); }

.bc-teal { background: linear-gradient(120deg, #B5F0E4 0%, #12B8A6 100%); }
.bc-teal .bc-title { color: #fff; }
.bc-teal .bc-sub { color: rgba(255, 255, 255, 0.92); }
.bc-teal .bc-no { color: var(--accent-teal); }

.bc-red { background: linear-gradient(120deg, #FFC7BB 0%, #FF4D2E 100%); }
.bc-red .bc-title { color: #fff; }
.bc-red .bc-sub { color: rgba(255, 255, 255, 0.92); }
.bc-red .bc-no { color: var(--brand-deep); }

/* ---- 分区标题 ---- */
.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.section-row h2 {
  margin: 0;
  font-size: var(--fs-h2);
  font-weight: 800;
  color: var(--text-primary);
}

.section-row .section-more {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  cursor: pointer;
}

/* ---- 分类胶囊 ---- */
.category-row {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}

.category-row::-webkit-scrollbar { display: none; }
.category-row .chip { flex: 0 0 auto; }

/* ---- 产品卡片网格（双列）---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4) var(--space-5);
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.12s;
  position: relative;
}

.product-card:active { transform: scale(0.985); }

.product-card .p-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #F2F4FA 0%, #E9EDF7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--divider);
  overflow: hidden;
}

.product-card .p-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .p-thumb .ph { width: 42%; height: 42%; opacity: 0.55; }

.product-card .p-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 77, 46, 0.92);
  color: #fff;
  font-size: var(--fs-small);
  font-weight: 700;
}

.product-card .p-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.product-card .p-fav.on { color: var(--brand); }
.product-card .p-fav svg { width: 16px; height: 16px; }

.product-card .p-meta { padding: 10px 12px 12px; }

.product-card .p-name {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.product-card .p-no {
  margin-top: 4px;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.product-card .p-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.product-card .p-tags .tag {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  font-weight: 600;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.product-card .p-tags .tag.flat { background: var(--brand-soft); color: var(--brand); }
.product-card .p-tags .tag.plain { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border-soft); }

.product-card .p-stats {
  margin-top: 6px;
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* =========================================================================
 * 教程页
 * ======================================================================= */
.tut-head {
  padding: var(--space-2) var(--space-4) var(--space-3);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.search-bar svg {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  flex: 0 0 auto;
}

.search-bar input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: var(--fs-body);
  color: var(--text-primary);
}

.search-bar input::placeholder { color: var(--text-tertiary); }

.search-bar .search-clear {
  border: 0;
  background: var(--bg);
  color: var(--text-tertiary);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  display: none;
}

.search-bar.has-text .search-clear { display: block; }

/* 左右布局：左分类栏 + 右列表 */
.tut-body {
  display: flex;
  align-items: stretch;
  padding-bottom: var(--space-3);
}

.tut-side {
  flex: 0 0 96px;
  width: 96px;
  padding: var(--space-2) var(--space-2) var(--space-5) 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  max-height: calc(100dvh - var(--tabbar-height) - var(--statusbar-height));
  overflow-y: auto;
  scrollbar-width: none;
}

.tut-side::-webkit-scrollbar { display: none; }

.tut-cat {
  position: relative;
  min-height: 40px;
  border: 0;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-caption);
  font-weight: 600;
  padding: 0 10px 0 14px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tut-cat.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.tut-cat.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: var(--brand);
}

.tut-list {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0 var(--space-4) var(--space-5) var(--space-2);
}

.tut-item {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.12s;
}

.tut-item:active { transform: scale(0.985); }

.tut-item .tut-thumb {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #F2F4FA 0%, #E9EDF7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--divider);
  overflow: hidden;
}

.tut-item .tut-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tut-item .tut-thumb .ph { width: 38px; height: 38px; opacity: 0.55; }

.tut-item .tut-info {
  flex: 1 1 auto;
  min-width: 0;
}

.tut-item .tut-name {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tut-item .tut-no {
  margin-top: 4px;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
}

.tut-item .tut-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.tut-item .tut-tags .tag {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  font-weight: 600;
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.tut-item .tut-tags .tag.flat { background: var(--brand-soft); color: var(--brand); }
.tut-item .tut-tags .tag.plain { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border-soft); }

.tut-item .tut-go {
  flex: 0 0 auto;
  color: var(--text-tertiary);
}

.tut-item .tut-go svg { width: 18px; height: 18px; }

/* =========================================================================
 * 书架页
 * ======================================================================= */
.bookshelf-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: var(--space-3) var(--space-4) var(--space-2);
}

.bookshelf-head h1 {
  margin: 0;
  font-size: var(--fs-h1);
  font-weight: 800;
}

.bookshelf-head .bookshelf-count {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}

/* =========================================================================
 * 我的页
 * ======================================================================= */
.mine-wrap { padding: var(--space-3) var(--space-4); }

.profile-card {
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, #FF6B4A 0%, #FF4D2E 55%, #E63E22 100%);
  padding: var(--space-5);
  color: #fff;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  box-shadow: 0 8px 24px rgba(255, 77, 46, 0.3);
  position: relative;
  overflow: hidden;
}

.profile-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.profile-avatar svg { width: 38px; height: 38px; }

.profile-info { position: relative; z-index: 1; min-width: 0; }

.profile-name {
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-sub {
  margin-top: 4px;
  font-size: var(--fs-caption);
  opacity: 0.92;
}

/* 统计 */
.profile-stats {
  display: flex;
  margin-top: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-4) 0;
}

.profile-stats .pstat {
  flex: 1;
  text-align: center;
  position: relative;
}

.profile-stats .pstat + .pstat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--divider);
}

.profile-stats .pstat b {
  display: block;
  font-size: var(--fs-h1);
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.profile-stats .pstat span {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

/* 菜单 */
.menu-list {
  margin-top: var(--space-4);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-4);
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px solid var(--divider);
}

.menu-item:last-child { border-bottom: 0; }

.menu-item:active { background: var(--bg); }

.menu-ico {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: var(--brand-soft);
  color: var(--brand);
}

.menu-ico.blue { background: var(--accent-blue-soft); color: var(--accent-blue); }
.menu-ico.teal { background: var(--accent-teal-soft); color: var(--accent-teal); }
.menu-ico.orange { background: var(--accent-yellow-soft); color: var(--accent-orange); }

.menu-ico svg { width: 18px; height: 18px; }

.menu-label {
  flex: 1 1 auto;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-primary);
}

.menu-value {
  font-size: var(--fs-caption);
  color: var(--text-tertiary);
}

.menu-arrow { color: var(--text-tertiary); }
.menu-arrow svg { width: 16px; height: 16px; }


/* ---- 无封面产品：彩色首字渐变占位 ---- */
.thumb-fb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  user-select: none;
}

.bc-img .thumb-fb { font-size: 30px; }
.hero-img .thumb-fb { font-size: 32px; }

.fb-0 { background: linear-gradient(135deg, #FFC53D 0%, #FF9F0A 100%); }
.fb-1 { background: linear-gradient(135deg, #6B93FF 0%, #3B6CFF 100%); }
.fb-2 { background: linear-gradient(135deg, #35CFBE 0%, #12B8A6 100%); }
.fb-3 { background: linear-gradient(135deg, #FF7A5C 0%, #FF4D2E 100%); }


/* ---- 横幅轮播（壁纸/广告）---- */
.banner-section { padding: var(--space-2) var(--space-4) 0; }
.banner-viewport {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--bg-card);
}
.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s ease;
  will-change: transform;
}
.banner-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
  background: linear-gradient(120deg, #FFE9A8 0%, #FFC53D 100%);
}
.banner-slide > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 16px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  color: #fff;
}
.banner-caption .b-title { font-size: var(--fs-h2); font-weight: 800; }
.banner-caption .b-sub { font-size: var(--fs-caption); opacity: 0.9; margin-top: 2px; }
.banner-section .banner-card { height: 100%; min-height: 0; border-radius: 0; box-shadow: none; }
.banner-slide .ad-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand);
  font-size: var(--fs-small);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
  box-shadow: var(--shadow-card);
}
.banner-dots {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}
.banner-dots .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s, background 0.25s;
}
.banner-dots .dot.active {
  width: 16px;
  border-radius: 3px;
  background: #fff;
}

/* =========================================================================
 * 详情页
 * ======================================================================= */
.detail-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: calc(var(--safe-top) + 6px) var(--space-3) 6px;
  background: var(--bg);
  flex: 0 0 auto;
}

.detail-nav .back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.detail-nav .back svg { width: 20px; height: 20px; }

.detail-nav .title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-nav .fav-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

.detail-nav .fav-btn.on { color: var(--brand); }
.detail-nav .fav-btn svg { width: 20px; height: 20px; }

/* 信息卡 */
.detail-hero {
  margin: var(--space-2) var(--space-4) var(--space-3);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(120deg, #B7C9FF 0%, #3B6CFF 100%);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  box-shadow: 0 8px 24px rgba(59, 108, 255, 0.28);
  color: #fff;
}

.detail-hero .hero-img {
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.detail-hero .hero-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .hero-img .ph { width: 46px; height: 46px; opacity: 0.35; color: var(--accent-blue); }

.detail-hero .hero-info { flex: 1 1 auto; min-width: 0; }

.detail-hero .hero-name {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-hero .hero-no {
  margin-top: 6px;
  font-size: var(--fs-caption);
  opacity: 0.92;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

.detail-hero .hero-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.detail-hero .hero-tags .tag {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--accent-blue);
}

/* Tab 切换（分段式） */
.detail-tabs {
  display: flex;
  gap: 6px;
  padding: var(--space-1) var(--space-4) var(--space-2);
  flex: 0 0 auto;
}

.detail-tabs .dtab {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.detail-tabs .dtab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: var(--shadow-button);
}

.detail-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--space-2) var(--space-4) var(--space-5);
}

.detail-panel { display: none; }
.detail-panel.active { display: block; }

/* 3D 工具条（原版说明书入口） */
.mp3d-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

/* 3D iframe */
.manual-frame {
  width: 100%;
  height: 68vh;
  height: 68dvh;
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
}

/* 平面说明书 */
.flat-viewer {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.flat-viewer iframe {
  width: 100%;
  height: 68vh;
  height: 68dvh;
  border: 0;
}

.flat-carousel { position: relative; }

.flat-carousel img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.flat-carousel .fc-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-float);
}

.flat-carousel .fc-prev { left: 10px; }
.flat-carousel .fc-next { right: 10px; }

.flat-carousel .fc-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: rgba(31, 41, 55, 0.78);
  color: #fff;
  font-size: var(--fs-small);
}

.detail-section-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--text-primary);
  margin: var(--space-4) 0 var(--space-2);
}

/* 空状态内边距 */
.detail-panel .empty { padding: var(--space-10) var(--space-4); }

/* ---------- 桌面端微调 ---------- */
@media (min-width: 520px) {
  .app-shell {
    border-left: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft);
  }
}

/* 产品展示详情 */
.product-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 var(--space-4) var(--space-3);
}
.product-metrics .metric {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 12px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.product-metrics .metric-wide { grid-column: 1 / -1; }
.product-metrics .metric-value {
  color: var(--text-primary);
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: 1.35;
}
.product-metrics .metric-label {
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: var(--fs-caption);
}
.product-original {
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}
.product-original img {
  max-width: 100%;
  max-height: 66vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.compare-item {
  min-width: 0;
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
}
.compare-label {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: var(--fs-caption);
  font-weight: 700;
  text-align: center;
}
.compare-frame {
  width: 100%;
  height: clamp(260px, calc((100vh - 160px) / 2), 480px);
  min-height: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: #fff;
}
.compare-img {
  display: block;
  width: 100%;
  height: clamp(260px, calc((100vh - 160px) / 2), 480px);
  min-height: 0;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #fff;
}





.interaction-caption {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: var(--fs-caption);
  text-align: center;
}

/* ---------- 客户分享模式（隐藏导航，仅保留当前产品） ---------- */
html.share-mode .capsule,
.share-mode .capsule,
.share-mode .tabbar {
  display: none !important;
}

.share-mode .view-scroll {
  padding-bottom: calc(var(--safe-bottom) + 12px);
}

.share-mode .detail-nav .back,
.share-mode .detail-nav .fav-btn,
.share-mode #shareProduct {
  display: none !important;
}
