/* 安生源商城 · 中医雅致风格 */
:root {
  --paper: #f7f3ea;
  --paper-2: #fdfbf6;
  --ink: #2b2b26;
  --ink-2: #6b675c;
  --green: #1e5a3c;
  --green-deep: #153e2a;
  --gold: #b08d57;
  --red: #9e3b2b;
  --line: #e5ddcc;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: var(--sans);
  background: #efe9dc;
  color: var(--ink);
  line-height: 1.6;
}
#app { max-width: 480px; margin: 0 auto; background: var(--paper); min-height: 100vh; position: relative; box-shadow: 0 0 24px rgba(0,0,0,.08); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.page-loading { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--green); }
.seal { width: 64px; height: 64px; border-radius: 10px; background: var(--red); color: #fff; font-family: var(--serif); font-size: 34px; display: flex; align-items: center; justify-content: center; }
.page-loading p { font-family: var(--serif); letter-spacing: 8px; font-size: 18px; }

/* ---------- 顶部品牌栏 ---------- */
.brand-bar {
  padding: 18px 16px 12px;
  display: flex; align-items: center; gap: 12px;
  background: var(--paper);
}
.brand-bar .seal { width: 44px; height: 44px; font-size: 24px; border-radius: 8px; flex: none; }
.brand-bar .names h1 { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 4px; color: var(--green-deep); }
.brand-bar .names p { font-size: 11px; color: var(--gold); letter-spacing: 3px; margin-top: 2px; }

/* ---------- Banner 轮播 ---------- */
.swiper { overflow-x: auto; scroll-snap-type: x mandatory; display: flex; scrollbar-width: none; }
.swiper::-webkit-scrollbar { display: none; }
.swiper .slide { flex: 0 0 100%; scroll-snap-align: center; }
.swiper .slide img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #cfc6b2; transition: .2s; }
.dots i.on { background: var(--green); width: 16px; border-radius: 3px; }

/* ---------- 通用区块 ---------- */
.section { padding: 22px 16px 6px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-family: var(--serif); font-size: 19px; color: var(--green-deep); letter-spacing: 2px; position: relative; padding-left: 12px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; background: var(--gold); border-radius: 2px; }
.section-head .more { font-size: 12px; color: var(--ink-2); }

/* ---------- 品质承诺 ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px 16px 4px; }
.feature { text-align: center; }
.feature .ic {
  width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--green);
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2);
}
.feature .ic svg { width: 26px; height: 26px; }
.feature p { font-size: 12px; color: var(--ink-2); letter-spacing: 1px; }

/* ---------- 药食同源 ---------- */
.intro-card {
  margin: 16px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #20402f, #15301f);
  color: #f0e9d8; position: relative;
}
.intro-card .body { padding: 22px 20px; position: relative; z-index: 1; }
.intro-card h3 { font-family: var(--serif); font-size: 20px; letter-spacing: 6px; margin-bottom: 10px; color: #f3e6c8; }
.intro-card p { font-size: 13px; line-height: 1.9; opacity: .92; }
.intro-card .tag { display: inline-block; margin-top: 14px; font-size: 11px; letter-spacing: 2px; border: 1px solid rgba(240,230,200,.5); padding: 4px 12px; border-radius: 999px; }

/* ---------- 产品卡片 ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.pcard { background: var(--paper-2); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.pcard .pic { aspect-ratio: 1; background: #f0ebdd; overflow: hidden; position: relative; }
.pcard .pic img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pic .noimg { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--gold); gap: 8px; }
.pcard .pic .noimg svg { width: 40px; height: 40px; opacity: .7; }
.pcard .pic .noimg span { font-size: 11px; letter-spacing: 2px; }
.pcard .info { padding: 10px 12px 12px; }
.pcard h3 { font-size: 14px; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .sub { font-size: 11px; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard .price-row { margin-top: 8px; display: flex; align-items: baseline; gap: 6px; }
.pcard .price { color: var(--red); font-weight: 700; font-size: 17px; }
.pcard .price::before { content: "¥"; font-size: 12px; margin-right: 1px; }
.pcard .mprice { font-size: 11px; color: #b3ab98; text-decoration: line-through; }

/* ---------- 品牌故事 ---------- */
.story { margin: 16px; padding: 22px 20px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; }
.story h2 { font-family: var(--serif); font-size: 19px; color: var(--green-deep); letter-spacing: 2px; margin-bottom: 10px; }
.story p { font-size: 13px; color: var(--ink-2); line-height: 2; }
.story .motto { margin-top: 14px; font-family: var(--serif); color: var(--gold); letter-spacing: 4px; font-size: 14px; text-align: right; }

/* ---------- 页脚 ---------- */
.footer { text-align: center; padding: 26px 16px 90px; color: #a89f8a; font-size: 11px; letter-spacing: 1px; }
.footer .name { font-family: var(--serif); color: var(--green); font-size: 13px; letter-spacing: 4px; margin-bottom: 6px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 50;
  display: flex; background: rgba(253,251,246,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 0 10px; color: var(--ink-2); font-size: 11px; gap: 3px; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--green); }
.tabbar a.on svg { stroke: var(--green); }

/* ---------- 搜索 ---------- */
.search-wrap { padding: 14px 16px 4px; position: sticky; top: 0; background: var(--paper); z-index: 10; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px;
}
.search-box svg { width: 16px; height: 16px; stroke: var(--ink-2); flex: none; }
.search-box input { border: none; outline: none; background: none; flex: 1; font-size: 14px; color: var(--ink); }

/* ---------- 产品列表页 ---------- */
.plist { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.prow { display: flex; gap: 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prow .pic { width: 118px; height: 118px; flex: none; background: #f0ebdd; }
.prow .pic img { width: 100%; height: 100%; object-fit: cover; }
.prow .pic .noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.prow .pic .noimg svg { width: 34px; height: 34px; opacity: .7; }
.prow .info { flex: 1; padding: 10px 12px 10px 0; display: flex; flex-direction: column; }
.prow h3 { font-size: 15px; font-weight: 600; }
.prow .sub { font-size: 12px; color: var(--ink-2); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow .price-row { margin-top: auto; display: flex; align-items: baseline; gap: 6px; }
.prow .price { color: var(--red); font-weight: 700; font-size: 18px; }
.prow .price::before { content: "¥"; font-size: 12px; }
.prow .mprice { font-size: 11px; color: #b3ab98; text-decoration: line-through; }
.empty { text-align: center; color: var(--ink-2); font-size: 13px; padding: 60px 0; }

/* ---------- 详情页 ---------- */
.detail-hero { background: #f0ebdd; }
.detail-hero img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail-hero .noimg { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--gold); }
.detail-hero .noimg svg { width: 72px; height: 72px; opacity: .7; }
.detail-main { padding: 18px 16px; background: var(--paper-2); border-radius: 16px 16px 0 0; margin-top: -14px; position: relative; }
.detail-main h1 { font-family: var(--serif); font-size: 21px; color: var(--ink); }
.detail-main .sub { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.detail-main .price-row { margin-top: 14px; display: flex; align-items: baseline; gap: 10px; }
.detail-main .price { color: var(--red); font-size: 26px; font-weight: 700; }
.detail-main .price::before { content: "¥"; font-size: 15px; }
.detail-main .mprice { color: #b3ab98; text-decoration: line-through; font-size: 13px; }
.detail-main .meta { margin-top: 12px; display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.detail-sec { padding: 18px 16px; }
.detail-sec h2 { font-family: var(--serif); font-size: 17px; color: var(--green-deep); letter-spacing: 2px; margin-bottom: 10px; padding-left: 12px; position: relative; }
.detail-sec h2::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; background: var(--gold); border-radius: 2px; }
.detail-sec .text { font-size: 14px; color: #4a473e; line-height: 2; white-space: pre-wrap; }
.detail-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 50;
  display: flex; gap: 10px; padding: 10px 16px 14px;
  background: rgba(253,251,246,.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px);
}
.detail-bar .btn { flex: 1; text-align: center; padding: 12px 0; border-radius: 999px; font-size: 15px; letter-spacing: 2px; }
.detail-bar .btn.tel { background: var(--green); color: #fff; }
.detail-bar .btn.wx { border: 1px solid var(--green); color: var(--green); }
.detail-space { height: 76px; }

/* ---------- 联系页 ---------- */
.contact-hero { padding: 40px 24px 10px; text-align: center; }
.contact-hero .seal { margin: 0 auto 16px; }
.contact-hero h1 { font-family: var(--serif); font-size: 24px; letter-spacing: 6px; color: var(--green-deep); }
.contact-hero p { color: var(--gold); font-size: 12px; letter-spacing: 3px; margin-top: 6px; }
.contact-list { padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.contact-item { display: flex; align-items: center; gap: 14px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.contact-item .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.contact-item .ic svg { width: 20px; height: 20px; }
.contact-item .tx { flex: 1; }
.contact-item .tx h3 { font-size: 14px; font-weight: 600; }
.contact-item .tx p { font-size: 12px; color: var(--ink-2); margin-top: 2px; word-break: break-all; }
.contact-item .act { font-size: 12px; color: var(--green); border: 1px solid var(--green); padding: 5px 14px; border-radius: 999px; flex: none; }
.toast {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%);
  background: rgba(30, 30, 26, .85); color: #fff; font-size: 13px;
  padding: 10px 22px; border-radius: 8px; z-index: 99; letter-spacing: 1px;
}
