/* ============================================================
   v1.20 设计系统「自然雅致」
   依据 2026 趋势：柔和自然色调（Pantone Cloud Dancer 米白）、
   超大圆角、多层柔和阴影、大留白、精致排版层次
   ============================================================ */
:root {
  /* 主色：森林绿（降低饱和，更沉稳高级） */
  --green: #3a6b52;
  --green-d: #2c5442;
  --green-l: #edf3ee;
  /* 辅助色：赤陶（花盆与大地，点缀用） */
  --wood: #b0764d;
  --gold: #c2a15c;
  /* 品牌主色别名：多处样式直接引用 --brand，此前未定义导致激活态/绿条/聚焦框全部失效 */
  --brand: #3a6b52;
  --brand-d: #2c5442;
  --text: #232a26;
  /* 中性：米白系背景（2026 年度色方向），炭灰文字而非纯黑 */
  --cream: #faf8f4;
  --bg: #f7f5f0;
  --card: #ffffff;
  --ink: #232a26;
  --muted: #79857e;
  --line: #e8e4dc;
  /* 语义色 */
  --danger: #b8503c;
  --warn: #c08a2e;
  --ok: #3a6b52;
  /* 形状：超大圆角（Bento 风格） */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  /* 阴影：多层柔和，告别生硬投影 */
  --shadow: 0 1px 2px rgba(35, 42, 38, .04), 0 6px 20px rgba(35, 42, 38, .06);
  --shadow-lg: 0 2px 4px rgba(35, 42, 38, .05), 0 12px 32px rgba(35, 42, 38, .10);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: .2px;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}

/* 顶栏（iOS 刘海/灵动岛安全区下沿自动补偿） */
.app-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(120deg, #3f7358 0%, #35604a 55%, #2b4d3c 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(35, 60, 45, .16);
}
/* 品牌标准字 LOGO（依据已注册「花之音」商标与展架设计规范） */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  font-size: 22px; width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: rgba(255,255,255,.16);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: 4px; }
.brand-text small { font-size: 10px; opacity: .82; letter-spacing: 1.2px; margin-top: 1px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.18); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.icon-btn:active { background: rgba(255,255,255,.32); }

/* ---------- v1.19 触控可达性：小图标按钮也要有 ≥44px 的可点击范围 ---------- */
/* 视觉尺寸不变，用透明热区（::after）扩大命中范围，不改变排版 */
.icon-btn, .fav-btn { position: relative; }
.icon-btn::after, .fav-btn::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }

/* 视图容器 */
.view { max-width: 720px; margin: 0 auto; padding: 14px 14px 90px; min-height: 60vh; }

/* 底部导航 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; max-width: 720px; margin: 0 auto;
  background: rgba(255,255,255,.86); backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(232,228,220,.9);
  box-shadow: 0 -6px 24px rgba(35, 50, 42, .08);
}
.tabbar button {
  flex: 1; border: none; background: none; cursor: pointer;
  padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: 11px;
}
.tabbar button span { font-size: 20px; }
.tabbar button.active { color: var(--green); font-weight: 600; }

/* 通用卡片（v1.20 大圆角 + 多层柔和阴影 + 悬停微反馈） */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.align-baseline { align-items: baseline; }
.between { justify-content: space-between; }
.muted { color: var(--muted); font-size: 13px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--green-l); color: var(--green-d); }
.tag.warn { background: #fbf0d8; color: var(--warn); }
.tag.danger { background: #fbe6e0; color: var(--danger); }

/* 网格 */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* 按钮 */
/* v1.20 按钮：品牌色渐变 + 大圆角 + 柔和落影 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; border-radius: 14px; padding: 12px 20px;
  font-size: 15px; font-weight: 600; letter-spacing: .3px; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff;
  box-shadow: 0 6px 16px rgba(58, 107, 82, .22);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:active { transform: translateY(1px) scale(.99); box-shadow: 0 3px 8px rgba(58, 107, 82, .18); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--green-l); color: var(--brand-d); box-shadow: none; }
.btn.line { background: #fff; color: var(--brand-d); border: 1.5px solid var(--brand); box-shadow: none; }
.btn.sm { padding: 9px 14px; font-size: 13.5px; }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 15px; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--green-l); border-color: var(--green); }

/* ---------- 登录 / 注册弹窗（v1.23.2：此前 .mask/.sheet/.auth-* 完全未定义，弹窗裸奔、无遮罩无居中 → 界面「乱」）---------- */
.mask {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(28, 43, 34, .42);
  backdrop-filter: blur(2px);
  animation: maskIn .2s ease;
}
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }
.sheet {
  width: 100%; max-width: 460px;
  background: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  max-height: 92vh; overflow: auto;
  animation: sheetUp .26s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sheetUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
.auth-sheet { max-width: 420px; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tabs button {
  flex: 1; border: none; background: none; cursor: pointer;
  padding: 9px 0; border-radius: 9px; font-size: 14px; font-weight: 600;
  color: var(--muted); transition: background .15s, color .15s;
}
.auth-tabs button.on { background: #fff; color: var(--brand-d); box-shadow: var(--shadow); }

/* 列表 */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 10px; cursor: pointer;
}
.list li:active { background: #fafbfa; }
.list .title { font-weight: 600; font-size: 15px; }
.list .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* 横幅 */
/* v1.20 Hero：柔和多段渐变 + 有机光斑 + 大标题留白 */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 30px 20px; color: #fff; margin-bottom: 18px;
  background: linear-gradient(135deg, #3f7358 0%, #35604a 45%, #2b4d3c 100%);
  box-shadow: 0 10px 30px rgba(43, 77, 60, .22);
}
.hero::before {
  content: ''; position: absolute; top: -60px; right: -40px;
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(194,161,92,.30), transparent 68%);
}
.hero::after {
  content: ''; position: absolute; bottom: -70px; left: -30px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.13), transparent 70%);
}
.hero h2 { position: relative; margin: 0 0 8px; font-size: 23px; font-weight: 600; letter-spacing: .6px; }
.hero p { position: relative; margin: 0; opacity: .9; font-size: 13.5px; letter-spacing: .3px; }

/* 快捷入口 */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 16px; }
.quick a {
  text-decoration: none; color: var(--ink); background: var(--card);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 14px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.quick a:active { transform: scale(.96); }
/* 图标置于浅绿柔底圆角方块内，比裸 emoji 更整齐精致 */
.quick a span {
  width: 42px; height: 42px; border-radius: 14px; background: var(--green-l);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.quick a span { font-size: 24px; }

/* 价格 */
.price { color: var(--wood); font-weight: 700; }
.price small { font-size: 12px; color: var(--muted); font-weight: 400; }

/* 进度条 */
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); }

/* 浮动提示 */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: rgba(31,42,36,.92); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 13px; z-index: 50; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.show { opacity: 1; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }
/* v1.19 专题区块标题：左侧绿条 + 右侧「更多」入口 */
.section-title { display: flex; align-items: center; justify-content: space-between; font-size: 16.5px; font-weight: 600; letter-spacing: .4px; color: var(--ink); margin: 26px 0 14px; padding: 0 0 11px 13px; border-bottom: 1px solid var(--line); position: relative; }
.section-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-65%); width: 4px; height: 17px; background: linear-gradient(180deg, var(--brand), var(--brand-d)); border-radius: 3px; }
.section-title .more { font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .15s; }
.section-title .more:hover { color: var(--brand); }

.thumb {
  width: 100%; height: 140px; border-radius: var(--radius-sm); object-fit: cover; overflow: hidden;
  background: linear-gradient(135deg, #e4efe7, #f0e9dc);
  display: flex; align-items: center; justify-content: center; font-size: 42px; color: #fff;
}
.badge-num {
  position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff;
  font-size: 11px; min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.pos-rel { position: relative; }

/* ---- 支付弹窗（订单结算 / 会员充值共用）---- */
.hz-modal-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20,30,25,.45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.hz-modal {
  width: 100%; max-width: 360px; background: var(--card); border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 20px 18px; text-align: center;
}
.hz-modal-h { font-size: 16px; font-weight: 700; }
.hz-modal-brand { font-size: 12.5px; color: var(--brand); font-weight: 700; letter-spacing: 1.5px; margin-bottom: 4px; }
.hz-modal-amt { font-size: 30px; color: var(--wood); font-weight: 800; margin: 10px 0 16px; }
.pay-ch {
  display: block; width: 100%; border-radius: 12px; padding: 13px 14px;
  font-size: 15px; font-weight: 600; cursor: pointer; margin-bottom: 10px; text-align: left;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
}
.pay-ch[disabled] { opacity: .5; }
.pay-ch:hover:not([disabled]) { border-color: var(--green); background: var(--green-l); }
.pay-sim { border-color: var(--green); background: var(--green-l); color: var(--green-d); text-align: center; }
.hz-modal-status { font-size: 13px; color: var(--muted); min-height: 20px; margin: 4px 0 8px; }
/* v1.23.1：NATIVE 扫码支付二维码容器 */
.hz-modal-qr { display: none; margin: 8px auto; min-height: 0; }
.hz-modal-qr:not(:empty) { display: block; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; width: max-content; max-width: 100%; }
.hz-modal-qr canvas, .hz-modal-qr img { display: block; border-radius: 6px; }
.hz-modal-qr:empty { color: var(--muted); font-size: 12px; word-break: break-all; }
.hz-modal-close { border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; padding: 11px; width: 100%; border-radius: 12px; min-height: 44px; margin-top: 10px; transition: background .15s; }
.hz-modal-close:hover { background: var(--green-l); }
.hz-modal-close:active { background: #eef2ef; }

/* ---- 会员卡 ---- */
.vip-card {
  border-radius: var(--radius); padding: 18px 16px; margin-bottom: 12px; color: #fff;
  background: linear-gradient(135deg, var(--green-d), var(--wood)); box-shadow: var(--shadow);
}
.vip-card .muted { color: rgba(255,255,255,.78); }
.vip-top { display: flex; justify-content: space-between; font-size: 13px; align-items: baseline; }
.vip-name { font-size: 20px; font-weight: 700; margin: 8px 0 14px; }
.vip-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; text-align: left; }
.vip-n { font-size: 19px; font-weight: 800; }

/* ---- 一键升级条（新版本检测）---- */
#upgradeBar {
  position: sticky; top: 0; z-index: 40; height: 46px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px; font-size: 13px; color: #fff;
  background: linear-gradient(90deg, var(--wood), #d29a5b);
  box-shadow: 0 2px 8px rgba(0,0,0,.18); overflow: hidden; white-space: nowrap;
}
#upgradeBar .ub-acts { display: flex; gap: 6px; flex-shrink: 0; }
#upgradeBar button {
  border: none; border-radius: 999px; padding: 5px 13px; font-size: 12.5px; cursor: pointer;
  background: #fff; color: var(--wood); font-weight: 700; flex-shrink: 0;
}
#upgradeBar .ub-later { background: transparent; border: 1px solid rgba(255,255,255,.65); color: #fff; font-weight: 400; }
body.has-upg .app-bar { top: 46px; } /* 升级条在顶栏上方固定，两者同屏不重叠 */

/* ---- v1.2 提货点选择行（结算页定位推荐）---- */
.pick {
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
  cursor: pointer; background: #fff; transition: border-color .15s, background .15s;
}
.pick.on { border-color: var(--green); background: var(--green-l); }
.pk-dist { font-size: 13px; color: var(--wood); text-align: right; white-space: nowrap; flex-shrink: 0; line-height: 1.4; }

/* ---- v1.2 分红流水正负色（分销看板内联使用）---- */
.tag.warn, .tag.danger { font-weight: 600; }

/* ---- 分辨率适配：小屏手机（<380px，如 SE/mini 及低分屏）---- */
@media (max-width: 379px) {
  body { font-size: 14px; }
  .view { padding: 12px 10px calc(86px + env(safe-area-inset-bottom)); }
  .tabbar button { font-size: 10px; padding-top: 7px; }
  .tabbar button span { font-size: 17px; }
  .quick a { font-size: 11px; padding: 9px 2px; gap: 3px; }
  .quick a span { font-size: 20px; }
  .vip-card { padding: 14px 12px; }
  .vip-n { font-size: 17px; }
  .card h3, .section-title { font-size: 14.5px; }
}

/* ---- 分辨率适配：平板 / 桌面（≥900px，中央加宽 + 导航悬浮）---- */
@media (min-width: 900px) {
  body { font-size: 16px; }
  .view { max-width: 780px; padding: 24px 20px calc(110px + env(safe-area-inset-bottom)); min-height: 70vh; }
  .tabbar { border-radius: 16px 16px 0 0; left: max(calc((100vw - 780px) / 2), 0); right: max(calc((100vw - 780px) / 2), 0); }
  .card { padding: 16px; border-radius: 16px; }
}

/* ---- 横屏手机：压缩内容区高度，避免被导航栏遮挡 ---- */
@media (max-height: 480px) and (orientation: landscape) {
  .view { min-height: auto; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* ---- 减少动态偏好：尊重系统"减弱动态效果"设置 ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- v1.3 资讯中心：公告条 / 分类 / 置顶 / 正文 ---- */
.ann-bar {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #fff7e6, #fdeecd);
  border: 1px solid #f3dca0; color: #8a6a1f;
  border-radius: 12px; padding: 8px 10px; margin-bottom: 12px;
}
.ann-tag { font-size: 12px; font-weight: 700; flex-shrink: 0; }
.ann-scroll { flex: 1; overflow: hidden; font-size: 12.5px; line-height: 1.4; }
.ann-item { display: inline-block; }
.ann-sep { margin: 0 8px; opacity: .5; }
.ann-x { flex-shrink: 0; border: none; background: transparent; color: #8a6a1f; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; }
.chip { flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.chip.on { border-color: var(--green); background: var(--green-l); color: var(--green); font-weight: 600; }
.hotdot { display: inline-block; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px; margin-right: 4px; vertical-align: middle; }
.article { white-space: pre-wrap; line-height: 1.85; font-size: 14.5px; color: var(--ink); }

/* ---- v1.3 全局公告横幅（顶栏下方固定，机制同 has-upg）---- */
.g-ann { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #fff7e6, #fdeecd); border-bottom: 1px solid #f3dca0; color: #8a6a1f; padding: 9px 12px; font-size: 12.5px; }
.gann-tag { flex-shrink: 0; }
.gann-scroll { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gann-item { display: inline-block; }
.gann-sep { margin: 0 8px; opacity: .5; }
.gann-x { flex-shrink: 0; border: none; background: transparent; color: #8a6a1f; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
body.ann-on .app-bar { top: 42px; }
body.ann-on .view { padding-top: calc(42px + 14px); }

/* ---- v1.8 商品图集轮播 + 厂家信息 + 后台图集 ---- */
.carousel { position: relative; margin: 10px 0; border-radius: var(--radius); overflow: hidden; background: #0000000d; }
.cs-track { display: flex; transition: transform .35s ease; }
.cs-slide { flex: 0 0 100%; }
.cs-slide img { width: 100%; height: 220px; object-fit: cover; display: block; }
.cs-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(0,0,0,.35); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.cs-prev { left: 8px; } .cs-next { right: 8px; }
.cs-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.cs-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); cursor: pointer; transition: width .2s, background .2s; }
.cs-dot.on { background: #fff; width: 18px; border-radius: 4px; }
.mfg-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; color: var(--green-d); }
.mfg-row { display: flex; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); }
.mfg-row:first-of-type { border-top: none; }
.mfg-k { flex: 0 0 96px; color: var(--muted); font-size: 13px; }
.mfg-v { flex: 1; font-size: 14px; line-height: 1.5; }
/* 后台商品图集 */
.galbox { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.galitem { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.galitem img { width: 100%; height: 100%; object-fit: cover; }
.galitem .galdel { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }

/* 商品库存提示徽标（v1.10） */
.stock-tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.stock-tag.ok { background: #e7f4ec; color: #2f7d4f; }
.stock-tag.warn { background: #fdf2dc; color: #b8860b; }
.stock-tag.danger { background: #fdeaea; color: #c0492f; }
/* 商城搜索 + 分类筛选 + 收藏（v1.9） */
.shop-tool { margin: 8px 0 4px; }
.shop-search { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; background: var(--card); color: var(--text); }
.shop-search:focus { outline: none; border-color: var(--brand); }
.cat-chips { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
/* v1.19 胶囊筛选：更大更醒目 + 图标 + 激活态品牌色实心 */
.chip { flex: 0 0 auto; padding: 10px 18px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; transition: all .18s ease; }
.chip.on { background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff; border-color: transparent; font-weight: 600; box-shadow: 0 6px 16px rgba(58, 107, 82, .28); }
.chip:active { transform: scale(.96); }
.fav-btn { border: none; background: rgba(255,255,255,.85); border-radius: 50%; width: 30px; height: 30px; font-size: 15px; cursor: pointer; padding: 0; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* ---- v1.14：列表排序条（搜索 + 筛选 + 排序 三件套） ---- */
.sort-bar { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.sort-bar::-webkit-scrollbar { display: none; }
.sort-t { flex: 0 0 auto; font-size: 12px; color: var(--muted); margin-right: 2px; }
.sort-bar .chip { padding: 4px 12px; font-size: 12px; }

/* ---- v1.13：首页 Banner 轮播 / 分类图标网格 / 特价 ---- */
.banner { position: relative; margin: 8px 0; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg,#2f7d4f,#3fa06a); }
.banner-track { display: flex; transition: transform .4s ease; }
.banner-slide { flex: 0 0 100%; position: relative; min-height: 132px; display: block; text-decoration: none; color: #fff; }
.banner-slide img { width: 100%; height: 132px; object-fit: cover; display: block; }
.banner-fallback { height: 132px; display: flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center; font-weight: 700; font-size: 17px; }
.banner-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.banner-title { font-weight: 700; font-size: 16px; }
.banner-sub { font-size: 12px; opacity: .9; margin-top: 2px; }
.banner-dots { position: absolute; bottom: 6px; right: 10px; display: flex; gap: 5px; z-index: 2; }
.banner-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; }
.banner-dot.on { background: #fff; width: 16px; border-radius: 4px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 4px; }
.cat-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.cat-emoji { font-size: 24px; }
.cat-name { font-size: 12px; color: var(--muted); }
.price-now { color: #c0492f; font-weight: 700; }
.price-origin { color: var(--muted); text-decoration: line-through; font-size: 12px; margin-left: 5px; }
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag-special { position: absolute; top: 6px; left: 6px; z-index: 2; background: #c0492f; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 8px; }
.tag-sp-inline { display: inline-block; background: #c0492f; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 8px; margin-left: 6px; }
@media (max-width: 380px) { .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; } .cat-emoji { font-size: 21px; } }

/* 积分/余额抵扣开关（v1.11） */
.switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch input + span { position: relative; display: inline-block; width: 42px; height: 24px; background: var(--line); border-radius: 999px; transition: background .2s; flex: 0 0 auto; }
.switch input + span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: .45; cursor: not-allowed; }
.switch input + span + em { font-style: normal; margin-left: 8px; font-size: 13px; color: var(--muted); }
/* 地址簿条目（v1.11） */
.addr-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.addr-item .addr-top { display: flex; justify-content: space-between; align-items: center; }
.addr-item .addr-name { font-weight: 600; }
.addr-item .addr-def { font-size: 11px; color: #fff; background: var(--brand); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }
.addr-item .addr-line { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
.addr-item .addr-act { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
/* v1.19：原来 padding:0 的裸文字按钮几乎点不中，改为带底色的可点按钮 */
.addr-item .addr-act button {
  font-size: 12.5px; color: var(--brand); background: var(--green-l, #e8f3ec);
  border: none; border-radius: 8px; cursor: pointer;
  min-height: 34px; padding: 0 12px; position: relative;
}
.addr-item .addr-act button:active { transform: translateY(1px); }
.addr-item .addr-act button::after { content: ''; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }

/* ============================================================
   v1.17 视觉精致度 + 加载/交互感知（对标主流商城，纯前端）
   ============================================================ */

/* ---- 1. 骨架屏（内容占位，替代"白屏/示例数据闪跳"；>300ms 加载必备）---- */
@keyframes sk-shimmer {
  0% { background-position: -420px 0; }
  100% { background-position: 420px 0; }
}
.sk {
  position: relative; overflow: hidden; background: #e8eeea; border-radius: 8px;
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,.65) 40%, rgba(255,255,255,0) 80%);
  background-size: 840px 100%; background-repeat: no-repeat; animation: sk-shimmer 1.3s ease-in-out infinite;
}
.sk-card { padding: 14px; margin-bottom: 12px; }            /* 商品卡骨架 */
.sk-row { display: flex; align-items: center; gap: 10px; }
.sk-thumb-sm { width: 56px; height: 56px; border-radius: 12px; flex: 0 0 auto; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.sk-line { height: 12px; border-radius: 6px; }
.sk-line.w80 { width: 80%; } .sk-line.w55 { width: 55%; }
.sk-price { width: 46px; height: 18px; flex: 0 0 auto; }
.sk-hero-card { padding: 0; overflow: hidden; margin-bottom: 12px; }   /* 首页大图卡骨架 */
.sk-img { height: 150px; border-radius: 0; }
.sk-pad { padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }

/* ---- 2. 价格醒目化（商品卡现价：大号陶土红 + 小号单位；原价小灰划线）---- */
.p-card { color: #c0492f; font-weight: 800; display: inline-flex; align-items: baseline; gap: 1px; }
.p-card b { font-size: 17px; line-height: 1; }
.p-card small { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 2px; }

/* ---- 3. 商品卡可点反馈（仅 hover 能力设备抬升；触屏用 :active 按压）---- */
a.card.lift { transition: transform .16s ease, box-shadow .16s ease; }
@media (hover:hover) and (pointer:fine) {
  a.card.lift:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(31,42,36,.15); }
}
a.card.lift:active { transform: translateY(0); box-shadow: var(--shadow); }

/* ---- 4. 首页信任背书条（图标+短句，中性、不抢核心内容）---- */
.trust { display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.trust span {
  flex: 1 1 auto; text-align: center; font-size: 11.5px; color: var(--muted);
  background: linear-gradient(180deg, #ffffff, #fbfaf7);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; line-height: 1.3;
  box-shadow: var(--shadow);
}
.trust b { display: block; font-size: 13px; color: var(--green-d); font-weight: 600; margin-bottom: 1px; }

/* ---- 5. 空状态升级（图标+文案，替代纯灰字）---- */
.empty { text-align: center; color: var(--muted); padding: 48px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .e-ico { font-size: 40px; line-height: 1; margin-bottom: 4px; filter: grayscale(.15); }
.empty .e-txt { font-size: 14px; }
.empty a, .empty .btn { margin-top: 8px; text-decoration: none; color: var(--green-d); font-weight: 600; }

/* ---- 6. 商城搜索：历史关键词 + 一键清除 ---- */
.search-wrap { position: relative; display: block; }
.search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--line);
  color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: none; align-items: center; justify-content: center; padding: 0; z-index: 2;
}
.search-wrap.has-q .search-clear { display: flex; }
.hist-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.hist-t { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.hist-chip { font-size: 12px; color: var(--green-d); background: var(--green-l); border-radius: 999px; padding: 3px 10px; cursor: pointer; border: none; line-height: 1.5; }

/* ---- 7. toast 微动效（淡入+上滑，反馈更明确）---- */
.toast { bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); transition: opacity .25s, transform .25s; }
.toast.show { transform: translate(-50%, 0); }

/* ---- 8. 按钮加载态（处理中禁用+微降不透明度，防重复提交）---- */
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- v1.22.4 图片占位兜底（P1-1：加载失败显示柔和渐变，避免破图图标）---- */
.thumb, .cs-slide img, .banner-slide img, .galitem img { background: linear-gradient(135deg, #e4efe7, #f0e9dc); }
