/* ============ AI效率铺 · 设计系统 ============ */
:root {
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1a1d26;
  --muted: #6b7280;
  --border: #e8eaf1;
  --tier-t1: #10b981;
  --tier-t2: #4f46e5;
  --tier-t3: #f59e0b;
  --tier-t4: #e11d48;
  --ok: #16a34a;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(23, 26, 45, 0.06);
  --shadow-md: 0 6px 20px rgba(60, 64, 120, 0.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .inner {
  max-width: 1080px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-grad);
  color: #fff; display: grid; place-items: center; font-size: 17px;
}
.topbar .slogan { color: var(--muted); font-size: 13px; display: none; }
@media (min-width: 640px) { .topbar .slogan { display: block; } }

/* ---------- Hero ---------- */
.hero {
  background: var(--brand-grad); color: #fff;
  padding: 40px 16px 46px; text-align: center; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 220px at 80% -10%, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
}
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: 0.5px; }
.hero p.sub { margin-top: 10px; font-size: 15px; opacity: 0.92; }
.trust {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.trust span {
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
}

/* ---------- 分类过滤 ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 18px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap; padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  font-size: 14px; cursor: pointer;
}
.chip.active { background: var(--text); border-color: var(--text); color: #fff; font-weight: 600; }

/* ---------- 价位分区 ---------- */
.tier-section { padding: 20px 0 6px; }
.tier-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tier-head h2 { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.tier-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tier-head .range { color: var(--muted); font-size: 13px; }
.tier-head .desc { width: 100%; color: var(--muted); font-size: 13px; }

/* ---------- 商品卡片 ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 12px 0 8px; }
@media (min-width: 700px) { .grid { grid-template-columns: 1fr 1fr; } }
.pcard {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pcard .badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge {
  font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600;
  background: #f1f2f8; color: var(--muted);
}
.badge.tier-t1 { background: #e7f8f1; color: var(--tier-t1); }
.badge.tier-t2 { background: #eef0ff; color: var(--tier-t2); }
.badge.tier-t3 { background: #fef3e2; color: #d97706; }
.badge.tier-t4 { background: #fde8ee; color: var(--tier-t4); }
.pcard h3 { font-size: 16px; font-weight: 700; line-height: 1.45; }
.pcard .desc {
  color: var(--muted); font-size: 13.5px; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard .bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.price { color: #ff5722; font-weight: 800; font-size: 21px; }
.price small { font-weight: 500; font-size: 12px; color: var(--muted); margin-left: 4px; }
.btn-buy {
  border: 0; cursor: pointer; font-size: 14px; font-weight: 700;
  background: var(--brand-grad); color: #fff; border-radius: 10px; padding: 10px 18px;
}
.btn-buy:active { transform: scale(0.97); }
.btn-detail {
  background: #fff; color: var(--brand); border: 1.5px solid var(--brand);
  border-radius: 10px; padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
}

/* ---------- 详情页 ---------- */
.detail-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; margin-top: 18px; box-shadow: var(--shadow-sm);
}
.detail-card h1 { font-size: 21px; font-weight: 800; line-height: 1.4; }
.detail-price { display: flex; align-items: baseline; gap: 10px; margin: 14px 0; }
.detail-price .price { font-size: 30px; }
.detail-block { border-top: 1px dashed var(--border); padding-top: 14px; margin-top: 14px; }
.detail-block h4 { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.detail-block p { font-size: 14px; }
.delivery-note {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px;
  padding: 12px 14px; font-size: 13px; color: #14532d; margin-top: 14px;
}
.action-row { display: flex; gap: 10px; margin-top: 18px; }
.action-row .btn-buy { flex: 1; padding: 13px; font-size: 16px; }
.action-row .btn-detail { padding: 13px 20px; font-size: 15px; }

/* ---------- 支付页 / 结果页 ---------- */
.center-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 34px 22px; text-align: center; margin-top: 26px;
}
.big-icon { font-size: 44px; margin-bottom: 8px; }
.center-card h2 { font-size: 19px; }
.center-card .tip { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.btn-main {
  display: inline-block; margin-top: 18px; background: var(--brand-grad); color: #fff;
  border: 0; border-radius: 10px; padding: 12px 30px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-secondary {
  display: inline-block; margin-top: 18px; background: #fff; color: var(--brand);
  border: 1.5px solid var(--brand); border-radius: 10px; padding: 11px 26px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 34px; padding: 26px 16px 40px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 12.5px; text-align: center; line-height: 1.9;
}

/* ---------- 管理后台 ---------- */
.admin-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-top: 16px; box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--border); word-break: break-all; }
th { color: var(--muted); font-weight: 500; }
input, textarea {
  width: 100%; padding: 11px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 15px; margin-top: 6px; font-family: inherit; background: #fbfbfe;
}
input:focus, textarea:focus { outline: 2px solid #c7d2fe; border-color: var(--brand); }
label { font-size: 13px; color: var(--muted); display: block; margin-top: 12px; }
.form-actions { margin-top: 16px; display: flex; gap: 10px; }
button.secondary { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); border-radius: 10px; padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer; }
button.danger { background: #fff; color: #dc2626; border: 1.5px solid #dc2626; border-radius: 10px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.status-ok { color: var(--ok); font-weight: 600; }
.status-wait { color: #d97706; font-weight: 600; }
.hidden { display: none; }
