/* =============================================================================
 * jkpos AI 官方商城 · 样式
 * 视觉与桌面端交易市场（styles/trade.css）同源：商品卡、徽章、价签、
 * 分类/排序 chips 逐一对齐，尺寸按 Web 阅读放大约 15%。
 * ========================================================================== */

.mall-wrap {
  padding-top: 26px;
  padding-bottom: 80px;
}

/* ---------- 演示数据横幅 ---------- */

.demo-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 9px 14px;
  border: 1px solid var(--yellow);
  border-radius: 9px;
  background: var(--yellow-soft);
  color: var(--yellow);
  font-size: 12.5px;
}

.demo-banner[hidden] {
  display: none;
}

/* ---------- 商城 hero（应用内 trade-hero 同款） ---------- */

.mall-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--of-r-lg);
  margin: 26px 0 8px;
  padding: 40px 44px;
  display: flex;
  align-items: center;
  gap: 30px;
  background:
    linear-gradient(100deg, rgba(16, 16, 20, 0.92) 30%, rgba(16, 16, 20, 0.45) 100%),
    url("../img/band-art-dark.webp") right center / cover no-repeat,
    #101014;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mall-hero-text {
  flex: 1;
  min-width: 0;
}

.mall-hero-text h1 {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.mall-hero-text p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.7);
  max-width: 560px;
}

.mall-hero-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background: #fff;
  color: #111114;
  font-size: 13.5px;
  font-weight: 650;
  transition: transform 0.13s, box-shadow 0.13s;
}

.mall-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}

/* 卖家入驻说明（hero 下方细条） */
.seller-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 22px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.seller-tip b {
  color: var(--text-secondary);
  font-weight: 550;
}

/* ---------- 工具行：搜索 + 刷新 ---------- */

.mall-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.mall-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-light);
  border-radius: 9px;
  background: var(--bg-input);
  color: var(--text-muted);
}

.mall-search:focus-within {
  border-color: var(--accent);
}

.mall-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font-size: 13.5px;
  color: var(--text-primary);
}

.mall-search button {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.mall-search button:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}

.mall-refresh {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-light);
  border-radius: 9px;
  background: var(--bg-input);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.mall-refresh:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}

/* ---------- 分类 / 排序 chips ---------- */

.mall-cats,
.mall-sorts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.mall-cats button,
.mall-sorts button {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.mall-cats button:hover,
.mall-sorts button:hover {
  background: var(--bg-hover);
  color: var(--text-strong);
}

.mall-cats button.on,
.mall-sorts button.on {
  background: var(--btn-pri-bg);
  border-color: var(--btn-pri-bg);
  color: var(--btn-pri-fg);
  font-weight: 550;
}

.mall-sorts {
  margin-bottom: 20px;
}

.mall-sorts .hint {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ---------- 商品网格与卡片（trade-card 同构） ---------- */

.mall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.trade-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-app);
  overflow: hidden;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.13s, transform 0.13s, box-shadow 0.13s;
}

.trade-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(15, 30, 45, 0.3);
}

:root[data-theme="dark"] .trade-card:hover {
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.6);
}

.trade-card-cover {
  height: 138px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(90% 150% at 85% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 60%),
    var(--bg-active);
  color: var(--text-faint);
  overflow: hidden;
  flex-shrink: 0;
}

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

.trade-card-body {
  padding: 11px 12px 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.trade-card-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 650;
}

.trade-card-summary {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3em;
}

.trade-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 11px;
}

.trade-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.trade-price {
  color: var(--red);
  font-weight: 650;
  font-size: 15px;
}

.trade-price.big {
  font-size: 26px;
}

.trade-card-sales {
  color: var(--text-faint);
  font-size: 11px;
}

.trade-card-shop {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.trade-card-shop-name {
  color: var(--text-muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 徽章（应用同款） */
.trade-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  line-height: 1.6;
}

.trade-badge.official {
  color: #9a6b00;
  background: var(--yellow-soft);
}

.trade-badge.verified {
  color: var(--accent);
  background: var(--accent-dim);
}

.trade-badge.kind {
  color: var(--text-muted);
  background: var(--bg-active);
}

/* 星级（两层叠加实现小数比例） */
.stars {
  position: relative;
  display: inline-block;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 1px;
  line-height: 1;
}

.stars .fill {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #e5a33c;
}

/* ---------- 空态 / 加载 / 分页 ---------- */

.mall-empty {
  padding: 72px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

.mall-empty .icon {
  color: var(--text-faint);
  margin-bottom: 12px;
}

.mall-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
  font-size: 13px;
  color: var(--text-muted);
}

.mall-pager button {
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 12.5px;
}

.mall-pager button:hover:not(:disabled) {
  background: var(--bg-hover);
}

.mall-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 骨架屏 */
.sk-card {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg-app);
}

.sk-cover {
  height: 138px;
  background: var(--bg-active);
}

.sk-line {
  height: 10px;
  border-radius: 5px;
  background: var(--bg-active);
  margin: 12px 12px 0;
}

.sk-line.short {
  width: 55%;
  margin-bottom: 14px;
}

.sk-card .sk-cover,
.sk-card .sk-line {
  animation: sk-pulse 1.4s ease-in-out infinite;
}

@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ---------- 商品详情页 ---------- */

.crumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 4px 0 18px;
}

.crumbs a:hover {
  color: var(--text-strong);
  text-decoration: underline;
}

.crumbs .sep {
  color: var(--text-faint);
}

.crumbs .cur {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 380px;
}

.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 460px) 1fr;
  gap: 36px;
  align-items: start;
}

.pd-gallery {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.pd-main {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: 13px;
  background:
    radial-gradient(90% 150% at 85% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 62%),
    var(--bg-active);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

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

.pd-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pd-thumbs button {
  width: 64px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-active);
  padding: 0;
  opacity: 0.65;
  transition: opacity 0.12s, border-color 0.12s;
}

.pd-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-thumbs button.on {
  opacity: 1;
  border-color: var(--accent);
}

.pd-info {
  min-width: 0;
}

.pd-kind-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pd-info h1 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--text-strong);
}

.pd-summary {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.pd-rating-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.pd-price-card {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--of-r-md);
  background: var(--bg-card);
}

.pd-price-card .hint {
  font-size: 12px;
  color: var(--text-muted);
}

.pd-meta {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--of-r-md);
  overflow: hidden;
}

.pd-meta-row {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  font-size: 13px;
}

.pd-meta-row + .pd-meta-row {
  border-top: 1px solid var(--border);
}

.pd-meta-row span {
  flex: none;
  width: 76px;
  color: var(--text-muted);
}

.pd-meta-row b {
  font-weight: 500;
  color: var(--text-primary);
  min-width: 0;
  overflow-wrap: anywhere;
}

.pd-buy-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* 店铺卡 */
.pd-shop {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--of-r-md);
  background: var(--bg-card);
}

.shop-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, #2d2d2d, #0f0f0f);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 650;
  overflow: hidden;
}

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

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

.pd-shop-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-strong);
}

.pd-shop-meta {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* 详情 tabs */
.pd-tabs {
  display: flex;
  gap: 2px;
  margin: 42px 0 0;
  border-bottom: 1px solid var(--border);
}

.pd-tabs button {
  padding: 10px 18px;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.pd-tabs button:hover {
  color: var(--text-strong);
}

.pd-tabs button.on {
  color: var(--text-strong);
  font-weight: 650;
  border-bottom-color: var(--text-strong);
}

.pd-pane {
  padding: 26px 2px 10px;
}

.pd-pane[hidden] {
  display: none;
}

/* markdown 正文（应用 .md 排版同源） */
.md {
  line-height: 1.75;
  word-wrap: break-word;
  font-size: 14px;
  max-width: 820px;
}

.md p { margin: 10px 0; }
.md h1, .md h2 { margin: 22px 0 10px; font-weight: 650; color: var(--text-strong); }
.md h3, .md h4 { margin: 16px 0 8px; font-weight: 650; color: var(--text-strong); }
.md h1 { font-size: 20px; }
.md h2 { font-size: 18px; }
.md h3 { font-size: 15.5px; }
.md h4 { font-size: 14px; }
.md ul, .md ol { padding-left: 24px; margin: 10px 0; }
.md li { margin: 5px 0; }
.md strong { font-weight: 650; color: var(--text-strong); }
.md a { color: var(--accent); }
.md a:hover { text-decoration: underline; }

.md blockquote {
  border-left: 3px solid var(--border-light);
  padding-left: 12px;
  color: var(--text-secondary);
  margin: 8px 0;
}

.md code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--code-inline-bg);
  padding: 1px 5px;
  border-radius: 4px;
}

.md pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.md pre code {
  background: none;
  padding: 0;
}

.md table {
  border-collapse: collapse;
  margin: 10px 0;
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.md th, .md td {
  border: 1px solid var(--border-light);
  padding: 6px 12px;
}

.md img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

/* 交付清单 */
.deliv-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-primary);
}

.deliv-row + .deliv-row {
  margin-top: 8px;
}

.deliv-row .icon {
  color: var(--text-muted);
}

.deliv-row .size {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

.deliv-tip {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* 评价 */
.review-item {
  padding: 16px 2px;
  border-bottom: 1px solid var(--border);
}

.review-item:last-child {
  border-bottom: none;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.review-head .buyer {
  font-weight: 550;
  color: var(--text-secondary);
}

.review-head time {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-faint);
}

.review-body {
  margin-top: 7px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-primary);
}

.review-reply {
  margin-top: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-panel);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.review-reply b {
  color: var(--text-muted);
  font-weight: 550;
  margin-right: 6px;
}

/* ---------- 订单页 ---------- */

.orders-head {
  margin: 10px 0 20px;
}

.orders-head h1 {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--text-strong);
}

.orders-head p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.login-card {
  max-width: 460px;
  margin: 60px auto;
  padding: 40px 36px;
  border: 1px solid var(--border);
  border-radius: var(--of-r-lg);
  background: var(--bg-card);
  text-align: center;
}

.login-card .brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 20px;
  margin: 0 auto 18px;
}

.login-card h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
}

.login-card p {
  margin: 10px 0 22px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.order-card {
  border: 1px solid var(--border);
  border-radius: var(--of-r-md);
  background: var(--bg-app);
  overflow: hidden;
  margin-bottom: 14px;
}

.order-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.order-head .oid {
  font-family: var(--font-mono);
}

.order-status {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}

.order-status.st-pending { color: var(--yellow); background: var(--yellow-soft); }
.order-status.st-paid { color: var(--accent); background: var(--accent-dim); }
.order-status.st-delivered { color: var(--accent); background: var(--accent-dim); }
.order-status.st-completed { color: var(--green); background: var(--green-soft); }
.order-status.st-expired,
.order-status.st-cancelled { color: var(--text-muted); background: var(--bg-active); }
.order-status.st-refunded { color: var(--red); background: var(--red-soft); }

.order-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.order-cover {
  flex: none;
  width: 84px;
  height: 60px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-active);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}

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

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

.order-info strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-info .sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.order-amount {
  flex: none;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-strong);
}

.order-acts {
  flex: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.order-acts .btn {
  height: 30px;
  padding: 0 13px;
  font-size: 12.5px;
  border-radius: 7px;
}

/* 订单详情弹窗内部 */
.od-section {
  margin-bottom: 16px;
}

.od-section h4 {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.od-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}

.od-kv:last-child {
  border-bottom: none;
}

.od-kv span {
  color: var(--text-muted);
}

.od-kv b {
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
  overflow-wrap: anywhere;
}

/* 卡密展示（应用 trade-cardkey 同款） */
.cardkey {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-active);
  overflow: hidden;
}

.cardkey-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  color: var(--text-muted);
  font-size: 11.5px;
}

.cardkey-head span {
  flex: 1;
}

.cardkey-head button {
  color: var(--accent);
  font-size: 11.5px;
}

.cardkey pre {
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  color: var(--text-strong);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  user-select: text;
}

/* 留言 */
.msg-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px;
}

.msg-item {
  max-width: 86%;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.6;
}

.msg-item .who {
  display: block;
  font-size: 10.5px;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.msg-item.me {
  align-self: flex-end;
  background: var(--accent-dim);
  color: var(--text-primary);
}

.msg-item.other {
  align-self: flex-start;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
}

.msg-input {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.msg-input input {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-input);
  font-size: 13px;
  outline: none;
}

.msg-input input:focus {
  border-color: var(--accent);
}

/* 评价表单 */
.rate-stars {
  display: flex;
  gap: 4px;
  font-size: 26px;
  color: var(--text-faint);
  cursor: pointer;
  user-select: none;
}

.rate-stars b {
  font-weight: 400;
  transition: transform 0.1s;
}

.rate-stars b.on {
  color: #e5a33c;
}

.rate-stars b:hover {
  transform: scale(1.15);
}

.rate-text {
  width: 100%;
  min-height: 84px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 9px;
  background: var(--bg-input);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.rate-text:focus {
  border-color: var(--accent);
}

/* ---------- 支付弹窗 ---------- */

.pay-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  margin-bottom: 16px;
}

.pay-product .order-cover {
  width: 64px;
  height: 48px;
}

.pay-product .t {
  flex: 1;
  min-width: 0;
}

.pay-product .t strong {
  display: block;
  font-size: 13.5px;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-product .t span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.pay-product .trade-price {
  flex: none;
}

.pay-channels {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.pay-channels button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  border: 1px solid var(--border-light);
  border-radius: 9px;
  background: var(--bg-input);
  font-size: 13px;
  color: var(--text-primary);
}

.pay-channels button.on {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
}

.pay-channels button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pay-qr-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 0 6px;
}

.pay-qr-box {
  position: relative;
  width: 216px;
  height: 216px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pay-qr-box canvas {
  display: block;
}

.pay-qr-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #333;
  font-size: 13px;
  text-align: center;
  padding: 14px;
}

.pay-qr-overlay .btn {
  height: 30px;
  padding: 0 14px;
  font-size: 12.5px;
}

.pay-spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: pay-spin 0.8s linear infinite;
}

@keyframes pay-spin {
  to { transform: rotate(360deg); }
}

.pay-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
}

.pay-hint b {
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-weight: 600;
}

.pay-copy {
  font-size: 12px;
  color: var(--accent);
}

.pay-copy:hover {
  text-decoration: underline;
}

/* 支付成功态 */
.pay-done {
  text-align: center;
  padding: 8px 0 4px;
}

.pay-done .ok-ring {
  width: 54px;
  height: 54px;
  margin: 6px auto 14px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-done h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-strong);
}

.pay-done p {
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.pay-done .cardkey,
.pay-done .deliv-row {
  text-align: left;
}

.pay-done-acts {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- 登录弹窗 ---------- */

.login-modal-body {
  text-align: center;
  padding: 10px 6px 6px;
}

.login-modal-body .brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 17px;
  margin: 0 auto 14px;
}

.login-modal-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
}

.login-modal-body p {
  margin: 9px 0 18px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.login-modal-body .btn {
  width: 100%;
}

.login-modal-body .demo-login {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.login-modal-body .demo-login button {
  color: var(--accent);
}

.login-modal-body .demo-login button:hover {
  text-decoration: underline;
}

/* 导航登录区 */
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 12.5px;
  color: var(--text-primary);
  cursor: pointer;
}

.nav-user:hover {
  background: var(--bg-hover);
}

.nav-user .ava {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 650;
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .pd-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pd-gallery {
    position: static;
  }

  .mall-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 26px;
  }
}

@media (max-width: 620px) {
  .mall-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .trade-card-cover {
    height: 104px;
  }

  .order-body {
    flex-wrap: wrap;
  }

  .order-acts {
    width: 100%;
    justify-content: flex-start;
  }
}
