/* 前台样式：iOS 风手机端商城（最大宽度480px居中），主色 机关蓝 #3B82F6（不偏青、不过深） */
:root {
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --primary-light: #9CC5FB;
  --primary-soft: #E8F1FE;
  --grad: radial-gradient(120% 90% at 85% 0%, rgba(255,255,255,.26), rgba(255,255,255,0) 55%), linear-gradient(140deg, #5B96FA 0%, #3B82F6 48%, #3B82F6 100%);
  --success: #2FAE5C;
  --cyan: #12A5B0;
  --danger: #F4534A;
  --warning: #FF9F0A;
  --text: #1C1C1E;
  --text-sub: #8E8E93;
  --bg: #F3F4F8;
  --card-bg: #fff;
  --border: #E9EAF0;
  --sep: rgba(60, 60, 67, .08);
  --radius: 20px;
  --radius-btn: 12px;
  --shadow-card: 0 2px 4px rgba(28,28,30,.03), 0 12px 32px rgba(28,28,30,.05);
  --tabbar-h: 56px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.icon { width: 1.2em; height: 1.2em; fill: currentColor; vertical-align: -0.25em; }

/* 数字等宽对齐（价格/金额） */
.goods-price, .gd-price, .settle-total b, .price, .coupon-money, .stat .num {
  font-variant-numeric: tabular-nums;
}

/* 居中容器：手机端商城 */
.wrap { max-width: 480px; margin: 0 auto; padding: 0 14px; }

/* ===== 顶部品牌区（机关蓝渐变） ===== */
.topbar { background: var(--grad); color: #fff; box-shadow: 0 6px 24px rgba(59, 130, 246, .24); }
.topbar-in { max-width: 480px; margin: 0 auto; padding: 15px 14px 17px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: 1; min-width: 0; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px; object-fit: cover; flex: none;
  background: rgba(255,255,255,.22); box-shadow: 0 2px 12px rgba(0,0,0,.14);
  border: 1px solid rgba(255,255,255,.4);
}
.brand-txt { min-width: 0; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .2px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-kefu { font-size: 11px; opacity: .85; line-height: 1.3; display: flex; align-items: center; gap: 4px; }
.brand-kefu .icon { width: 1em; height: 1em; vertical-align: 0; }
/* 玻璃质感「查询订单」胶囊按钮 */
.topbar-query {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .24); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}
.topbar-query:active { transform: scale(.96); background: rgba(255,255,255,.34); }

/* 公告条 */
.notice-bar { background: #fffaf0; color: #a06a06; font-size: 12px; }
.notice-bar .wrap { display: flex; gap: 8px; align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
.notice-bar .icon { flex: none; margin-top: 3px; }
.notice-body { min-width: 0; }
.notice-body p { margin: 0; }
.notice-body img { max-width: 100%; height: auto; }

.main { padding-top: 12px; padding-bottom: 24px; }
body.has-settle .main { padding-bottom: 96px; }
.main .card { margin-bottom: 12px; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 15px; box-shadow: var(--shadow-card); }
/* iOS 分组标题：小号灰字、字距、左侧细圆角短条 */
.sec-title {
  font-size: 13px; font-weight: 600; color: var(--text-sub);
  letter-spacing: 1px;
  margin-bottom: 9px; display: flex; align-items: center; gap: 7px;
}
.sec-title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); opacity: .75; flex: none; }
.sec-title .icon { color: var(--primary); }
.empty { text-align: center; color: var(--text-sub); padding: 36px 16px; }
.muted { color: var(--text-sub); font-size: 12px; }

/* ===== 首页弹窗 ===== */
.popup-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 28px; }
.popup-box { background: var(--card-bg); border-radius: 22px; max-width: 340px; width: 100%; max-height: 72vh; overflow: auto; position: relative; padding: 22px 18px 16px; box-shadow: 0 16px 56px rgba(0,0,0,.22); }
.popup-close { position: absolute; top: 8px; right: 8px; color: var(--text-sub); padding: 6px; z-index: 2; }
.popup-body img { max-width: 100%; width: auto; height: auto; border-radius: 12px; margin: 6px auto; }
.popup-body p { margin: .4em 0; }
.popup-nomore { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--sep); font-size: 12px; color: var(--text-sub); }
.popup-nomore input { width: 15px; height: 15px; accent-color: var(--primary); }

/* ===== 领券中心：票券样式（左橙红金额区 + 虚线分隔 + 右侧领取按钮） ===== */
.coupon-list { display: flex; flex-direction: column; gap: 11px; }
.coupon-item {
  position: relative; display: flex; align-items: center;
  background: #fff; border: 1px solid #FFD9C8; border-radius: 16px;
  overflow: hidden; box-shadow: 0 3px 12px rgba(255, 91, 46, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.coupon-item:active { transform: scale(.97); box-shadow: 0 1px 5px rgba(255, 91, 46, .1); }
/* 票券左右缺口（与金额区右边界对齐） */
.coupon-item::before, .coupon-item::after {
  content: ""; position: absolute; left: 80px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--bg); border: 1px solid #FFD9C8;
  z-index: 1;
}
.coupon-item::before { top: 0; transform: translate(-50%, -50%); }
.coupon-item::after { bottom: 0; transform: translate(-50%, 50%); }
.coupon-money {
  width: 80px; flex: none; align-self: stretch; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font-size: 18px; font-weight: 800; color: #fff;
  background: linear-gradient(155deg, #FF8A50, #FF4D2E);
  border-right: 1px dashed rgba(255, 255, 255, .7);
  white-space: nowrap; padding: 14px 0;
}
.coupon-money::after {
  content: "优惠券"; font-size: 10px; font-weight: 600; letter-spacing: 2px;
  color: rgba(255, 255, 255, .9);
}
.coupon-info {
  flex: 1; font-size: 13px; font-weight: 600; color: #33343A; min-width: 0;
  padding: 12px 8px 12px 14px; line-height: 1.5;
}
.coupon-info .muted { margin-top: 3px; font-weight: 400; }
.btn-sm { padding: 4px 12px; font-size: 12px; border-radius: 999px; white-space: nowrap; }
.btn-disabled { background: #D7DAE2; color: #fff; cursor: not-allowed; }
.coupon-item .btn, .coupon-item .btn-sm { margin-right: 12px; flex: none; }
/* 首页领券中心：小长方形卡片 + 右侧竖向“领取”条（大小接近分类卡片） */
.coupon-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.coupon-scroll::-webkit-scrollbar { display: none; }
.coupon-mini { flex: 0 0 148px; display: flex; height: 62px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #FFD9C8; box-shadow: 0 2px 8px rgba(255, 91, 46, .06); }
.cm-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 4px; }
.cm-money { font-size: 15px; font-weight: 800; color: #FF4D2E; line-height: 1; white-space: nowrap; }
.cm-th { font-size: 10px; color: #9aa0ac; line-height: 1; white-space: nowrap; }
.cm-side { flex: 0 0 28px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; font-size: 12px; color: #fff; font-weight: 600; background: linear-gradient(180deg, #FF8A50, #FF4D2E); letter-spacing: 2px; border: none; text-decoration: none; cursor: pointer; }
.cm-side.dis { background: #D7DAE2; }
.cm-side:active { opacity: .85; }
.coupon-more { margin-left: auto; font-size: 12px; color: var(--text-sub); font-weight: 500; padding-left: 8px; }
/* 轻提示 Toast（复制链接等） */
.fk-toast { position: fixed; left: 50%; top: 16%; transform: translateX(-50%) translateY(-10px); background: rgba(17,19,30,.92); color: #fff; padding: 13px 22px; border-radius: 14px; font-size: 14px; line-height: 1.5; z-index: 9999; opacity: 0; transition: opacity .25s ease, transform .25s ease; pointer-events: none; max-width: 80%; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.fk-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 限时拼团：横滑卡片 ===== */
.pt-section { padding-bottom: 10px; }
.pt-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pt-scroll::-webkit-scrollbar { display: none; }
.pt-card { flex: 0 0 132px; background: #fff; border: 1px solid var(--sep); border-radius: 12px; overflow: hidden; position: relative; }
.pt-card.full .pt-img { filter: grayscale(.6); opacity: .72; }
.pt-img { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #F5F6FA; display: flex; align-items: center; justify-content: center; }
.pt-img img { width: 100%; height: 100%; object-fit: cover; }
.pt-body { padding: 8px 9px 10px; }
.pt-name { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.pt-row { display: flex; align-items: baseline; gap: 5px; margin-bottom: 6px; }
.pt-price { font-size: 16px; font-weight: 800; color: var(--danger); font-variant-numeric: tabular-nums; }
.pt-orig { font-size: 11px; color: var(--text-sub); text-decoration: line-through; }
.pt-flag { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 999px; }

/* ===== 选择分类：两列紧凑卡片 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 0 0 16px; }
.cat-card { min-width: 0; }
.cat-card {
  position: relative; background: var(--card-bg); border: 2px solid transparent;
  border-radius: 14px; padding: 9px 11px; color: var(--text); box-shadow: var(--shadow-card);
  display: block; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.cat-card:active { transform: scale(.97); }
.cat-card .cat-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cat-card .cat-count { font-size: 10.5px; color: var(--text-sub); margin-top: 2px; }
.cat-card.on { border-color: var(--primary); background: var(--primary-soft); }
.cat-card.on .cat-name { color: var(--primary); }
.cat-card.on::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 20px; height: 20px;
  background: var(--primary); border-radius: 11px 0 11px 0;
}
.cat-card.on::before {
  content: ""; position: absolute; right: 3px; bottom: 4px; width: 9px; height: 5px; z-index: 1;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-2px);
}

/* ===== 选择商品：两列紧凑卡片（卡片内边距/图片留白更舒适，名称价格字体更大） ===== */
.goods-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; }
.goods-card { min-width: 0; }
.goods-card {
  background: var(--card-bg); border: 2px solid transparent; border-radius: 12px;
  overflow: hidden; color: var(--text); display: block; box-shadow: var(--shadow-card);
  padding: 6px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.goods-card:active { transform: scale(.97); }
.goods-img { aspect-ratio: 1/1; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 10px; border-radius: 10px; }
.goods-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
/* 无图商品：CSS 渐变占位 + 商品名首字（详情页大图用默认块，首页小卡片用小号覆盖） */
.goods-ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #E8F1FE 0%, #DEEBFF 50%, #E4EEFE 100%);
}
.goods-ph span {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.88); color: var(--primary);
  font-size: 17px; font-weight: 700; box-shadow: 0 4px 12px rgba(59,130,246,.14);
}
.goods-card .goods-ph span {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.88); color: var(--primary);
  font-size: 14px; font-weight: 700; box-shadow: 0 4px 12px rgba(59,130,246,.14);
}
.goods-noimg { width: 44px; height: 44px; color: var(--primary); opacity: .35; }
.goods-meta { padding: 8px 8px 10px; }
.goods-name { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; height: 2.4em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; gap: 2px; }
.goods-price { color: var(--primary); font-weight: 800; font-size: 19px; line-height: 1; white-space: nowrap; }
.goods-price i { font-style: normal; font-size: 13px; }
.goods-meta .muted { font-size: 11px; white-space: nowrap; }
/* 库存标签：全圆角 capsule */
.tag-stock { font-size: 8.5px; padding: 1px 5px; border-radius: 999px; white-space: nowrap; font-weight: 600; }
.tag-green { background: #E5F7EC; color: var(--success); }
.tag-cyan { background: #E0F4F6; color: var(--cyan); }
.tag-red { background: #FDE9E8; color: var(--danger); }
.tag-gray { background: #EEF0F3; color: var(--text-sub); }
.tag-yellow { background: #FFF4D6; color: #C78700; }
.goods-card.soldout { cursor: not-allowed; }
.goods-card.soldout .goods-img { filter: grayscale(.8); opacity: .6; }
.goods-card.soldout .goods-name, .goods-card.soldout .goods-price { color: var(--text-sub); }

/* ===== 多数量卡密编号列表（卡密1 / 卡密2 ...） ===== */
.card-list { background: #f6f8fc; border-radius: 12px; padding: 4px 12px; margin-bottom: 10px; }
.card-list-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed #e6e8ef; }
.card-list-row:last-child { border-bottom: none; }
.cl-idx { flex: none; font-size: 11px; color: var(--primary); font-weight: 700; background: #E8F1FE; border-radius: 999px; padding: 2px 8px; margin-top: 1px; }
.cl-val { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; color: var(--text); min-width: 0; }

/* ===== 商品详情 / 下单 ===== */
.goods-detail { display: flex; gap: 12px; }
.gd-img { width: 104px; height: 104px; flex: none; border-radius: 16px; overflow: hidden; background: var(--primary-soft); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-card); }
.gd-img img { width: 100%; height: 100%; object-fit: cover; }
.gd-info { min-width: 0; flex: 1; }
.gd-name { font-size: 16px; font-weight: 700; line-height: 1.4; }
.gd-price { color: var(--primary); font-size: 22px; font-weight: 800; margin-top: 6px; }
.pt-tag { font-size: 11px; background: var(--warning); color: #fff; border-radius: 999px; padding: 2px 9px; margin-left: 8px; vertical-align: middle; font-weight: 500; }
.gd-sub { margin-top: 6px; }

/* 商品介绍富文本（HTML5：标题/列表/表格/引用/代码/图片等） */
.goods-desc .richtext { font-size: 14px; line-height: 1.7; word-break: break-word; }
.goods-desc .richtext p { margin: .5em 0; }
.goods-desc .richtext h1, .goods-desc .richtext h2, .goods-desc .richtext h3,
.goods-desc .richtext h4, .goods-desc .richtext h5, .goods-desc .richtext h6 {
  margin: .9em 0 .45em; line-height: 1.35; font-weight: 700; color: var(--text);
}
.goods-desc .richtext h1 { font-size: 1.5em; }
.goods-desc .richtext h2 { font-size: 1.35em; }
.goods-desc .richtext h3 { font-size: 1.2em; }
.goods-desc .richtext h4 { font-size: 1.08em; }
.goods-desc .richtext h5, .goods-desc .richtext h6 { font-size: 1em; color: var(--text-sub); }
.goods-desc .richtext img { max-width: 100%; height: auto; border-radius: 10px; margin: .4em 0; }
.goods-desc .richtext a { color: var(--primary); text-decoration: underline; word-break: break-all; }
.goods-desc .richtext ul, .goods-desc .richtext ol { margin: .5em 0 .5em 1.4em; }
.goods-desc .richtext li { margin: .2em 0; }
.goods-desc .richtext blockquote {
  margin: .6em 0; padding: 8px 12px; border-left: 3px solid var(--primary);
  background: var(--primary-soft); border-radius: 0 8px 8px 0; color: var(--text-sub);
}
.goods-desc .richtext pre { margin: .6em 0; padding: 10px 12px; background: #F4F6FA; border-radius: 10px; overflow-x: auto; font-size: 12.5px; }
.goods-desc .richtext code {
  background: #EEF0F3; border-radius: 4px; padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em;
}
.goods-desc .richtext pre code { background: none; padding: 0; }
.goods-desc .richtext table { width: 100%; border-collapse: collapse; margin: .6em 0; font-size: 13px; }
.goods-desc .richtext th, .goods-desc .richtext td { border: 1px solid var(--border); padding: 6px 9px; text-align: left; }
.goods-desc .richtext th { background: var(--primary-soft); font-weight: 600; }
.goods-desc .richtext hr { border: 0; border-top: 1px solid var(--border); margin: .9em 0; }

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.form-row input, .form-row select { height: 44px; padding-top: 0; padding-bottom: 0; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: #F5F6FA; font-size: 15px;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
/* 购买数量步进器（加减号） */
.stepper { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: #F5F6FA; }
.stepper-btn {
  width: 44px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; color: var(--primary); background: #fff; user-select: none;
  transition: background .2s ease, color .2s ease;
}
.stepper-btn:active { background: var(--primary-soft); }
.stepper-btn[disabled] { color: #C3C7D0; background: #EEF0F4; }
.stepper input {
  width: 64px; height: 42px; border: 0; border-radius: 0; background: #fff; text-align: center;
  font-size: 16px; font-weight: 700; padding: 0; color: var(--text); -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; box-shadow: none; }

/* 按钮 */
.btn {
  display: inline-block; padding: 7px 16px; border-radius: var(--radius-btn);
  background: var(--primary); color: #fff; font-size: 14px; text-align: center;
  box-shadow: 0 4px 12px rgba(59,130,246,.18);
  transition: transform .2s ease, opacity .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.96); background: var(--primary-dark); box-shadow: 0 2px 8px rgba(59,130,246,.14); }
.btn-block { display: block; width: 100%; padding: 11px; font-size: 15px; font-weight: 600; border-radius: 13px; margin-top: 8px; background: linear-gradient(135deg, #4B8DF7, #2563EB); box-shadow: 0 8px 20px rgba(59, 130, 246, .28); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; border-radius: 999px; }
.btn.plain { background: transparent; color: var(--primary); border: 1px solid var(--primary); box-shadow: none; }
.btn.plain:active { background: var(--primary-soft); box-shadow: none; }
.btn-pt { background: linear-gradient(135deg, #FF9F0A, #FFB84D); box-shadow: 0 6px 16px rgba(255, 159, 10, .28); margin-top: 10px; }
.btn-plain { background: transparent; color: var(--primary); border: 1px solid var(--primary); box-shadow: none; }
.btn-plain:active { background: var(--primary-soft); box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, #F4534A, #FF7A70); color: #fff; box-shadow: 0 6px 16px rgba(244,83,74,.26); }
.btn-danger:active { background: var(--danger); transform: scale(.96); box-shadow: 0 2px 8px rgba(244,83,74,.18); }

/* 底部固定结算栏：毛玻璃 */
.settle-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--sep); z-index: 60;
}
.settle-in { max-width: 480px; margin: 0 auto; padding: 10px 14px; display: flex; align-items: center; gap: 12px; }
.settle-total { flex: 1; min-width: 0; font-size: 12px; color: var(--text-sub); }
.settle-total b { color: var(--primary); font-size: 20px; font-weight: 800; }
.settle-btn {
  flex: none; padding: 11px 16px; border-radius: 13px;
  background: linear-gradient(135deg, #4B8DF7, #2563EB); color: #fff;
  font-size: 14.5px; font-weight: 700; box-shadow: 0 8px 20px rgba(59, 130, 246, .32);
  transition: transform .2s ease;
}
.settle-btn:active { transform: scale(.96); }
.settle-btn[disabled] { background: #C9CDD6; box-shadow: none; }
.settle-btn.pt { background: linear-gradient(135deg, #FF9F0A, #FFB84D); box-shadow: 0 6px 16px rgba(255, 159, 10, .32); }

/* 拼团列表页：团成员标签 */
.pt-members { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.pt-member { font-size: 12px; background: #F2F4F8; color: var(--text); border-radius: 999px; padding: 3px 10px; }
.pt-member.leader { background: rgba(255, 159, 10, .16); color: #B25E00; }
.pt-member.me { background: rgba(59, 130, 246, .14); color: var(--primary); border: 1px solid rgba(59, 130, 246, .3); }
.pt-member.empty { background: transparent; border: 1px dashed var(--sep); color: var(--text-sub); }
/* 订单详情页：我的拼团卡片 */
.pintuan-group { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 14px; }

/* ===== 拼团列表：醒目团卡片（仿领券票券样式） ===== */
.pt-group-list { display: flex; flex-direction: column; gap: 12px; }
.pt-group-card {
  position: relative; display: flex; align-items: stretch;
  background: #fff; border: 1px solid #FFD9C8; border-radius: 16px;
  overflow: hidden; box-shadow: 0 3px 12px rgba(255, 91, 46, .08);
  margin: 0 2px;
}
.pt-group-left {
  width: 84px; flex: none; align-self: stretch;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #fff; background: linear-gradient(155deg, #FF9F0A, #FF4D2E);
  border-right: 1px dashed rgba(255, 255, 255, .7); padding: 12px 0;
}
.pt-group-badge { font-size: 11px; font-weight: 700; background: rgba(255, 255, 255, .26); border-radius: 999px; padding: 2px 9px; }
.pt-group-num { font-size: 21px; font-weight: 800; line-height: 1.1; }
.pt-group-label { font-size: 10px; letter-spacing: 1px; color: rgba(255, 255, 255, .92); }
.pt-group-main { flex: 1; min-width: 0; padding: 10px 12px 12px; }
.pt-group-title { font-size: 13px; font-weight: 700; color: #33343A; }
.pt-progress { height: 7px; background: #F2F4F8; border-radius: 999px; overflow: hidden; margin: 8px 0 8px; }
.pt-bar { height: 100%; background: linear-gradient(90deg, #FF9F0A, #FF5B2E); border-radius: 999px; transition: width .3s ease; }
.pt-group-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; }
.pt-group-foot .ops { display: flex; gap: 8px; flex: none; }

/* ===== 订单 ===== */
.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--sep); font-size: 14px; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kv th { color: var(--text-sub); font-weight: 400; width: 90px; }
.kv .price, .price { color: var(--primary); font-weight: 700; }
/* 状态：capsule + 状态色点 */
.status { font-size: 11px; padding: 3px 11px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status.s0 { background: #FFF3E0; color: var(--warning); }
.status.s1 { background: var(--primary-soft); color: var(--primary); }
.status.s2 { background: #E5F7EC; color: var(--success); }
.status.s3, .status.s4 { background: #FDE9E8; color: var(--danger); }
.pay-box { margin-top: 16px; text-align: center; }
.pay-types { display: flex; gap: 10px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }
.pay-btn { min-width: 100px; border-radius: 999px; }
/* 支付方式选择卡：图标 + 名称 + 选中描边 */
.pay-cards { gap: 12px; }
.pay-card {
  flex: 1; min-width: 0; max-width: 160px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: 16px; background: #fff; color: var(--text);
  border: 2px solid var(--border); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.pay-card .icon { width: 28px; height: 28px; }
.pay-card:active, .pay-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(59,130,246,.14); color: var(--primary); transform: scale(.97); }
.card-content-box { margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 14px; }
.card-content { background: var(--primary-soft); border-radius: 12px; padding: 14px; white-space: pre-wrap; word-break: break-all; font-size: 14px; margin-bottom: 10px; }
/* 订单列表：状态色点 + 时间线感 */
.order-list { display: flex; flex-direction: column; position: relative; }
.order-item {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0 12px 16px; border-bottom: 1px solid var(--sep); color: var(--text); gap: 10px;
  transition: transform .2s ease;
}
.order-item:active { transform: scale(.98); }
.order-item:last-child { border-bottom: 0; }
/* 左侧时间线：圆点 + 连接线 */
.order-item::before {
  content: ""; position: absolute; left: 0; top: 21px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--primary); opacity: .55;
}
.order-item:not(:last-child)::after {
  content: ""; position: absolute; left: 3px; top: 32px; bottom: -1px; width: 1px;
  background: var(--border);
}
.order-gname { font-size: 14px; font-weight: 500; min-width: 0; word-break: break-all; }
.order-right { text-align: right; flex: none; }
.order-main { display: flex; flex: 1; justify-content: space-between; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.order-del { flex: none; font-size: 12px; color: var(--danger); border: 1px solid var(--danger); border-radius: 8px; padding: 4px 10px; background: transparent; transition: background .2s ease; }
.order-del:active { background: #FDE9E8; }
/* 批量删除 */
.order-check { flex: none; display: inline-flex; align-items: center; padding-left: 2px; }
.order-check input { width: 17px; height: 17px; accent-color: var(--primary); }
.order-batchbar { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; font-size: 13px; color: var(--text-sub); }
.order-batchbar label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.order-batchbar input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.order-batchbar .spacer { flex: 1; }
.order-batchbar .btn-plain { font-size: 13px; }
/* 订单筛选/搜索 */
.flt { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.order-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; }
.order-tabs a { padding: 5px 12px; border-radius: 999px; background: #EEF0F4; color: var(--text); font-size: 13px; text-decoration: none; }
.order-tabs a.on { background: var(--primary); color: #fff; font-weight: 600; }
.order-filter-form .flt { margin-bottom: 10px; }
.order-filter-form .flt:last-child { margin-bottom: 0; }
.order-filter-form input.ipt, .order-filter-form select.ipt {
  height: 40px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px;
  background: #F5F6FA; font-size: 14px; width: auto; min-width: 0;
}
.order-filter-form input.ipt:focus, .order-filter-form select.ipt:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.order-daterange { display: flex; align-items: center; gap: 6px; }
.order-daterange input.ipt { flex: 1; min-width: 0; }
.order-empty-link { color: var(--primary); font-weight: 600; }

/* ===== 清爽版订单页（前台） ===== */
/* 勾选框默认隐藏，进入批量处理模式才显示 */
.order-item .order-check { display: none; }
body.batch-on .order-item .order-check { display: inline-flex; }
/* 列表标题行：左侧标题 + 右侧批量处理 */
.my-order-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
/* 分类下方长条搜索 */
.order-search { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.order-search .ipt { flex: 1; min-width: 0; height: 42px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 12px; background: #F5F6FA; font-size: 14px; -webkit-appearance: none; appearance: none; }
.order-search .ipt:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.order-search .btn { flex: none; white-space: nowrap; }
.order-search .btn-plain { flex: none; white-space: nowrap; }

/* 提示条 */
.alert { border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.alert-err { background: #FDE9E8; color: var(--danger); }
.alert-warn { background: #FFF3E0; color: var(--warning); }
.alert-ok { background: #E5F7EC; color: var(--success); }

/* ===== 登录/注册 ===== */
.auth-box { margin: 8px 0 20px; }
.auth-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; text-align: center; }
/* iOS 分段控件风格 tabs */
.auth-tabs { display: flex; background: #E9E9EE; border-radius: 12px; padding: 3px; margin-bottom: 18px; }
.auth-tabs button { flex: 1; padding: 8px; font-size: 14px; color: var(--text-sub); border-radius: 10px; transition: all .2s ease; }
.auth-tabs button.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.auth-msg { margin: 10px 0; font-size: 13px; min-height: 18px; }
.auth-msg.err { color: var(--danger); }
.auth-msg.ok { color: var(--success); }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row .btn { white-space: nowrap; padding: 8px 14px; }
.code-row .btn[disabled] { background: #C9CDD6; cursor: not-allowed; }
.auth-alt { text-align: center; margin-top: 14px; font-size: 13px; }

/* ===== 底部 tabbar：毛玻璃 + 选中胶囊 ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-top: 1px solid var(--sep);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabbar-in { max-width: 480px; margin: 0 auto; display: flex; height: var(--tabbar-h); }
.tabbar a {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--text-sub); font-size: 11px; transition: color .2s ease;
}
.tabbar a .icon { width: 22px; height: 22px; position: relative; z-index: 1; transition: transform .25s ease; }
.tabbar a span { position: relative; z-index: 1; }
.tabbar a.on .icon { transform: translateY(-1px) scale(1.08); }
.tabbar a.on { color: var(--primary); font-weight: 600; }
.tabbar a.on::before {
  content: ""; position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 26px; border-radius: 999px; background: var(--primary-soft);
}

/* 页脚（页内版权声明，置于 tabbar 之上） */
.footer { text-align: center; padding: 6px 0 10px; }
.footer .foot-item { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px 6px; color: var(--text-sub); font-size: 12px; }
.footer .muted { font-size: 11px; }

/* 查单页最近订单 */
#recentOrders { margin-top: 6px; }
#recentOrders a { margin-right: 8px; word-break: break-all; }

/* ===== 首页公告卡（喇叭 + 2 行截断可展开 + 胶囊按钮） ===== */
.notice-card { display: flex; gap: 10px; align-items: flex-start; }
.notice-card .ni { width: 34px; height: 34px; flex: none; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.notice-card .ni .icon { width: 18px; height: 18px; }
.notice-card .nb { flex: 1; min-width: 0; }
.notice-card .nt {
  font-size: 12.5px; font-weight: 600; color: #1A1A1C; line-height: 1.6; word-break: break-all;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notice-card .nt.open { display: block; overflow: visible; }
.notice-card .ntoggle { font-size: 12px; color: var(--primary); background: none; border: 0; padding: 2px 0 0; cursor: pointer; }
.notice-card .nbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.notice-card .npill {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600;
}
.notice-card .npill .icon { width: 14px; height: 14px; }

/* ===== 首页搜索框（带放大镜图标） ===== */
.search-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.search-bar input {
  flex: 1; min-width: 0; padding: 10px 16px 10px 40px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 14px center / 16px no-repeat;
  font-size: 14px; box-shadow: var(--shadow-card);
}
.search-bar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.search-bar .btn { flex: none; border-radius: 999px; padding: 8px 18px; }

/* ===== 入场动画与交互动效（轻量级 iOS 质感） ===== */
@keyframes fkIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cat-card, .goods-card, .notice-card, .search-bar { animation: fkIn .3s ease both; }
.goods-card:nth-child(1) { animation-delay: 0s; }
.goods-card:nth-child(2) { animation-delay: .05s; }
.goods-card:nth-child(3) { animation-delay: .1s; }
.goods-card:nth-child(4) { animation-delay: .15s; }
.goods-card:nth-child(n+5) { animation-delay: .2s; }
.cat-card:nth-child(2) { animation-delay: .05s; }
.cat-card:nth-child(n+3) { animation-delay: .1s; }
@media (hover:hover) {
  .goods-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(28,28,30,.08); }
  .cat-card:hover { transform: translateY(-1px); }
}

/* ===== iOS 触感微调（不改布局） ===== */
.btn, .btn-plain, .btn-pt, .order-tabs a, .pay-card, .coupon-item, .card, .notice-card { -webkit-tap-highlight-color: transparent; }
.btn:active, .btn-plain:active, .btn-pt:active { transform: scale(.97); }
.pay-card:active { transform: scale(.97); }
.order-tabs a:active { opacity: .7; transform: scale(.96); }

/* ===== iOS 动效层 v2：更柔和的入场 + 呼吸感 ===== */
@keyframes fkRise {
  0%   { opacity: 0; transform: translateY(10px) scale(.995); }
  60%  { opacity: 1; transform: translateY(-1px); }
  100% { opacity: 1; transform: none; }
}
@keyframes fkPop {
  0%   { opacity: 0; transform: scale(.86); }
  70%  { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: none; }
}
@keyframes fkShine {
  0% { background-position: -140% 0; }
  100% { background-position: 240% 0; }
}
.main .card { animation: fkRise .34s cubic-bezier(.2,.8,.3,1.1) both; }
.main .card:nth-of-type(1) { animation-delay: .02s; }
.main .card:nth-of-type(2) { animation-delay: .07s; }
.main .card:nth-of-type(3) { animation-delay: .12s; }
.main .card:nth-of-type(4) { animation-delay: .16s; }
.main .card:nth-of-type(n+5) { animation-delay: .2s; }
.coupon-item, .order-item, .pt-group-card { animation: fkRise .3s ease both; }
.lottery-cell, .lottery-center { animation: fkPop .28s ease both; }
.lottery-cell:nth-child(1) { animation-delay: .02s; }
.lottery-cell:nth-child(2) { animation-delay: .05s; }
.lottery-cell:nth-child(3) { animation-delay: .08s; }
.lottery-cell:nth-child(4) { animation-delay: .11s; }
.lottery-cell:nth-child(6) { animation-delay: .11s; }
.lottery-cell:nth-child(7) { animation-delay: .08s; }
.lottery-cell:nth-child(8) { animation-delay: .05s; }
.lottery-cell:nth-child(9) { animation-delay: .02s; }
.lottery-center { animation-delay: .14s; }
/* 主按钮流光：仅保留签到/结算少量呼吸光感，登录按钮不做流光 */
.settle-btn, .sign-btn, .lottery-center { background-size: 160% 100%; }
.settle-btn, .sign-btn { animation: fkShine 4.5s ease-in-out infinite; }
/* 卡片微抬升 hover（仅真机/桌面） */
@media (hover:hover) {
  .coupon-item:hover { transform: translateY(-1px); }
  .notice-card, .order-item { transition: transform .16s ease; }
  .order-item:hover { transform: translateX(1px); }
}
/* 触摸反馈统一 */
.goods-card, .cat-card, .pt-card, .order-main, .lcard a, .adm-item { -webkit-tap-highlight-color: transparent; }
.coupon-item:active, .pt-card:active, .notice-card:active { transform: scale(.98); }

/* ============================================================
   视觉收敛 v3（参考 vivo / OPPO 商城：干净、克制、低饱和）
   仅收敛视觉，不改布局；桌面后台 admin_pc.css 不加载本层
   ============================================================ */
:root {
  --radius: 16px;
  --shadow-card: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.05);
}
body { background: #F7F8FA; }

/* 顶部品牌区：平铺机关蓝，去掉多余的玻璃与光晕 */
.topbar { background: linear-gradient(135deg, #5B96FA 0%, #3B82F6 100%); box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.brand-logo {
  background: rgba(255,255,255,.15);
  box-shadow: none;
  border: 1px solid rgba(255,255,255,.22);
}
.topbar-query {
  background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.25);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none;
}

/* 卡片：从“悬浮玻璃”回到“平面纸张”，细描边更干净 */
.card { border-radius: 16px; border-color: #EDEEF2; box-shadow: none; }
.goods-card { border-radius: 12px; border: 1px solid #ECEEF3; box-shadow: none; }
.goods-img { border-radius: 9px; background: #F5F7FA; }
.goods-ph { background: linear-gradient(150deg, #EAF2FE 0%, #DFEBFE 100%); }
.goods-ph span { box-shadow: none; }
.cat-card { border-radius: 12px; border: 1px solid #ECEEF3; box-shadow: none; }
.cat-card.on { border-color: #3B82F6; background: #EDF4FF; }
/* 去掉“右下角切角对勾”这种模板装饰 */
.cat-card.on::after, .cat-card.on::before { display: none; }
.cat-card.on .cat-name { color: #2563EB; }

/* 标题更克制：取消左侧色条，改成更接近电商的小节标题 */
.sec-title { color: #1f2937; font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.sec-title::before { display: none; }
.sec-title .icon { display: none; }

/* 优惠券：去掉仿票据缺口，减少花哨 */
.coupon-item::before, .coupon-item::after { display: none; }
.coupon-item { border-radius: 14px; box-shadow: none; }
.coupon-money { background: linear-gradient(160deg, #FF7A45, #FF4D2E); }
.coupon-mini { border-radius: 10px; box-shadow: none; }

/* 拼团卡片去厚重 */
.pt-group-card { border-radius: 14px; box-shadow: none; }

/* 支付选择卡：轻描边，不放大阴影 */
.pay-card { border-width: 1px; border-radius: 14px; box-shadow: none; }
.pay-card:active, .pay-card:hover { box-shadow: none; transform: scale(.98); }

/* 动画收敛：去掉整页卡片“依次弹入”的刻意感；抽奖保留轻量动效 */
.main .card { animation: none; }
.coupon-item, .order-item, .pt-group-card { animation: none; }
.notice-card, .search-bar { animation: none; }
.lottery-cell, .lottery-center { animation: fkPop .18s ease both; }
@keyframes fkSoftFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (hover:hover) {
  .goods-card:hover, .cat-card:hover, .coupon-item:hover { transform: none; box-shadow: none; }
  .notice-card:hover, .order-item:hover { transform: none; }
}

/* ============================================================
   商品详情页布局改版（首页以外的页面）：大图置顶，信息下移
   ============================================================ */
.card.goods-detail {
  display: flex; flex-direction: column;
  padding: 0; overflow: hidden;
}
.goods-detail .gd-img {
  width: 100%; height: auto; aspect-ratio: 1/1;
  flex: none; border-radius: 0; box-shadow: none;
}
.goods-detail .gd-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.goods-detail .gd-info { padding: 14px 16px 16px; }
.goods-detail .gd-name { font-size: 18px; }
.goods-detail .gd-price { font-size: 24px; margin-top: 8px; }
