/* 极光优选 · H5 仓储商城风（对齐参考站布局：白底 + 主色红 #e41f17） */
:root {
  --primary: #e41f17;
  --primary-2: #e83730;
  --primary-soft: #fff1f0;
  --orange: #ff8a3d;
  --orange-deep: #ff6a00;
  --ink: #333333;
  --muted: #888888;
  --muted-2: #555555;
  --line: #f2f2f2;
  --bg: #f5f5f5;
  --white: #ffffff;
  --danger: #e41f17;
  --radius: 8px;
  --nav-h: 52px;
  --topbar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --app-max: 640px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; }

body.shop-body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #ddd;
  min-height: 100vh;
  line-height: 1.45;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.app-shell {
  max-width: var(--app-max);
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 24px rgba(0,0,0,.12);
  /* 勿设 overflow-x，否则 WebKit/小程序里 sticky 顶栏会失效，商品会盖住搜索框 */
  overflow: visible;
}

.site-main {
  min-height: 60vh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
}

/* ---------- 顶栏搜索（首页） ---------- */
.hx-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  /* 独立图层，避免上滑时商品透出/盖住搜索框 */
  isolation: isolate;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.hx-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 999px;
  padding: 0 12px;
  height: 36px;
}

.hx-search .scan {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
}

.hx-search input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
  min-width: 0;
}

.hx-search input::placeholder { color: #bbb; }

.hx-search button,
.hx-search .hx-search-go {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 0 2px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.hx-search .hx-search-go svg {
  display: block;
}

/* ---------- 首页优惠券 ---------- */
.home-coupons {
  padding: 10px 0 4px;
  background: #fff;
  overflow: hidden;
}

.home-coupons-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 12px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.home-coupons-scroll::-webkit-scrollbar { display: none; }

.home-coupon-card {
  flex: 0 0 108px;
  width: 108px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffe7d1 0%, #ff9a3c 48%, #ff6a00 100%);
  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.22);
  color: #fff;
  text-align: center;
}

.home-coupon-top {
  padding: 12px 8px 8px;
}

.home-coupon-amount {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.home-coupon-amount small {
  font-size: 14px;
  font-weight: 700;
  margin-right: 1px;
}

.home-coupon-rule {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.95;
}

.home-coupon-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 0 8px 10px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #ff6a00;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.home-coupon-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

/* ---------- 首页分类+商品 ---------- */
.home-catalog {
  display: flex;
  align-items: stretch;
  min-height: 52vh;
  background: #f7f7f7;
  border-top: 1px solid var(--line);
}

.home-cat-side {
  width: 84px;
  flex-shrink: 0;
  background: #f3f3f3;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  position: sticky;
  top: 52px;
  align-self: flex-start;
}

.home-cat-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px 8px;
  font-size: 13px;
  color: #666;
  text-align: center;
  position: relative;
  cursor: pointer;
  line-height: 1.35;
}

.home-cat-item.is-on {
  background: #fff;
  color: #ff6a00;
  font-weight: 700;
}

.home-cat-item.is-on::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 0 2px 2px 0;
  background: #ff6a00;
}

.home-cat-main {
  flex: 1;
  min-width: 0;
  background: #fff;
  padding: 8px 12px 16px;
}

.home-cat-sec + .home-cat-sec {
  margin-top: 8px;
}

.home-cat-title {
  margin: 6px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: #222;
}

.home-pro-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-pro-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.home-pro-row .cover {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
  flex-shrink: 0;
}

.home-pro-row .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-pro-row .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
}

.home-pro-row .title {
  font-size: 13px;
  color: #222;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-pro-row .row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.home-pro-row .price {
  color: #ff6a00;
  font-size: 16px;
  font-weight: 700;
}

.home-pro-row .price small {
  font-size: 12px;
}

.home-pro-row .home-add {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: #ff6a00;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.home-pro-row .home-add svg { display: block; }

.home-cat-main .empty-state {
  padding: 24px 0;
}

.nav-home .site-main {
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
}

/* 内页顶栏 */
.hx-pagebar {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.hx-pagebar .back {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--ink);
}

.hx-pagebar h1 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.hx-pagebar .side {
  width: 52px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 首页轮播 ---------- */
.hx-banner {
  margin: 0;
  width: 100%;
  background: #eee;
  overflow: hidden;
  position: relative;
  aspect-ratio: 75 / 28;
}

.hx-banner-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .35s ease;
  will-change: transform;
}

.hx-banner-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 100%;
}

.hx-banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.hx-banner-slide img,
.hx-banner > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hx-banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.hx-banner-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  display: block;
}

.hx-banner-dots i.is-on {
  background: #fff;
  width: 14px;
  border-radius: 999px;
}

.hx-banner-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #ff8a3d 0%, #e41f17 55%, #c01010 100%);
  color: #fff;
}

.hx-banner-fallback strong {
  font-size: 22px;
  font-weight: 700;
}

.hx-banner-fallback span {
  margin-top: 6px;
  font-size: 13px;
  opacity: .92;
}

/* ---------- 入口图标 ---------- */
.hx-icons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 6px;
  padding: 14px 12px 12px;
  background: var(--white);
  margin-bottom: 8px;
}

.hx-icons-home {
  margin-bottom: 8px;
  border-bottom: 0;
}

.hx-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
  min-width: 0;
}

.hx-icon > span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hx-icon .ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff9a4d, #ff6a00);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 8px rgba(255, 106, 0, .22);
  flex-shrink: 0;
}

.hx-icon .ico svg { width: 20px; height: 20px; }

.hx-icon.red .ico {
  background: linear-gradient(180deg, #ff6b63, #e41f17);
  box-shadow: 0 3px 8px rgba(228, 31, 23, .22);
}

/* ---------- 区块标题 ---------- */
.hx-section {
  background: var(--white);
  margin-bottom: 8px;
}

.hx-section-hd {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 42px;
  border-bottom: 1px solid var(--line);
}

.hx-section-hd h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.hx-section-hd h2::before,
.hx-section-hd h2::after {
  content: "—";
  color: #ccc;
  margin: 0 6px;
  font-weight: 400;
}

.hx-section-hd .more {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 商品列表行（参考站） ---------- */
.hx-plist { background: var(--white); }

.hx-prow {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  position: relative;
  z-index: 0;
}

.hx-prow:last-child { border-bottom: 0; }

.hx-prow .cover {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
}

.hx-prow .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hx-prow .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hx-prow .title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hx-prow .sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hx-prow .row-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
}

.hx-prow .price {
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
}

.hx-prow .price small {
  font-size: 12px;
  font-weight: 500;
}

.hx-prow .market {
  margin-left: 6px;
  font-size: 12px;
  color: #aaa;
  text-decoration: line-through;
  font-weight: 400;
}

.hx-add-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.hx-item-qty {
  position: absolute;
  top: -7px;
  left: -7px;
  z-index: 2;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
  pointer-events: none;
  box-shadow: 0 0 0 1.5px #fff;
}
.hx-item-qty[hidden] {
  display: none !important;
}
.hx-item-qty.is-pop {
  animation: yh-badge-pop .35s ease;
}

.hx-add {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.hx-add:active { opacity: .85; }

/* 加购飞入购物车 */
.yh-fly-ball {
  position: fixed;
  z-index: 9999;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  background: var(--primary, #e41f17);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(228, 31, 23, .35);
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
}

.nav-icon-wrap.is-bump,
.mobile-nav .nav-icon-wrap.is-bump {
  animation: yh-cart-bump .4s ease;
}
.nav-icon-wrap.is-bump .badge,
.mobile-nav .nav-icon-wrap.is-bump .badge {
  animation: yh-badge-pop .4s ease;
}
@keyframes yh-cart-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  70% { transform: scale(.94); }
  100% { transform: scale(1); }
}
@keyframes yh-badge-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------- 底部导航 ---------- */
.mobile-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: var(--app-max);
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--white);
  border-top: 1px solid #eee;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 100;
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #999;
  font-size: 11px;
  position: relative;
}

.mobile-nav a.is-active { color: var(--primary); }

.mobile-nav svg { width: 22px; height: 22px; }

.mobile-nav .badge,
.nav-icon-wrap .badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon-wrap { position: relative; display: inline-flex; }

/* ---------- 分类页：左栏+右列表 ---------- */
.hx-cat-page {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-height: 60vh;
  background: var(--white);
  align-items: start;
  overflow: visible;
  --hx-filter-row-h: 40px;
}

/* 首页：整页滚动；侧栏/筛选吸顶（真机可滚到页码） */
.nav-home .hx-cat-page {
  position: relative;
  top: auto;
  z-index: auto;
  height: auto;
  min-height: 70vh;
  max-height: none;
  border-top: 1px solid var(--line);
  overflow: visible;
}

.nav-home .hx-cat-side {
  position: sticky;
  top: var(--topbar-h);
  z-index: 90;
  height: auto;
  max-height: calc(100dvh - var(--topbar-h) - var(--nav-h) - var(--safe-b));
  align-self: start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f7f7f7;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.nav-home .hx-cat-main {
  height: auto;
  max-height: none;
  display: block;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.nav-home .hx-cat-sticky {
  position: sticky;
  top: var(--topbar-h);
  z-index: 100;
  background: #fff;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.nav-home .hx-cat-scroll {
  flex: none;
  min-height: 0;
  height: auto;
  overflow: visible;
  padding-bottom: 0;
}

.nav-home .hx-cat-pager {
  position: relative;
  padding: 12px 6px 20px;
}

/* 首页顶部：Banner 区（下滑瞬时收起，避免 max-height 动画卡顿） */
.home-chrome {
  display: block;
}

.home-chrome.is-collapsed {
  display: none;
}

.nav-product .hx-pagebar ~ .site-main .hx-cat-page,
body.nav-product:has(.hx-pagebar) .hx-cat-page {
  min-height: calc(100vh - 44px - var(--nav-h) - var(--safe-b));
}

.hx-cat-side {
  background: #f7f7f7;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.hx-cat-side a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 6px;
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
  border-left: 3px solid transparent;
  line-height: 1.35;
  box-sizing: border-box;
}

/* 无二级时：左侧「全部」与右侧「综合」同行等高，底线对齐 */
.hx-cat-side a:first-child {
  height: var(--hx-filter-row-h);
  min-height: var(--hx-filter-row-h);
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

/* 有二级标签时：与右侧 cascade 行对齐 */
.hx-cat-page:has(.hx-cascade) .hx-cat-side a:first-child {
  height: auto;
  min-height: 44px;
  border-bottom: 0;
}

.hx-cat-side a.is-active {
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}

/* 「全部」选中时底部红线与「综合」红线同一水平 */
.hx-cat-page:not(:has(.hx-cascade)) .hx-cat-side a:first-child.is-active {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.hx-cat-main {
  min-width: 0;
  background: var(--white);
  overflow: visible;
}

.hx-cat-sticky {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  max-width: 100%;
  overflow: hidden;
}

.hx-cat-scroll {
  overflow: visible;
}

/* 分类侧栏：细滚动条 */
.hx-cat-side {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.28) transparent;
  padding-bottom: 12px;
}

.hx-cat-side::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.hx-cat-side::-webkit-scrollbar-track {
  background: transparent;
}

.hx-cat-side::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
}

.hx-cat-pager {
  background: #fff;
  border-top: 1px solid var(--line);
}

.hx-cat-pager .pager {
  padding: 8px 0 4px;
}

.hx-loadmore,
.hx-loadend {
  text-align: center;
  padding: 14px 12px 28px;
  font-size: 12px;
  color: var(--muted);
}

.hx-loadmore {
  min-height: 28px;
  visibility: hidden;
}

.hx-loadmore.is-on {
  visibility: visible;
}

.hx-loadend {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 20px 36px;
  color: #c0c0c0;
  background: transparent;
}

.hx-loadend.is-on {
  display: flex;
}

.hx-loadend-line {
  flex: 1;
  max-width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e0e0e0 30%, #e0e0e0 70%, transparent);
}

.hx-loadend-text {
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #c4c4c4;
  line-height: 1;
  white-space: nowrap;
}

.hx-cascade {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.hx-cascade-label {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 6px;
  font-weight: 600;
}

.hx-cascade-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.hx-cascade-row + .hx-cascade-row {
  margin-top: 6px;
}

.hx-cascade-row::-webkit-scrollbar { display: none; }

.hx-chip {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid #e5e5e5;
  color: var(--muted-2);
  white-space: nowrap;
}

.hx-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.hx-chip.muted {
  border-style: dashed;
  color: #aaa;
}

.hx-sort {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: var(--hx-filter-row-h, 40px);
  border-bottom: 1px solid var(--line);
  background: var(--white);
  box-sizing: border-box;
}

.hx-sort a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 4px;
  font-size: 13px;
  color: var(--muted-2);
  box-sizing: border-box;
}

.hx-sort a.is-active {
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--primary);
}

/* ---------- 详情 ---------- */
.detail-page { background: var(--bg); padding-bottom: 70px; }

.detail-gallery { background: var(--white); }

.detail-cover {
  aspect-ratio: 1;
  background: #fafafa;
  position: relative;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
}

.thumb {
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0;
  background: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.thumb.is-active { border-color: var(--primary); }

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info {
  background: var(--white);
  padding: 14px 14px 4px;
  margin-bottom: 8px;
}

.detail-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  background: #f7f7f7;
  color: #666;
  font-size: 12px;
  line-height: 1.2;
  max-width: 100%;
}

.detail-brand-logo {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.detail-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-info h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
}

.detail-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.detail-price-box {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.detail-price-box .price {
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
}

.detail-price-box .market {
  color: #aaa;
  text-decoration: line-through;
  font-size: 13px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 10px 0 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #f2f2f2;
  font-size: 12px;
  color: #999;
}

.detail-meta em {
  font-style: normal;
  color: #555;
  font-weight: 500;
}

.detail-meta-cat {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-attrs {
  display: none;
}

.spec-panel {
  background: transparent;
  padding: 12px 0 4px;
  margin: 0;
  border-bottom: 1px solid #f2f2f2;
}

.spec-group { margin-bottom: 12px; }
.spec-group:last-child { margin-bottom: 8px; }
.spec-label { font-size: 13px; color: #666; margin-bottom: 8px; }

.spec-values { display: flex; flex-wrap: wrap; gap: 8px; }

.spec-value {
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 4px;
  padding: 7px 14px;
  font-size: 13px;
  color: #333;
}

.spec-value.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  padding: 14px 0;
  margin: 0;
  font-size: 13px;
  color: #666;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border: 0;
  background: #f7f7f7;
  font-size: 16px;
  color: #333;
}

.qty-control input {
  width: 44px;
  height: 32px;
  border: 0;
  text-align: center;
  border-left: 1px solid #e5e5e5;
  border-right: 1px solid #e5e5e5;
}

.detail-actions {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b));
  width: 100%;
  max-width: var(--app-max);
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  background: var(--white);
  border-top: 1px solid var(--line);
  z-index: 90;
}

.detail-fav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: #666;
  padding: 0;
  font-size: 10px;
  line-height: 1.1;
}

.detail-fav svg {
  width: 22px;
  height: 22px;
  display: block;
}

.detail-fav.is-on {
  color: var(--primary);
}

.detail-content {
  background: var(--white);
  padding: 12px;
  margin-bottom: 8px;
}

.detail-content h2,
.panel-title {
  margin: 0 0 10px;
  font-size: 15px;
}

.rich-content { font-size: 14px; color: #444; line-height: 1.7; }
.rich-content img { max-width: 100%; height: auto; }

.crumb {
  display: none;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #f5f5f5;
  color: var(--ink);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border-color: #ddd;
  color: var(--ink);
}

.btn-lg { padding: 12px 18px; font-size: 15px; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn.danger, a.danger { color: var(--primary); }

/* ---------- 会员 / 订单 / 购物车 / 表单 ---------- */
.page-banner {
  background: var(--white);
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--line);
}

.page-banner h1 {
  margin: 0;
  font-size: 18px;
}

.page-banner p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.wrap {
  max-width: var(--app-max);
  margin: 0 auto;
  padding: 0;
}

.member-page,
.address-page,
.cart-page,
.checkout-page,
.orders-page,
.auth-page {
  padding: 0 0 20px;
}

.member-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 18px 14px;
  background: linear-gradient(135deg, #ff8a3d, #e41f17);
  color: #fff;
}

.member-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}

.member-hero h2 { margin: 0; font-size: 18px; }
.member-hero p { margin: 4px 0 0; opacity: .9; font-size: 13px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  margin-bottom: 8px;
}

.stat-tile {
  padding: 14px 8px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stat-tile:last-child { border-right: 0; }
.stat-tile strong { display: block; font-size: 18px; color: var(--primary); }
.stat-tile span { font-size: 12px; color: var(--muted); }

.menu-list {
  background: var(--white);
}

.menu-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.menu-list a em { color: #ccc; font-style: normal; }
.menu-list a.danger { color: var(--primary); }

/* —— 个人中心（对齐参考站） —— */
.mine-page {
  background: #f5f5f5;
  min-height: calc(100vh - var(--nav-h) - var(--safe-b));
}

.mine-hero {
  background: #e64340;
  color: #fff;
  padding: 18px 16px 16px;
}

.mine-hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mine-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #d8d8d8;
  color: #999;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 20px;
  font-weight: 700;
}

.mine-avatar.is-user {
  background: #fff;
  color: #e64340;
}

.mine-avatar svg {
  width: 30px;
  height: 30px;
}

.mine-hero-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}

.mine-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  height: 34px;
  padding: 0 22px;
  border-radius: 999px;
  background: #fff;
  color: #222;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.mine-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.mine-sub {
  font-size: 12px;
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.mine-msg {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.mine-msg svg { width: 22px; height: 22px; }

.mine-msg-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  transform: translate(25%, -15%);
}

.mine-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
  text-align: center;
}

.mine-metric {
  color: #fff;
  text-decoration: none;
}

.mine-metric strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.mine-metric span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: .95;
}

.mine-orders {
  margin: 10px 0 0;
  background: #fff;
}

.mine-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 4px;
}

.mine-orders-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.mine-orders-head a {
  font-size: 12px;
  color: #999;
}

.mine-orders-head em {
  font-style: normal;
  margin-left: 2px;
}

.mine-order-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 10px 6px 14px;
}

.mine-order-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #333;
  text-decoration: none;
}

.mine-order-grid .ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #e64340;
}

.mine-order-grid .ico svg {
  width: 28px;
  height: 28px;
}

.mine-order-grid em {
  font-style: normal;
  font-size: 12px;
  color: #333;
}

.mine-menu {
  margin-top: 10px;
  background: #fff;
}

.mine-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  color: #222;
  text-decoration: none;
}

.mine-menu a:last-child { border-bottom: 0; }
.mine-menu a em { color: #ccc; font-style: normal; font-size: 16px; }
.mine-menu a.danger { color: var(--primary); }

.nav-member .site-main { padding-top: 0; }
.nav-product .site-main { padding-top: 0; }

/* —— 站内信息 —— */
.msg-page {
  background: var(--bg);
  min-height: 50vh;
}

.msg-list {
  background: #fff;
}

.msg-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}

.msg-item-main {
  flex: 1;
  min-width: 0;
}

.msg-item h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.msg-item.is-unread h3::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e64340;
  margin-right: 6px;
  vertical-align: middle;
}

.msg-item p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-item time {
  flex-shrink: 0;
  font-size: 12px;
  color: #bbb;
  padding-top: 2px;
}

.msg-detail {
  background: #fff;
  padding: 16px 14px 20px;
}

.msg-detail h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.msg-detail time {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #999;
}

.msg-detail-body {
  margin-top: 16px;
  font-size: 14px;
  color: #333;
  line-height: 1.7;
  word-break: break-word;
}

.msg-detail-act {
  padding: 16px 14px;
}

.msg-detail-act .btn {
  display: block;
  text-align: center;
}

/* —— 优惠券 / 对账单 —— */
.coupon-page,
.stmt-page {
  background: var(--bg);
  min-height: 50vh;
  padding-bottom: 16px;
}

.coupon-tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.coupon-tabs a,
.coupon-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  color: #666;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.coupon-tabs a.is-on,
.coupon-tab.is-on {
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--primary);
}

.coupon-block[hidden] {
  display: none !important;
}

.coupon-block-title {
  margin: 0;
  padding: 12px 14px 0;
  font-size: 14px;
  color: #666;
}

.coupon-list {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coupon-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #f0f0f0;
}

.coupon-card.is-used {
  opacity: .55;
}

.coupon-amount {
  width: 72px;
  flex-shrink: 0;
  text-align: center;
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
}

.coupon-amount small {
  font-size: 12px;
}

.coupon-info {
  flex: 1;
  min-width: 0;
}

.coupon-info h3 {
  margin: 0;
  font-size: 14px;
}

.coupon-info p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #888;
}

.coupon-state {
  font-size: 12px;
  color: #999;
  flex-shrink: 0;
}

.stmt-list {
  background: #fff;
}

.stmt-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #f0f0f0;
  color: #222;
}

.stmt-item h3 {
  margin: 0;
  font-size: 15px;
}

.stmt-item p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #999;
}

.stmt-right {
  text-align: right;
  flex-shrink: 0;
}

.stmt-right strong {
  display: block;
  color: var(--primary);
  font-size: 15px;
}

.stmt-right em {
  font-style: normal;
  color: #ccc;
}

.stmt-detail {
  background: #fff;
  padding: 16px 14px;
}

.stmt-detail h1 {
  margin: 0;
  font-size: 18px;
}

.stmt-meta {
  margin-top: 14px;
}

.stmt-meta > div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}

.stmt-meta span { color: #888; }
.stmt-meta strong { font-weight: 600; color: #222; }

.stmt-remark {
  margin-top: 16px;
}

.stmt-remark h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.stmt-remark p {
  margin: 0;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.stmt-orders {
  margin-top: 10px;
  background: #fff;
  padding: 14px;
}

.stmt-orders h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.stmt-order {
  border: 1px solid #eee;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}

.stmt-order:last-child { margin-bottom: 0; }

.stmt-order-hd {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.stmt-order-hd span {
  display: block;
  margin-top: 4px;
  color: #999;
  font-size: 12px;
}

.stmt-order-amt {
  text-align: right;
}

.stmt-order-amt em {
  display: block;
  font-style: normal;
  color: #888;
  font-size: 12px;
  margin-bottom: 4px;
}

.stmt-order-amt strong {
  color: #e64340;
  font-size: 15px;
}

.stmt-order-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stmt-order-items li {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f5f5f5;
  align-items: center;
}

.stmt-order-items li:last-child { border-bottom: 0; }

.stmt-order-items img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  background: #f5f5f5;
  flex-shrink: 0;
}

.stmt-oi-info {
  flex: 1;
  min-width: 0;
}

.stmt-oi-info p {
  margin: 0;
  font-size: 13px;
  color: #222;
  line-height: 1.4;
}

.stmt-oi-info span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #999;
}

.stmt-oi-price {
  text-align: right;
  flex-shrink: 0;
}

.stmt-oi-price strong {
  display: block;
  font-size: 13px;
  color: #222;
}

.stmt-oi-price span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #999;
}

.panel {
  background: var(--white);
  margin-bottom: 8px;
  padding: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.field-full { grid-column: 1 / -1; }

.field input,
.field select,
.field textarea {
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
}

.field input:focus,
.field select:focus { border-color: var(--primary); }

.check-field {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.addr-card {
  background: var(--white);
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.addr-card header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.addr-card p { margin: 8px 0; color: var(--muted); font-size: 13px; }
.addr-card footer { display: flex; gap: 8px; flex-wrap: wrap; }

.tag-inline {
  font-size: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 3px;
  font-style: normal;
}

.tag {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  color: #fff;
}

.tag-hot { background: var(--primary); }
.tag-new { background: var(--orange-deep); }

.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
  background: var(--white);
}

.empty-state .btn { margin-top: 12px; }

.pager {
  padding: 14px 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
}

.pager .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pager .pagination li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pager .pagination a,
.pager .pagination span,
.pager > a,
.pager > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  color: #333;
  line-height: 1;
  text-decoration: none;
}

.pager .pagination .active span,
.pager .pagination .active a {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pager .pagination .disabled span {
  color: #ccc;
  background: #f7f7f7;
}

.cart-footer,
.cart-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b));
  width: 100%;
  max-width: var(--app-max);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  gap: 10px;
  box-shadow: 0 -6px 20px rgba(0,0,0,.04);
}

.cart-total strong,
.cart-bar .sum {
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
}

.cart-page {
  padding: 0 0 88px;
  min-height: 50vh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(225, 29, 72, .06), transparent 55%),
    var(--bg);
}

.cart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 12px 0;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.cart-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-sel-tip {
  font-size: 12px;
  color: var(--muted);
}

.cart-batch-del {
  border: 0;
  background: #fff1f2;
  color: #e11d48;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.cart-batch-del:active { opacity: .85; }

.cart-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #444;
}

.cart-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin: 0;
}

.cart-list {
  margin: 10px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 22px 78px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .03);
}

.cart-cover {
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 10px;
  overflow: hidden;
  background: #f6f6f6;
}

.cart-cover img,
.cart-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-body { min-width: 0; }

.cart-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cart-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-info h3 { margin: 0; font-size: 14px; }
.cart-info .price,
.cart-price-wrap .price {
  color: var(--primary);
  font-weight: 700;
  margin: 0;
  font-size: 16px;
}
.cart-info .sku-text,
.cart-item .sku-text {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  background: #f5f5f5;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
}

.cart-bottom {
  margin-top: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.cart-subtotal {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.cart-remove {
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #9ca3af;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
}

.cart-remove:hover { color: #e11d48; }

.cart-footer-check { flex-shrink: 0; }

.cart-total {
  flex: 1;
  min-width: 0;
  text-align: right;
}

.cart-total-main {
  font-size: 13px;
  color: #374151;
}

.cart-total-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #9ca3af;
}

.cart-checkout {
  flex-shrink: 0;
  min-width: 108px;
  text-align: center;
  border-radius: 999px !important;
  padding: 10px 18px !important;
}

.cart-empty {
  margin: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.cart-empty-ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  color: #d1d5db;
}

.cart-empty-ico svg { width: 100%; height: 100%; }

.cart-empty .btn { margin-top: 14px; }

.cart-item .qty-control {
  border: 1px solid #ececec;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

/* ---------- 提交成功 / 拦截页 ---------- */
.success-page {
  min-height: calc(100vh - var(--nav-h) - 80px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 14px 40px;
  background: var(--bg);
}

.success-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 14px;
  padding: 32px 20px 24px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #16a34a;
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.12);
}

.success-icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

.success-icon-warn {
  color: var(--primary);
  background: linear-gradient(180deg, #fff1f0, #ffe4e1);
  box-shadow: inset 0 0 0 1px rgba(228, 31, 23, 0.12);
}

.success-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.success-desc {
  margin: 0 auto 22px;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.success-meta {
  text-align: left;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 14px;
  margin-bottom: 22px;
}

.success-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.success-meta-row:last-child { border-bottom: 0; }

.success-meta-row > span {
  flex: 0 0 auto;
  color: var(--muted);
}

.success-meta-row > strong,
.success-meta-row > em {
  flex: 1 1 auto;
  text-align: right;
  font-style: normal;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.success-meta-row .price {
  color: var(--primary);
  font-size: 16px;
}

.success-actions {
  display: grid;
  gap: 10px;
}

.success-actions .btn {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

/* ---------- 我的订单 ---------- */
.order-page {
  padding-bottom: 20px;
  background: var(--bg);
  min-height: 50vh;
}

.status-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.status-tabs::-webkit-scrollbar { display: none; }

.status-tabs a {
  flex: 1 0 auto;
  min-width: 64px;
  padding: 13px 12px;
  font-size: 13px;
  color: var(--muted-2);
  text-align: center;
  white-space: nowrap;
  position: relative;
}

.status-tabs a.is-active {
  color: var(--primary);
  font-weight: 700;
}

.status-tabs a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 3px;
  margin-left: -14px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
}

.order-list {
  padding: 0 10px 8px;
  display: grid;
  gap: 10px;
}

.order-card {
  background: var(--white);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.order-card-head,
.order-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.order-no {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.order-no-label {
  font-size: 11px;
  color: var(--muted);
}

.order-no strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-all;
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--primary);
  background: var(--primary-soft);
}

.status-pill.status-0,
.status-pill.status-1 {
  color: #c2410c;
  background: #fff7ed;
}

.status-pill.status-2 {
  color: #1d4ed8;
  background: #eff6ff;
}

.status-pill.status-3 {
  color: #15803d;
  background: #ecfdf5;
}

.status-pill.status-4 {
  color: #6b7280;
  background: #f3f4f6;
}

.order-card-body {
  padding: 12px 14px 4px;
}

.order-line {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.order-line img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg);
  flex: 0 0 auto;
}

.order-line-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-line h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-line .sku-text {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.order-line-meta {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.order-line-meta .price {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}

.order-line-meta .qty {
  color: var(--muted);
  font-size: 12px;
}

.order-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 14px;
  border-top: 1px dashed var(--line);
}

.order-foot-left {
  min-width: 0;
}

.order-time {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  color: var(--muted);
}

.order-pay {
  font-size: 13px;
  color: var(--muted-2);
}

.order-pay strong {
  color: var(--primary);
  font-size: 17px;
  font-weight: 700;
  margin-left: 4px;
}

.order-acts {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.order-acts .btn-sm {
  border-radius: 999px;
  padding: 6px 14px;
}

.order-empty {
  margin: 10px;
  border-radius: 12px;
  padding: 56px 16px;
}

.order-empty-ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  color: #c4c4c4;
}

.order-empty-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.order-empty p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.price-locked,
a.price-locked {
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-decoration: none;
}
a.price-locked:hover { color: var(--primary) !important; }

.yh-sku-price .price-locked {
  font-size: 15px !important;
  color: var(--muted);
}

.page-banner { display: none; }

.fav-page {
  background: var(--bg);
  min-height: 50vh;
  padding-bottom: 12px;
}

.fav-list {
  background: var(--white);
}

.fav-row-acts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fav-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.addr-pick { margin-bottom: 12px; }
.addr-option {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 8px;
  background: #fff;
}

.checkout-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.checkout-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
}

.checkout-summary > div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}

.checkout-summary .pay-row strong { color: var(--primary); font-size: 18px; }

.checkout-actions {
  display: flex;
  gap: 10px;
  padding: 12px;
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-b));
  background: #fff;
  border-top: 1px solid var(--line);
}

.yh-toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.78);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  opacity: 0;
  transition: .2s;
  z-index: 200;
  max-width: 80%;
  text-align: center;
}

.yh-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.yh-toast.is-error { background: rgba(228,31,23,.92); }

/* 美团式规格弹层 */
body.yh-sku-open { overflow: hidden; }
.yh-sku-mask {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.yh-sku-mask.show { display: flex; }
.yh-sku-sheet {
  width: 100%;
  max-width: var(--app-max);
  max-height: 78vh;
  background: #fff;
  border-radius: 14px 14px 0 0;
  padding: 14px 14px calc(12px + var(--safe-b));
  position: relative;
  overflow: auto;
  animation: yhSkuUp .22s ease;
}
@keyframes yhSkuUp {
  from { transform: translateY(40px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}
.yh-sku-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f2;
  font-size: 20px;
  line-height: 1;
  color: #666;
  z-index: 2;
}
.yh-sku-hd {
  display: flex;
  gap: 12px;
  padding-right: 28px;
  margin-bottom: 12px;
}
.yh-sku-hd img {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  background: #f5f5f5;
  border: 1px solid #eee;
}
.yh-sku-price {
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
}
.yh-sku-stock,
.yh-sku-picked {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.yh-sku-group { margin-bottom: 14px; }
.yh-sku-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.yh-sku-vals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.yh-sku-val {
  border: 1px solid #e5e5e5;
  background: #f7f7f7;
  border-radius: 4px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--ink);
}
.yh-sku-val.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.yh-sku-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 14px;
  border-top: 1px solid var(--line);
}
.yh-sku-ft .btn { height: 44px; font-size: 15px; border-radius: 22px; }
.yh-sku-empty { color: var(--muted); font-size: 13px; }

.site-footer { display: none; }
.site-header { display: none; }

.auth-card {
  margin: 24px 16px;
  background: var(--white);
  border-radius: 8px;
  padding: 20px 16px;
}

.auth-brand { text-align: center; margin-bottom: 16px; }
.auth-brand h1 { margin: 8px 0 4px; font-size: 20px; }
.auth-brand p { margin: 0; color: var(--muted); font-size: 13px; }
.auth-error {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-size: 13px;
}

.auth-form .field { margin-bottom: 12px; }
.auth-form .field-full { display: block; }

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted-2, #888);
  cursor: pointer;
  user-select: none;
}
.auth-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary, #1a3d32);
  flex-shrink: 0;
}

.notice-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: #fff8e8;
  color: #a66a00;
  font-size: 12px;
  border-bottom: 1px solid #ffe6b0;
}

.notice-strip .label {
  background: var(--orange-deep);
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.notice-strip p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.related-section {
  margin-top: 8px;
  background: var(--bg);
  padding-bottom: 12px;
}

.related-head {
  padding: 12px 14px 8px;
}

.related-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 12px;
}

.related-grid .product-card {
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  display: block;
}

.related-grid .product-cover { aspect-ratio: 1; background: #f3f3f3; }
.related-grid .product-cover img { width: 100%; height: 100%; object-fit: cover; }
.related-grid .product-body { padding: 8px; }
.related-grid h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-grid .price { color: var(--primary); font-weight: 700; font-size: 14px; }
.related-grid .product-meta { margin-top: 6px; }

@media (min-width: 641px) {
  body.shop-body { background: #cfcfcf; padding: 0; }

  .hx-banner {
    aspect-ratio: 64 / 22;
  }

  .hx-icons {
    gap: 16px 10px;
    padding: 18px 20px 16px;
  }

  .hx-icon {
    font-size: 13px;
    gap: 8px;
  }

  .hx-icon .ico {
    width: 52px;
    height: 52px;
  }

  .hx-icon .ico svg {
    width: 24px;
    height: 24px;
  }

  .hx-section-hd {
    height: 48px;
    padding: 0 16px;
  }

  .hx-prow {
    padding: 12px 16px;
  }
}
