/* 七鲜轻食 H5 - 主样式 */

:root {
  --green: #1f9d55;
  --green-2: #2fb86a;
  --green-soft: #eaf7ef;
  --green-deep: #157a41;
  --ink: #1d241f;
  --sub: #6f7a72;
  --line: #edefe8;
  --bg: #f5f4ef;
  --card: #fff;
  --gold: #e0a83c;
  --danger: #e2574c;
  --radius: 14px;
  --shadow: 0 6px 18px rgba(28, 45, 33, .06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; font-size: 16px; color: var(--ink); border: 0; outline: none; background: transparent; }

#page {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.wrap { padding: 0 14px; }

/* ------------------------------- 顶栏 ------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 14px;
  background: rgba(245, 244, 239, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(237, 239, 232, .8);
}

.topbar .logo { height: 30px; width: auto; }
.topbar .spacer { flex: 1; }

.store-pick {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 52%;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 600;
}
.store-pick .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-pick .arrow { color: var(--sub); font-size: 10px; transform: scaleX(1.4); }

.me-btn {
  flex: none;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .5px;
  box-shadow: 0 6px 14px rgba(31, 157, 85, .22);
}

/* ------------------------------- 横幅 ------------------------------- */
.hero {
  position: relative;
  margin: 10px 14px 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #e9e7df;
}
.hero .slides { display: flex; transition: transform .45s ease; }
.hero .slide { min-width: 100%; aspect-ratio: 2 / 1; position: relative; }
.hero .slide img { width: 100%; height: 100%; object-fit: cover; }
.hero .slide .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 16px 12px;
  background: linear-gradient(to top, rgba(20, 30, 22, .62), rgba(20, 30, 22, 0));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .3px;
}
.hero .dots {
  position: absolute;
  right: 12px; bottom: 10px;
  display: flex;
  gap: 5px;
}
.hero .dots i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
}
.hero .dots i.on { background: #fff; width: 12px; border-radius: 3px; }

/* ------------------------------- 门店卡 ------------------------------- */
.storecard {
  margin: 12px 14px 0;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.storecard .row1 { display: flex; align-items: center; gap: 8px; }
.storecard .title { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 600;
}
.badge.off { background: #f2f2ee; color: #8b8f88; }
.storecard .meta {
  margin-top: 8px;
  color: var(--sub);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.storecard .meta .dot { color: #c8cbc5; }
.storecard .promos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.promo-tag {
  font-size: 11.5px;
  color: #9c6b1f;
  background: #fdf4e3;
  border-radius: 6px;
  padding: 2px 7px;
}
.storecard .deliver {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--sub);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ------------------------------- 分类导航 ------------------------------- */
.catnav {
  position: sticky;
  top: 56px;
  z-index: 25;
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  background: rgba(245, 244, 239, .96);
  backdrop-filter: blur(10px);
  scrollbar-width: none;
}
.catnav::-webkit-scrollbar { display: none; }
.catnav button {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--sub);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.catnav button.on { background: var(--ink); color: #fff; }

/* ------------------------------- 商品 ------------------------------- */
.section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.section-title small { font-size: 11px; color: var(--sub); font-weight: 400; }

.product {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.product .thumb {
  width: 92px;
  height: 92px;
  border-radius: 12px;
  overflow: hidden;
  background: #eee;
  flex: 0 0 auto;
}
.product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.product .name { font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.product .intro {
  margin-top: 3px;
  font-size: 12px;
  color: var(--sub);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product .bottom { margin-top: auto; display: flex; align-items: flex-end; gap: 6px; }
.price { color: #d4483c; font-weight: 700; }
.price .cur { font-size: 11px; }
.price .num { font-size: 18px; letter-spacing: -.4px; }
.price-old { color: #b9bcb6; font-size: 11px; text-decoration: line-through; margin-bottom: 2px; }
.product .sales { margin-left: auto; color: #a4a99f; font-size: 11px; }

.addbtn {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(31, 157, 85, .28);
}
.addbtn.ghost { background: #fff; color: var(--green); border: 1px solid var(--green); box-shadow: none; }
.addbtn.disabled { background: #cfd3cc; box-shadow: none; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.stepper .qty { min-width: 16px; text-align: center; font-weight: 700; font-size: 13px; }

.empty {
  padding: 40px 0;
  text-align: center;
  color: #a7aca3;
  font-size: 13px;
}

/* ------------------------------- 购物车栏 ------------------------------- */
.cartbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: calc(100% - 28px);
  max-width: 492px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  background: #232b25;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(22, 32, 24, .3);
}
.cartbar .cicon { position: relative; line-height: 1; }
.cartbar .cicon-ic { width: 22px; height: 22px; display: block; }
.cartbar .cicon .badge-num {
  position: absolute;
  top: -6px; right: -9px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  background: var(--green-2);
  font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.cartbar .csum { flex: 1; min-width: 0; }
.cartbar .csum .txt { font-size: 16px; font-weight: 700; }
.cartbar .csum .tip { font-size: 11px; color: rgba(255, 255, 255, .55); }
.cartbar .cbtn {
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--green-2);
  font-weight: 700;
  font-size: 14px;
}
.cartbar .cbtn.disabled { background: #4a544b; color: rgba(255, 255, 255, .45); }

/* ------------------------------- 通用页 ------------------------------- */
.page-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-head .back { font-size: 19px; width: 24px; }
.page-head .h-title { font-size: 16px; font-weight: 700; }
.page-head .spacer { flex: 1; }

.panel {
  margin: 12px 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel .p-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 8px;
  font-size: 13px;
  font-weight: 700;
}
.panel .p-head .link { color: var(--green-deep); font-size: 12px; font-weight: 500; }
.panel .p-body { padding: 0 14px 14px; }
.panel .line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--sub);
}
.panel .line .v { color: var(--ink); text-align: right; }
.panel .line.total .v { color: #d4483c; font-size: 17px; font-weight: 700; }

/* 分段选择 */
.segment { display: flex; gap: 8px; }
.segment button {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  background: #f4f4ef;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  border: 1px solid transparent;
}
.segment button.on {
  background: var(--green-soft);
  color: var(--green-deep);
  border-color: rgba(31, 157, 85, .18);
}

/* 地址卡 */
.addr-card { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; }
.addr-card .icon { color: var(--green); margin-top: 1px; }
.addr-card .addr-ic { width: 18px; height: 18px; display: block; }
.addr-card .addr-ic.default { color: #d99a34; }
.addr-card .body { flex: 1; min-width: 0; }
.addr-card .l1 { font-size: 14px; font-weight: 600; }
.addr-card .l2 { margin-top: 2px; font-size: 12.5px; color: var(--sub); }
.addr-card .l3 { margin-top: 3px; font-size: 11.5px; color: #a0a59c; }
.addr-card .chev { color: #b9beb6; font-size: 14px; align-self: center; }

/* 购物车抽屉 */
.mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(16, 24, 18, .42);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px 18px 0 0;
  animation: rise .24s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
@keyframes rise { from { transform: translateY(30px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.sheet .s-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px 10px;
  font-weight: 700;
}
.sheet .s-head .clear { color: var(--sub); font-size: 12px; font-weight: 400; }
.sheet .s-body { overflow-y: auto; padding: 0 16px; }
.sheet .s-foot { padding: 12px 16px; border-top: 1px solid var(--line); }

.citem { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.citem:last-child { border-bottom: 0; }
.citem .thumb { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; background: #eee; }
.citem .thumb img { width: 100%; height: 100%; object-fit: cover; }
.citem .ci { flex: 1; min-width: 0; }
.citem .ci .nm { font-size: 13.5px; font-weight: 600; }
.citem .ci .sp { font-size: 11.5px; color: var(--sub); }
.citem .ci .pr { color: #d4483c; font-weight: 700; font-size: 13px; margin-top: 2px; }

/* 底部提交栏 */
.footbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 520px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
}
.footbar .sum { flex: 1; }
.footbar .sum .amt { font-size: 20px; font-weight: 700; color: #d4483c; letter-spacing: -.5px; }
.footbar .sum .tip { font-size: 11px; color: var(--sub); }
.footbar .submit {
  padding: 12px 30px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(31, 157, 85, .3);
}
.footbar .submit.disabled { background: #cdd2cb; box-shadow: none; }

/* 订单列表 */
.order-card {
  margin: 12px 14px 0;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.order-card .oc-head { display: flex; justify-content: space-between; align-items: center; }
.order-card .oc-head .sn { font-size: 13px; font-weight: 700; }
.order-card .oc-head .st { font-size: 13px; font-weight: 700; color: var(--green-deep); }
.order-card .oc-head .st.off { color: #a4a99f; }
.order-card .oc-items { display: flex; gap: 8px; margin: 10px 0; }
.order-card .oc-items .t { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: #eee; }
.order-card .oc-items .t img { width: 100%; height: 100%; object-fit: cover; }
.order-card .oc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--sub);
}
.order-card .oc-foot .amt { color: var(--ink); font-weight: 700; }
.order-card .oc-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.btn-sm {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sub);
}
.btn-sm.primary { border-color: var(--green); color: var(--green-deep); background: var(--green-soft); }
.btn-sm.solid { background: var(--green); border-color: var(--green); color: #fff; }

/* 订单详情 */
.status-hero {
  margin: 12px 14px 0;
  padding: 20px 16px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f9d55, #35b96f);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 157, 85, .22);
}
.status-hero .st { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.status-hero .desc { margin-top: 4px; font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.status-hero .code {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  font-size: 12px;
}
.status-hero .code b { font-size: 20px; letter-spacing: 3px; }

.steps { padding: 4px 0 0; }
.step { display: flex; gap: 10px; font-size: 12.5px; color: var(--sub); padding: 6px 0; }
.step .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #dfe2db;
  margin-top: 7px;
  flex: 0 0 auto;
}
.step.done { color: var(--ink); }
.step.done .dot { background: var(--green); }
.step .tm { margin-left: auto; color: #a7aca3; font-size: 11px; }

/* 我的 */
.mine-hero {
  margin: 14px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(140deg, #23302a, #3c5344);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
}
.mine-hero .avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.mine-hero .avatar-ic { width: 26px; height: 26px; color: rgba(255, 255, 255, .88); }
.mine-hero .avatar img { width: 100%; height: 100%; object-fit: cover; }
.mine-hero .nm { font-size: 17px; font-weight: 700; }
.mine-hero .ph { font-size: 12px; color: rgba(255, 255, 255, .65); margin-top: 2px; }

.menu-list { margin: 0 14px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item .mi-ic { width: 20px; height: 20px; flex: none; color: #6d7d72; }
.menu-item .chev { margin-left: auto; color: #c3c7c0; font-size: 14px; }

/* 门店列表 */
.store-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.store-item:last-child { border-bottom: 0; }
.store-item .thumb { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; flex: 0 0 auto; background: #eee; }
.store-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.store-item .nm { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.store-item .ad { margin-top: 3px; font-size: 12px; color: var(--sub); }
.store-item .mt { margin-top: 4px; font-size: 11.5px; color: #a0a59c; display: flex; gap: 12px; flex-wrap: wrap; }
.store-item .cur { position: absolute; right: 14px; top: 14px; font-size: 11px; color: var(--green-deep); background: var(--green-soft); padding: 2px 8px; border-radius: 6px; }

/* 表单 */
.form { margin: 12px 14px; background: #fff; border-radius: var(--radius); padding: 4px 14px; box-shadow: var(--shadow); }
.form .field { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.form .field:last-child { border-bottom: 0; }
.form .field label { width: 66px; font-size: 13px; color: var(--sub); flex: 0 0 auto; }
.form .field input { flex: 1; }
.form .field .locate { font-size: 12px; color: var(--green-deep); white-space: nowrap; }

.big-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 18px 14px;
  padding: 14px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 22px rgba(31, 157, 85, .26);
}
.big-btn.ghost { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

/* 登录 */
.login-box { padding: 40px 22px 0; }
.login-box .lg { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-box .lg img { width: 96px; }
.login-box .lg .nm { font-size: 17px; font-weight: 700; letter-spacing: 2px; }
.login-box .lg .sl { font-size: 11.5px; color: var(--sub); letter-spacing: 1px; }
.login-box .field { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.login-box .field .code-btn { color: var(--green-deep); font-size: 13px; font-weight: 600; }
.login-box .tip { margin-top: 14px; font-size: 11.5px; color: #a7aca3; line-height: 1.6; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: 78%;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(22, 30, 24, .88);
  color: #fff;
  font-size: 13px;
  text-align: center;
  animation: fade .18s ease;
}

/* 分类锚点小节 */
.sold-tag {
  font-size: 11px;
  color: #fff;
  background: #b9beb6;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: 2px;
  font-weight: 400;
}

.safe-bottom { height: 96px; }
.hint { padding: 8px 14px 0; font-size: 11.5px; color: #a7aca3; }
.center { text-align: center; }
.mt8 { margin-top: 8px; }
.hidden { display: none !important; }
