/* 公开站点通用样式（用于微信 H5 支付经营场景审核） */
:root {
  --brand-1: #3E2C8F;
  --brand-2: #BE9222;
  --text: #1c2230;
  --sub: #6b7280;
  --muted: #9aa2b0;
  --line: #ebeef2;
  --bg: #f6f7fb;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.7;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
a { color: var(--brand-1); }

/* 顶部导航 */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; font-weight: 700; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(62,44,143,.28);
}
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: -3px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--sub);
  text-decoration: none; white-space: nowrap;
}
.nav a.active, .nav a:hover { background: rgba(62,44,143,.08); color: var(--brand-1); }
.nav .btn-login {
  color: var(--brand-1); background: rgba(62,44,143,.07);
  border: 1px solid rgba(62,44,143,.16); font-weight: 600;
}

/* 页面标题区 */
.page-head { background: linear-gradient(135deg, #2b1f6b 0%, var(--brand-1) 55%, #6b4bb8 100%); color: #fff; padding: 38px 0 42px; }
.page-head h1 { font-size: 26px; margin: 0 0 8px; font-weight: 800; letter-spacing: .5px; }
.page-head p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.85); max-width: 760px; }

/* 内容卡片 */
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 18px 0; }
.card h2 { font-size: 17px; margin: 0 0 12px; }
.card h3 { font-size: 14.5px; margin: 18px 0 8px; color: var(--brand-1); }
.card p { font-size: 13.5px; color: var(--sub); margin: 0 0 10px; }
.card ul, .card ol { font-size: 13.5px; color: var(--sub); padding-left: 22px; margin: 0 0 10px; }
.card li { margin-bottom: 6px; }
.card b { color: var(--text); }

/* 商品网格 */
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.filter button {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--sub); font-size: 13px; cursor: pointer;
}
.filter button.active { background: var(--brand-1); border-color: var(--brand-1); color: #fff; }
.filter input {
  flex: 1; min-width: 180px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 13px; outline: none;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.p-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.p-card:hover { box-shadow: 0 8px 24px rgba(28,34,48,.09); transform: translateY(-2px); }
.p-img { height: 160px; background: #f7f8fc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: contain; }
.p-img .noimg { font-size: 34px; opacity: .5; }
.p-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.p-brand { font-size: 11.5px; color: var(--muted); }
.p-model { font-size: 14px; font-weight: 600; color: var(--text); }
.p-price { font-size: 19px; font-weight: 700; color: #c0392b; margin-top: 2px; }
.p-price small { font-size: 11px; color: var(--muted); font-weight: 400; }
.p-stock { font-size: 11.5px; color: #2e9e5b; }
.p-stock.out { color: var(--muted); }
.p-cat { font-size: 11px; color: var(--brand-1); background: rgba(62,44,143,.07); padding: 2px 8px; border-radius: 8px; align-self: flex-start; }
.loading { grid-column: 1/-1; text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0; }

/* 商品详情 */
.detail { display: flex; gap: 24px; flex-wrap: wrap; }
.detail-img { width: 340px; max-width: 100%; height: 300px; background: #f7f8fc; border-radius: 14px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.detail-img img { width: 100%; height: 100%; object-fit: contain; }
.detail-info { flex: 1; min-width: 260px; }
.detail-info h1 { font-size: 22px; margin: 0 0 6px; }
.detail-price { font-size: 28px; font-weight: 800; color: #c0392b; margin: 10px 0 4px; }
.detail-meta { font-size: 13px; color: var(--sub); line-height: 2; }
.detail-desc { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--sub); white-space: pre-wrap; }
.btn-main {
  display: inline-block; margin-top: 18px; padding: 12px 28px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-1), #6b4bb8); color: #fff;
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.btn-ghost {
  display: inline-block; margin-top: 18px; margin-left: 10px; padding: 12px 24px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); color: var(--sub); text-decoration: none; font-size: 14px;
}

/* 页脚 */
footer { background: #fff; border-top: 1px solid var(--line); padding: 26px 0 calc(26px + env(safe-area-inset-bottom, 0px)); font-size: 12px; color: var(--muted); text-align: center; line-height: 1.9; }
footer strong { color: var(--sub); font-weight: 600; }
footer a { color: inherit; text-decoration: underline; }
footer .f-links { margin: 6px 0; }

@media (max-width: 640px) {
  .nav { gap: 0; }
  .nav a { padding: 6px 8px; font-size: 12.5px; }
  .brand-sub { display: none; }
  .detail { gap: 14px; }
  .detail-img { height: 230px; }
}
