/* ============================================================
   数字商品自动发卡商城 — 前台样式
   配色：主蓝 #3a7bd5 → #4f9cf7，购物车橙 #e47919
   ============================================================ */

:root {
  --blue-1: #3a7bd5;
  --blue-2: #4f9cf7;
  --blue-deep: #1e6bff;
  --ink: #2f3c4f;
  --ink-2: #6f7f97;
  --line: #e9edf3;
  --bg: #f5f7fb;
  --orange-1: #fff4e8;
  --orange-2: #ffe6cf;
  --orange-ink: #e47919;
  --red: #ff4d4f;
  --green: #2fb673;
  --radius: 14px;
  --shadow-sm: 0 6px 14px rgba(24, 38, 64, .08);
  --shadow-md: 0 10px 24px rgba(24, 38, 64, .12);
  --shadow-lg: 0 18px 40px rgba(24, 38, 64, .16);
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 0;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ============================================================
   顶部导航
   ============================================================ */
.header-navbar {
  position: sticky;
  top: 0;
  z-index: 1060;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 44, 88, .06);
}

.header-flex {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.topnav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topnav-logo img {
  height: 36px;
  width: 36px;
  border-radius: 9px;
  object-fit: cover;
}

.logo-title {
  font-family: "Orbitron", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1.2px;
  padding-left: 2px;
  text-transform: uppercase;
  color: var(--blue-deep);
  text-shadow: 0 1px 1px rgba(18, 38, 63, .18);
  position: relative;
  line-height: 1;
  white-space: nowrap;
}

.logo-title::after {
  content: '';
  position: absolute;
  left: 2px;
  right: -6px;
  bottom: -6px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(30, 107, 255, .6), rgba(0, 196, 255, .45));
  transform: skewX(-12deg);
}

.header-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* 通用胶囊按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  background: #f7f9fc;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease,
              border-color .15s ease, color .15s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-outline {
  border-color: #d7dde5;
  background: #f7f9fc;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  background: #edf3ff;
  border-color: #c5d5f2;
  color: #1f4fa3;
  box-shadow: 0 10px 18px rgba(24, 38, 64, .14);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-1) 0%, var(--blue-2) 100%);
  color: #fff;
  box-shadow: 0 10px 18px rgba(32, 70, 150, .2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #2f6fc9 0%, #3f8ff0 100%);
  color: #fff;
  box-shadow: 0 12px 22px rgba(32, 70, 150, .26);
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff9466 100%);
  color: #fff;
  box-shadow: 0 8px 16px rgba(255, 107, 107, .26);
}
.btn-danger:hover { color: #fff; filter: brightness(1.04); }

.btn-cart {
  border: 0;
  background: linear-gradient(135deg, var(--orange-1) 0%, var(--orange-2) 100%);
  color: var(--orange-ink) !important;
  box-shadow: 0 8px 16px rgba(255, 143, 63, .18);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.btn-block { width: 100%; }
.btn-lg { padding: 11px 26px; font-size: 15px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.header-cart-btn { position: relative; }
.cart-count-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}
.cart-count-badge.d-none { display: none; }

/* ============================================================
   分类胶囊导航
   ============================================================ */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0;
}

.tab-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 14px;
  background: #f4f7ff;
  border: 1px solid #dde6f7;
  color: #2b4a7f;
  transition: all .2s ease;
  box-shadow: 0 4px 10px rgba(32, 70, 150, .08);
  font-size: 13px;
}
.tab-link .tab-title { font-weight: 600; letter-spacing: .2px; }
.tab-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(32, 70, 150, .18);
}
.tab-link.active {
  background: linear-gradient(135deg, #2f6fd6 0%, #62a6ff 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(47, 111, 214, .28);
}
.tab-link .count {
  font-size: 11px;
  opacity: .7;
  margin-left: 4px;
}

/* ============================================================
   搜索框
   ============================================================ */
.search-wrap {
  max-width: 700px;
  margin: 4px auto 14px;
  position: relative;
}
.search-input {
  width: 100%;
  height: 48px;
  font-size: 14px;
  border-radius: 24px;
  padding: 0 20px 0 50px;
  border: 1px solid #e0e0e0;
  background: #fff;
  transition: all .3s ease;
  outline: none;
  color: var(--ink);
}
.search-input::placeholder { color: #a7b1be; }
.search-input:focus {
  border-color: #42a5f5;
  box-shadow: 0 0 0 3px rgba(66, 165, 245, .1);
}
.search-input:hover { border-color: #64b5f6; }
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #42a5f5;
  pointer-events: none;
}

/* ============================================================
   分类分组 + 商品卡片
   ============================================================ */
.category-section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: hidden;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.category-header:hover { background: #fafcff; }

.category-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1f2a44;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-title::before {
  content: '';
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
}

.category-toggle-icon {
  color: #9aa8bd;
  font-size: 13px;
  transition: transform .2s ease;
}
.category-section.collapsed .category-toggle-icon { transform: rotate(-90deg); }
.category-section.collapsed .category-content { display: none; }

.category-content { padding: 10px 12px 14px; }

.hyper-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

/* --- 单条商品 --- */
.home-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.home-card:hover {
  border-color: #cfe0ff;
  box-shadow: 0 10px 24px rgba(32, 70, 150, .1);
  transform: translateY(-1px);
}

.home-img-wrap {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #f2f6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e8eefc;
}
.home-img { width: 100%; height: 100%; object-fit: cover; }

.home-card .flex {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.name-stock-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.name {
  margin: 0;
  font-weight: 500;
  color: #333;
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
}

.stock-badge {
  flex-shrink: 0;
  font-size: 13px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
  background: linear-gradient(135deg, #f0f6ff 0%, #e6f0ff 100%);
  border: 1px solid #cfe0ff;
  color: #2a5bd7;
  white-space: nowrap;
}
.stock-badge.out {
  background: linear-gradient(135deg, #fff0f0 0%, #ffe3e3 100%);
  border-color: #ffc9c9;
  color: #d9363e;
}

.goods-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.goods-stock { display: none; }

.price-wholesale-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 96px;
  flex-shrink: 0;
}
.price-item { display: flex; align-items: baseline; gap: 4px; }
.price-label { font-size: 12px; color: var(--ink-2); letter-spacing: .3px; }
.price-value { font-size: 19px; font-weight: 700; color: #1f2a44; }

.wholesale-items { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.wholesale-item {
  font-size: 11px;
  color: var(--ink-2);
  background: #f6f8fd;
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

.goods-actions { display: flex; gap: 8px; flex-shrink: 0; }
.goods-actions .btn { font-size: 13px; padding: 8px 16px; }

.goods-actions-mobile { display: none; }
.mobile-stock-display { display: none; }
.mobile-price-info { display: none; }

/* 推荐角标 */
.ribbon-box { overflow: hidden; }
.ribbon-two {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  z-index: 2;
}
.ribbon-two span {
  position: absolute;
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  transform: rotate(45deg);
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}
.ribbon-two-success {
  border-width: 0 46px 46px 0;
  border-color: transparent #2fb673 transparent transparent;
}
.ribbon-two-success span {
  top: 8px;
  right: -40px;
  width: 46px;
  transform: rotate(45deg);
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  margin-top: 24px;
  padding: 26px 0 34px;
  background: #fff;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
  line-height: 2;
}
.site-footer a { color: var(--blue-1); }
.site-footer .footer-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }

/* ============================================================
   公告
   ============================================================ */
.notice-card {
  background: linear-gradient(135deg, #f2f7ff 0%, #eaf2ff 100%);
  border: 1px solid #dbe8ff;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 14px;
  color: #2b4a7f;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-line;
  position: relative;
  padding-left: 46px;
}
.notice-card::before {
  content: '📢';
  position: absolute;
  left: 16px;
  top: 13px;
  font-size: 17px;
}

/* ============================================================
   购买页
   ============================================================ */
.page-title-box { margin: 16px 0 12px; }
.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2a44;
}

.buy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.card-body { padding: 20px; }
.card.sticky { position: sticky; top: 78px; }

.buy-form-title {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 700;
  color: #1f2a44;
  line-height: 1.4;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f0f6ff;
  border: 1px solid #cfe0ff;
  color: #2a5bd7;
  margin-right: 6px;
}
.badge-warn { background: #fff7e8; border-color: #ffe0b2; color: #d98200; }
.badge-danger { background: #fff0f0; border-color: #ffc9c9; color: #d9363e; }
.badge-ok { background: #eefbf3; border-color: #bfeed4; color: #1f9d55; }

.buy-price {
  font-size: 30px;
  font-weight: 800;
  color: #ff4d4f;
  letter-spacing: -.5px;
}

.form-group { margin-bottom: 16px; }
.buy-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dde3ec;
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  color: var(--ink);
}
.form-control:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(79, 156, 247, .14);
}
textarea.form-control { resize: vertical; min-height: 90px; }

/* 数量步进器 */
.touchspin {
  display: inline-flex;
  align-items: center;
  border: 1px solid #dde3ec;
  border-radius: 10px;
  overflow: hidden;
}
.touchspin button {
  width: 42px;
  height: 42px;
  border: 0;
  background: linear-gradient(135deg, var(--blue-1), var(--blue-2));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.touchspin button:hover { filter: brightness(1.06); }
.touchspin input {
  width: 78px;
  height: 42px;
  border: 0;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

/* 支付方式 */
.pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
}
.pay-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1.5px solid #e3e9f2;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all .18s ease;
  position: relative;
}
.pay-type:hover { border-color: #b9d3ff; background: #fafcff; }
.pay-type.active {
  border-color: var(--blue-1);
  background: linear-gradient(135deg, #f3f8ff 0%, #e8f1ff 100%);
  box-shadow: 0 8px 18px rgba(58, 123, 213, .18);
  color: #1f4fa3;
}
.pay-type.active::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 12px;
  color: var(--blue-1);
  font-weight: 800;
}
.pay-type svg { width: 30px; height: 30px; }
.pay-type .rate {
  font-size: 11px;
  color: #d0021b;
  font-weight: 600;
}

.buy-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.buy-actions .btn { flex: 1; padding: 12px 20px; font-size: 15px; }

.buy-side .side-block + .side-block { margin-top: 14px; }
.side-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2a44;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.side-title::before {
  content: '';
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
}
.side-text { font-size: 13px; color: var(--ink-2); line-height: 2; white-space: pre-line; }
.side-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3a7bd5 0%, #4f9cf7 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(32, 70, 150, .2);
}
.side-link:hover { color: #fff; filter: brightness(1.04); }

.product-desc { font-size: 13px; color: var(--ink-2); line-height: 1.9; white-space: pre-line; }

/* ============================================================
   订单 / 支付 / 表格
   ============================================================ */
.panel {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 16px;
}

.panel-title {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 700;
  color: #1f2a44;
  display: flex;
  align-items: center;
  gap: 9px;
}
.panel-title::before {
  content: '';
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
}

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }

.delivered-box {
  background: #0f172a;
  color: #7dd3fc;
  border-radius: 12px;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 420px;
  overflow: auto;
  position: relative;
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #bae6fd;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.copy-btn:hover { background: rgba(255, 255, 255, .22); }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.table th {
  color: var(--ink-2);
  font-weight: 600;
  background: #fafcff;
  font-size: 13px;
  white-space: nowrap;
}
.table tbody tr:hover { background: #fafcff; }
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); }

.empty {
  text-align: center;
  color: #9aa8bd;
  padding: 48px 20px;
  font-size: 14px;
}
.empty .big { font-size: 40px; display: block; margin-bottom: 10px; }

/* 状态标签 */
.status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.status-0 { background: #fff7e8; color: #d98200; border: 1px solid #ffe0b2; }
.status-1 { background: #eef4ff; color: #2a5bd7; border: 1px solid #cfe0ff; }
.status-2 { background: #eefbf3; color: #1f9d55; border: 1px solid #bfeed4; }
.status-3 { background: #f3f5f8; color: #8894a8; border: 1px solid #e3e8ef; }
.status-4 { background: #fff0f0; color: #d9363e; border: 1px solid #ffc9c9; }

/* ============================================================
   购物车抽屉
   ============================================================ */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 92vw;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 30px rgba(16, 54, 108, .16);
  transition: right .25s ease;
  z-index: 1200;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 46, .42);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 1190;
}
.cart-overlay.show { display: block; }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 { margin: 0; font-size: 16px; font-weight: 700; color: #1f2a44; }
.cart-close {
  border: 0;
  background: #f2f5fa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 17px;
  color: #6f7f97;
  line-height: 1;
}
.cart-close:hover { background: #e8eef7; color: #33415c; }

.cart-body { flex: 1; overflow-y: auto; padding: 14px 20px; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.cart-item img {
  width: 52px; height: 52px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.cart-item .ci-main { flex: 1; min-width: 0; }
.cart-item .ci-name {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item .ci-price { font-size: 14px; font-weight: 700; color: #ff4d4f; }
.cart-item .ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.ci-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.ci-qty button {
  width: 26px; height: 26px;
  border: 0;
  background: #f7f9fc;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
}
.ci-qty button:hover { background: #eaf1ff; color: var(--blue-1); }
.ci-qty span { min-width: 30px; text-align: center; font-size: 13px; font-weight: 600; }
.ci-del {
  border: 0;
  background: transparent;
  color: #a7b1be;
  font-size: 12px;
}
.ci-del:hover { color: var(--red); }

.cart-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
  background: #fafcff;
}
.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--ink-2);
}
.cart-total b { font-size: 22px; color: #ff4d4f; font-weight: 800; }

/* ============================================================
   移动端
   ============================================================ */
.mobile-quickbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1040;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(16, 24, 40, .08);
  padding: 8px 82px 6px 12px;
  display: none;
  gap: 10px;
  align-items: center;
}
.mobile-quickbar a {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #3b3f46;
  padding: 6px 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 52px;
}
.mobile-quickbar .icon { font-size: 21px; line-height: 1; color: var(--blue-1); }
.mobile-quickbar .label { font-size: 10px; line-height: 1; }

.mobile-cart-float {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 1041;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  color: var(--orange-ink);
  box-shadow: 0 10px 20px rgba(20, 40, 80, .18);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.mobile-cart-float .cart-count-badge { top: -4px; right: -4px; }

/* 移动端菜单按钮 */
.mobile-only { display: none; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) translateY(16px);
  background: rgba(15, 23, 42, .92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 2000;
  max-width: 86vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   登录 / 注册
   ============================================================ */
.auth-wrap {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  border: 1px solid var(--line);
}
.auth-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: #1f2a44;
  text-align: center;
}
.auth-card .sub {
  text-align: center;
  color: var(--ink-2);
  font-size: 13px;
  margin-bottom: 22px;
}
.auth-card .btn { width: 100%; padding: 11px; font-size: 15px; margin-top: 6px; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.auth-alt a { color: var(--blue-1); font-weight: 600; }

.alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  background: #fff0f0;
  border: 1px solid #ffc9c9;
  color: #d9363e;
}
.alert-ok { background: #eefbf3; border-color: #bfeed4; color: #1f9d55; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
  .buy-grid { grid-template-columns: 1fr; }
  .card.sticky { position: static; }
}

@media (max-width: 768px) {
  body { padding-bottom: 72px; }

  .header-flex { min-height: 56px; }
  .logo-title { font-size: 18px; letter-spacing: .6px; }
  .topnav-logo img { height: 30px; width: 30px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 6px 12px; font-size: 12px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: inline-flex !important; }

  .nav-list { gap: 5px; padding: 8px 0; }
  .tab-link { padding: 6px 11px; font-size: 12.5px; }

  .search-wrap { margin-bottom: 12px; }
  .search-input { height: 44px; font-size: 13.5px; }

  .category-content { padding: 8px; }
  .home-card { padding: 10px; gap: 10px; align-items: flex-start; }
  .home-img-wrap { flex: 0 0 66px; width: 66px; height: 66px; }
  .home-card .flex { flex-wrap: wrap; }
  .name-stock-container { flex-direction: column; align-items: flex-start; gap: 6px; }
  .name { font-size: 14px; }
  .goods-right { display: none; }
  .mobile-stock-display { display: flex; width: 100%; justify-content: center; }
  .mobile-stock-display .stock-badge {
    width: 100%; text-align: center; font-size: 11px;
    background: linear-gradient(135deg, #f3f8ff 0%, #e5efff 100%);
    border: 1px solid #c7d8f5; color: #2b4a7f;
  }
  .mobile-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
  }
  .mobile-price-info .price { font-size: 13px; color: #ff4d4f; font-weight: 700; }
  .mobile-price-info .price b { font-size: 17px; }
  .goods-actions-mobile { display: flex; gap: 6px; margin-left: auto; align-items: center; }
  .goods-actions-mobile .btn {
    font-size: 12px; padding: 7px 13px; border-radius: 999px; border: 0;
    box-shadow: 0 6px 16px rgba(30, 80, 160, .18); font-weight: 600;
  }
  .goods-add-icon {
    width: 34px !important; height: 34px !important; padding: 0 !important;
    border-radius: 50% !important; display: inline-flex !important;
    align-items: center; justify-content: center;
  }

  .mobile-quickbar { display: flex; }
  .mobile-cart-float { display: flex; }

  .buy-actions { flex-direction: column; }
  .kv { grid-template-columns: 90px 1fr; }
  .panel { padding: 16px; }
  .buy-price { font-size: 26px; }
  .cart-drawer { width: 100%; right: -100%; }
  .pay-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .logo-title { font-size: 16px; }
  .header-actions .btn { padding: 5px 10px; font-size: 11.5px; }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3dbe7; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #bcc7d8; }
::-webkit-scrollbar-track { background: transparent; }

/* ==================== 补充：内页通用组件 ==================== */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #38465c;
  margin-bottom: 7px;
}
.search-row { display: flex; gap: 10px; }
.search-row .form-control { flex: 1; }

/* 订单详情 */
.order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.order-no { font-size: 14.5px; }
.order-no b { color: var(--blue-deep); }
.order-time { font-size: 12.5px; color: #98a6bd; margin-top: 5px; }

/* 收银台 */
.pay-wrap { max-width: 560px; margin: 0 auto; }
.pay-amount { text-align: center; padding: 12px 0 22px; }
.pay-amount-label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.pay-amount-num {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ff4d4f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pay-tip {
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #fff7e8;
  border: 1px solid #ffe0b2;
  color: #b8730a;
  font-size: 13px;
  line-height: 1.7;
}

/* 结算清单 */
.checkout-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5fb;
}
.checkout-item:last-child { border-bottom: none; }
.checkout-item img {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: #eef3fb;
}
.ci-main { flex: 1; min-width: 0; }
.ci-name { font-size: 14px; font-weight: 600; }
.ci-sub { font-size: 12.5px; color: #98a6bd; margin-top: 4px; }
.ci-sum { font-size: 14.5px; font-weight: 700; color: var(--red); white-space: nowrap; }

/* 登录注册 */
.auth-title { font-size: 20px; font-weight: 800; margin: 0 0 18px; text-align: center; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 13px; color: var(--ink-2); }
.auth-foot a { color: var(--blue-1); font-weight: 600; }

/* 错误页 */
.error-card { max-width: 480px; margin: 60px auto; text-align: center; }
.error-code {
  font-size: 76px;
  font-weight: 900;
  letter-spacing: -3px;
  background: linear-gradient(135deg, var(--blue-1) 0%, var(--blue-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.error-msg { font-size: 15px; color: var(--ink-2); margin-top: 14px; }

/* 教程正文 */
.help-body h3 {
  font-size: 16px;
  margin: 24px 0 10px;
  padding-left: 11px;
  position: relative;
}
.help-body h3:first-child { margin-top: 0; }
.help-body h3::before {
  content: "";
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--blue-1), var(--blue-2));
}
.help-body ol, .help-body ul { padding-left: 22px; color: var(--ink-2); line-height: 2.1; font-size: 13.5px; }
.help-body p { color: var(--ink-2); line-height: 2; font-size: 13.5px; }

/* ================================================================== */
/* USDT-TRC20 链上收款                                                  */
/* ================================================================== */
.usdt-box {
  margin-top: 18px;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
  padding: 16px;
}
.usdt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.usdt-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #26a17b 0%, #3fc79c 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
}
.usdt-net {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eaf7f2;
  color: #1c8464;
  font-size: 12px;
  font-weight: 600;
}
.usdt-main {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.usdt-qr {
  flex: 0 0 auto;
  text-align: center;
}
.usdt-qr img {
  display: block;
  border-radius: 10px;
  border: 1px solid #e6eef9;
  background: #fff;
  padding: 6px;
  width: 180px;
  height: 180px;
}
.usdt-qr-fallback {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  color: #98a6bd;
  border: 1px dashed #cfdcec;
  border-radius: 10px;
  background: #fff;
}
.usdt-qr-tip {
  margin-top: 6px;
  font-size: 12px;
  color: #98a6bd;
}
.usdt-fields {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.usdt-field { min-width: 0; }
.usdt-label {
  font-size: 12px;
  color: #8b9bb4;
  margin-bottom: 5px;
}
.usdt-value-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.usdt-amount {
  font-size: 26px;
  font-weight: 800;
  color: #1c8464;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: -.5px;
  word-break: break-all;
}
.usdt-unit {
  font-size: 13px;
  color: #1c8464;
  font-weight: 600;
}
.usdt-addr {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  color: #2b3a52;
  background: #f1f6fd;
  border: 1px solid #e2ecf9;
  border-radius: 8px;
  padding: 7px 10px;
  word-break: break-all;
  line-height: 1.5;
}
.usdt-copy {
  flex: 0 0 auto;
  border: 1px solid #b9e3d3;
  background: #fff;
  color: #1c8464;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.usdt-copy:hover { background: #eaf7f2; }
.usdt-copy:active { background: #d9f0e7; }
.usdt-warn {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7e8;
  border: 1px solid #ffe2b8;
  color: #a55d00;
  font-size: 12.5px;
  line-height: 1.8;
}
.usdt-status {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6f7f97;
}
.usdt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4f9cf7;
  box-shadow: 0 0 0 0 rgba(79, 156, 247, .6);
  animation: usdtPulse 1.6s infinite;
  flex: 0 0 auto;
}
@keyframes usdtPulse {
  0%   { box-shadow: 0 0 0 0 rgba(79, 156, 247, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(79, 156, 247, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 156, 247, 0); }
}
.usdt-status.ok { color: #1c8464; font-weight: 600; }
.usdt-status.ok .usdt-dot { background: #2fb673; animation: none; }
.usdt-status.warn { color: #a55d00; }
.usdt-status.warn .usdt-dot { background: #e47919; animation: none; }
.usdt-manual {
  margin-top: 14px;
  border-top: 1px dashed #dbe6f5;
  padding-top: 12px;
}
.usdt-manual summary {
  cursor: pointer;
  font-size: 13px;
  color: #3a7bd5;
  outline: none;
}
.usdt-txid-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.usdt-txid-input {
  flex: 1 1 260px;
  min-width: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
}
.usdt-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #98a6bd;
  line-height: 1.8;
}
@media (max-width: 640px) {
  .usdt-main { flex-direction: column; align-items: center; }
  .usdt-fields { width: 100%; }
  .usdt-amount { font-size: 22px; }
}
