/* ============ 初见·臻品 商城 样式 ============ */
:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --card: #12121b;
  --card-2: #171722;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ecebf2;
  --muted: #9a97ab;
  --gold: #f6c76a;
  --gold-2: #d9a83c;
  --pink: #ff5f8f;
  --green: #3ddc84;
  --red: #ff5d5d;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  font-synthesis: none;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(246, 199, 106, 0.28); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2a2a38; border-radius: 8px; }

.bg-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-orbs i {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35;
  animation: float 18s ease-in-out infinite alternate;
}
.bg-orbs i:nth-child(1) { width: 420px; height: 420px; background: #6b2a8f; top: -120px; left: -80px; }
.bg-orbs i:nth-child(2) { width: 380px; height: 380px; background: #8f2a4d; top: 40%; right: -120px; animation-delay: -6s; }
.bg-orbs i:nth-child(3) { width: 320px; height: 320px; background: #8a6a1f; bottom: -100px; left: 30%; animation-delay: -11s; }
@keyframes float { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(30px, -40px, 0) scale(1.15); } }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 22px;
  background: rgba(7, 7, 11, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: 1px; font-size: 17px; }
.brand .dot { color: var(--gold); font-size: 20px; }
.nav { display: flex; gap: 20px; font-size: 14px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--gold); }
.topbar .admin-link { font-size: 12px; color: #6d6a7d; }
@media (max-width: 780px) {
  .nav { display: none; }
  .topbar { padding: 12px 14px; }
}

/* ---------- 滚动条公告 ---------- */
.ticker {
  background: linear-gradient(90deg, rgba(246, 199, 106, 0.12), rgba(255, 95, 143, 0.12));
  border-bottom: 1px solid var(--line);
  font-size: 13px; color: #e7d7ae; padding: 8px 18px; text-align: center;
}

/* ---------- Hero ---------- */
.hero { padding: 74px 22px 46px; text-align: center; position: relative; }
.hero h1 {
  font-size: clamp(28px, 5vw, 52px); line-height: 1.15; margin: 0 0 14px; letter-spacing: 1px;
  background: linear-gradient(100deg, #fff 10%, var(--gold) 46%, var(--pink) 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 26px; font-size: 15.5px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-badges { margin-top: 30px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-badges span {
  font-size: 12.5px; color: #cfc9dd; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 24px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04); color: var(--text); cursor: pointer;
  font-size: 14.5px; font-weight: 600; transition: 0.18s; white-space: nowrap;
}
.btn:hover { border-color: rgba(246, 199, 106, 0.5); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(100deg, var(--gold-2), var(--gold)); color: #241a05; border: none;
  box-shadow: 0 10px 28px rgba(246, 199, 106, 0.25);
}
.btn.primary:hover { box-shadow: 0 14px 34px rgba(246, 199, 106, 0.38); }
.btn.pink { background: linear-gradient(100deg, #ff3f7a, var(--pink)); color: #fff; border: none; }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- 区块 ---------- */
section { padding: 46px 22px; max-width: 1220px; margin: 0 auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { font-size: 22px; margin: 0; letter-spacing: 0.5px; }
.section-head h2::before { content: "◆"; color: var(--gold); margin-right: 9px; font-size: 13px; vertical-align: 3px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 7px 15px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--line); color: var(--muted); background: rgba(255, 255, 255, 0.03);
}
.chip.active { color: #241a05; background: linear-gradient(100deg, var(--gold-2), var(--gold)); border-color: transparent; font-weight: 700; }

.search { margin-bottom: 22px; }
.search input {
  width: 100%; padding: 13px 18px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line); outline: none;
}
.search input:focus { border-color: rgba(246, 199, 106, 0.45); }

/* ---------- 商品网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px; }
.card {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: 0.22s; display: flex; flex-direction: column; position: relative;
}
.card:hover { transform: translateY(-5px); border-color: rgba(246, 199, 106, 0.4); box-shadow: var(--shadow); }
.card .thumb { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #0b0b12; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s; }
.card:hover .thumb img { transform: scale(1.06); }
.card .badge {
  position: absolute; left: 12px; top: 12px; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; color: #241a05;
  background: linear-gradient(100deg, var(--gold), #ffe6a8);
}
.card .body { padding: 15px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .name { font-size: 16.5px; font-weight: 800; letter-spacing: 0.4px; }
.card .sub { font-size: 12.5px; color: var(--muted); min-height: 19px; }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.card .tags i {
  font-style: normal; font-size: 11px; padding: 3px 8px; border-radius: 6px;
  color: #d8c8a0; background: rgba(246, 199, 106, 0.1); border: 1px solid rgba(246, 199, 106, 0.18);
}
.card .foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 8px; }
.price { font-size: 20px; font-weight: 900; color: var(--gold); letter-spacing: -0.5px; }
.price small { font-size: 12px; color: var(--muted); font-weight: 500; display: block; letter-spacing: 0; }
.sold { font-size: 11.5px; color: #6f6c80; }

/* ---------- 流程 / 须知 ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.step b { color: var(--gold); font-size: 13px; letter-spacing: 2px; }
.step h4 { margin: 8px 0 6px; font-size: 16px; }
.step p { margin: 0; color: var(--muted); font-size: 13.5px; }
.notice-box {
  white-space: pre-wrap; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; color: #cfcadb; font-size: 14px;
}

/* ---------- FAQ / 评价 ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-item h4 { margin: 0 0 6px; font-size: 15.5px; color: var(--gold); }
.faq-item p { margin: 0; color: #b9b4c8; font-size: 14px; }
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.review .stars { color: var(--gold); font-size: 13px; letter-spacing: 2px; }
.review p { font-size: 13.5px; color: #c7c2d4; margin: 8px 0 10px; }
.review .who { font-size: 12px; color: #7b7889; }

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line); padding: 30px 22px 46px; text-align: center;
  color: #6f6c80; font-size: 13px;
}
footer .contacts { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
footer .contacts a { color: var(--gold); }
footer .copy { font-size: 12px; color: #4d4a5a; margin-top: 14px; }

/* ---------- 抽屉（商品详情） ---------- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: 0.24s; z-index: 90;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(520px, 100%);
  background: var(--bg-2); border-left: 1px solid var(--line); z-index: 91;
  transform: translateX(102%); transition: transform 0.3s cubic-bezier(0.3, 0.9, 0.2, 1);
  overflow-y: auto; padding-bottom: 110px;
}
.drawer.show { transform: none; }
.drawer .close {
  position: absolute; right: 14px; top: 12px; z-index: 3; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line); cursor: pointer;
  font-size: 18px; line-height: 1;
}
.drawer .hero-img { aspect-ratio: 1/1; background: #0b0b12; }
.drawer .hero-img img { width: 100%; height: 100%; object-fit: cover; }
.drawer .content { padding: 20px; }
.drawer h3 { margin: 0 0 6px; font-size: 22px; }
.drawer .subtitle { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.drawer .hl { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 9px; }
.drawer .hl li {
  font-size: 13.8px; color: #ded9e8; padding-left: 22px; position: relative;
}
.drawer .hl li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.drawer .desc { color: #b7b2c6; font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.drawer .desc p { margin: 0 0 10px; }
.buybar {
  position: fixed; bottom: 0; right: 0; width: min(520px, 100%); padding: 14px 18px;
  background: rgba(13, 13, 20, 0.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: none; gap: 12px; align-items: center;
  z-index: 92; box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.45);
}
.buybar.show { display: flex; }
.buybar .price { font-size: 22px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 18px; z-index: 100;
}
.modal-mask.show { display: flex; }
.modal {
  width: min(460px, 100%); background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow); padding: 24px; max-height: 92vh; overflow-y: auto;
  animation: pop 0.22s ease-out;
}
@keyframes pop { from { transform: translateY(14px) scale(0.97); opacity: 0; } }
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.modal .hint { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: 11px; background: var(--card);
  border: 1px solid var(--line); outline: none; font-size: 14px;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(246, 199, 106, 0.5); }
.field textarea { resize: vertical; min-height: 62px; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-ctrl { display: flex; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.qty-ctrl button { width: 38px; height: 38px; background: none; border: none; cursor: pointer; color: var(--gold); font-size: 17px; }
.qty-ctrl span { min-width: 40px; text-align: center; font-weight: 700; }

/* ---------- 支付页 ---------- */
.pay-modal { width: min(480px, 100%); text-align: center; }
.pay-modal .st { font-size: 13px; color: var(--muted); }
.pay-amount { font-size: 38px; font-weight: 900; color: var(--gold); letter-spacing: -1px; margin: 2px 0 2px; }
.pay-amount small { font-size: 15px; font-weight: 600; }
.pay-amount .tail { color: var(--pink); }
.pay-cny { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.qr-wrap {
  background: #fff; border-radius: 16px; padding: 10px; width: 216px; margin: 0 auto 12px;
}
.qr-wrap img { width: 100%; border-radius: 8px; }
.addr-box {
  background: var(--card); border: 1px dashed rgba(246, 199, 106, 0.4); border-radius: 12px;
  padding: 12px; margin-bottom: 12px; text-align: left;
}
.addr-box .label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; display: flex; justify-content: space-between; }
.addr-box .val { font-family: ui-monospace, Consolas, monospace; font-size: 12.6px; word-break: break-all; color: #ffe6a8; }
.pay-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin: 12px 0; }
.pay-status {
  display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px;
  padding: 10px; border-radius: 11px; background: rgba(246, 199, 106, 0.08);
  border: 1px solid rgba(246, 199, 106, 0.2); color: #f0dca6; margin-bottom: 14px;
}
.pay-status.ok { background: rgba(61, 220, 132, 0.1); border-color: rgba(61, 220, 132, 0.3); color: #93f0bb; }
.pay-status.err { background: rgba(255, 93, 93, 0.1); border-color: rgba(255, 93, 93, 0.3); color: #ffa8a8; }
.spinner {
  width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.pay-tips { font-size: 12px; color: #7d7a8c; text-align: left; line-height: 1.7; margin-top: 12px; }
.pay-tips b { color: #ffb3c6; }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); opacity: 0;
  background: #1c1c28; border: 1px solid var(--line); color: #fff; padding: 11px 20px;
  border-radius: 999px; font-size: 13.5px; z-index: 300; transition: 0.25s; pointer-events: none;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
