:root {
  --bg: #f4f7fc;
  --bg-soft: #eaf0f8;
  --card: #ffffff;
  --line: rgba(15, 23, 42, 0.09);
  --text: #0f172a;
  --muted: #5d6b82;
  --gold: #d97706;
  --gold-bright: #f5b821;
  --cyan: #0891b2;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ===== 导航 ===== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px; margin: auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 32px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.logo-mark { width: 34px; height: 34px; display: block; }
.logo-text em { display: block; font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; color: var(--muted); }
.nav-links a:hover { color: var(--gold); }
.cart-btn {
  position: relative; font-size: 18px; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.cart-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--gold-bright); color: #1a1200; font-size: 12px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 5px;
}

/* ===== Hero ===== */
.hero { position: relative; min-height: 92vh; display: grid; place-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 18% 28%, rgba(245, 184, 33, 0.22), transparent 60%),
    radial-gradient(720px 520px at 82% 72%, rgba(8, 145, 178, 0.16), transparent 60%),
    radial-gradient(500px 380px at 60% 15%, rgba(8, 145, 178, 0.08), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(15, 23, 42, 0.045) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(15, 23, 42, 0.045) 39px 40px);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: scale(1.06) translateY(-12px); } }
.hero-content { position: relative; text-align: center; padding: 120px 24px 60px; }
.hero-tag { color: var(--cyan); letter-spacing: 6px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-size: clamp(44px, 8vw, 88px); line-height: 1.15; font-weight: 800; }
.grad {
  background: linear-gradient(100deg, var(--gold), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); margin: 20px 0 34px; font-size: 17px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }
.btn {
  padding: 13px 32px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s; display: inline-block;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(100deg, var(--gold-bright), #ff9d2e); color: #1a1200; box-shadow: 0 10px 30px rgba(245, 184, 33, 0.4); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: rgba(255, 255, 255, 0.7); }
.btn-block { width: 100%; }
.hero-stats { display: flex; gap: 56px; justify-content: center; margin-top: 64px; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 30px; color: var(--gold); }
.hero-stats span { color: var(--muted); font-size: 13px; }

/* ===== 实力条 ===== */
.features {
  max-width: 1200px; margin: -30px auto 0; padding: 0 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
  position: relative; z-index: 2;
}
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
  text-align: center;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(217, 119, 6, 0.45); }
.feature i { font-style: normal; font-size: 70px; display: block; line-height: 1.15; }
.feature h3 { margin: 10px 0 6px; font-size: 16px; }
.feature p { color: var(--muted); font-size: 13px; }

/* ===== 商品区 ===== */
.products { max-width: 1200px; margin: auto; padding: 90px 24px 40px; }
.section-title { font-size: 32px; font-weight: 800; margin-bottom: 26px; }
.section-title span { color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 3px; margin-left: 12px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filter {
  padding: 8px 20px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-size: 14px; background: #fff; transition: all 0.2s;
}
.filter.active, .filter:hover { border-color: var(--gold); color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-img {
  height: 190px;
  background: linear-gradient(140deg, #eef3fa, #e2eaf5);
  position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--gold-bright); color: #1a1200; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 6px;
}
.card-body { padding: 18px; }
.card-cat { color: var(--cyan); font-size: 12px; letter-spacing: 2px; font-weight: 600; }
.card-name { font-size: 17px; font-weight: 700; margin: 6px 0 4px; }
.card-desc { color: var(--muted); font-size: 13px; height: 40px; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.price { color: var(--gold); font-size: 20px; font-weight: 800; }
.price s { color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 6px; }
.add-btn {
  background: rgba(217, 119, 6, 0.08); color: var(--gold);
  border: 1px solid rgba(217, 119, 6, 0.35);
  padding: 7px 16px; border-radius: 999px; font-size: 13px; transition: all 0.2s;
}
.add-btn:hover { background: var(--gold-bright); color: #1a1200; border-color: var(--gold-bright); }

/* ===== 关于 / 页脚 ===== */
.about { padding: 90px 24px; background: var(--bg-soft); border-block: 1px solid var(--line); }
.about-inner { max-width: 760px; margin: auto; text-align: center; }
.about-inner p { color: var(--muted); margin-top: 18px; }
.footer { text-align: center; padding: 34px; color: var(--muted); font-size: 13px; }

/* ===== 弹窗 ===== */
.modal[hidden], .drawer-mask[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
}
.modal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  max-width: 640px; width: 100%; max-height: 86vh; overflow: auto;
  position: relative; padding: 30px; box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: 14px; right: 16px; font-size: 16px;
  color: var(--muted); width: 34px; height: 34px; border-radius: 50%;
}
.modal-close:hover { background: rgba(15, 23, 42, 0.06); color: var(--text); }
.modal-body .m-img img { width: 100%; max-height: 340px; object-fit: cover; border-radius: 12px; display: block; }
.modal-body h3 { font-size: 24px; }
.m-specs { margin: 18px 0; display: grid; gap: 8px; }
.m-specs li { list-style: none; color: var(--muted); font-size: 14px; padding-left: 18px; position: relative; }
.m-specs li::before { content: "▸"; color: var(--gold); position: absolute; left: 0; }

/* ===== 购物车抽屉 ===== */
.drawer-mask { position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, 0.35); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(400px, 92vw); background: #fff;
  border-left: 1px solid var(--line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s ease;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); }
.drawer-items { flex: 1; overflow: auto; padding: 16px 20px; display: grid; gap: 14px; align-content: start; }
.cart-empty { color: var(--muted); text-align: center; padding: 60px 0; }
.cart-item { display: flex; gap: 12px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cart-item .ci-img img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; display: block; }
.cart-item .ci-info { flex: 1; }
.cart-item .ci-name { font-size: 14px; font-weight: 600; }
.cart-item .ci-price { color: var(--gold); font-size: 14px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #fff; }
.qty button:hover { color: var(--gold); border-color: var(--gold); }
.drawer-foot { padding: 20px; border-top: 1px solid var(--line); }
.total { display: flex; justify-content: space-between; margin-bottom: 14px; color: var(--muted); }
.total strong { color: var(--gold); font-size: 22px; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 80px);
  background: #0f172a; color: #fff; font-weight: 600;
  padding: 13px 28px; border-radius: 999px; z-index: 100;
  opacity: 0; transition: all 0.35s ease; pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero-stats { gap: 28px; }
}
