/* =========================================================
   卡密商城 · 前台样式
   设计参考：浅色卡片式数字商品店铺（Arco 配色体系）
   ========================================================= */

:root {
  --primary: #165dff;
  --primary-hover: #4080ff;
  --primary-light: #e8f1ff;
  --success: #00b42a;
  --success-bg: #e8ffea;
  --warning: #ff7d00;
  --danger: #f53f3f;
  --danger-bg: #ffece8;

  --text: #1d2129;
  --text-2: #4e5969;
  --text-3: #86909c;
  --text-4: #c9cdd4;

  --border: #e5e6eb;
  --border-2: #f2f3f5;
  --fill: #f2f3f5;
  --fill-2: #f7f8fa;
  --white: #fff;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(29, 33, 41, 0.04);
  --shadow: 0 4px 16px rgba(29, 33, 41, 0.08);
  --shadow-lg: 0 12px 40px rgba(29, 33, 41, 0.14);
  --wrap: 1220px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  background-color: #f1f4f8;
  background-image: radial-gradient(1200px 600px at 12% -8%, #e3f1ff 0%, rgba(227, 241, 255, 0) 60%),
    radial-gradient(900px 500px at 88% 4%, #eef0ff 0%, rgba(238, 240, 255, 0) 62%),
    radial-gradient(900px 700px at 50% 100%, #e9eef6 0%, rgba(233, 238, 246, 0) 70%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

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

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

input,
textarea,
select {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* ---------------------------- 顶部导航 ---------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 60px;
  background: rgba(249, 249, 249, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.topbar-inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.nav a {
  position: relative;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: 6px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.nav a:hover {
  color: var(--primary);
  background: rgba(22, 93, 255, 0.06);
}

.nav a.active {
  color: var(--text);
  font-weight: 600;
}

.nav a.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  transition: background 0.15s, transform 0.15s;
}

.btn-pill:hover {
  background: var(--primary-hover);
}

.btn-pill:active {
  transform: scale(0.98);
}

.btn-pill svg {
  width: 14px;
  height: 14px;
}

/* ---------------------------- 店铺头部 ---------------------------- */
.shop-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 0 6px;
}

.shop-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--border-2);
  flex: none;
}

.shop-meta {
  min-width: 0;
}

.shop-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 26px;
}

.shop-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
}

.deposit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid #b7ebc6;
  border-radius: 4px;
  background: #f3fff5;
  color: #0e9f3d;
  font-size: 12px;
  line-height: 1;
}

.deposit-badge svg {
  width: 12px;
  height: 12px;
}

.level-badges {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 2px;
}

.level-badge {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  opacity: 0.92;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.shop-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  transition: all 0.15s;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost.green {
  border-color: #aff0b5;
  background: var(--success-bg);
  color: var(--success);
}

.btn-ghost.green:hover {
  border-color: var(--success);
  background: #d9ffe0;
}

.btn-ghost svg {
  width: 13px;
  height: 13px;
}

/* ---------------------------- 公告 ---------------------------- */
.notice {
  margin: 14px 0 18px;
  padding: 0;
}

.notice-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.notice-head svg {
  width: 15px;
  height: 15px;
  color: #ff7d00;
}

.notice-text {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------------------------- 主面板 ---------------------------- */
.panel {
  background: var(--white);
  border: 1px solid #edeff3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px 26px;
  margin-bottom: 28px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.panel-title .zap {
  color: var(--primary);
  width: 17px;
  height: 17px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 208px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--fill);
  transition: box-shadow 0.15s, background 0.15s;
}

.search-box:focus-within {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.12);
}

.search-box svg {
  width: 14px;
  height: 14px;
  color: var(--text-3);
  flex: none;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  height: 100%;
  font-size: 13px;
}

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

/* 分类磁贴 */
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}

.cat-tile {
  position: relative;
  width: 168px;
  min-height: 68px;
  padding: 13px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-align: left;
  transition: all 0.18s;
  overflow: hidden;
}

.cat-tile:hover {
  border-color: #bcd2ff;
  box-shadow: 0 4px 14px rgba(22, 93, 255, 0.1);
}

.cat-tile .cat-name {
  font-size: 13px;
  font-weight: 600;
  display: block;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-tile .cat-count {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
}

.cat-tile .cat-check {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s;
}

.cat-tile .cat-check svg {
  width: 14px;
  height: 14px;
}

.cat-tile.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #4a9dff 0%, #2f74f9 100%);
  box-shadow: 0 8px 20px rgba(47, 116, 249, 0.28);
}

.cat-tile.active .cat-count {
  color: rgba(255, 255, 255, 0.86);
}

.cat-tile.active .cat-check {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.section-label {
  margin: 22px 0 12px;
  font-size: 13px;
  color: var(--text-3);
}

/* 商品网格 */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 22px;
}

.goods-card {
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
}

.goods-card:hover {
  transform: translateY(-2px);
  border-color: #c7d9ff;
  box-shadow: 0 10px 26px rgba(22, 93, 255, 0.12);
}

.goods-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f7f8fa;
  overflow: hidden;
}

.goods-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.goods-card:hover .goods-cover img {
  transform: scale(1.03);
}

.goods-cover .sold-out {
  position: absolute;
  inset: 0;
  background: rgba(29, 33, 41, 0.56);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

.goods-body {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.goods-name {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 20px;
}

.goods-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.price {
  color: var(--primary);
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}

.price .cur {
  font-size: 12px;
  font-weight: 600;
}

.price .num {
  font-size: 19px;
  letter-spacing: -0.3px;
}

.price .market {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-4);
  text-decoration: line-through;
}

.stock-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(22, 93, 255, 0.07);
  color: var(--primary);
  white-space: nowrap;
}

.stock-tag.low {
  background: rgba(255, 125, 0, 0.1);
  color: var(--warning);
}

.stock-tag.none {
  background: var(--danger-bg);
  color: var(--danger);
}

.load-more {
  display: block;
  margin: 26px auto 0;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 13px;
  padding: 8px 20px;
  border-radius: 6px;
}

.load-more:hover {
  color: var(--primary);
  background: rgba(22, 93, 255, 0.06);
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.empty svg {
  width: 64px;
  height: 64px;
  opacity: 0.5;
  margin: 0 auto 12px;
  display: block;
}

/* ---------------------------- 页脚 ---------------------------- */
.footer {
  padding: 26px 0 40px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.9;
}

.footer a:hover {
  color: var(--primary);
}

.footer .icp {
  color: #a8adb8;
}

/* ---------------------------- 浮动按钮 ---------------------------- */
.float-btns {
  position: fixed;
  left: 0;
  top: 176px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  padding: 8px 0;
  border: none;
  border-radius: 0 6px 6px 0;
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  box-shadow: 0 4px 12px rgba(29, 33, 41, 0.18);
  opacity: 0.94;
  transition: padding 0.15s, opacity 0.15s;
}

.float-btn:hover {
  opacity: 1;
  padding-left: 4px;
}

/* ---------------------------- 弹窗 ---------------------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(29, 33, 41, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade 0.16s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: pop 0.18s ease;
}

.modal-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 52px;
  border-bottom: 1px solid var(--border-2);
}

.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.modal-tools {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
}

.icon-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--fill);
  color: var(--text);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.modal-body {
  padding: 18px 24px 6px;
}

.order-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-goods {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.order-qty {
  flex: none;
  font-size: 13px;
  color: var(--text-3);
  padding-top: 4px;
}

.order-desc {
  position: relative;
  margin: 14px 0 0;
  padding: 0 22px 0 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 92px;
  overflow-y: auto;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--success-bg);
  color: var(--success);
}

.tag.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.divider {
  height: 1px;
  background: var(--border-2);
  margin: 16px 0;
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.field-label {
  flex: none;
  width: 66px;
  font-size: 13px;
  color: var(--text-2);
}

.field-label .req {
  color: var(--danger);
  margin-right: 2px;
}

.input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--fill-2);
  font-size: 13px;
  transition: all 0.15s;
}

.input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.1);
}

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

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 14px;
}

.amount {
  color: var(--primary);
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}

.amount .cur {
  font-size: 14px;
}

.amount .num {
  font-size: 24px;
  letter-spacing: -0.5px;
}

.amount .origin {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-4);
  text-decoration: line-through;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  height: 30px;
}

.stepper button {
  width: 28px;
  height: 100%;
  border: none;
  background: #fff;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1;
}

.stepper button:hover:not(:disabled) {
  background: var(--fill-2);
  color: var(--primary);
}

.stepper button:disabled {
  color: var(--text-4);
  cursor: not-allowed;
}

.stepper input {
  width: 42px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  background: #fff;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pay-item {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: var(--text-2);
  transition: all 0.15s;
}

.pay-item:hover {
  border-color: #bcd2ff;
}

.pay-item img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex: none;
}

.pay-item.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #f5f9ff;
  box-shadow: 0 0 0 1px var(--primary) inset;
}

.pay-item .pay-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1;
  transition: all 0.15s;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  min-width: 96px;
}

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

.btn.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.block {
  width: 100%;
  height: 42px;
  font-size: 15px;
}

.btn.text {
  border-color: transparent;
  background: transparent;
}

/* ---------------------------- 支付页 / 订单页 ---------------------------- */
.page-card {
  max-width: 620px;
  margin: 28px auto 60px;
  background: #fff;
  border: 1px solid #edeff3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.page-card-head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border-2);
}

.page-card-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.page-card-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}

.page-card-body {
  padding: 22px 26px 26px;
}

.kv {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  padding: 6px 0;
}

.kv .k {
  width: 78px;
  flex: none;
  color: var(--text-3);
}

.kv .v {
  flex: 1;
  min-width: 0;
  color: var(--text);
  word-break: break-all;
}

.kv .v.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.4px;
}

.pay-box {
  margin: 18px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 10px;
  background: var(--fill-2);
}

.qr {
  width: 168px;
  height: 168px;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 10px rgba(29, 33, 41, 0.08);
}

.qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

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

.countdown {
  font-size: 13px;
  color: var(--warning);
  font-variant-numeric: tabular-nums;
}

.big-amount {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.6px;
}

.big-amount .cur {
  font-size: 18px;
  margin-right: 2px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--primary-light);
  color: var(--primary);
}

.status-pill.success {
  background: var(--success-bg);
  color: var(--success);
}

.status-pill.gray {
  background: var(--fill);
  color: var(--text-3);
}

.status-pill.warn {
  background: rgba(255, 125, 0, 0.1);
  color: var(--warning);
}

.card-list {
  margin-top: 16px;
  border: 1px dashed #bcd2ff;
  background: #f7faff;
  border-radius: 10px;
  padding: 14px;
}

.card-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-2);
}

.card-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  margin-bottom: 8px;
}

.card-item:last-child {
  margin-bottom: 0;
}

.card-item .idx {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fill);
  color: var(--text-3);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-item code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.5px;
  word-break: break-all;
  color: var(--text);
}

.copy-btn {
  flex: none;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
}

.copy-btn:hover {
  border-color: var(--primary);
  background: #f5f9ff;
}

/* 订单查询页 */
.query-box {
  display: flex;
  gap: 10px;
  margin: 0 0 8px;
}

.query-box .input {
  height: 42px;
}

.query-box .btn {
  height: 42px;
  flex: none;
  padding: 0 22px;
}

.order-item {
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.order-item:hover {
  border-color: #c7d9ff;
  box-shadow: 0 6px 18px rgba(22, 93, 255, 0.08);
}

.order-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.order-item-title img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
}

.order-item-title .t {
  min-width: 0;
}

.order-item-title .t b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.order-item-title .t span {
  font-size: 12px;
  color: var(--text-3);
}

.order-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-3);
}

.order-item-meta .price {
  font-size: 15px;
}

/* 通用列表页（禁售/FAQ） */
.list-panel {
  background: #fff;
  border: 1px solid #edeff3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 8px 24px 24px;
  margin-bottom: 40px;
}

.banned-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-2);
}

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

.banned-item .no {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.banned-item .c b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.banned-item .c span {
  font-size: 13px;
  color: var(--text-3);
}

.faq-item {
  border-bottom: 1px solid var(--border-2);
}

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

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 2px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q .chev {
  flex: none;
  color: var(--text-3);
  transition: transform 0.2s;
}

.faq-q .chev svg {
  width: 14px;
  height: 14px;
}

.faq-item[open] .faq-q {
  color: var(--primary);
}

.faq-item[open] .chev {
  transform: rotate(180deg);
}

.faq-a {
  padding: 0 2px 16px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* toast */
.toast-root {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  min-width: 120px;
  max-width: 80vw;
  padding: 9px 16px;
  border-radius: 8px;
  background: rgba(29, 33, 41, 0.88);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(29, 33, 41, 0.2);
  animation: pop 0.18s ease;
}

.toast.err {
  background: rgba(245, 63, 63, 0.94);
}

.toast.ok {
  background: rgba(0, 180, 42, 0.94);
}

/* loading skeleton */
.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, #f2f3f5 25%, #e9ebef 37%, #f2f3f5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.sk-card {
  height: 300px;
}

/* ---------------------------- 响应式 ---------------------------- */
@media (max-width: 1100px) {
  .goods-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .wrap {
    padding: 0 14px;
  }
  .goods-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .nav {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .float-btns {
    top: auto;
    bottom: 90px;
  }
  .float-btn {
    writing-mode: horizontal-tb;
    letter-spacing: 0;
    width: 56px;
    border-radius: 0 8px 8px 0;
    padding: 6px 0;
  }
  .panel {
    padding: 14px 14px 20px;
  }
  .search-box {
    width: 140px;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .modal {
    max-width: 100%;
  }
  .page-card-body,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .modal-foot {
    padding: 14px 16px 18px;
  }
  .pay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-name {
    font-size: 16px;
  }
  .field-label {
    width: 58px;
  }
}

@media (max-width: 520px) {
  .topbar-right .btn-pill span {
    display: none;
  }
  .btn-pill {
    padding: 0 12px;
  }
  .goods-grid {
    gap: 10px;
  }
  .price .num {
    font-size: 17px;
  }
  .cat-tile {
    width: calc(50% - 6px);
  }
  .order-item-title .t b {
    max-width: 180px;
  }
}
