/* ==========================================================================
   京东联盟精选 · 首页样式
   设计基调：京东红 #e1251b 主色 + #ff6a00 橙色渐变，浅灰页面底 + 白色圆角卡片
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 变量与基础重置
   -------------------------------------------------------------------------- */
:root {
  --jd-red: #e1251b;
  --jd-red-dark: #c81623;
  --jd-orange: #ff6a00;
  --price-red: #e1251b;
  --page-bg: #f5f5f5;
  --card-bg: #ffffff;
  --text-main: #22252a;
  --text-sub: #6b7078;
  --text-dim: #9aa0a6;
  --line-color: #ececec;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 4px rgba(0, 0, 0, .06);
  --shadow-hover: 0 8px 22px rgba(0, 0, 0, .12);
  --topbar-h: 64px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* 固定预留纵向滚动条位置：切类目时列表会被清空、页面高度瞬间不足一屏，
     滚动条若跟着消失再出现，内容会横向错位 15px（看起来就是抽动一下）。 */
  scrollbar-gutter: stable;
}

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

a { color: inherit; text-decoration: none; }

/* 保证 hidden 属性能覆盖后续 display:flex 等样式 */
[hidden] { display: none !important; }

img { display: block; max-width: 100%; border: 0; }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, p { margin: 0; }

/* 统一隐藏滚动条（横向滚动条在 Tab 行会占用视觉高度） */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* --------------------------------------------------------------------------
   2. 顶部导航
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line-color);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .04);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--jd-red), var(--jd-orange));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(225, 37, 27, .3);
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text b { font-size: 16px; color: var(--jd-red); letter-spacing: .5px; }
.logo-text i { font-style: normal; font-size: 11px; color: var(--text-dim); }

/* 搜索框 */
.search-box { flex: 1 1 auto; max-width: 880px; }

.search-form {
  display: flex;
  align-items: center;
  height: 38px;
  border: 2px solid var(--jd-red);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 4px 0 16px;
  border: 0;
  outline: none;
  font-size: 13px;
  color: var(--text-main);
  background: transparent;
  -webkit-appearance: none;
}

.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-input::placeholder { color: var(--text-dim); }

.search-clear {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 4px;
  border: 0;
  border-radius: 50%;
  background: #d8dade;
  color: #fff;
  font-size: 15px;
  line-height: 20px;
  padding: 0;
}

.search-btn {
  flex: 0 0 auto;
  width: 62px;
  height: 100%;
  border: 0;
  background: linear-gradient(135deg, var(--jd-red), var(--jd-orange));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 右侧入口 */
.topbar-links {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-sub);
}

.tb-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.tb-link:hover { color: var(--jd-red); }

.tb-sep { width: 1px; height: 14px; background: var(--line-color); }

.tb-login {
  padding: 5px 14px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--jd-red), var(--jd-orange));
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

/* ---------- 扫码登录弹窗（入口 A：带参二维码，结构与 referrer 页一致） ---------- */
.login-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.login-mask[hidden] { display: none; }

.login-box {
  width: 260px;
  padding: 24px 20px;
  background: #fff;
  border-radius: 12px;
  text-align: center;
}

.login-title {
  font-size: 16px;
  font-weight: 600;
}

.login-qr {
  width: 180px;
  height: 180px;
  margin: 16px auto 10px;
  background: #f7f7f7;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-tip {
  font-size: 12px;
  color: #999;
}

.login-cancel {
  margin-top: 16px;
  padding: 8px 24px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- 登录后：用户名 + 个人中心下拉 ---------- */
.tb-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tb-user-name {
  font-size: 13px;
  color: var(--text-main);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-center { position: relative; }

.tb-center-btn {
  padding: 5px 12px;
  border: 1px solid var(--line-color);
  border-radius: 15px;
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
}

.tb-center-btn:hover { color: var(--jd-red); border-color: #ffd4d1; }

.tb-center-arrow { font-style: normal; font-size: 11px; margin-left: 2px; }

.tb-center-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 120px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
  z-index: 30;
}

.tb-center-menu button {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: none;
  color: var(--text-main);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.tb-center-menu button:hover { background: #fff1f0; color: var(--jd-red); }

.tb-center-logout { color: var(--text-sub) !important; }

/* ---------- 个人中心订单列表弹窗 ---------- */
.uc-box {
  width: 760px;
  max-width: 94vw;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.uc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-color);
}

.uc-title { font-size: 15px; font-weight: 600; }

.uc-close {
  border: 0;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}

.uc-list { flex: 1; overflow-y: auto; padding: 8px 18px; }

.uc-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-color);
}

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

/* 第一行：时间 · 订单号 · 支付金额 · [状态]，状态靠右 */
.uc-row-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 32px;
  font-size: 12px;
  color: var(--text-main);
}

.uc-row-rebate-wrap { margin-left: auto; flex: none; font-size: 12px; }

.uc-row-rebate.hot { color: var(--price-red); }

/* 第二行：商品名（左）+ 红包/佣金（右） */
.uc-row-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.uc-row-name {
  flex: none;
  width: 80%;
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uc-row-flag { margin-left: auto; flex: none; font-size: 13px; }

.uc-row-flag.ok { color: #1e9fff; }

.uc-row-flag.done { color: #10b981; }

.uc-row-rebate { flex: none; font-size: 13px; color: var(--text-main); }

.uc-row-rebate.hot { color: var(--price-red); }

.uc-empty { padding: 40px 0; text-align: center; font-size: 13px; color: var(--text-dim); }

.uc-more { padding: 10px 0 14px; text-align: center; }

.uc-more-btn {
  padding: 7px 26px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  cursor: pointer;
}

.uc-more-btn:hover { color: var(--jd-red); border-color: #ffd4d1; }

/* ---------- 「我的推广」顶部：推广二维码 + 链接 ---------- */
.uc-promo {
  padding: 16px 0 18px;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--line-color);
  text-align: center;
}

.uc-promo-title { font-size: 13px; color: var(--text-main); font-weight: 600; }

.uc-promo-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* 「我的推广」弹窗内第三个区块「我的订单」的标题：左对齐，与上方推广区拉开距离 */
.uc-promo-orders-title { margin: 18px 0 4px; padding-top: 14px; border-top: 2px solid var(--line-color); text-align: left; }

.uc-promo-qr {
  width: 200px;
  height: 200px;
  margin: 12px auto 10px;
}

.uc-promo-qr img { display: block; width: 100%; height: 100%; }

.uc-promo-qr canvas, .uc-promo-qr img.uc-promo-qr-img { box-shadow: 0 0 0 1px var(--line-color); border-radius: 4px; }

/* 推广链接 + 右侧复制按钮，同一行 */
.uc-promo-linkrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.uc-promo-link {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  word-break: break-all;
}

.uc-promo-copy {
  flex-shrink: 0;
  padding: 4px 14px;
  font-size: 12px;
  color: var(--text-main);
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: 4px;
  cursor: pointer;
}

.uc-promo-copy:hover { color: var(--jd-red); border-color: #ffd4d1; }

/* ---------- 「领订单红包」活动弹窗（样板） ---------- */
.promo-body { padding: 18px; }

/* 弹窗里的海报图类名用 promo-poster，不要叫 promo-img——活动卡（.promo-card）里
   已有一个 .promo-img 图片容器，重名会互相串样式。
   分配二维码展示不需要太大：定宽 240px、水平居中 */
.promo-poster {
  display: block;
  width: 240px;
  max-width: 100%;
  margin: 0 auto 14px;
  border-radius: 8px;
}

.promo-h { margin: 10px 0 4px; font-size: 14px; color: var(--jd-red); }

.promo-p { font-size: 13px; line-height: 1.8; color: var(--text-sub); }

/* --------------------------------------------------------------------------
   3. 页面容器与区块通用
   -------------------------------------------------------------------------- */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.section { margin-bottom: 26px; }

/* 各区块语义钩子（预留给后续按区块定制样式） */
.coupon-section { scroll-margin-top: 80px; }
.promo-section { scroll-margin-top: 80px; }
.recommend-section { scroll-margin-top: 80px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 4px solid var(--jd-red);
}

.section-title { font-size: 18px; font-weight: 700; color: var(--text-main); }
.section-sub { font-size: 12px; color: var(--text-dim); }

.section-more {
  margin-left: auto;
  font-size: 12px;
  color: var(--jd-red);
}

/* --------------------------------------------------------------------------
   4. 优惠券区
   -------------------------------------------------------------------------- */
.coupon-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) { .coupon-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .coupon-row { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.coupon-card {
  position: relative;
  padding: 14px 12px 12px;
  border-radius: var(--radius-md);
  color: #fff;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* 券面左右两侧的半圆缺口 */
.coupon-card::before,
.coupon-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--page-bg);
}

.coupon-card::before { left: -6px; }
.coupon-card::after { right: -6px; }

.c-red { background: linear-gradient(135deg, #ff5b4a, #e1251b); }
.c-orange { background: linear-gradient(135deg, #ffa63d, #ff6a00); }
.c-pink { background: linear-gradient(135deg, #ff7ba8, #f5417f); }
.c-blue { background: linear-gradient(135deg, #57b6ff, #2b7ff0); }
.c-purple { background: linear-gradient(135deg, #b58cff, #7a4ff0); }

.coupon-flag {
  position: absolute;
  top: 0;
  right: 0;
  padding: 2px 8px;
  border-radius: 0 0 0 8px;
  background: rgba(0, 0, 0, .28);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
}

.coupon-amount {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

.coupon-amount i { font-size: 15px; font-style: normal; margin-right: 1px; }

.coupon-cond { margin-top: 4px; font-size: 12px; opacity: .92; }

.coupon-btn {
  margin: 10px auto 0;
  width: 76px;
  padding: 3px 0;
  border-radius: 12px;
  background: #fff;
  color: #e1251b;
  font-size: 12px;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   4.1 促销卡片矩阵（最新活动）
   -------------------------------------------------------------------------- */
.promo-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) { .promo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .promo-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.promo-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  color: #fff;
  min-height: 108px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}

.promo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.promo-text { flex: 1 1 auto; min-width: 0; }

.promo-title { font-size: 17px; font-weight: 700; letter-spacing: .5px; }

/* 副标题占位：活动卡不放副标题，保留这一行的高度（11px × 1.5 行高）不塌陷 */
.promo-sub { font-size: 11px; opacity: .9; margin-top: 2px; min-height: 17px; }

.promo-desc {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
  opacity: .95;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.promo-price {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
}

.promo-price i { font-size: 11px; font-style: normal; }

.promo-img {
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  overflow: hidden;
}

.promo-img img { width: 100%; height: 100%; object-fit: contain; }

/* 促销卡配色 */
.t-red { background: linear-gradient(135deg, #ff6a5a, #e1251b); }
.t-orange { background: linear-gradient(135deg, #ffb03d, #ff6a00); }
.t-pink { background: linear-gradient(135deg, #ff87b0, #ec3f7c); }
.t-blue { background: linear-gradient(135deg, #64c0ff, #2b7ff0); }
.t-purple { background: linear-gradient(135deg, #bb92ff, #7a4ff0); }

/* --------------------------------------------------------------------------
   5. 分类 Tab
   -------------------------------------------------------------------------- */
/* 类目全称时一行放不下，自动折成第二行（宽屏仍是一行） */
/* 滚动时冻结在顶部导航下方，便于随时切分类；背景用页面底色盖住下方滚动的商品 */
.tabs-wrap {
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
  margin-bottom: 12px;
  padding: 8px 0;
  background: var(--page-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .04);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 未选中：白底 + 浅灰描边。页面底色是 #f5f5f5，纯灰底会跟底色糊在一起，所以必须带框 */
.tab {
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid #e3e4e6;
  border-radius: 999px;
  background: #fff;
  color: var(--text-sub);
  font-size: 13px;
  white-space: nowrap;
  transition: all .15s ease;
}

.tab:hover { color: var(--jd-red); border-color: #ffc9c6; background: #fff5f4; }

.tab.is-active {
  border-color: #ffd4d1;
  background: #fff1f0;
  color: var(--jd-red);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   6. 结果提示条
   -------------------------------------------------------------------------- */
.result-bar {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: #fff5f4;
  border: 1px solid #ffe0dd;
  color: #a8443c;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.result-bar b { color: var(--jd-red); }

.result-reset {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid #ffc9c6;
  border-radius: 12px;
  background: #fff;
  color: var(--jd-red);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   7. 商品网格
   -------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 576px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .product-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}

.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.product-card:focus-visible { outline: 2px solid var(--jd-red); outline-offset: 2px; }

/* 商品卡内部用于包住图片 / 标题 / 价格的商品跳转锚点（各为独立链接，互不嵌套） */
.p-main { display: block; }

/* 商品图（1:1 占位，防止图片未加载时布局抖动） */
.p-thumb {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background: #f7f8fa;
}

.p-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.p-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  flex: 1 1 auto;
}

.p-title {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-main);
  height: 2.8em;           /* 固定 2 行高度，保证卡片等高 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card:hover .p-title { color: var(--jd-red); }

/* 标签 chips：整行布局（标签在左，「券」按钮在右） */
.p-tags-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.p-tags {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 18px;
  max-height: 20px;    /* 与 mobile.css 一致的兜底：标签排满单行，超出的裁掉，不换行 */
  overflow: hidden;
}

.p-tag {
  padding: 1px 5px;
  border: 1px solid #c8e6c9;
  border-radius: 3px;
  background: #f0f9f0;
  color: #2f9e57;
  font-size: 10px;
  line-height: 16px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 「券」按钮：左侧「券」字橙底白字，右侧券文案白底橙字，连成一体，点击跳领券地址 */
.p-coupon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  background: var(--jd-orange);
  overflow: hidden;
}

.p-coupon .p-coupon-char {
  padding: 1px 2px;
  color: #fff;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}

.p-coupon .p-coupon-text {
  padding: 0 4px;
  border: 1px solid var(--jd-orange);
  border-radius: 3px;
  background: #fff;
  color: var(--jd-orange);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
}

.p-coupon:hover { background: #f05500; }

/* 图片右上角「三角形红包」角标（金额 = 预估佣金的一半）
   说明：不再把「预估赚 ¥0.30 / 佣金 0.5%」直接印在卡片上——几毛钱会劝退用户，
        改成红包角标后观感更像「返现福利」，点击率更友好。 */
.p-redpacket {
  position: absolute;
  top: 0;
  right: 0;
  width: 34%;
  min-width: 56px;
  max-width: 84px;
  height: auto;
  aspect-ratio: 1 / 1;
  z-index: 2;
  pointer-events: none;            /* 纯装饰，不遮挡卡片点击 */
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .18));
}

/* 右上直角三角形：直角顶点落在图片右上角 */
.p-redpacket .rp-bg { fill: var(--jd-red); }

.p-redpacket text {
  text-anchor: middle;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.p-redpacket .rp-label  { font-size: 11px; fill: #ffdca8; }
.p-redpacket .rp-amount { font-size: 15px; font-weight: 700; fill: #fff; }

/* 价格行 */
.p-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;   /* 推到底部，卡片对齐 */
  flex-wrap: wrap;
}

.p-price {
  color: var(--price-red);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.p-price i { font-size: 13px; font-style: normal; margin-right: 1px; }

.p-origin { color: var(--text-dim); font-size: 12px; }

/* 销量：推到价格行最右侧（与手机版一致，颜色同为灰） */
.p-good { margin-left: auto; color: #9aa0a6; font-size: 12px; }

/* --------------------------------------------------------------------------
   8. 空状态
   -------------------------------------------------------------------------- */
.empty-state {
  padding: 48px 16px 56px;
  background: #fff;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.empty-icon { color: #d3d7dd; }

.empty-title { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--text-sub); }
.empty-desc { margin-top: 4px; font-size: 12px; color: var(--text-dim); }

.empty-btn {
  margin-top: 14px;
  padding: 7px 20px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--jd-red), var(--jd-orange));
  color: #fff;
  font-size: 13px;
}

/* --------------------------------------------------------------------------
   9. 页脚 / 返回顶部 / noscript
   -------------------------------------------------------------------------- */
.footer {
  padding: 20px 16px 32px;
  background: #fff;
  border-top: 1px solid var(--line-color);
  text-align: center;
}

.footer-line { font-size: 12px; color: var(--text-sub); }

.back-top {
  position: fixed;
  right: 18px;
  bottom: 26px;
  z-index: 70;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease;
}

.back-top:hover { background: var(--jd-red); }

.noscript-tip {
  margin: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #fff5f4;
  color: #a8443c;
  font-size: 13px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   10. 加载更多（服务端分页）
   -------------------------------------------------------------------------- */
.load-more {
  margin-top: 16px;
  text-align: center;
}

.load-more-btn {
  padding: 9px 34px;
  border: 1px solid #ffd9d6;
  border-radius: 20px;
  background: #fff;
  color: var(--jd-red);
  font-size: 14px;
  transition: all .15s ease;
}

.load-more-btn:hover:not(:disabled) {
  background: #fff7f6;
  border-color: var(--jd-red);
}

.load-more-btn:disabled { color: var(--text-dim); cursor: default; }

.load-end { font-size: 12px; color: var(--text-dim); }

/* 触底哨兵：只占 1px，被 IntersectionObserver 观察，本身不可见 */
.load-sentinel { height: 1px; }

/* --------------------------------------------------------------------------
   11. 移动端适配
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .topbar-links .tb-link { display: none; }
  .topbar-links .tb-sep { display: none; }
}

@media (max-width: 640px) {
  :root { --topbar-h: 56px; }
  .topbar-inner { gap: 10px; padding: 0 10px; }
  .logo-text i { display: none; }
  .logo-text b { font-size: 14px; }
  .page { padding: 12px 10px 32px; }
  .section-title { font-size: 16px; }
  .p-price { font-size: 18px; }
  .coupon-amount { font-size: 26px; }
  .back-top { right: 10px; bottom: 16px; }
}
