/* ============================================================
   VOLT — 电子设备商店样品站
   纯静态，无依赖，无外部资源
   ============================================================ */

:root {
  --ink: #0d1117;
  --ink-2: #414a56;
  --ink-3: #6b7482;
  --line: #e6e9ef;
  --line-2: #d5dae3;
  --bg: #ffffff;
  --bg-2: #f6f7f9;
  --accent: #2f6bff;
  --accent-2: #00c2a8;
  --danger: #e5484d;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(13, 17, 23, .05);
  --shadow: 0 8px 24px rgba(13, 17, 23, .07);
  --shadow-lg: 0 24px 60px rgba(13, 17, 23, .12);
  --max: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------------- 页眉 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 30px; height: 70px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.4px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #7a5cff);
  display: grid; place-items: center; color: #fff;
  font-size: 17px; font-weight: 900; letter-spacing: -.5px;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .32);
}
.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 15px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); font-weight: 650; }

.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff;
  font-size: 14.5px; font-weight: 650; color: var(--ink);
  transition: .16s;
}
.cart-btn:hover { border-color: var(--ink-3); text-decoration: none; }
.cart-count {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 11.5px; font-weight: 800; line-height: 19px; text-align: center;
}
.cart-count[data-empty="1"] { background: var(--line-2); color: var(--ink-3); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 11px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 650; transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: 0 10px 24px rgba(13, 17, 23, .18);
}
.btn-primary:hover { background: #1b2230; border-color: #1b2230; color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(47,107,255,.28); }
.btn-accent:hover { background: #1f57e0; border-color: #1f57e0; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(70% 90% at 78% 8%, rgba(47, 107, 255, .14) 0%, rgba(47, 107, 255, 0) 62%),
              radial-gradient(50% 70% at 12% 90%, rgba(0, 194, 168, .12) 0%, rgba(0, 194, 168, 0) 65%),
              var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
  padding: 84px 0 92px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 650; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }
.hero h1 {
  margin: 20px 0 16px; font-size: 56px; line-height: 1.06;
  letter-spacing: -1.8px; font-weight: 820;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lede { margin: 0 0 30px; font-size: 17.5px; color: var(--ink-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; gap: 30px; margin-top: 38px; flex-wrap: wrap; }
.hero-meta div b { display: block; font-size: 22px; letter-spacing: -.6px; }
.hero-meta div span { font-size: 13px; color: var(--ink-3); }

.hero-art {
  position: relative; border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, #10151f 0%, #1c2433 100%);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.4;
  display: grid; place-items: center;
}
.hero-art svg { width: 74%; height: auto; }

/* ---------------- 通用区块 ---------------- */
section.band { padding: 76px 0; }
section.band.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: 33px; letter-spacing: -1px; font-weight: 800; }
.sec-head p { margin: 8px 0 0; color: var(--ink-3); font-size: 15.5px; }

/* ---------------- 分类 ---------------- */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
  transition: .16s; text-align: center;
}
.cat:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.cat svg { width: 34px; height: 34px; color: var(--accent); }
.cat span { font-size: 14px; font-weight: 650; }

/* ---------------- 商品卡 ---------------- */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; transition: .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card-art {
  position: relative; aspect-ratio: 4 / 3;
  background: linear-gradient(150deg, #f1f4f9, #e6ebf4);
  display: grid; place-items: center; overflow: hidden;
}
.card-art svg { width: 58%; height: auto; }
.badge {
  position: absolute; top: 11px; left: 11px;
  padding: 4px 9px; border-radius: 7px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
  background: var(--ink); color: #fff;
}
.badge.new { background: var(--accent-2); color: #04261f; }
.badge.sale { background: var(--danger); }
.card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-body h3 { margin: 0; font-size: 15.5px; letter-spacing: -.2px; }
.card-body .sub { font-size: 12.5px; color: var(--ink-3); }
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.price s { font-size: 12.5px; font-weight: 500; color: var(--ink-3); margin-left: 5px; }

/* ---------------- 特性 ---------------- */
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat {
  padding: 26px 24px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff;
}
.feat .ico {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(47, 107, 255, .10); color: var(--accent); margin-bottom: 15px;
}
.feat .ico svg { width: 21px; height: 21px; }
.feat h3 { margin: 0 0 7px; font-size: 16.5px; letter-spacing: -.2px; }
.feat p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------------- 商品详情 ---------------- */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; padding: 52px 0 20px; align-items: start; }
.pd-art {
  border-radius: 20px; aspect-ratio: 1 / 1; display: grid; place-items: center;
  background: linear-gradient(150deg, #f1f4f9, #e2e8f3); border: 1px solid var(--line);
}
.pd-art svg { width: 62%; }
.pd h1 { margin: 10px 0 10px; font-size: 36px; letter-spacing: -1.1px; font-weight: 800; }
.pd .pd-price { font-size: 30px; font-weight: 820; letter-spacing: -.8px; margin: 16px 0 4px; }
.pd .pd-price s { font-size: 16px; font-weight: 500; color: var(--ink-3); margin-left: 8px; }
.pd .pd-desc { color: var(--ink-2); font-size: 15.5px; margin: 14px 0 22px; }
.pd-actions { display: flex; gap: 12px; margin: 22px 0 26px; flex-wrap: wrap; }
.specs { border-top: 1px solid var(--line); margin-top: 6px; }
.specs div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.specs dt { color: var(--ink-3); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------------- 购物车 ---------------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr .9fr; gap: 34px; padding: 46px 0 80px; align-items: start; }
.cart-row {
  display: grid; grid-template-columns: 92px 1fr auto auto; gap: 16px; align-items: center;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; margin-bottom: 12px;
}
.cart-row .thumb {
  width: 92px; height: 76px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(150deg, #f1f4f9, #e6ebf4);
}
.cart-row .thumb svg { width: 62%; }
.cart-row h4 { margin: 0 0 3px; font-size: 15px; }
.cart-row .sub { font-size: 12.5px; color: var(--ink-3); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.qty button { width: 32px; height: 32px; border: 0; background: #fff; font-size: 16px; color: var(--ink-2); }
.qty button:hover { background: var(--bg-2); }
.qty span { min-width: 34px; text-align: center; font-size: 14px; font-weight: 700; }
.link-danger { border: 0; background: none; color: var(--ink-3); font-size: 13px; text-decoration: underline; }
.link-danger:hover { color: var(--danger); }

.summary {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: #fff; position: sticky; top: 92px;
}
.summary h3 { margin: 0 0 16px; font-size: 17px; }
.summary .line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14.5px; color: var(--ink-2); }
.summary .total { display: flex; justify-content: space-between; padding: 15px 0 4px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 800; }
.empty { text-align: center; padding: 70px 20px; color: var(--ink-3); }
.empty svg { width: 54px; height: 54px; margin: 0 auto 16px; color: var(--line-2); }

/* ---------------- 页脚 ---------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 34px; }
.foot-cols { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot-cols h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--ink-3); }
.foot-cols a { display: block; margin-bottom: 8px; font-size: 14.5px; color: var(--ink-2); }
.foot-cols a:hover { color: var(--ink); }
.foot-brand p { margin: 12px 0 0; font-size: 14px; color: var(--ink-3); max-width: 34ch; }
.foot-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 11px;
  font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: .22s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 0 64px; }
  .hero h1 { font-size: 42px; }
  .grid-products { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .feats { grid-template-columns: 1fr; }
  .pd { grid-template-columns: 1fr; gap: 30px; }
  .cart-layout { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .hero h1 { font-size: 34px; letter-spacing: -1px; }
  .grid-products { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .cart-row { grid-template-columns: 70px 1fr; row-gap: 10px; }
  .cart-row .thumb { width: 70px; height: 60px; }
  .sec-head h2 { font-size: 26px; }
}
