/* ============================================================
   数字商品自动发货商城 - 前台样式
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --price: #ef4444;
  --price-light: #fef2f2;
  --success: #16a34a;
  --warn: #f59e0b;
  --text: #0f172a;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --border: #e8ecf3;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .07);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .1);
  --container: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font: 14px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color .18s; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; border: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }
table { border-collapse: collapse; width: 100%; }

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

/* ---------------- 通用组件 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .18s;
  background: var(--primary); color: #fff; white-space: nowrap; line-height: 1.4;
}
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn-lg { padding: 13px 34px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-outline { background: #fff; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); color: var(--primary-dark); }
.btn-gray { background: #f1f5f9; color: var(--text-2); border-color: var(--border); }
.btn-gray:hover { background: #e2e8f0; color: var(--text); }
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #15803d; }
.btn-orange { background: #f97316; }
.btn-orange:hover { background: #ea580c; }

.card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }

.badge {
  display: inline-block; padding: 1px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; line-height: 1.7; vertical-align: middle;
}
.badge-red { background: var(--price-light); color: var(--price); }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: #f0fdf4; color: var(--success); }
.badge-gray { background: #f1f5f9; color: var(--text-2); }
.badge-orange { background: #fff7ed; color: #ea580c; }

.text-price { color: var(--price); font-weight: 700; }
.text-muted { color: var(--text-2); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; } .gap-1 { gap: 8px; } .gap-2 { gap: 16px; }

/* ---------------- 顶部条 ---------------- */
.topbar { background: #0f172a; color: #cbd5e1; font-size: 12.5px; line-height: 36px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar .notice { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.topbar .notice .ico { flex: none; }
.topbar .notice a { color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .notice a:hover { color: #fff; }
.topbar .links { display: flex; align-items: center; gap: 18px; flex: none; }
.topbar .links a:hover { color: #fff; }

/* ---------------- 头部 ---------------- */
.header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header .container { display: flex; align-items: center; gap: 32px; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo .mark {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff; font-size: 19px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.logo .txt strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; }
.logo .txt span { display: block; font-size: 11px; color: var(--text-3); letter-spacing: 1.5px; }

.search { flex: 1; max-width: 520px; position: relative; }
.search form { display: flex; border: 2px solid var(--primary); border-radius: 10px; overflow: hidden; }
.search input { flex: 1; border: 0; padding: 9px 14px; font-size: 14px; background: #fff; }
.search button {
  border: 0; background: var(--primary); color: #fff; padding: 0 22px;
  font-weight: 600; cursor: pointer; transition: .18s;
}
.search button:hover { background: var(--primary-dark); }
.suggest {
  position: absolute; top: 46px; left: 0; right: 0; background: #fff; border-radius: 10px;
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200; display: none;
}
.suggest a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 14px; font-size: 13px; }
.suggest a:hover { background: var(--primary-light); }
.suggest a span { color: var(--price); font-weight: 600; flex: none; }

.head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.head-actions .act {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px;
  font-size: 13px; color: var(--text-2); transition: .18s; position: relative;
}
.head-actions .act:hover { background: var(--primary-light); color: var(--primary); }
.head-actions .act .num {
  position: absolute; top: 2px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--price); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ---------------- 导航 ---------------- */
.nav { background: #fff; border-bottom: 1px solid var(--border); }
.nav .container { display: flex; align-items: center; gap: 4px; height: 48px; overflow-x: auto; }
.nav a {
  padding: 0 16px; height: 48px; display: flex; align-items: center; font-size: 14px;
  font-weight: 500; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav a:hover { color: var(--primary); }
.nav a.active { color: var(--primary); font-weight: 700; border-bottom-color: var(--primary); }
.nav .all-cat { color: var(--primary); font-weight: 700; }

/* ---------------- 页面主体 ---------------- */
.main { padding: 24px 0 60px; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin-bottom: 18px; flex-wrap: wrap; }
.crumb a { color: var(--text-2); }
.crumb a:hover { color: var(--primary); }
.crumb .sep { color: #cbd5e1; }

.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.page-head p { color: var(--text-2); font-size: 13px; margin-top: 6px; }

/* ---------------- 首页 Banner ---------------- */
.hero {
  background: linear-gradient(120deg, #1e3a8a 0%, #2563eb 45%, #7c3aed 100%);
  border-radius: var(--radius-lg); color: #fff; padding: 40px 44px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  border-radius: 50%; background: rgba(255, 255, 255, .09);
}
.hero::before {
  content: ''; position: absolute; right: 100px; bottom: -120px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(255, 255, 255, .07);
}
.hero h2 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 10px; position: relative; }
.hero p { font-size: 14px; color: rgba(255, 255, 255, .88); max-width: 620px; position: relative; }
.hero .feats { display: flex; gap: 28px; margin-top: 24px; flex-wrap: wrap; position: relative; }
.hero .feats div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.hero .feats .ic {
  width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none;
}

/* ---------------- 分类区块 ---------------- */
.sec { margin-bottom: 34px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.sec-head .t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sec-head .t h3 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; white-space: nowrap; }
.sec-head .t .cnt { font-size: 12px; color: var(--text-3); background: #f1f5f9; padding: 2px 9px; border-radius: 20px; flex: none; }
.sec-head .t .bar { width: 4px; height: 20px; border-radius: 3px; background: var(--primary); flex: none; }
.sec-head .more { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 4px; flex: none; }
.sec-head .more:hover { color: var(--primary); }

/* ---------------- 商品网格 ---------------- */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.goods {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: all .2s; display: flex; flex-direction: column;
  position: relative;
}
.goods:hover { border-color: #c7d7fb; box-shadow: var(--shadow); transform: translateY(-3px); }
.goods .thumb { position: relative; padding-top: 68%; background: #f8fafc; overflow: hidden; }
.goods .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.goods:hover .thumb img { transform: scale(1.05); }
.goods .thumb .seller {
  position: absolute; left: 8px; top: 8px; background: rgba(15, 23, 42, .72); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 5px; backdrop-filter: blur(4px);
}
.goods .thumb .corner {
  position: absolute; right: 0; top: 0; background: var(--price); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-bottom-left-radius: 8px;
}
.goods .thumb .oos {
  position: absolute; inset: 0; background: rgba(255, 255, 255, .72);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-2);
}
.goods .body { padding: 12px 13px 14px; display: flex; flex-direction: column; flex: 1; }
.goods .name {
  font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 40px; margin-bottom: 8px;
}
.goods:hover .name { color: var(--primary); }
.goods .tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; min-height: 18px; }
.goods .meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--text-3); margin-bottom: 9px; }
.goods .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.goods .price { line-height: 1.25; }
.goods .price .now { color: var(--price); font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.goods .price .now i { font-size: 12px; font-style: normal; font-weight: 700; }
.goods .price .old { color: var(--text-3); font-size: 11.5px; text-decoration: line-through; }
.goods .buy {
  padding: 6px 14px; border-radius: 8px; background: var(--primary); color: #fff;
  font-size: 12.5px; font-weight: 600; border: 0; cursor: pointer; transition: .18s; flex: none;
}
.goods .buy:hover { background: var(--primary-dark); color: #fff; }
.goods .buy.disabled { background: #e2e8f0; color: var(--text-3); cursor: not-allowed; }

/* ---------------- 工具条 / 筛选 ---------------- */
.toolbar {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--border);
  padding: 14px 20px; margin-bottom: 20px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.sorts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sorts a { padding: 6px 14px; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.sorts a:hover { background: #f1f5f9; color: var(--text); }
.sorts a.active { background: var(--primary); color: #fff; font-weight: 600; }
.toolbar .total { font-size: 13px; color: var(--text-3); }
.toolbar .total b { color: var(--price); font-size: 15px; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; justify-content: center; margin-top: 32px; }
.pager ul { display: flex; gap: 6px; flex-wrap: wrap; }
.pager a, .pager span {
  display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
  padding: 0 12px; border-radius: 9px; background: #fff; border: 1px solid var(--border);
  font-size: 13.5px; color: var(--text-2); transition: .18s;
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .active span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pager .disabled span { color: #cbd5e1; }
.pager .gap span { border: 0; background: transparent; }

/* ---------------- 商品详情 ---------------- */
.pd { display: grid; grid-template-columns: 460px 1fr; gap: 32px; margin-bottom: 28px; }
.pd-gallery { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 16px; }
.pd-gallery .big { border-radius: var(--radius); overflow: hidden; background: #f8fafc; position: relative; padding-top: 75%; }
.pd-gallery .big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-gallery .thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.pd-gallery .thumbs img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer; flex: none; transition: .18s;
}
.pd-gallery .thumbs img.on { border-color: var(--primary); }

.pd-info { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 26px 28px; }
.pd-info h1 { font-size: 22px; font-weight: 800; line-height: 1.45; letter-spacing: -.3px; margin-bottom: 14px; }
.pd-info .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pd-price {
  background: linear-gradient(100deg, #fff5f5, #fff8f8); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 18px;
}
.pd-price .row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pd-price .now { color: var(--price); font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.pd-price .now i { font-size: 17px; font-style: normal; font-weight: 700; }
.pd-price .old { color: var(--text-3); text-decoration: line-through; font-size: 14px; }
.pd-price .save { background: var(--price); color: #fff; font-size: 11.5px; padding: 2px 9px; border-radius: 5px; font-weight: 700; }

.pd-stat { display: flex; gap: 26px; padding: 14px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.pd-stat div { font-size: 13px; color: var(--text-2); }
.pd-stat div b { color: var(--text); font-weight: 700; margin-left: 4px; }

.pd-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pd-row > label { width: 62px; color: var(--text-2); font-size: 13.5px; flex: none; }
.qty { display: flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.qty button { width: 36px; height: 38px; border: 0; background: #f8fafc; cursor: pointer; font-size: 16px; color: var(--text-2); }
.qty button:hover { background: #eef2f7; color: var(--primary); }
.qty input { width: 62px; height: 38px; border: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; font-size: 14px; font-weight: 600; }
.pd-row .stock-tip { font-size: 12.5px; color: var(--text-3); }

.pd-actions { display: flex; gap: 12px; margin: 22px 0 18px; flex-wrap: wrap; }
.pd-actions .btn { flex: 1; min-width: 150px; padding: 14px 20px; font-size: 15px; border-radius: 12px; }

.pd-promise { display: flex; gap: 20px; padding-top: 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pd-promise div { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.pd-promise .ic { color: var(--success); font-size: 14px; }

/* 详情标签页 */
.tabs { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.tabs-head { display: flex; border-bottom: 1px solid var(--border); background: #fbfcfe; overflow-x: auto; }
.tabs-head a { padding: 15px 26px; font-size: 14.5px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs-head a:hover { color: var(--primary); }
.tabs-head a.active { color: var(--primary); border-bottom-color: var(--primary); background: #fff; }
.tabs-body { padding: 28px 30px; }
.rich { font-size: 14.5px; line-height: 1.9; color: #334155; word-break: break-word; }
.rich h2, .rich h3 { color: var(--text); margin: 22px 0 10px; font-weight: 700; }
.rich h2 { font-size: 18px; } .rich h3 { font-size: 16px; }
.rich h2:first-child, .rich h3:first-child { margin-top: 0; }
.rich p { margin: 10px 0; }
.rich ul, .rich ol { margin: 10px 0 10px 22px; }
.rich ul li { list-style: disc; margin: 5px 0; }
.rich ol li { list-style: decimal; margin: 5px 0; }
.rich img { border-radius: 10px; margin: 14px 0; }
.rich table { margin: 14px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.rich table th { background: #f8fafc; text-align: left; padding: 10px 14px; font-weight: 600; border-bottom: 1px solid var(--border); }
.rich table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; }
.rich a { color: var(--primary); text-decoration: underline; }
.rich blockquote { border-left: 3px solid var(--primary); background: var(--primary-light); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 14px 0; }

/* ---------------- 购物车 ---------------- */
.cart-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.cart-list { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.cart-head, .cart-item { display: grid; grid-template-columns: 40px 1fr 120px 130px 110px 70px; align-items: center; gap: 12px; padding: 14px 20px; }
.cart-head { background: #fbfcfe; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.cart-item { border-bottom: 1px solid #f4f7fb; }
.cart-item:last-child { border-bottom: 0; }
.cart-item .thumb { width: 68px; height: 68px; border-radius: 9px; object-fit: cover; background: #f8fafc; }
.cart-item .info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cart-item .info .nm { font-size: 13.5px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .del { color: var(--text-3); font-size: 13px; text-align: right; }
.cart-item .del:hover { color: var(--price); }
.cart-sum { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 22px; position: sticky; top: 140px; }
.cart-sum h4 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.cart-sum .line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13.5px; color: var(--text-2); }
.cart-sum .line.total { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 14px; align-items: baseline; }
.cart-sum .line.total b { color: var(--price); font-size: 24px; font-weight: 800; }
.empty { text-align: center; padding: 70px 20px; color: var(--text-3); }
.empty .ic { font-size: 52px; margin-bottom: 14px; opacity: .5; }
.empty p { margin-bottom: 20px; }

/* ---------------- 结算 ---------------- */
.checkout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.panel { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 24px; margin-bottom: 18px; }
.panel h3 { font-size: 16px; font-weight: 700; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.panel h3 .n { width: 22px; height: 22px; border-radius: 7px; background: var(--primary); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 7px; font-weight: 600; }
.form-row label .req { color: var(--price); }
.form-control {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; background: #fff; transition: .18s;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.form-row .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.form-row.inline { display: flex; gap: 10px; align-items: flex-end; }

.pay-list { display: grid; gap: 10px; }
.pay-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 2px solid var(--border);
  border-radius: 12px; cursor: pointer; transition: .18s;
}
.pay-item:hover { border-color: #c7d7fb; }
.pay-item.on { border-color: var(--primary); background: var(--primary-light); }
.pay-item .radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cbd5e1; flex: none; position: relative; }
.pay-item.on .radio { border-color: var(--primary); }
.pay-item.on .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary); }
.pay-item .nm { font-size: 14px; font-weight: 600; }
.pay-item .ds { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.pay-item .fee { margin-left: auto; font-size: 12px; color: var(--text-3); }

.sum-box { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 22px; position: sticky; top: 140px; }
.sum-box .goods-mini { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f4f7fb; }
.sum-box .goods-mini img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: #f8fafc; }
.sum-box .goods-mini .t { font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sum-box .goods-mini .p { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.sum-box .line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; color: var(--text-2); }
.sum-box .line b { color: var(--text); }
.sum-box .line.total { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 14px; align-items: baseline; }
.sum-box .line.total b { color: var(--price); font-size: 26px; font-weight: 800; }

/* ---------------- 订单 / 结果页 ---------------- */
.result { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 40px; text-align: center; }
.result .ic { font-size: 56px; margin-bottom: 12px; }
.result h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.result p { color: var(--text-2); margin-bottom: 6px; }
.result .actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

.order-box { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.order-box .oh { padding: 20px 26px; border-bottom: 1px solid var(--border); background: #fbfcfe; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.order-box .oh .no { font-family: Consolas, Monaco, monospace; font-size: 15px; font-weight: 700; letter-spacing: .3px; }
.order-box .ob { padding: 26px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 30px; margin-bottom: 22px; }
.info-grid div { display: flex; font-size: 13.5px; }
.info-grid div span:first-child { color: var(--text-2); width: 84px; flex: none; }
.info-grid div span:last-child { color: var(--text); font-weight: 500; word-break: break-all; }

.deliver-card { border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.deliver-card .t { font-size: 13.5px; font-weight: 700; color: #15803d; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.deliver-card pre {
  font-family: Consolas, Monaco, monospace; font-size: 13px; background: #fff; color: #0f172a;
  padding: 14px; border-radius: 8px; white-space: pre-wrap; word-break: break-all; line-height: 1.8;
  border: 1px solid #dcfce7; margin-bottom: 10px;
}
.deliver-card .copy {
  font-size: 12px; padding: 5px 12px; border-radius: 7px; background: #16a34a; color: #fff;
  border: 0; cursor: pointer; font-weight: 600;
}
.deliver-card .copy:hover { background: #15803d; }

.pay-qr { text-align: center; padding: 30px 20px; }
.pay-qr .box { display: inline-block; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.pay-qr .box img { width: 220px; height: 220px; object-fit: contain; }
.pay-qr .box svg { width: 220px; height: 220px; display: block; }
.pay-qr .amt { font-size: 34px; font-weight: 800; color: var(--price); margin: 8px 0 18px; }
.pay-qr .input-group { display: flex; gap: 8px; align-items: center; }
.pay-qr .input-group .form-control { flex: 1; }

/* ---------------- 会员中心 ---------------- */
.user-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.side { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.side .uinfo { padding: 22px; border-bottom: 1px solid var(--border); text-align: center; }
.side .uinfo .av {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800;
}
.side .uinfo .nm { font-size: 15px; font-weight: 700; }
.side .uinfo .bl { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.side .uinfo .bl b { color: var(--price); }
.side nav a { display: flex; align-items: center; gap: 9px; padding: 12px 22px; font-size: 13.5px; color: var(--text-2); border-left: 3px solid transparent; }
.side nav a:hover { background: #f8fafc; color: var(--primary); }
.side nav a.active { background: var(--primary-light); color: var(--primary); font-weight: 700; border-left-color: var(--primary); }

.table-simple { width: 100%; font-size: 13.5px; }
.table-simple th { text-align: left; padding: 12px 14px; background: #fbfcfe; color: var(--text-2); font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.table-simple td { padding: 14px; border-bottom: 1px solid #f4f7fb; vertical-align: middle; }
.table-simple tr:last-child td { border-bottom: 0; }

/* ---------------- 登录注册 ---------------- */
.auth { max-width: 420px; margin: 40px auto; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 36px; }
.auth h1 { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth .sub { text-align: center; color: var(--text-3); font-size: 13px; margin-bottom: 26px; }
.auth .form-row { margin-bottom: 16px; }
.auth .swap { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 18px; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row img { height: 42px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); flex: none; }

/* ---------------- 文章 / 帮助 ---------------- */
.help-list { display: grid; gap: 12px; }
.help-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; transition: .18s; }
.help-item:hover { border-color: #c7d7fb; box-shadow: var(--shadow-sm); }
.help-item h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.help-item p { font-size: 13px; color: var(--text-2); }
.help-item .meta { font-size: 12px; color: var(--text-3); margin-top: 10px; }

/* ---------------- 页脚 ---------------- */
.footer { background: #0f172a; color: #94a3b8; padding: 44px 0 0; margin-top: 40px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 32px; }
.footer h4 { color: #e2e8f0; font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer .about p { font-size: 13px; line-height: 1.9; margin-bottom: 14px; }
.footer .about .logo { margin-bottom: 14px; }
.footer .about .logo .txt strong { color: #fff; }
.footer ul li { margin-bottom: 9px; font-size: 13px; }
.footer ul li a:hover { color: #fff; }
.footer .contact div { font-size: 13px; margin-bottom: 9px; display: flex; gap: 8px; }
.footer .contact div b { color: #e2e8f0; font-weight: 600; flex: none; }
.footer .bottom { border-top: 1px solid #1e293b; padding: 18px 0; font-size: 12.5px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.footer .bottom a { color: #94a3b8; }
.footer .bottom a:hover { color: #fff; }

/* ---------------- 提示 / Toast ---------------- */
#toast-wrap { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: #0f172a; color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 13.5px;
  box-shadow: var(--shadow-lg); animation: toastIn .25s ease; max-width: 90vw;
}
.toast.ok { background: #16a34a; }
.toast.err { background: #ef4444; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------------- 404 ---------------- */
.nf { text-align: center; padding: 80px 20px; }
.nf .code { font-size: 90px; font-weight: 800; color: #e2e8f0; letter-spacing: -4px; line-height: 1; }
.nf h2 { font-size: 20px; margin: 16px 0 8px; }
.nf p { color: var(--text-2); margin-bottom: 24px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 980px) {
  .grid, .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .pd { grid-template-columns: 1fr; gap: 20px; }
  .cart-wrap, .checkout, .user-wrap { grid-template-columns: 1fr; }
  .cart-sum, .sum-box { position: static; }
  .footer .cols { grid-template-columns: 1fr 1fr; gap: 26px; }
  .hero { padding: 30px 26px; }
  .hero h2 { font-size: 24px; }
  .header .container { gap: 16px; }
  .search { max-width: none; }
}
@media (max-width: 760px) {
  .grid, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .container { padding: 0 14px; }
  .header .container { height: auto; padding: 12px 14px; flex-wrap: wrap; }
  .search { order: 3; width: 100%; flex: none; }
  .head-actions .act span { display: none; }
  .topbar .links { display: none; }
  .info-grid { grid-template-columns: 1fr; }
  .cart-head { display: none; }
  .cart-item { grid-template-columns: 26px 1fr auto; grid-template-areas: 'chk info del' '. price qty'; gap: 10px; padding: 14px; }
  .cart-item .chk { grid-area: chk; } .cart-item .info { grid-area: info; } .cart-item .del { grid-area: del; }
  .footer .cols { grid-template-columns: 1fr; }
  .tabs-body { padding: 18px; }
  .pd-info { padding: 20px; }
  .pd-actions .btn { min-width: 0; flex: 1 1 100%; }
  .hero .feats { gap: 14px; }
  .footer .bottom { justify-content: center; text-align: center; }
}
