/* ==========================================================================
   国科云链 · 促销专题页样式（超值好货 / 类目榜单 / 清仓特卖）
   前缀统一为 .pm-  ·  不引入任何外部资源
   ========================================================================== */

.pm-root {
  --pm-a: #0b4c9c;
  --pm-b: #2f86e0;
  --pm-soft: #eef4fc;
  --pm-ink: #0f4c9c;
  --pm-line: #e9edf1;
  --pm-text: #4c545d;
  --pm-muted: #98a0a8;
  --pm-price: #e2452f;
  color: #232a30;
  font-size: 13px;
  line-height: 1.7;
}

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

.pm-root h1,
.pm-root h2,
.pm-root h3,
.pm-root p { margin: 0; }

.pm-root a { color: inherit; text-decoration: none; }

.pm-value { --pm-a: #0b4c9c; --pm-b: #2f86e0; --pm-soft: #eef4fc; --pm-ink: #0f4c9c; }
.pm-rank { --pm-a: #4a2d9e; --pm-b: #7c5bd6; --pm-soft: #f2eefc; --pm-ink: #4a2d9e; }
.pm-clearance { --pm-a: #bb3a0f; --pm-b: #f26a2e; --pm-soft: #fff1e9; --pm-ink: #bb3a0f; }

/* ------------------------------ 主题横幅 ------------------------------ */
.pm-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 206px;
  padding: 34px 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(118deg, var(--pm-a) 0%, var(--pm-b) 100%);
  box-shadow: 0 16px 34px rgba(17, 24, 39, .14);
}

.pm-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
}
.pm-ring-a {
  width: 360px;
  height: 360px;
  right: -96px;
  top: -150px;
  background: radial-gradient(circle at 34% 34%, rgba(255, 255, 255, .14), transparent 70%);
}
.pm-ring-b {
  width: 210px;
  height: 210px;
  right: 190px;
  bottom: -140px;
  background: rgba(255, 255, 255, .06);
}

.pm-hero-copy { position: relative; z-index: 1; min-width: 0; }

.pm-kicker {
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .68);
  text-transform: uppercase;
}

.pm-hero h1 {
  margin-top: 8px;
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: 1.5px;
  font-weight: 800;
}

.pm-sub {
  margin-top: 12px;
  max-width: 540px;
  font-size: 13.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .82);
}

.pm-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  margin-top: 22px;
}
.pm-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, .72);
  letter-spacing: .5px;
}
.pm-stat b {
  font-size: 20px;
  line-height: 1.3;
  color: #fff;
  font-weight: 700;
  letter-spacing: .5px;
}

.pm-hero-art {
  position: relative;
  z-index: 1;
  flex: none;
  width: 230px;
  height: 150px;
}
.pm-art-chip {
  position: absolute;
  top: -4px;
  right: 6px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  font-size: 11px;
  letter-spacing: 1px;
  color: #fff;
  white-space: nowrap;
}
.pm-art-card {
  position: absolute;
  left: 12px;
  bottom: 0;
  width: 196px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .26);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .12);
  transform: rotate(-3deg);
}
.pm-art-card small {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, .72);
}
.pm-art-card b {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  line-height: 1.2;
  color: #fff;
  letter-spacing: .5px;
}
.pm-art-card em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 11px;
  color: rgba(255, 255, 255, .68);
}

/* ------------------------------ 工具条 ------------------------------ */
.pm-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 2px 12px;
}
.pm-bar p { font-size: 13px; color: var(--pm-text); }
.pm-bar p b { font-size: 16px; color: var(--pm-ink); margin-right: 2px; }
.pm-bar p i { font-style: normal; color: #c6ccd3; margin: 0 6px; }
.pm-bar-note { flex: none; font-size: 11.5px; color: var(--pm-muted); }

.pm-footnote {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--pm-muted);
}

/* ------------------------------ 加购按钮 ------------------------------ */
.pm-add {
  flex: none;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--pm-b);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  line-height: 30px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, transform .12s ease, box-shadow .16s ease;
}
.pm-add:hover { filter: brightness(.92); box-shadow: 0 4px 12px rgba(17, 24, 39, .16); }
.pm-add:active { transform: scale(.97); }
.pm-add:focus-visible { outline: 2px solid var(--pm-b); outline-offset: 2px; }
.pm-add.is-added { background: #3a9d6a; filter: none; }

/* ------------------------------ 超值好货 ------------------------------ */
.pm-deal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pm-deal {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--pm-line);
  border-radius: 12px;
  background: #fff;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.pm-deal:hover {
  transform: translateY(-2px);
  border-color: #cddff5;
  box-shadow: 0 12px 26px rgba(11, 76, 156, .1);
}

.pm-deal-art {
  position: relative;
  flex: none;
  width: 128px;
  height: 128px;
  border-radius: 10px;
  background: var(--tint, #eef4fc);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.pm-symbol { font-size: 46px; line-height: 1; filter: saturate(.92); }
.pm-code {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-size: 10px;
  letter-spacing: .5px;
  color: rgba(24, 34, 46, .38);
}

.pm-deal-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pm-brand {
  font-size: 11px;
  color: var(--pm-ink);
  letter-spacing: .3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-deal-name {
  margin: 3px 0 2px;
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 700;
  color: #232a30;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-deal-code {
  font-size: 11.5px;
  color: var(--pm-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.pm-price b { font-size: 21px; line-height: 1.2; color: var(--pm-price); letter-spacing: .3px; }
.pm-price s { font-size: 12px; color: #aab0b8; }
.pm-price em {
  font-style: normal;
  font-size: 11px;
  color: var(--pm-price);
  background: #fff1ee;
  border-radius: 4px;
  padding: 1px 6px;
}
.pm-deal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed #eef1f4;
}
.pm-lead { font-size: 11px; color: var(--pm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------ 类目榜单 ------------------------------ */
.pm-panel {
  padding: 20px 22px 6px;
  border: 1px solid var(--pm-line);
  border-radius: 14px;
  background: #fff;
}
.pm-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.pm-panel-head h2 { font-size: 18px; color: #232a30; letter-spacing: .5px; }
.pm-panel-head p { margin-top: 4px; font-size: 12px; color: var(--pm-muted); }
.pm-panel-count { flex: none; font-size: 12px; color: var(--pm-muted); }
.pm-panel-count b { font-size: 17px; color: var(--pm-ink); margin-right: 3px; }

.pm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 14px;
}
.pm-tab {
  padding: 7px 18px;
  border: 1px solid #e7eaee;
  border-radius: 999px;
  background: #fff;
  color: #5a626b;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.pm-tab:hover { border-color: var(--pm-b); color: var(--pm-ink); }
.pm-tab:focus-visible { outline: 2px solid var(--pm-b); outline-offset: 2px; }
.pm-tab.is-active {
  background: var(--pm-soft);
  border-color: var(--pm-b);
  color: var(--pm-ink);
  font-weight: 700;
}

.pm-rank-head {
  display: grid;
  grid-template-columns: 64px 56px minmax(0, 1fr) 120px 110px 116px;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid #f0f2f4;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--pm-muted);
}
.pm-rank-head span:nth-child(4),
.pm-rank-head span:nth-child(5) { text-align: right; }

.pm-rank-list { padding-bottom: 10px; }

.pm-rank-row {
  display: grid;
  grid-template-columns: 64px 56px minmax(0, 1fr) 120px 110px 116px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #f4f6f8;
  transition: background .16s ease;
}
.pm-rank-row:last-child { border-bottom: 0; }
.pm-rank-row:hover { background: #fbfcfd; }
.pm-rank-row.is-top { background: linear-gradient(90deg, #fffdf6 0%, #fff 46%); }
.pm-rank-row.is-top:hover { background: #fffcf2; }

.pm-rank-badge {
  justify-self: start;
  width: 52px;
  padding: 5px 0;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
}
.pm-rank-1 { background: linear-gradient(135deg, #e6a417, #f5c451); box-shadow: 0 4px 10px rgba(230, 164, 23, .28); }
.pm-rank-2 { background: linear-gradient(135deg, #98a5b3, #c6d0da); box-shadow: 0 4px 10px rgba(152, 165, 179, .26); }
.pm-rank-3 { background: linear-gradient(135deg, #b4703f, #d69a6d); box-shadow: 0 4px 10px rgba(180, 112, 63, .24); }
.pm-rank-no {
  justify-self: start;
  width: 52px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #c3c9d0;
  font-variant-numeric: tabular-nums;
}

.pm-rank-art {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  background: var(--tint, #f1edfb);
  display: grid;
  place-items: center;
  font-size: 24px;
  overflow: hidden;
}

.pm-rank-info { min-width: 0; }
.pm-rank-info h3 {
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 700;
  color: #232a30;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-rank-info p {
  margin-top: 2px;
  font-size: 11px;
  color: var(--pm-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-rank-code { display: inline-block; margin-top: 2px; font-size: 10.5px; color: #b3bac2; letter-spacing: .3px; }

.pm-rank-sales { text-align: right; }
.pm-rank-sales b { display: block; font-size: 14px; color: var(--pm-ink); line-height: 1.4; }
.pm-rank-sales span { font-size: 10.5px; color: var(--pm-muted); }

.pm-rank-price { text-align: right; }
.pm-rank-price b { display: block; font-size: 15px; color: var(--pm-price); line-height: 1.4; }
.pm-rank-price s { font-size: 11px; color: #b3bac2; }

/* ------------------------------ 清仓特卖 ------------------------------ */
.pm-clear-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pm-clear-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid #f1e3db;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.pm-clear-card:hover {
  transform: translateY(-2px);
  border-color: #f6c8b1;
  box-shadow: 0 12px 26px rgba(187, 58, 15, .12);
}

.pm-corner {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  padding: 4px 10px;
  border-bottom-right-radius: 10px;
  background: linear-gradient(135deg, #f2452f, #ff8a3d);
  color: #fff;
  font-size: 11px;
  letter-spacing: .5px;
}
.pm-off-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 2px 7px;
  border: 1px solid #ffd8c8;
  border-radius: 999px;
  background: #fff6f1;
  color: #d8410f;
  font-size: 11px;
  font-weight: 700;
}

.pm-clear-art {
  position: relative;
  height: 148px;
  padding-top: 18px;
  background: var(--tint, #fff1ea);
  display: grid;
  place-items: center;
}
.pm-clear-art .pm-symbol { font-size: 52px; }
.pm-clear-art small {
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 10px;
  letter-spacing: .4px;
  color: rgba(24, 34, 46, .34);
}

.pm-clear-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  padding: 13px 14px 14px;
}
.pm-clear-body h3 {
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 700;
  color: #232a30;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pm-clear-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.pm-clear-price b { font-size: 20px; line-height: 1.2; color: var(--pm-price); letter-spacing: .3px; }
.pm-clear-price s { font-size: 11.5px; color: #b3bac2; }
.pm-clear-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed #f6e9e2;
}
.pm-stock {
  flex: none;
  padding: 1px 7px;
  border-radius: 4px;
  background: #fff3ec;
  color: #d8410f;
  font-size: 11px;
}
.pm-clear-foot .pm-add { height: 28px; line-height: 28px; padding: 0 10px; font-size: 11.5px; }

/* ------------------------------ 空状态 ------------------------------ */
.pm-empty {
  grid-column: 1 / -1;
  padding: 44px 20px;
  border: 1px dashed #dfe4e9;
  border-radius: 12px;
  background: #fbfcfc;
  text-align: center;
}
.pm-empty b { display: block; font-size: 15px; color: #3a424a; }
.pm-empty p { margin-top: 6px; font-size: 12px; color: var(--pm-muted); }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 1100px) {
  .pm-hero { padding: 30px 26px; }
  .pm-hero h1 { font-size: 28px; }
  .pm-hero-art { width: 190px; }
  .pm-art-card { width: 176px; }
  .pm-clear-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pm-rank-head { display: none; }
  .pm-rank-row { grid-template-columns: 56px 48px minmax(0, 1fr) 100px 96px auto; }
  .pm-rank-badge,
  .pm-rank-no { width: 46px; }
  .pm-rank-art { width: 48px; height: 48px; font-size: 22px; }
}

@media (max-width: 900px) {
  .pm-hero {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 26px 20px 24px;
  }
  .pm-hero h1 { font-size: 25px; letter-spacing: 1px; }
  .pm-sub { font-size: 12.5px; }
  .pm-hero-art { display: none; }
  .pm-stats { gap: 8px 24px; margin-top: 18px; }
  .pm-bar { flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 14px; }

  .pm-deal-grid,
  .pm-clear-grid { grid-template-columns: minmax(0, 1fr); }

  .pm-deal-art { width: 108px; height: 108px; }
  .pm-symbol { font-size: 40px; }

  .pm-panel { padding: 16px 14px 4px; }
  .pm-panel-head { flex-direction: column; gap: 6px; }
  .pm-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .pm-tab { flex: none; }

  .pm-rank-row {
    grid-template-columns: 46px 44px minmax(0, 1fr) auto;
    grid-template-areas:
      "badge art info add"
      "badge art sales price";
    row-gap: 6px;
    padding: 12px 8px;
  }
  .pm-rank-badge,
  .pm-rank-no { grid-area: badge; width: 42px; font-size: 11px; }
  .pm-rank-art { grid-area: art; width: 44px; height: 44px; font-size: 20px; }
  .pm-rank-info { grid-area: info; }
  .pm-rank-info h3 { font-size: 12.5px; white-space: normal; }
  .pm-rank-info p { white-space: normal; }
  .pm-rank-sales { grid-area: sales; text-align: left; }
  .pm-rank-sales b { display: inline; margin-right: 4px; font-size: 12px; }
  .pm-rank-sales span { font-size: 10px; }
  .pm-rank-price { grid-area: price; text-align: right; }
  .pm-rank-price b { display: inline; margin-right: 5px; font-size: 14px; }
  .pm-rank-row .pm-add { grid-area: add; height: 28px; line-height: 28px; padding: 0 10px; font-size: 11.5px; }
}

@media (max-width: 640px) {
  .pm-hero h1 { font-size: 22px; }
  .pm-stat b { font-size: 17px; }
  .pm-deal { gap: 10px; padding: 12px; }
  .pm-deal-art { width: 92px; height: 92px; }
  .pm-symbol { font-size: 34px; }
  .pm-price b { font-size: 19px; }

  .pm-rank-row {
    grid-template-columns: 42px 44px minmax(0, 1fr);
    grid-template-areas:
      "badge art info"
      "badge art sales"
      "badge art price"
      "add add add";
    row-gap: 3px;
    padding: 10px 6px 12px;
  }
  .pm-rank-badge,
  .pm-rank-no { width: 38px; font-size: 10.5px; }
  .pm-rank-badge { padding: 4px 0; }
  .pm-rank-art { width: 42px; height: 42px; font-size: 19px; }
  .pm-rank-sales { text-align: left; }
  .pm-rank-price { text-align: left; }
  .pm-rank-row .pm-add { width: 100%; margin-top: 6px; }

  .pm-clear-art { height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-deal,
  .pm-clear-card,
  .pm-add { transition: none; }
}

/* 专区价角标（专区挂商品后展示） */
.pm-zone-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 3;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f2452f, #ff8a3d);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  box-shadow: 0 4px 10px rgba(229, 72, 77, .22);
}
.pm-zone-badge-inline {
  position: static;
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  vertical-align: 1px;
  box-shadow: none;
}
