/* ===== 稿效商城 前台样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #8f959e;
  --border: #e5e9f0;
  --bg-gray: #f6f8fb;
  --red: #d4380d;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }
.muted { color: var(--text-2); }

/* ===== 头部 ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 20px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.logo .logo-badge { background: var(--primary); color: #fff; border-radius: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.main-nav { display: flex; gap: 26px; }
.main-nav a { color: var(--text-2); font-size: 15px; }
.main-nav a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ===== Hero ===== */
.hero { background: linear-gradient(135deg, #e8f1ff 0%, #f6f9ff 60%, #fff 100%); padding: 72px 0 56px; text-align: center; }
.hero h1 { font-size: 36px; margin-bottom: 14px; }
.hero-sub { font-size: 17px; color: var(--text-2); max-width: 720px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-notice { margin-top: 22px; color: var(--text-2); font-size: 14px; }

/* ===== 按钮 ===== */
.btn { display: inline-block; border: 1px solid transparent; border-radius: 8px; padding: 9px 22px; font-size: 15px; cursor: pointer; transition: all .2s; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-primary:disabled { background: #b7cbe8; cursor: not-allowed; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-outline:hover { background: #f0f6ff; }
.btn-lg { padding: 13px 32px; font-size: 16px; }
.btn-sm { padding: 5px 14px; font-size: 13px; }
.btn-block { display: block; width: 100%; }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: #fff2f0; }

/* ===== 区块 ===== */
.section { padding: 64px 0; }
.section-gray { background: var(--bg-gray); }
.section-title { font-size: 28px; text-align: center; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--text-2); margin-bottom: 36px; }
.section-tip { text-align: center; color: var(--text-3); font-size: 14px; margin-top: 26px; }

/* ===== 商品卡 ===== */
.goods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.goods-card { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 26px 22px; background: #fff; transition: box-shadow .2s, transform .2s; }
.goods-card:hover { box-shadow: 0 8px 28px rgba(22, 119, 255, .12); transform: translateY(-3px); }
.goods-card h3 { font-size: 17px; margin-bottom: 12px; }
.goods-badge { position: absolute; top: -1px; right: 16px; background: var(--red); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 0 0 6px 6px; }
.goods-price { margin-bottom: 10px; }
.goods-price .price { font-size: 28px; font-weight: 700; color: var(--red); }
.goods-price .original-price { font-size: 14px; color: var(--text-3); text-decoration: line-through; margin-left: 8px; }
.goods-desc { font-size: 14px; color: var(--text-2); min-height: 44px; margin-bottom: 8px; }
.goods-meta { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }

/* ===== 功能卡 ===== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.feature-card { display: block; border: 1px solid var(--border); border-radius: 12px; padding: 22px 20px; background: #fff; color: var(--text); transition: box-shadow .2s; }
.feature-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); color: var(--text); }
.feature-icon { font-size: 30px; margin-bottom: 10px; }
.feature-card h3 { font-size: 16px; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.feature-more { font-size: 13px; color: var(--primary); }

/* ===== 为什么选择 ===== */
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.why-card { border: 1px solid var(--border); border-radius: 12px; padding: 24px; text-align: center; }
.why-icon { font-size: 34px; margin-bottom: 10px; }
.why-card h3 { font-size: 17px; margin-bottom: 6px; }
.why-card p { font-size: 14px; color: var(--text-2); }

/* ===== 教程 ===== */
.tutorial-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tutorial-item { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; color: var(--text); }
.tutorial-item:hover { border-color: var(--primary); color: var(--primary); }
.tutorial-arrow { color: var(--text-3); }

/* ===== FAQ ===== */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; background: #fff; }
.faq-item summary { padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none; position: relative; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; color: var(--text-3); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 20px 16px; color: var(--text-2); font-size: 14px; }

/* ===== 详情页 ===== */
.detail-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
.detail-main h1 { font-size: 26px; margin-bottom: 14px; }
.detail-price { margin-bottom: 20px; }
.detail-desc { border-top: 1px solid var(--border); padding-top: 20px; margin-bottom: 26px; }
.detail-desc h3, .order-box h3 { font-size: 17px; margin-bottom: 10px; }
.detail-points { list-style: none; margin-top: 12px; }
.detail-points li { padding: 6px 0 6px 22px; position: relative; color: var(--text-2); font-size: 14px; }
.detail-points li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.order-box { background: var(--bg-gray); border-radius: 12px; padding: 24px; }
.order-tip { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.order-safe { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 12px; }
.side-card { border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.side-card h4 { margin-bottom: 12px; }
.side-goods { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); color: var(--text-2); font-size: 14px; }
.side-goods:last-child { border-bottom: none; }
.side-goods:hover { color: var(--primary); }
.side-price { color: var(--red); font-weight: 600; }
.side-text { font-size: 13px; color: var(--text-2); line-height: 1.8; }

/* ===== 表单 ===== */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text-2); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px; font-size: 15px; outline: none; transition: border-color .2s;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--primary); }
.form-error { color: var(--red); font-size: 14px; margin-bottom: 12px; }

/* ===== 面板 / 内容页 ===== */
.page-title { font-size: 28px; margin-bottom: 8px; }
.page-sub { color: var(--text-2); margin-bottom: 26px; }
.panel { border: 1px solid var(--border); border-radius: 12px; padding: 24px; background: #fff; }
.panel-title { font-size: 17px; margin-bottom: 14px; }
.panel-tips { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); font-size: 14px; color: var(--text-2); }
.panel-tips ul { padding-left: 20px; margin-top: 6px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.info-table td { padding: 11px 8px; border-bottom: 1px solid var(--border); }
.info-table tr:last-child td { border-bottom: none; }
.info-table td:first-child { color: var(--text-3); }
.prose p { margin-bottom: 14px; color: var(--text-2); }
.prose h3 { margin: 22px 0 10px; }
.prose ul { padding-left: 22px; margin-bottom: 14px; color: var(--text-2); }
.steps { padding-left: 22px; margin: 10px 0 16px; color: var(--text-2); }
.steps li { margin-bottom: 6px; }

/* ===== 卡密展示 ===== */
.card-display { background: #f6f9ff; border: 1px dashed var(--primary); border-radius: 10px; padding: 20px; text-align: center; margin: 18px 0; }
.card-label { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.card-value { font-size: 22px; font-weight: 700; letter-spacing: 1px; color: var(--primary); word-break: break-all; margin-bottom: 12px; }

/* ===== 支付结果页 ===== */
.result-card { border: 1px solid var(--border); border-radius: 14px; padding: 44px 30px; text-align: center; }
.result-card h2 { margin: 14px 0 10px; }
.result-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 32px; color: #fff; }
.result-icon.success { background: #52c41a; }
.result-icon.pending { background: #faad14; }
.result-icon.error { background: var(--red); }
.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.spinner { width: 44px; height: 44px; border: 4px solid #e3e8ef; border-top-color: var(--primary); border-radius: 50%; margin: 0 auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 页脚 ===== */
.site-footer { background: #1f2329; color: #b8bcc4; padding: 44px 0 26px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { color: #fff; margin-bottom: 14px; font-size: 15px; }
.footer-grid a { display: block; color: #b8bcc4; font-size: 14px; padding: 4px 0; }
.footer-grid a:hover { color: #fff; }
.footer-desc { font-size: 14px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid #343a42; padding-top: 20px; text-align: center; font-size: 13px; color: #8f959e; }
.footer-bottom a { color: #8f959e; }
.footer-bottom a:hover { color: #fff; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .detail-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .main-nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; border-bottom: 1px solid var(--border); padding: 8px 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 20px; border-top: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 44px 0; }
  .goods-price .price { font-size: 24px; }
  .card-value { font-size: 17px; }
}

/* ===== 支付方式选择 ===== */
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.pay-method { position: relative; display: block; cursor: pointer; }
.pay-method input { position: absolute; opacity: 0; width: 0; height: 0; }
.pay-method-inner {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 11px 13px; background: #fff; transition: border-color .18s, background .18s, box-shadow .18s;
}
.pay-method-inner:hover { border-color: #bed4ef; }
.pay-method input:checked + .pay-method-inner {
  border-color: var(--primary); background: #f5f9ff; box-shadow: 0 0 0 3px rgba(22, 119, 255, .08);
}
.pay-method input:focus-visible + .pay-method-inner { outline: 2px solid var(--primary); outline-offset: 2px; }
.pay-method-logo {
  width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.pay-method-alipay .pay-method-logo { background: #1677ff; }
.pay-method-wechat .pay-method-logo { background: #07c160; }
.pay-method-wechat input:checked + .pay-method-inner {
  border-color: #07c160; background: #f2fcf6; box-shadow: 0 0 0 3px rgba(7, 193, 96, .08);
}
.pay-method-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.pay-method-text b { font-size: 14px; }
.pay-method-text em { font-style: normal; font-size: 12px; color: var(--text-3); }

/* ===== 微信扫码支付页 ===== */
.wxpay-head h2 { margin: 12px 0 6px; font-size: 20px; }
.wxpay-logo {
  display: inline-flex; width: 52px; height: 52px; border-radius: 14px;
  background: #07c160; color: #fff; font-size: 24px; font-weight: 700;
  align-items: center; justify-content: center;
}
.wxpay-amount { color: var(--red); font-size: 16px; }
.wxpay-notice {
  background: #fffbe6; border: 1px solid #ffe58f; color: #ad6800;
  border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.7;
  margin: 16px 0 0; text-align: left;
}
.wxpay-qr-wrap { display: flex; justify-content: center; margin: 22px 0 14px; }
.wxpay-qr {
  width: 240px; height: 240px; padding: 10px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.wxpay-qr img { width: 100%; height: 100%; display: block; }
.wxpay-guide { font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.wxpay-guide b { color: var(--text); }
.wxpay-refresh { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.wxpay-status {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--text-2);
}
.wxpay-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #faad14; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.wxpay-error { padding-top: 4px; }

@media (max-width: 640px) {
  .pay-methods { grid-template-columns: 1fr; }
  .wxpay-qr { width: 210px; height: 210px; }
}
