/* =========================================================
   清风智库 · Qingfeng Think Tank
   共享样式表 — 清新智库绿主题 / Light 主题
   ========================================================= */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #f5f9f7;
  --bg-soft: #eef5f2;
  --surface: #ffffff;
  --surface-2: #f8fbfa;
  --ink: #16241f;
  --ink-soft: #2c3b35;
  --muted: #5e7068;
  --line: #e2ece8;
  --line-strong: #cfe0d9;

  --accent: #138a72;
  --accent-2: #19a487;
  --accent-deep: #0e6b58;
  --accent-soft: #e6f4ef;
  --gold: #c9942f;
  --gold-soft: #faf2df;

  --shadow-sm: 0 2px 8px -4px rgba(16, 80, 66, .14);
  --shadow: 0 14px 38px -16px rgba(16, 80, 66, .22);
  --shadow-lg: 0 26px 60px -22px rgba(16, 80, 66, .30);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --font-serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", Georgia, serif;
  --font-sans: "Noto Sans SC", system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;

  --maxw: 1180px;
  --nav-h: 68px;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.25; color: var(--ink); margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- 布局容器 ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-serif); font-weight: 700; color: var(--ink); font-size: 1.18rem; letter-spacing: .5px; }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-deep));
  display: grid; place-items: center; color: #fff; font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.brand .logo svg { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 14px; border-radius: 10px; color: var(--ink-soft);
  font-size: .96rem; font-weight: 500; transition: background .18s, color .18s;
}
.nav-links a:hover { background: var(--accent-soft); color: var(--accent-deep); text-decoration: none; }
.nav-links a.active { color: var(--accent-deep); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
  padding: 9px 14px; border-radius: 11px; cursor: pointer; font-size: .92rem; font-weight: 600;
  transition: border-color .18s, transform .18s;
}
.cart-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.cart-count {
  position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 0 0 2px #fff;
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-size: .98rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: transform .16s, box-shadow .18s, background .18s;
  font-family: var(--font-sans);
}
.btn-primary { background: linear-gradient(135deg, var(--accent-2), var(--accent-deep)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--accent-deep); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: .9rem; border-radius: 10px; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-deep);
}
.tag { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: .78rem; background: var(--bg-soft); color: var(--muted); }
.tag-hot { background: #fdecec; color: #c0392b; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 90px 0 70px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 60% at 85% 10%, rgba(25,164,135,.16), transparent 60%),
    radial-gradient(50% 50% at 5% 90%, rgba(19,138,114,.14), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: .5px; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.hero-stats .stat .num { font-family: var(--font-serif); font-size: 1.9rem; font-weight: 700; color: var(--accent-deep); }
.hero-stats .stat .lbl { font-size: .88rem; color: var(--muted); }

.hero-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow); position: relative;
}
.hero-card h3 { margin-top: 4px; }
.hero-card .price { font-family: var(--font-serif); font-size: 2rem; color: var(--gold); font-weight: 700; }
.hero-card ul { display: grid; gap: 10px; margin: 14px 0 22px; }
.hero-card li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: .95rem; }
.hero-card li svg { flex: none; margin-top: 4px; color: var(--accent); }

/* ---------- 区块标题 ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 2px; font-size: .82rem; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head p { color: var(--muted); }

/* ---------- 特性卡片 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.feature .ic {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-deep); margin-bottom: 16px;
}
.feature .ic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }

/* ---------- 文章卡片 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-cover { height: 168px; position: relative; display: grid; place-items: center; color: #fff; }
.post-cover .cat { position: absolute; top: 14px; left: 14px; }
.post-cover h4 { position: absolute; bottom: 14px; left: 16px; right: 16px; color: #fff; font-size: 1.05rem; margin: 0; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.post-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-body .meta { font-size: .82rem; color: var(--muted); display: flex; gap: 12px; }
.post-body p { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.post-body .read { font-weight: 600; color: var(--accent-deep); font-size: .9rem; }

/* ---------- 资料超市 ---------- */
.mkt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
  padding: 9px 16px; border-radius: 999px; cursor: pointer; font-size: .92rem; font-weight: 600; transition: .18s;
}
.tab:hover { border-color: var(--accent); color: var(--accent-deep); }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mkt-search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.mkt-search input {
  width: 100%; padding: 11px 14px 11px 40px; border: 1px solid var(--line-strong);
  border-radius: 12px; font-size: .95rem; font-family: var(--font-sans); background: var(--surface); color: var(--ink);
}
.mkt-search input:focus { outline: none; border-color: var(--accent); }
.mkt-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-thumb { height: 150px; display: grid; place-items: center; color: #fff; font-size: 2.4rem; position: relative; }
.product-thumb .kind { position: absolute; top: 12px; left: 12px; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-body h3 { font-size: 1.08rem; margin: 0; }
.product-body .desc { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.product-meta { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; color: var(--muted); }
.product-price { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.product-price .now { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.product-price .old { color: var(--muted); text-decoration: line-through; font-size: .9rem; }
.product-actions { display: flex; gap: 10px; margin-top: 10px; }
.product-actions .btn { flex: 1; }

/* 评分星星 */
.stars { color: var(--gold); letter-spacing: 1px; }

/* ---------- 购物车弹窗 ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(16,36,31,.42); z-index: 120;
  display: none; align-items: flex-end; justify-content: flex-end; padding: 18px;
}
.cart-overlay.open { display: flex; }
.cart-panel {
  background: var(--surface); width: 100%; max-width: 420px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart-head h3 { margin: 0; }
.cart-close { background: var(--bg-soft); border: 0; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 1.2rem; color: var(--muted); }
.cart-items { padding: 10px 20px; overflow-y: auto; flex: 1; display: grid; gap: 12px; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.cart-item { display: flex; gap: 12px; align-items: center; border-bottom: 1px dashed var(--line); padding-bottom: 12px; }
.cart-item .ci-thumb { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 1.4rem; flex: none; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-info h4 { font-size: .95rem; margin: 0 0 2px; font-family: var(--font-sans); }
.cart-item .ci-info .ci-price { color: var(--gold); font-weight: 700; font-size: .9rem; }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 1rem; line-height: 1; }
.cart-qty span { min-width: 20px; text-align: center; font-weight: 600; }
.cart-foot { padding: 18px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cart-total .amt { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 700; color: var(--gold); }

/* 提示 toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: .92rem;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: .3s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 关于页 ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-list { display: grid; gap: 14px; }
.about-list li { display: flex; gap: 12px; align-items: flex-start; }
.about-list .dot { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; flex: none; font-weight: 700; }
.quote-card { background: linear-gradient(135deg, var(--accent-deep), var(--accent-2)); color: #fff; border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.quote-card blockquote { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.5; margin: 0 0 14px; }
.quote-card cite { opacity: .85; font-style: normal; font-size: .92rem; }

/* ---------- 文章详情 ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article .cover { height: 220px; border-radius: var(--radius-lg); display: grid; place-items: center; color: #fff; font-size: 3rem; margin-bottom: 26px; }
.article .meta { color: var(--muted); font-size: .9rem; display: flex; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.article h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.article h2 { font-size: 1.5rem; margin-top: 1.6em; }
.article p, .article li { color: var(--ink-soft); font-size: 1.05rem; }
.article blockquote { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 1.4em 0; color: var(--ink-soft); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-deep); font-weight: 600; margin-bottom: 18px; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0f211c; color: #cfe0d9; padding: 56px 0 26px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; font-family: var(--font-sans); }
.site-footer a { color: #b9cdc5; font-size: .92rem; display: block; padding: 4px 0; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-brand p { color: #9fb6ad; font-size: .92rem; max-width: 30ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #8fa89f; font-size: .85rem; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .feature-grid, .card-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--surface);
    flex-direction: column; align-items: stretch; padding: 12px 18px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .feature-grid, .card-grid, .product-grid, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 56px 0 40px; }
  .mkt-search { max-width: none; }
}
