/* ============================================================
   页面级排版（按设计稿量测表，375 基准紧凑密度）
   ============================================================ */

/* ---------- 首页 ---------- */
.home-hero {
  background: linear-gradient(165deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-700) 100%);
  padding: 10px 12px 10px;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; }
.brand-name {
  color: #fff; font-size: 18px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.brand-icon svg { width: 22px; height: 22px; }
.tagline {
  color: rgba(255, 255, 255, 0.92); margin-top: 6px;
  display: flex; gap: 6px; align-items: center; font-size: 12px;
}
.tagline-icon svg { width: 15px; height: 15px; }

.home-body {
  margin-top: 5px;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* AI 咨询 banner：绿底横幅 + 右侧照片位 + 标题叠在左侧 + 右侧橙色胶囊按钮 */
.banner-card {
  position: relative;
  margin-top: 8px;
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 74px;
  display: flex;
}
.banner-photo { width: 42%; flex-shrink: 0; background: rgba(255, 255, 255, 0.12); }
.banner-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(22,89,67,0.72) 0%, rgba(31,122,92,0.25) 55%, rgba(31,122,92,0) 100%);
  pointer-events: none;
}
.banner-text {
  flex: 1; padding: 12px 12px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
}
.banner-title { color: #fff; font-size: 20px; font-weight: 800; }
.banner-sub { color: rgba(255, 255, 255, 0.9); font-size: 11px; }
.banner-btn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }

/* 四宫格入口 */
.grid-entry { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.grid-entry-cell { display: flex; gap: 10px; align-items: center; text-align: left; min-width: 0; }
.entry-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.entry-icon--green { background: var(--green-100); color: var(--green-800); }
.entry-icon--orange { background: var(--orange-100); color: var(--orange-500); }
.entry-icon--blue { background: var(--blue-100); color: var(--blue-600); }
.entry-icon--purple { background: var(--purple-100); color: var(--purple-600); }
.entry-icon svg { width: 20px; height: 20px; }
.entry-text { display: flex; flex-direction: column; gap: 2px; }
.entry-title { font-size: 13px; font-weight: 700; }
.entry-desc { font-size: 11px; color: var(--ink-500); }

/* 列表栅格 */
.science-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.task-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

/* ---------- 商品详情 ---------- */
.detail-page .section-card { margin: 12px 12px 0; }
.detail-hero {
  position: relative;
  width: 100%;
  height: 214px;
  margin: 0;
  overflow: hidden;
}
.detail-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.detail-hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.50) 46%, rgba(255,255,255,0.92) 100%);
}
.detail-hero-info {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 56%; padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 30%, rgba(255,255,255,0.96) 100%);
}
.detail-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.detail-name { font-size: 18px; font-weight: 800; color: var(--ink-900); }
.detail-sub { font-size: 12px; color: var(--ink-700); }
.detail-price-row { margin-top: 2px; }
.detail-price { color: var(--orange-600); font-weight: 800; font-size: 22px; }
.detail-sold { font-size: 11px; color: var(--ink-500); }
.detail-hero-btns { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.step-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

/* 小屏收窄 */
@media (max-width: 340px) {
  .science-grid, .feature-grid, .step-grid { grid-template-columns: repeat(2, 1fr); }
  .task-grid { grid-template-columns: repeat(2, 1fr); }
}
