:root {
  --primary: #ff5a1f;
  --primary2: #ff2d6f;
  --grad: linear-gradient(135deg, #ff7a18, #ff2d6f);
  --ink: #1f2329;
  --muted: #8a909a;
  --line: #ececf0;
  --bg: #fff7f3;
  --card: #ffffff;
  --shadow: 0 8px 24px rgba(255, 90, 31, 0.10);
  --shadow-hover: 0 16px 40px rgba(255, 45, 111, 0.18);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

.wrap { width: min(1140px, 92vw); margin: 0 auto; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.logo span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav-cta {
  background: var(--grad); color: #fff !important;
  padding: 8px 16px; border-radius: 999px; font-weight: 600;
  box-shadow: var(--shadow);
}

/* ---------- 主视觉 ---------- */
.hero {
  background: var(--grad);
  color: #fff;
  padding: 72px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.hero-inner { position: relative; z-index: 1; max-width: 640px; }
.hero-badge {
  display: inline-block; background: rgba(255,255,255,.2);
  padding: 6px 14px; border-radius: 999px; font-size: 14px; margin-bottom: 18px;
}
.hero h1 { font-size: 44px; line-height: 1.2; margin: 0 0 16px; font-weight: 800; }
.hero p { font-size: 17px; opacity: .92; margin: 0 0 28px; }
.hero-btn {
  display: inline-block; background: #fff; color: var(--primary);
  font-weight: 700; padding: 13px 28px; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15); transition: transform .2s;
}
.hero-btn:hover { transform: translateY(-2px); }

/* ---------- 工具栏 ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 36px 0 22px;
}
.cats { display: flex; flex-wrap: wrap; gap: 10px; }
.cat {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px;
  transition: all .2s;
}
.cat:hover { color: var(--ink); border-color: #ffd2c2; }
.cat.active {
  background: var(--grad); color: #fff; border-color: transparent; font-weight: 600;
  box-shadow: var(--shadow);
}
.search input {
  width: 260px; max-width: 100%;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-size: 14px; outline: none; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.search input:focus { border-color: var(--primary); box-shadow: var(--shadow); }

/* ---------- 产品网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding-bottom: 40px;
}
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-img {
  position: relative; aspect-ratio: 1 / 1; display: flex;
  align-items: center; justify-content: center; font-size: 90px;
  background: var(--grad);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute; left: 12px; top: 12px;
  background: #fff; color: var(--primary2); font-weight: 700;
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card-name { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.card-short { font-size: 13px; color: var(--muted); margin: 0 0 12px; flex: 1; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { color: var(--primary2); font-size: 20px; font-weight: 800; }
.orig { color: var(--muted); font-size: 13px; text-decoration: line-through; }
.card-btn {
  margin-top: 12px; text-align: center; background: var(--grad); color: #fff;
  font-weight: 600; padding: 9px; border-radius: 10px; font-size: 14px;
}

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- 详情弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,20,30,.55); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; background: #fff; border-radius: 20px; width: min(880px, 100%);
  max-height: 90vh; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.modal-close {
  position: absolute; right: 14px; top: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.9); font-size: 22px; line-height: 1; color: #555;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.m-gallery { background: var(--bg); display: flex; flex-direction: column; padding: 26px; gap: 12px; }
.m-main {
  aspect-ratio: 1/1; border-radius: 14px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 120px;
  background: var(--grad);
}
.m-main img { width: 100%; height: 100%; object-fit: cover; }
.m-thumbs { display: flex; gap: 8px; }
.m-thumb {
  width: 56px; height: 56px; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: var(--grad);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.m-thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-thumb.active { border-color: var(--primary); }

.m-info { padding: 26px; display: flex; flex-direction: column; }
.m-tag { font-size: 13px; color: var(--primary); font-weight: 600; }
.m-name { font-size: 24px; font-weight: 800; margin: 6px 0 10px; }
.m-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.m-price { color: var(--primary2); font-size: 28px; font-weight: 800; }
.m-orig { color: var(--muted); text-decoration: line-through; }
.m-desc { font-size: 14px; color: #555; margin: 0 0 16px; }
.m-specs { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.m-specs td { padding: 8px 10px; font-size: 13px; border-bottom: 1px solid var(--line); }
.m-specs td:first-child { color: var(--muted); width: 90px; }
.buy-title { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.buy-links { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.buy-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 15px;
  padding: 13px; border-radius: 12px; box-shadow: var(--shadow);
  transition: transform .15s;
}
.buy-btn:hover { transform: translateY(-2px); }
.buy-btn.alt { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }

/* ---------- 页脚 ---------- */
.site-footer { background: #1f2329; color: #cfd3da; padding: 40px 0; margin-top: 30px; text-align: center; }
.foot-logo { font-size: 20px; font-weight: 800; margin: 0 0 6px; color: #fff; }
.foot-logo span { color: var(--primary); }
.foot-note { font-size: 14px; margin: 0 0 10px; }
.foot-copy { font-size: 12px; color: #6b7280; margin: 0; }

/* ---------- 关于我们 / 联系我们 ---------- */
section[id], main[id] { scroll-margin-top: 76px; }
.about { background: #fff; padding: 56px 0; }
.sec-title { text-align: center; font-size: 28px; font-weight: 800; margin: 0 0 16px; }
.about-text { text-align: center; color: #555; max-width: 720px; margin: 0 auto 32px; }
.about-cards { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.about-card {
  background: var(--bg); border-radius: 14px; padding: 22px 28px;
  text-align: center; min-width: 150px; box-shadow: var(--shadow);
}
.ac-num {
  font-size: 28px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ac-label { font-size: 14px; color: var(--muted); margin-top: 4px; }

.contact { background: var(--bg); padding: 56px 0; }
.contact-text { text-align: center; color: #555; max-width: 640px; margin: 0 auto 24px; }
.contact-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; max-width: 520px; margin: 0 auto; }
.contact-meta { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .hero h1 { font-size: 32px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search input { width: 100%; }
  .modal-body { grid-template-columns: 1fr; }
  .nav a:not(.nav-cta) { display: none; }
}
