/* 小草快批下单 · 共享样式（移动端 H5，原生） */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
:root{
  --green:#07a35a; --green-d:#058a4b; --green-l:#e8f7ef;
  --bg:#f4f6f5; --card:#fff; --text:#1f2d27; --muted:#8a9a92; --line:#eef1ef;
  --orange:#ff7a18; --red:#e23b3b;
}
html,body{ background:var(--bg); color:var(--text); font-size:14px;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
a{ color:inherit; text-decoration:none; }
img{ display:block; }
.app{ min-height:100vh; padding-bottom:64px; }

/* 顶栏 */
.topbar{ position:sticky; top:0; z-index:20; background:linear-gradient(135deg,var(--green),var(--green-d));
  color:#fff; padding:10px 14px 12px; }
.topbar .brand{ display:flex; align-items:center; gap:6px; font-size:17px; font-weight:700; }
.topbar .brand .logo{ width:24px; height:24px; border-radius:7px; background:#fff; color:var(--green);
  display:flex; align-items:center; justify-content:center; font-size:15px; }
.topbar .search{ margin-top:9px; background:rgba(255,255,255,.22); border-radius:18px; padding:7px 12px;
  font-size:12.5px; color:#eafff4; display:flex; align-items:center; gap:6px; }
.topbar .search input{ border:0; background:transparent; outline:none; color:#fff; flex:1; font-size:13px; }
.topbar .search input::placeholder{ color:#d6f5e8; }

/* 通用返回条 */
.navbar{ position:sticky; top:0; z-index:20; background:#fff; border-bottom:1px solid var(--line);
  height:48px; display:flex; align-items:center; padding:0 12px; font-weight:600; }
.navbar .back{ font-size:20px; margin-right:8px; }
.navbar .ttl{ font-size:16px; }

/* 选购页：左分类 + 右商品 */
.shop{ display:flex; align-items:flex-start; }
.catbar{ width:88px; flex:0 0 88px; background:#fff; border-right:1px solid var(--line);
  position:sticky; top:0; height:calc(100vh - 0px); overflow:auto; }
.catbar .ci{ padding:16px 6px; text-align:center; font-size:13px; color:var(--muted);
  border-left:3px solid transparent; }
.catbar .ci.on{ color:var(--green-d); font-weight:700; background:var(--green-l); border-left-color:var(--green); }
.plist{ flex:1; padding:10px 10px 12px; }
.pcard{ background:var(--card); border-radius:12px; padding:10px; margin-bottom:10px; display:flex; gap:10px; }
.pcard .pic{ width:62px; height:62px; flex:0 0 62px; border-radius:10px; display:flex; align-items:center;
  justify-content:center; font-size:30px; color:#fff; }
.pcard .info{ flex:1; min-width:0; }
.pcard .nm{ font-size:14.5px; font-weight:600; }
.pcard .ds{ font-size:12px; color:var(--muted); margin:3px 0 6px; line-height:1.35; }
.pcard .pr{ display:flex; gap:10px; align-items:baseline; }
.pcard .pr b{ color:var(--red); font-size:14px; }
.pcard .pr .u{ font-size:11px; color:var(--muted); }
.pcard .acts{ display:flex; gap:6px; margin-top:8px; }
.btn{ border:0; border-radius:18px; padding:6px 12px; font-size:12.5px; cursor:pointer; font-weight:600; }
.btn-green{ background:var(--green); color:#fff; }
.btn-ghost{ background:var(--green-l); color:var(--green-d); }
.btn-detail{ background:#fff; color:var(--green-d); border:1px solid var(--green); }
.btn-block{ display:block; width:100%; text-align:center; }
.btn-orange{ background:var(--orange); color:#fff; }
.btn-lg{ padding:12px; font-size:15px; border-radius:24px; }

/* 底部购物车汇总条 */
.cartbar{ position:fixed; left:0; right:0; bottom:0; height:56px; background:#fff;
  border-top:1px solid var(--line); display:flex; align-items:center; padding:0 12px; z-index:30; }
.cartbar .ic{ position:relative; font-size:24px; margin-right:10px; }
.cartbar .ic .badge{ position:absolute; top:-6px; right:-8px; background:var(--red); color:#fff;
  font-size:10px; min-width:16px; height:16px; line-height:16px; border-radius:9px; text-align:center; padding:0 4px; }
.cartbar .total{ flex:1; font-size:15px; font-weight:700; }
.cartbar .total small{ font-size:11px; color:var(--muted); font-weight:400; }

/* 底部 Tab */
.tabbar{ position:fixed; left:0; right:0; bottom:0; height:56px; background:#fff; border-top:1px solid var(--line);
  display:flex; z-index:30; }
.tab{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  font-size:11px; color:var(--muted); position:relative; }
.tab .ti{ font-size:20px; position:relative; }
.tab.on{ color:var(--green-d); font-weight:700; }
.tab .badge{ position:absolute; top:-4px; right:-10px; background:var(--red); color:#fff; font-size:10px;
  min-width:15px; height:15px; line-height:15px; border-radius:9px; text-align:center; padding:0 3px; }

/* 详情页 */
.hero{ display:flex; gap:12px; padding:16px 14px; background:#fff; }
.hero .pic{ width:84px; height:84px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  font-size:42px; color:#fff; flex:0 0 84px; }
.hero .nm{ font-size:18px; font-weight:700; }
.hero .ds{ font-size:13px; color:var(--muted); margin-top:6px; line-height:1.5; }
.sect{ background:#fff; margin-top:10px; padding:14px; }
.sect .lab{ font-size:13px; color:var(--muted); margin-bottom:10px; }
.spec{ display:flex; gap:10px; }
.spec .opt{ flex:1; border:1.5px solid var(--line); border-radius:12px; padding:12px; text-align:center; cursor:pointer; }
.spec .opt.on{ border-color:var(--green); background:var(--green-l); }
.spec .opt .t{ font-weight:700; font-size:14px; }
.spec .opt .p{ color:var(--red); font-weight:700; margin-top:4px; }
.spec .opt .u{ font-size:11px; color:var(--muted); margin-top:2px; }
.stepper{ display:flex; align-items:center; gap:14px; margin-top:6px; }
.stepper button{ width:30px; height:30px; border-radius:50%; border:1px solid var(--line); background:#fff; font-size:18px; cursor:pointer; }
.stepper .n{ font-size:16px; font-weight:700; min-width:24px; text-align:center; }
.detail-acts{ position:fixed; left:0; right:0; bottom:0; display:flex; gap:10px; padding:10px 12px; background:#fff; border-top:1px solid var(--line); z-index:30; }
.detail-acts .btn{ flex:1; }

/* 列表通用 */
.list{ background:#fff; margin-top:10px; border-radius:12px; overflow:hidden; }
.row{ display:flex; align-items:center; padding:13px 14px; border-bottom:1px solid var(--line); }
.row:last-child{ border-bottom:0; }
.row .l{ flex:1; min-width:0; }
.row .l .t{ font-size:14.5px; font-weight:600; }
.row .l .s{ font-size:12px; color:var(--muted); margin-top:3px; }
.row .r{ color:var(--muted); font-size:13px; }
.row .price{ color:var(--red); font-weight:700; }

/* 购物车条目 */
.citem{ display:flex; gap:10px; padding:12px 14px; background:#fff; border-bottom:1px solid var(--line); }
.citem .pic{ width:52px; height:52px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-size:26px; color:#fff; flex:0 0 52px; }
.citem .info{ flex:1; min-width:0; }
.citem .nm{ font-size:14px; font-weight:600; }
.citem .sp{ font-size:12px; color:var(--muted); margin-top:3px; }
.citem .pr{ color:var(--red); font-weight:700; margin-top:4px; }
.citem .rt{ display:flex; align-items:center; gap:8px; }
.citem .del{ color:var(--muted); font-size:12px; }
.mini-step{ display:flex; align-items:center; gap:8px; }
.mini-step button{ width:24px; height:24px; border-radius:50%; border:1px solid var(--line); background:#fff; cursor:pointer; }
.mini-step .n{ min-width:20px; text-align:center; font-weight:700; }

/* 我的 */
.ucard{ background:linear-gradient(135deg,var(--green),var(--green-d)); color:#fff; padding:22px 16px; }
.ucard .av{ width:54px; height:54px; border-radius:50%; background:rgba(255,255,255,.25); display:flex;
  align-items:center; justify-content:center; font-size:28px; }
.ucard .un{ font-size:17px; font-weight:700; margin-top:10px; }
.ucard .ut{ font-size:12px; opacity:.85; margin-top:3px; }
.menu{ background:#fff; margin-top:12px; border-radius:12px; overflow:hidden; }
.menu .mi{ display:flex; align-items:center; padding:14px; border-bottom:1px solid var(--line); }
.menu .mi:last-child{ border-bottom:0; }
.menu .mi .ico{ font-size:19px; width:26px; text-align:center; }
.menu .mi .tx{ flex:1; font-size:14.5px; }
.menu .mi .ar{ color:var(--muted); }
.rec{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; padding:12px; }
.rec .rc{ background:#fff; border-radius:12px; padding:10px; display:flex; gap:8px; }
.rec .rc .pic{ width:44px; height:44px; border-radius:9px; display:flex; align-items:center; justify-content:center; font-size:22px; color:#fff; flex:0 0 44px; }
.rec .rc .nm{ font-size:13px; font-weight:600; }
.rec .rc .pr{ font-size:12px; color:var(--red); font-weight:700; margin-top:3px; }

/* 密码弹窗 / 模态 */
.mask{ position:fixed; inset:0; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index:50; }
.modal{ background:#fff; border-radius:14px; width:84%; max-width:320px; padding:20px; }
.modal h3{ font-size:16px; margin-bottom:12px; text-align:center; }
.modal input{ width:100%; border:1px solid var(--line); border-radius:10px; padding:11px; font-size:14px; outline:none; margin-bottom:12px; }
.modal .macts{ display:flex; gap:10px; }
.kv{ font-size:13px; margin-bottom:8px; }
.kv label{ display:block; color:var(--muted); margin-bottom:4px; }
.kv input{ width:100%; border:1px solid var(--line); border-radius:9px; padding:9px; font-size:14px; outline:none; }

/* 管理表 */
.mg-table{ width:100%; border-collapse:collapse; background:#fff; font-size:12.5px; }
.mg-table th,.mg-table td{ border:1px solid var(--line); padding:8px 6px; text-align:left; }
.mg-table th{ background:var(--green-l); color:var(--green-d); }
.mg-table .upd{ width:56px; border:1px solid var(--line); border-radius:6px; padding:4px; font-size:12px; }
.empty{ text-align:center; color:var(--muted); padding:40px 0; font-size:13px; }
.sub{ font-size:12px; color:var(--muted); margin:4px 0 10px; }
