/* =========================================================
   独立站模板 · CapBlast 风格单品落地页
   纯本地静态：改 script.js 顶部的 CONFIG 即可换成自己的产品
   ========================================================= */
:root {
  --ink: #141414;
  --muted: #5f5f5f;
  --line: #e6e6e6;
  --bg: #ffffff;
  --soft: #f6f6f4;
  --accent: #e63329;      /* 主色（按钮/徽章） */
  --accent-dark: #c22a20;
  --gold: #f5a623;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- 公告栏 ---------- */
.announce {
  background: var(--ink); color: #fff; text-align: center;
  font-size: 13px; letter-spacing: .4px; padding: 9px 16px;
}
.announce b { color: var(--gold); }

/* ---------- 导航 ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.logo span { background: linear-gradient(90deg, var(--accent), #f5a623); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { flex: 1; display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.cart-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; position: relative; }
.cart-btn:hover { border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 44px; padding-bottom: 40px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero-media .media-main {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: var(--soft); display: flex; align-items: center; justify-content: center; min-height: 420px;
}
.media-main img, .media-main svg { width: 100%; height: auto; }
.media-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.media-thumbs .thumb {
  width: 74px; height: 74px; border-radius: 12px; border: 2px solid var(--line);
  overflow: hidden; background: var(--soft); cursor: pointer; opacity: .75; transition: all .15s;
}
.media-thumbs .thumb.active { border-color: var(--accent); opacity: 1; }

.hero-info .eyebrow { font-size: 12px; letter-spacing: 3px; color: var(--accent); font-weight: 700; text-transform: uppercase; }
.hero-info h1 { font-size: 40px; line-height: 1.15; margin: 8px 0 10px; letter-spacing: -.5px; }
@media (max-width: 560px) { .hero-info h1 { font-size: 30px; } }
.rating { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.rating .stars { color: var(--gold); font-size: 16px; letter-spacing: 2px; }
.price-row { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 4px; }
.price { font-size: 32px; font-weight: 800; }
.compare { font-size: 17px; color: var(--muted); text-decoration: line-through; }
.save-badge { background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.urgency { font-size: 12.5px; color: var(--accent); margin-top: 6px; font-weight: 600; }
.desc { font-size: 15px; color: var(--muted); margin: 12px 0 16px; }
.benefits { list-style: none; margin-bottom: 18px; }
.benefits li { display: flex; gap: 10px; font-size: 14px; padding: 5px 0; }
.benefits li::before { content: "✓"; color: var(--accent); font-weight: 800; }

.bundle { display: flex; gap: 10px; margin-bottom: 18px; }
.bundle .opt {
  flex: 1; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fff; text-align: left; transition: all .15s;
}
.bundle .opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(230,51,41,.12); }
.bundle .opt small { display: block; color: var(--muted); font-size: 12px; }
.bundle .opt b { font-size: 16px; }
.bundle .opt .tag { color: var(--accent); font-weight: 700; font-size: 12px; }

.cta {
  width: 100%; border: none; border-radius: 14px; padding: 17px; font-size: 17px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 26px rgba(230,51,41,.3); transition: all .18s; letter-spacing: .5px;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(230,51,41,.4); }
.cta:active { transform: translateY(0); }
.cta.big { font-size: 20px; padding: 20px; max-width: 380px; margin: 18px auto 0; display: block; }
.cta.small { width: auto; padding: 10px 24px; font-size: 14px; border-radius: 10px; box-shadow: none; }

.payment { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.payment .pay {
  font-size: 11px; font-weight: 700; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 9px; color: #555; background: #fff; letter-spacing: .3px;
}
.payment .pay.card { padding: 5px 10px; }

.trust-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.trust-row span::before { content: "✔ "; color: var(--accent); font-weight: 800; }
.shipping-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ---------- USP 滚动条 ---------- */
.ticker {
  background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap; padding: 12px 0;
}
.ticker span { display: inline-block; margin: 0 34px; font-size: 13px; font-weight: 600; }
.ticker span::before { content: "★ "; color: var(--gold); }

/* ---------- 卖点卡片 ---------- */
.section { padding: 56px 0; }
.section-title { font-size: 26px; text-align: center; margin-bottom: 30px; letter-spacing: -.3px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.cards .card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px;
  background: #fff; box-shadow: var(--shadow); transition: all .18s;
}
.cards .card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.cards .card .ico { font-size: 30px; margin-bottom: 12px; }
.cards .card h3 { font-size: 17px; margin-bottom: 8px; }
.cards .card p { font-size: 13.5px; color: var(--muted); }

/* ---------- 评价 ---------- */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.review-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px;
  background: #fff; box-shadow: var(--shadow);
}
.review-card .r-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-card .ava {
  width: 38px; height: 38px; border-radius: 50%; background: var(--soft);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--accent);
}
.review-card .stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.review-card h4 { font-size: 14px; margin: 4px 0 6px; }
.review-card p { font-size: 13px; color: var(--muted); }
.review-card .r-meta { margin-top: 10px; font-size: 11.5px; color: #999; display: flex; justify-content: space-between; }

/* ---------- 保障 ---------- */
.promise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .promise-grid { grid-template-columns: 1fr; } }
.promise-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; background: var(--soft); }
.promise-card.accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.promise-card h3 { font-size: 19px; margin-bottom: 10px; }
.promise-card p { font-size: 14px; opacity: .9; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.faq-item .q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #fff; border: none; padding: 16px 18px; font-size: 15px; font-weight: 700; text-align: left;
}
.faq-item .q .arrow { transition: transform .2s; color: var(--muted); }
.faq-item.open .q .arrow { transform: rotate(180deg); }
.faq-item .a { display: none; padding: 0 18px 16px; font-size: 14px; color: var(--muted); }
.faq-item.open .a { display: block; }

/* ---------- 评论区 ---------- */
.comments { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.comment { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; }
.comment .c-head { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #999; margin-bottom: 6px; }
.comment p { font-size: 14px; }
.comment .c-like { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

/* ---------- 最终 CTA ---------- */
.final-cta { text-align: center; padding: 60px 0 70px; }
.final-cta h2 { font-size: 30px; margin-bottom: 10px; }
.final-cta p { color: var(--muted); font-size: 15px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 20px; text-align: center; font-size: 12.5px; color: #999; }

/* ---------- 浮动加购条 ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 12px 20px;
  transform: translateY(110%); transition: transform .25s;
}
.sticky-bar.show { transform: translateY(0); }
.sticky-bar .sticky-name { font-weight: 700; font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-bar .sticky-price { font-size: 16px; font-weight: 800; color: var(--accent); }
.sticky-bar .cta { flex-shrink: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: var(--ink); color: #fff; font-size: 14px; padding: 12px 22px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 80; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 购物车抽屉 ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.cart-overlay.show { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw; z-index: 95;
  background: #fff; box-shadow: -18px 0 50px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.cart-drawer.open { transform: translateX(0); }
.cd-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.cd-head h3 { font-size: 17px; }
.cd-close { border: none; background: none; font-size: 18px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.cd-close:hover { background: var(--soft); color: var(--ink); }
.cd-items { flex: 1; overflow-y: auto; padding: 14px 20px; }
.cd-empty { text-align: center; color: var(--muted); font-size: 14px; padding: 50px 0; }
.cd-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.cd-name { flex: 1; font-weight: 700; }
.cd-name small { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }
.cd-qty { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.cd-qty button { border: none; background: none; font-size: 15px; width: 22px; height: 22px; border-radius: 6px; }
.cd-qty button:hover { background: var(--soft); }
.cd-line { font-weight: 700; min-width: 64px; text-align: right; }
.cd-del { border: none; background: none; color: #bbb; font-size: 13px; padding: 4px; }
.cd-del:hover { color: var(--accent); }
.cd-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.cd-subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin-bottom: 12px; }
.cd-subtotal b { font-size: 22px; font-weight: 800; }
.cd-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; }

/* ---------- 语言切换 ---------- */
.lang-toggle {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 700; letter-spacing: .5px;
  transition: all .15s;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }
