/* ===== 聚优商城 H5 ===== */
:root {
  --red: #f2270c;
  --red-2: #ff5f2e;
  --orange: #ff8f1f;
  --bg: #f5f6f8;
  --card: #fff;
  --t1: #1f2126;
  --t2: #6b7280;
  --t3: #9aa0a6;
  --line: #f0f1f3;
  --radius: 12px;
  --tab-h: 54px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: #edeef1;
  color: var(--t1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: 0; background: none; padding: 0; color: inherit; cursor: pointer; }
input { font-family: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; font-weight: normal; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, .08);
}
.page { min-height: 100vh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); }
.page.no-tab { padding-bottom: env(safe-area-inset-bottom, 0px); }
.pb-14 { padding-bottom: 14px; }

/* ---------- 顶部 ---------- */
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.appbar .ttl { font-size: 16px; font-weight: 600; flex: 1; text-align: center; }
.appbar .icobtn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: #333; flex: none; }
.appbar .icobtn.right { margin-left: auto; }
.appbar .ph { width: 30px; flex: none; }

/* ---------- 首页头部 ---------- */
.home-head {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 10px;
  background: linear-gradient(180deg, #ff7a45 0%, #ff8f4d 60%, #ffa76b 100%);
}
.hh-loc { display: flex; align-items: center; gap: 2px; color: #fff; font-size: 14px; font-weight: 600; flex: none; }
.hh-loc svg { width: 14px; height: 14px; }
.hh-search {
  flex: 1; display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  color: #b3b3b3; font-size: 13px;
}
.hh-search svg { width: 15px; height: 15px; color: #c2c2c2; flex: none; }
.hh-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }

/* ---------- 轮播 ---------- */
.banner { position: relative; padding: 10px 12px 12px; background: linear-gradient(180deg, #ffa76b 0%, #ffb98a 22%, #f5f6f8 62%); }
.banner-track {
  display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  border-radius: 14px; scrollbar-width: none;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner-item {
  flex: 0 0 100%; scroll-snap-align: start;
  position: relative; height: 165px; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center;
  box-shadow: 0 6px 16px rgba(176, 112, 60, .18);
}
.banner-item .bn-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
.banner-item .bn-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.80) 0%, rgba(255,255,255,.44) 40%, rgba(255,255,255,0) 68%);
}
.banner-txt { position: relative; z-index: 1; padding: 0 0 0 18px; max-width: 54%; }
.banner-txt .bn-tag {
  display: inline-block; padding: 2px 9px 2.5px; border-radius: 4px;
  color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.banner-txt h3 { font-size: 18px; line-height: 1.32; font-weight: 800; white-space: pre-line; letter-spacing: .5px; margin-top: 7px; }
.banner-txt p { font-size: 10.5px; margin-top: 5px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-txt .bn-btn {
  display: inline-flex; align-items: center; gap: 2px;
  margin-top: 9px; padding: 6px 13px; border-radius: 999px;
  color: #fff; font-size: 11.5px; font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .16);
}
.banner-dots {
  position: absolute; left: 24px; bottom: 22px;
  display: flex; align-items: center; gap: 5px;
  padding: 3.5px 7px; border-radius: 999px;
  background: rgba(30, 40, 24, .16);
}
.banner-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .78); transition: .2s; }
.banner-dots i.on { width: 16px; background: #fff; }

/* ---------- 轮播图：整图 + 右侧文案（生鲜实拍版） ---------- */
.banner-item.flat .bn-bg { object-position: center center; }
.banner-item.align-right { justify-content: flex-end; }
.banner-item.align-right .bn-bg { object-position: left center; }
.banner-item.align-right .bn-veil {
  background: linear-gradient(270deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.88) 40%, rgba(255,255,255,.42) 62%, rgba(255,255,255,0) 82%);
}
.banner-item.align-right .banner-txt {
  margin-left: auto; max-width: 60%; padding: 0 14px 0 0; text-align: center;
}
.banner-txt .bn-kicker {
  display: block; font-style: normal; font-size: 7.5px; font-weight: 700;
  letter-spacing: 2.4px; text-transform: uppercase; opacity: .72;
}
.banner-item.align-right h3 { font-size: 17.5px; line-height: 1.34; font-weight: 800; letter-spacing: 1.5px; margin-top: 5px; }
.banner-item.align-right h3::after {
  content: ''; display: block; width: 94%; height: 3px; margin: 7px auto 0;
  background-image: radial-gradient(circle, rgba(96, 146, 34, .85) 1px, transparent 1.3px);
  background-size: 8px 3px; background-position: center;
}
.banner-txt .bn-keys {
  display: flex; justify-content: center; gap: 2px; margin-top: 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 2px;
}
.banner-txt .bn-keys span { position: relative; padding: 0 4px; }
.banner-txt .bn-keys span + span::before {
  content: ''; position: absolute; left: -1px; top: 50%; width: 2px; height: 2px;
  margin-top: -1.5px; border-radius: 50%; background: currentColor; opacity: .35;
}
.banner-item.align-right .bn-btn {
  margin-top: 8px; padding: 5.5px 17px; border-radius: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.5px;
  box-shadow: 0 3px 8px rgba(224, 148, 44, .3);
}

/* ---------- 金刚区 ---------- */
.quick {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 0;
  background: #fff; border-radius: 14px; margin: 8px 12px 0; padding: 14px 4px 12px;
}
.qe { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qe span {
  width: 52px; height: 52px; border-radius: 15px; display: flex; align-items: center; justify-content: center;
  background: none; transition: transform .12s;
}
.qe span img { width: 50px; height: 50px; object-fit: contain; display: block; filter: drop-shadow(0 3px 3px rgba(0,0,0,.13)); }
.qe:active span { transform: scale(.92); }
@media (max-width: 360px) {
  .qe span { width: 46px; height: 46px; }
  .qe span img { width: 44px; height: 44px; }
  .qe em { font-size: 11px; }
}
.qe em { font-size: 11.5px; color: #4b4f56; font-style: normal; white-space: nowrap; transform: scale(.95); }

/* ---------- 通用卡片 ---------- */
.card { background: #fff; border-radius: 14px; margin: 10px 12px 0; padding: 12px; }
.card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-hd b { font-size: 15px; font-weight: 700; }
.card-hd a { font-size: 12px; color: var(--t3); display: flex; align-items: center; gap: 2px; }
.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 14px 12px 8px; }
.sec-title b { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sec-title b::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--red); }
.sec-title span { font-size: 12px; color: var(--t3); }

/* ---------- 秒杀 ---------- */
.flash-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.flash-head b { font-size: 15px; font-weight: 800; }
.flash-clock { display: flex; align-items: center; gap: 3px; font-size: 11px; color: #fff; }
.flash-clock i { background: #2b2b2b; border-radius: 4px; padding: 1px 4px; font-style: normal; font-variant-numeric: tabular-nums; }
.flash-more { margin-left: auto; font-size: 12px; color: var(--t3); }
.flash-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.flash-row::-webkit-scrollbar { display: none; }
.flash-item { flex: 0 0 86px; }
.flash-item img { width: 86px; height: 86px; border-radius: 10px; object-fit: cover; background: #f7f7f7; }
.flash-item .fp { font-size: 13px; color: var(--red); font-weight: 700; margin-top: 6px; }
.flash-item .fp em { font-size: 10px; font-style: normal; }
.flash-item .fo { font-size: 11px; color: var(--t3); text-decoration: line-through; }
.flash-item .foff { display: inline-block; margin-top: 4px; font-size: 10px; color: var(--red); background: #ffece8; border-radius: 3px; padding: 0 4px; }

/* ---------- 商品卡 ---------- */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 0 12px; }
.pcard { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.pcard-img { position: relative; width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f7f7f7; }
.pcard-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard-badge {
  position: absolute; left: 6px; top: 6px; font-size: 10px; color: #fff; font-weight: 600;
  padding: 2px 6px; border-radius: 4px; background: linear-gradient(90deg, #ff5a3c, #f2270c);
}
.pcard-body { padding: 8px 9px 9px; display: flex; flex-direction: column; flex: 1; }
.pname {
  font-size: 13px; line-height: 1.32; color: #26282c;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 34px;
}
.ptags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.ptags span { font-size: 10px; color: #f2542d; background: #fff2ee; border-radius: 3px; padding: 1px 4px; }
.prow { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 7px; }
.price { color: var(--red); font-weight: 800; font-size: 17px; line-height: 1; display: flex; align-items: baseline; gap: 3px; }
.price i { font-style: normal; font-size: 11px; font-weight: 700; }
.price del { font-size: 11px; color: var(--t3); font-weight: 400; margin-left: 2px; }
.pcard .price del { display: none; }
.padd {
  width: 24px; height: 24px; border-radius: 50%; color: #fff; flex: none;
  background: linear-gradient(135deg, #ff6a3d, #f2270c);
  display: flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1;
  box-shadow: 0 2px 6px rgba(242, 39, 12, .28);
}
.psales { font-size: 11px; color: var(--t3); margin-top: 5px; }
.pgrid.list { grid-template-columns: 1fr; gap: 8px; }
.pgrid.list .pcard { flex-direction: row; }
.pgrid.list .pcard-img { width: 104px; height: 104px; aspect-ratio: auto; flex: none; }
.pgrid.list .pname { min-height: 0; -webkit-line-clamp: 2; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 60;
  width: 100%; max-width: 480px;
  display: flex; background: #fff;
  border-top: 1px solid #ececec;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabitem { flex: 1; height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9b9b9b; }
.tabitem svg { width: 22px; height: 22px; }
.tabitem em { font-size: 10px; font-style: normal; }
.tabitem.on { color: var(--red); }
.tabitem .badge {
  position: absolute; transform: translate(13px, -14px);
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 10px; line-height: 15px; text-align: center;
}
.tabitem-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }

/* ---------- 分类 ---------- */
.cat-head { position: sticky; top: 0; z-index: 40; background: #fff; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.searchbar {
  display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: 17px; background: #f3f4f6; color: #a9adb4; font-size: 13px;
}
.searchbar svg { width: 15px; height: 15px; flex: none; }
.cat-body { display: flex; align-items: stretch; min-height: calc(100vh - var(--tab-h) - 51px); }
.cat-nav { width: 88px; flex: none; background: #f7f8fa; padding-bottom: 20px; min-height: calc(100vh - 51px - var(--tab-h)); }
.cat-nav li {
  position: relative; padding: 15px 6px; text-align: center; font-size: 13px; color: #5c6066;
}
.cat-nav li.on { background: #fff; color: var(--red); font-weight: 700; }
.cat-nav li.on::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 16px; border-radius: 0 2px 2px 0; background: var(--red); }
.cat-main { flex: 1; background: #fff; padding-bottom: 20px; min-width: 0; }
.sortbar { display: flex; align-items: center; gap: 0; padding: 0 4px; border-bottom: 1px solid var(--line); position: sticky; top: 51px; background: #fff; z-index: 20; }
.sortbar button { flex: 1; height: 40px; font-size: 13px; color: #333; display: flex; align-items: center; justify-content: center; gap: 2px; }
.sortbar button.on { color: var(--red); font-weight: 700; }
.sortbar .arrow { display: inline-flex; flex-direction: column; line-height: 0; gap: 1px; }
.sortbar .arrow i { width: 0; height: 0; border-left: 3px solid transparent; border-right: 3px solid transparent; }
.sortbar .arrow i.up { border-bottom: 4px solid #c9ccd1; }
.sortbar .arrow i.dn { border-top: 4px solid #c9ccd1; }
.sortbar button.on .arrow i.up.on { border-bottom-color: var(--red); }
.sortbar button.on .arrow i.dn.on { border-top-color: var(--red); }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px 8px; }
.cat-grid .pcard { background: #fbfbfc; }
.cat-grid .pname { font-size: 12px; min-height: 32px; }

/* ---------- 空状态 ---------- */
.empty { padding: 56px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty svg { width: 132px; height: 132px; }
.empty p { font-size: 13px; color: #a8adb4; }

/* ---------- 购物车 ---------- */
.cart-empty { padding: 70px 0 30px; display: flex; flex-direction: column; align-items: center; }
.cart-empty svg { width: 108px; height: 108px; color: #c9ccd1; }
.cart-empty p { margin-top: 14px; font-size: 13px; color: #9aa0a6; }
.cart-empty .btn-go {
  margin-top: 18px; width: 168px; height: 40px; border-radius: 6px; color: #fff; font-size: 14px;
  background: linear-gradient(90deg, #ff6a4d, #f2452c);
}
.cart-list { padding: 10px 12px 0; }
.cart-shop { background: #fff; border-radius: 12px 12px 0 0; padding: 11px 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.cart-item { background: #fff; padding: 10px 12px; display: flex; gap: 10px; border-top: 1px solid #f6f6f7; }
.cart-item:last-child { border-radius: 0 0 12px 12px; }
.cb {
  width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid #d4d7dc; flex: none; margin-top: 26px;
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 11px;
}
.cb.on { background: var(--red); border-color: var(--red); color: #fff; }
.cb svg { width: 11px; height: 11px; }
.cart-item img { width: 78px; height: 78px; border-radius: 8px; object-fit: cover; background: #f7f7f7; flex: none; }
.ci-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-info h4 { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-spec { font-size: 11px; color: var(--t3); margin-top: 5px; }
.ci-btm { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.stepper { display: flex; align-items: center; border: 1px solid #eceef1; border-radius: 5px; overflow: hidden; }
.stepper button { width: 26px; height: 24px; font-size: 15px; color: #555; display: flex; align-items: center; justify-content: center; }
.stepper span { min-width: 30px; text-align: center; font-size: 12px; border-left: 1px solid #f0f1f3; border-right: 1px solid #f0f1f3; line-height: 24px; }
.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: 480px; z-index: 55;
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 12px; background: #fff; border-top: 1px solid #f0f1f3;
}
.cart-bar .sum { flex: 1; display: flex; flex-direction: column; align-items: flex-end; }
.cart-bar .sum .price { font-size: 18px; }
.cart-bar .sum em { font-size: 10px; color: var(--t3); font-style: normal; }
.btn-main {
  height: 38px; padding: 0 20px; border-radius: 19px; color: #fff; font-size: 14px; font-weight: 600;
  background: linear-gradient(90deg, #ff7043, #f2270c);
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-main[disabled] { background: #d9dce0; color: #fff; box-shadow: none; }
.btn-line {
  height: 32px; padding: 0 14px; border-radius: 16px; font-size: 12px; color: #444;
  border: 1px solid #dcdfe4; display: inline-flex; align-items: center; justify-content: center;
}
.btn-small { height: 28px; padding: 0 12px; border-radius: 14px; font-size: 12px; border: 1px solid #e2e5e9; color: #444; display: inline-flex; align-items: center; }
.btn-small.primary { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- 我的 ---------- */
.mine-hd {
  position: relative; padding: 22px 16px 16px; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, #ff8a5b 0%, #f4502c 52%, #e5300f 100%);
}
.mine-hd::before, .mine-hd::after {
  content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.mine-hd::before { width: 190px; height: 190px; right: -60px; top: -70px; }
.mine-hd::after { width: 120px; height: 120px; left: -50px; bottom: -50px; background: rgba(255,255,255,.06); }
.mine-user { position: relative; display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}
.avatar svg { width: 34px; height: 34px; color: #d8dade; }
.mine-user h3 { font-size: 17px; font-weight: 700; }
.mine-user p { font-size: 12px; opacity: .85; margin-top: 3px; }
.mine-stats { position: relative; display: flex; margin-top: 18px; }
.mine-stats div { flex: 1; text-align: center; }
.mine-stats b { font-size: 17px; font-weight: 700; display: block; }
.mine-stats span { font-size: 11px; opacity: .88; }
.mine-tools-wrap { margin-top: -14px; position: relative; }
.order-types { display: flex; padding: 4px 0 2px; }
.order-types a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.order-types svg { width: 24px; height: 24px; color: #3b3e44; }
.order-types em { font-size: 11px; color: #4a4d53; font-style: normal; }
.order-types .dot {
  position: absolute; top: -2px; right: 50%; transform: translateX(20px);
  min-width: 15px; height: 15px; padding: 0 4px; background: var(--red); color: #fff;
  font-size: 10px; line-height: 15px; border-radius: 8px; text-align: center;
}
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 0; }
.tools a { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tools svg { width: 23px; height: 23px; color: #3b3e44; }
.tools em { font-size: 11px; color: #4a4d53; font-style: normal; }

/* ---------- 商品详情 ---------- */
.detail-tabs { position: sticky; top: 0; z-index: 40; background: #fff; }
.detail-tabs .row { display: flex; align-items: center; height: 46px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.detail-tabs .row .ttl { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.detail-tabs .sw { display: flex; padding: 0; }
.detail-tabs .sw button { flex: 1; height: 40px; font-size: 14px; color: #555; position: relative; }
.detail-tabs .sw button.on { color: var(--red); font-weight: 700; }
.detail-tabs .sw button.on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 26px; height: 2.5px; border-radius: 2px; background: var(--red); }
.gallery { background: #fff; position: relative; }
.gallery .gtrack { display: flex; height: 100vw; max-height: 54vh; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .gtrack::-webkit-scrollbar { display: none; }
.gallery .gtrack img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.gallery .gdots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; }
.gallery .gdots i { width: 5px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .18); }
.gallery .gdots i.on { width: 12px; background: var(--red); }
.gprice { background: #fff; padding: 12px 14px 6px; }
.gprice .p { display: flex; align-items: baseline; gap: 8px; }
.gprice .p b { color: var(--red); font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.gprice .p b i { font-size: 15px; font-style: normal; margin-right: 1px; }
.gprice .p del { color: var(--t3); font-size: 12px; }
.gprice .p .tag { margin-left: auto; font-size: 10px; color: #f2542d; background: #fff2ee; border-radius: 4px; padding: 2px 6px; }
.gtitle { font-size: 16px; font-weight: 600; line-height: 1.4; padding: 6px 14px 4px; background: #fff; }
.gsub { font-size: 12px; color: var(--t3); padding: 0 14px 12px; background: #fff; }
.grows { background: #fff; margin-top: 8px; }
.grow { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; font-size: 13px; border-top: 1px solid #f6f6f7; }
.grow:first-child { border-top: 0; }
.grow .k { color: var(--t3); width: 52px; flex: none; }
.grow .v { flex: 1; color: #26282c; }
.grow .v b { font-weight: 600; }
.grow .arrow { color: #c4c8ce; font-size: 12px; }
.grow .stock { color: #17a673; font-weight: 600; margin-left: 6px; }
.gpromo { display: flex; gap: 10px; align-items: center; background: #fff; margin-top: 8px; padding: 12px 14px; font-size: 13px; }
.gpromo .k { color: var(--t3); width: 52px; flex: none; }
.gpromo .chip { font-size: 11px; color: var(--red); border: 1px solid #ffd0c6; background: #fff6f4; border-radius: 4px; padding: 2px 6px; }
.detail-sec { background: #fff; margin-top: 8px; padding: 14px; }
.detail-sec h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.detail-sec h4::before { content: ''; width: 3px; height: 13px; background: var(--red); border-radius: 2px; }
.param-row { display: flex; font-size: 13px; padding: 7px 0; border-bottom: 1px dashed #f1f2f4; }
.param-row .k { width: 86px; color: var(--t3); }
.param-row .v { flex: 1; color: #33363b; }
.detail-pic { width: 100%; border-radius: 10px; margin-top: 10px; }
.detail-text { font-size: 13px; color: #4a4d53; line-height: 1.75; margin-top: 10px; }
.gbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 55;
  width: 100%; max-width: 480px; display: flex; align-items: center; gap: 6px;
  height: calc(58px + env(safe-area-inset-bottom, 0px)); padding: 0 10px; background: #fff;
  border-top: 1px solid #f0f1f3;
}
.gbar .ic { width: 46px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: #6b7280; position: relative; }
.gbar .ic svg { width: 20px; height: 20px; }
.gbar .ic .badge { position: absolute; top: -3px; right: 4px; background: var(--red); color: #fff; border-radius: 8px; font-size: 9px; min-width: 14px; height: 14px; line-height: 14px; text-align: center; padding: 0 3px; }
.gbar .btns { flex: 1; display: flex; gap: 0; border-radius: 20px; overflow: hidden; height: 40px; }
.gbar .btns button { flex: 1; color: #fff; font-size: 14px; font-weight: 600; }
.gbar .btns .add { background: linear-gradient(90deg, #ffb44d, #ff8f1f); }
.gbar .btns .buy { background: linear-gradient(90deg, #ff7043, #f2270c); }

/* ---------- 结算 / 订单 ---------- */
.panel { background: #fff; border-radius: 12px; margin: 10px 12px 0; padding: 12px 14px; }
.addr-line { display: flex; align-items: flex-start; gap: 10px; }
.addr-line .pin { color: var(--red); padding-top: 2px; }
.addr-line .ic-svg { width: 20px; height: 20px; }
.addr-line h4 { font-size: 14px; font-weight: 600; }
.addr-line p { font-size: 12px; color: var(--t2); margin-top: 4px; line-height: 1.5; }
.addr-empty { display: flex; align-items: center; gap: 8px; color: var(--t2); font-size: 13px; }
.addr-empty svg { width: 17px; height: 17px; flex: none; color: var(--red); }
.addr-empty span:last-child { margin-left: auto; }
.addr-line .pin svg { width: 18px; height: 18px; }
.ck-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid #f7f7f8; }
.ck-item:first-of-type { border-top: 0; }
.ck-item img { width: 62px; height: 62px; border-radius: 8px; object-fit: cover; flex: none; background: #f7f7f7; }
.ck-item .n { flex: 1; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ck-item .r { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6px; }
.ck-item .q { font-size: 12px; color: var(--t3); }
.line-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 13px; border-top: 1px solid #f7f7f8; }
.line-row .v { color: #33363b; }
.line-row .v.red { color: var(--red); }
.paybar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 55;
  width: 100%; max-width: 480px; height: calc(56px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 0 14px; background: #fff; border-top: 1px solid #f0f1f3;
}
.paybar .t { font-size: 13px; }
.paybar .t b { color: var(--red); font-size: 19px; font-weight: 800; }

.tabs-line { display: flex; background: #fff; position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs-line::-webkit-scrollbar { display: none; }
.tabs-line button { flex: none; padding: 0 15px; height: 42px; font-size: 13px; color: #555; position: relative; }
.tabs-line button.on { color: var(--red); font-weight: 700; }
.tabs-line button.on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 22px; height: 2.5px; background: var(--red); border-radius: 2px; }

.ocard { background: #fff; border-radius: 12px; margin: 10px 12px 0; padding: 12px; }
.ocard-hd { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--t3); }
.ocard-hd .st { color: var(--red); font-weight: 600; font-size: 12px; }
.ocard-hd .st.done { color: #9aa0a6; }
.ocard .goods { display: flex; gap: 8px; margin-top: 10px; }
.ocard .goods img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: #f7f7f7; }
.ocard .gname { font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.ocard-ft { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f7f7f8; font-size: 12px; color: var(--t2); }
.ocard-ft b { color: var(--t1); }
.obtns { display: flex; gap: 8px; }

/* ---------- 通用列表 ---------- */
.list-item { display: flex; align-items: center; gap: 10px; background: #fff; padding: 14px; border-bottom: 1px solid #f7f7f8; }
.list-item:last-child { border-bottom: 0; }
.list-item .main { flex: 1; min-width: 0; }
.list-item h4 { font-size: 14px; font-weight: 600; }
.list-item p { font-size: 12px; color: var(--t2); margin-top: 3px; }
.list-item .arrow { color: #c9ccd1; }
.list-item > button { flex: none; }
.tagchip { display: inline-block; font-size: 10px; color: var(--red); border: 1px solid #ffd5cc; background: #fff6f4; border-radius: 3px; padding: 0 4px; margin-left: 6px; vertical-align: 1px; }

.coupon { position: relative; display: flex; background: #fff; border-radius: 10px; margin: 10px 12px 0; overflow: hidden; }
.coupon .left { width: 104px; flex: none; background: linear-gradient(135deg, #ff8a5b, #f2452c); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 0; }
.coupon .left b { font-size: 24px; font-weight: 800; line-height: 1; }
.coupon .left b i { font-size: 12px; font-style: normal; }
.coupon .left span { font-size: 10px; opacity: .9; margin-top: 5px; }
.coupon .right { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; }
.coupon .right h4 { font-size: 14px; font-weight: 600; }
.coupon .right p { font-size: 11px; color: var(--t3); margin-top: 4px; }
.coupon .use { position: absolute; right: 12px; bottom: 12px; font-size: 11px; color: var(--red); border: 1px solid #ffcec4; border-radius: 12px; padding: 2px 10px; }

/* ---------- 搜索 ---------- */
.search-page { background: #fff; min-height: 100vh; }
.search-input-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; position: sticky; top: 0; z-index: 30; }
.search-input-row .field { flex: 1; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #f3f4f6; border-radius: 17px; }
.search-input-row input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13px; }
.search-input-row .field svg { width: 15px; height: 15px; flex: none; color: #b0b4ba; }
.search-input-row .go { font-size: 13px; color: #333; flex: none; }
.search-block { padding: 14px 14px 4px; }
.search-block h4 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 12px; color: #4a4d53; background: #f4f5f7; border-radius: 13px; padding: 5px 12px; }

/* ---------- 登录弹层 ---------- */
.sheet { position: fixed; inset: 0; z-index: 90; display: none; }
.sheet.show { display: block; }
.sheet .bd { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sheet .pn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 300px; background: #fff; border-radius: 16px; padding: 20px 18px 18px;
}
.sheet .pn h3 { font-size: 16px; font-weight: 700; text-align: center; }
.sheet .pn p { font-size: 12px; color: var(--t3); text-align: center; margin-top: 5px; }
.sheet .fld { display: flex; align-items: center; gap: 8px; height: 42px; border-bottom: 1px solid #f0f1f3; margin-top: 10px; }
.sheet .fld input { flex: 1; border: 0; outline: none; font-size: 14px; background: none; }
.sheet .fld .code { font-size: 12px; color: var(--red); flex: none; }
.sheet .sub { margin-top: 18px; width: 100%; height: 42px; border-radius: 21px; color: #fff; font-size: 15px; font-weight: 600; background: linear-gradient(90deg, #ff7043, #f2270c); }
.sheet .tip { font-size: 10px; color: #b7bcc3; text-align: center; margin-top: 10px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.94);
  background: rgba(0, 0, 0, .78); color: #fff; font-size: 13px; line-height: 1.4;
  padding: 10px 16px; border-radius: 8px; max-width: 70%; text-align: center;
  opacity: 0; pointer-events: none; transition: .18s; z-index: 120;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------- 其他 ---------- */
.divider { height: 8px; background: transparent; }
.mt8 { margin-top: 8px; }
.muted { color: var(--t3); font-size: 12px; }
.center { text-align: center; }
.safe-bottom { height: calc(66px + env(safe-area-inset-bottom, 0px)); }
.payresult { padding: 50px 20px 20px; display: flex; flex-direction: column; align-items: center; }
.payresult .ok { width: 62px; height: 62px; border-radius: 50%; background: #eafaf2; display: flex; align-items: center; justify-content: center; color: #17a673; }
.payresult .ok svg { width: 32px; height: 32px; }
.payresult h3 { font-size: 17px; font-weight: 700; margin-top: 14px; }
.payresult p { font-size: 12px; color: var(--t3); margin-top: 6px; }
.payresult .acts { display: flex; gap: 12px; margin-top: 22px; }

/* 补充 */
.page.with-cartbar { padding-bottom: calc(var(--tab-h) + 56px + env(safe-area-inset-bottom, 0px)); }
.cart-price .price { font-size: 16px; }
.tabitem-wrap { position: relative; }
.cart-bar .cb { margin-top: 0; }
.gbar .ic span { line-height: 1; }
