/* ================= 更必来 · 极简三页签样式 ================= */
:root {
  --bg: #f5f6f4;
  --card: #ffffff;
  --line: #eef0ec;
  --t1: #1c2b20;   /* 主文字 */
  --t2: #7d887e;   /* 次文字 */
  --t3: #aeb6ac;   /* 弱文字 */
  --green: #1e8e3e;       /* 主色：农业绿 */
  --green-deep: #14682d;
  --green-soft: #eaf5ec;
  --price: #e0521f;       /* 价格色 */
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #e6e9e4; color: var(--t1);
  display: flex; justify-content: center;
  font-size: 14px; line-height: 1.55;
}
img { display: block; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

#phone {
  width: 100%; max-width: 480px; height: 100vh; height: 100dvh; min-height: 600px;
  background: var(--bg); position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  font-size: clamp(13.5px, 3.7vw, 15px);
}
#app { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#app::-webkit-scrollbar { display: none; }

/* ---------- 顶部品牌栏 ---------- */
#topbar {
  flex-shrink: 0; display: flex; align-items: baseline; gap: 10px;
  padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line); z-index: 20;
}
#topbar { align-items: center; }
#topbar .logo { display: flex; align-items: center; gap: 6px; font-size: 1.28em; font-weight: 800; color: var(--green-deep); white-space: nowrap; }
#topbar .logo img { height: 30px; width: auto; display: block; object-fit: contain; }
#topbar .sub { font-size: .72em; color: var(--t2); margin-left: auto; white-space: nowrap; }

/* ---------- 底部三页签 ---------- */
#tabbar {
  flex-shrink: 0; height: 58px; background: #fff; border-top: 1px solid var(--line);
  display: flex; position: relative; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
#tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 14.5px; color: var(--t2); cursor: pointer; user-select: none;
}
#tabbar .tab .ti { font-size: 21px; line-height: 1; filter: grayscale(1) opacity(.6); }
#tabbar .tab.on { color: var(--green-deep); font-weight: 700; }
#tabbar .tab.on .ti { filter: none; }

/* ---------- 列表（左图右名 + 描述） ---------- */
.list { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.row-item {
  display: flex; gap: 12px; background: var(--card); border-radius: var(--radius);
  padding: 11px; cursor: pointer; align-items: center;
  box-shadow: 0 1px 2px rgba(30,50,32,.04);
}
.row-item:active { background: #fafbf8; }
.row-item .thumb {
  width: 76px; height: 76px; border-radius: 10px; background: #eef1ec; flex-shrink: 0; object-fit: cover;
}
.row-item .meta { flex: 1; min-width: 0; }
.row-item .name {
  font-size: .98em; font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.row-item .desc {
  font-size: .82em; color: var(--t2); margin-top: 5px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-item .extra { margin-top: 6px; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 90px 0 40px; color: var(--t3); }
.empty .big { font-size: 44px; margin-bottom: 12px; }
.empty span { font-size: .82em; }

/* ---------- 详情浮层 ---------- */
.mask {
  position: absolute; inset: 0; background: rgba(20,26,20,.45); z-index: 50;
  display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity .22s;
}
.mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; background: #fff; border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .26s ease;
  max-height: 88%; overflow-y: auto; position: relative;
}
.mask.show .sheet { transform: translateY(0); }
.sheet .close { position: absolute; right: 14px; top: 12px; font-size: 19px; color: var(--t3); cursor: pointer; z-index: 2; }

.d-hero { margin: -4px -4px 12px; border-radius: 12px; overflow: hidden; background: #eef1ec; }
.d-hero img { width: 100%; max-height: 320px; object-fit: cover; }
.d-thumbs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.d-thumbs img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex-shrink: 0; cursor: pointer; border: 2px solid transparent; opacity: .75; }
.d-thumbs img.on { border-color: var(--green); opacity: 1; }
.d-thumbs .tvid { width: 72px; height: 72px; border-radius: 8px; flex-shrink: 0; cursor: pointer; border: 2px solid transparent; opacity: .75; background: #1c1c1e; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.d-thumbs .tvid.on { border-color: var(--green); opacity: 1; }
.d-thumbs::-webkit-scrollbar { display: none; }

.d-title { font-size: 1.18em; font-weight: 800; line-height: 1.45; }
.d-summary { font-size: .92em; color: var(--t2); margin-top: 8px; line-height: 1.6; }
.d-content { font-size: .9em; color: #37423a; margin-top: 10px; line-height: 1.75; white-space: pre-wrap; }

.d-block { background: #fff; border-top: 1px solid var(--line); margin: 12px -16px 0; padding: 14px 16px; }
.d-block .bt { font-size: .95em; font-weight: 800; margin-bottom: 10px; position: relative; padding-left: 9px; }
.d-block .bt::before { content: ""; position: absolute; left: 0; top: 3px; width: 4px; height: 14px; border-radius: 2px; background: var(--green); }
.d-block video { width: 100%; border-radius: 10px; background: #000; }
.d-imgs { display: flex; flex-direction: column; gap: 8px; }
.d-imgs img { width: 100%; border-radius: 10px; background: #eef1ec; }
.d-imgs video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; object-fit: contain; }

/* 三阶段标题：字号更大 + 淡绿色边框 */
.d-block .stage-bt { font-size: 1.12em; padding: 8px 10px 8px 14px; border: 1px solid #b7e0ba; border-radius: 8px; background: #f4fbf4; }
.d-block .stage-bt::before { top: 50%; transform: translateY(-50%); height: 16px; }

/* ---------- 套餐详情改版：痛点前置 + 模块化卡片（单列流式） ---------- */
/* ① 痛点警示（红） */
.pain-tag { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; background: #fdecea; border: 1px solid #f5c6c0; border-left: 4px solid #d93025; border-radius: 10px; font-size: .92em; line-height: 1.55; color: #a52318; }
.pain-tag b { color: #b3261e; }
.pt-ico { flex-shrink: 0; }

/* ③ 核心收益（品牌绿，效果前置） */
.benefit-card { margin-top: 14px; padding: 12px 14px; background: var(--green-soft); border: 1px solid #bfe3c6; border-left: 4px solid var(--green); border-radius: 10px; }
.benefit-card .bc-t { font-size: .98em; font-weight: 800; color: var(--green-deep); margin-bottom: 8px; }
.benefit-card .bc-item { font-size: .92em; color: #1c5e2e; line-height: 1.9; }
.benefit-card .bc-body { font-size: .92em; color: #1c5e2e; line-height: 1.75; }

/* ④ 配方/频次/作物：浅色小标签 */
.tag-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.tag-row { font-size: .88em; line-height: 1.6; padding: 9px 12px; border-radius: 9px; color: #33413a; }
.tag-row b { color: #23312a; }
.tag-blue { background: #eef5fc; border: 1px solid #cfe3f5; }
.tag-gray { background: #f5f6f4; border: 1px solid var(--line); }
.tag-green { background: var(--green-soft); border: 1px solid #cfe8d4; }
.tr-ico { margin-right: 4px; }

/* ② 顶部产品组合区 */
.combo { display: flex; align-items: stretch; justify-content: center; gap: 6px; margin-top: 14px; }
.combo .loading, .combo .muted { width: 100%; text-align: center; color: var(--t3); font-size: .9em; padding: 20px 0; }
.combo-item { flex: 1 1 0; min-width: 0; text-align: center; }
.combo-item .ci-imgbox { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.combo-item img { width: 100%; height: 110px; object-fit: contain; display: block; }
.combo-item .ci-name { margin-top: 8px; font-size: .95em; font-weight: 800; color: #23312a; line-height: 1.4; }
.combo-item .ci-pos { margin-top: 4px; font-size: .78em; color: var(--green-deep); background: var(--green-soft); border-radius: 999px; padding: 2px 8px; display: inline-block; max-width: 100%; }
.combo-plus { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 2px; flex-shrink: 0; }
.combo-plus .cp-x { font-size: 26px; font-weight: 800; color: var(--green); line-height: 1; }
.combo-plus .cp-t { font-size: .68em; font-weight: 700; color: var(--green-deep); background: var(--green-soft); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.combo-fallback { width: 100%; border-radius: 12px; display: block; }

/* 「方案包含产品」：卡片式，简介不截断 */
.pkg-products { display: flex; flex-direction: column; gap: 10px; }
.pkg-products .pkg-card { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.pkg-products .pkg-card:active { background: #f7faf6; }
.pkg-products .pc-img { width: 84px; height: 84px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex-shrink: 0; }
.pkg-products .pc-body { flex: 1; min-width: 0; }
.pkg-products .pc-name { font-size: .98em; font-weight: 800; color: #23312a; line-height: 1.45; }
.pkg-products .pc-pos { margin-top: 4px; font-size: .8em; color: var(--green-deep); }
.pkg-products .pc-core { margin-top: 6px; font-size: .84em; color: #4a564f; line-height: 1.7; }
b.em-num { font-weight: 800; font-size: 1.12em; color: var(--green-deep); }

/* 弹窗底部关闭按钮 */
.sheet-close { margin-top: 18px; }
.sheet-close button { width: 100%; padding: 12px; font-size: .95em; color: var(--t2); background: #f4f6f2; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.sheet-close button:active { background: #e9ede6; }
.usage-box { font-size: .88em; line-height: 1.75; color: #37423a; background: #fafbf8; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }

/* 套餐内产品 */
.pkg-products { display: flex; flex-direction: column; gap: 9px; }
.pkg-products .mini-row { display: flex; gap: 10px; align-items: center; background: #fafbf8; border-radius: 10px; padding: 9px; cursor: pointer; }
.pkg-products .mini-row:active { background: #f1f4ef; }
.pkg-products .thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #eef1ec; flex-shrink: 0; }
.pkg-products .meta { flex: 1; min-width: 0; }
.pkg-products .name { font-size: .9em; font-weight: 700; }
.pkg-products .desc { font-size: .78em; color: var(--t2); margin-top: 3px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pkg-products .extra { margin-top: 4px; }
.muted { color: var(--t2); font-size: .85em; }
.loading { color: var(--t3); font-size: .85em; }

/* ---------- 地区展示（列表同效果案例；点开弹层展示图集网格） ---------- */
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.region-grid-detail { margin-top: 4px; }
.region-cell { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #eef1ec; cursor: zoom-in; }
.region-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.region-cell:active img { transform: scale(1.04); }
@media (min-width: 480px) {
  .region-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
}

/* 图片放大预览 */
#lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(12,16,12,.88); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
#lightbox.show { opacity: 1; pointer-events: auto; }
#lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 12px 44px rgba(0,0,0,.5); object-fit: contain; }

/* ---------- 响应式 ---------- */
@media (min-width: 520px) {
  body { background: #dde3da; }
  #phone { border-radius: 18px; box-shadow: 0 12px 44px rgba(30,50,32,.18); min-height: 92vh; margin: 16px 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
