/* 京东消费决策中心 · 首页极简样式（对齐 v8b 视觉稿）
   仅首页引入，不影响其他页（其他页仍用商城皮肤 + site.css）。 */

@font-face {
  font-family: "OswaldNum";
  src: url("/fonts/oswald-num.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #e2231a;
  --red-text: #e1251b;
  --link: #0c82f7;
  --ink: #1a1a1a;
  --ink-2: #505259;
  --ink-3: #8b8b94;
  --line: rgba(17, 20, 26, .07);
  --line-strong: rgba(17, 20, 26, .16);
  --soft: #f7f7f7;
  --soft-hover: #f1f1f1;
  --surface: #ffffff;
  --shell: 1180px;
  --f-24: 24px;
  --f-18: 18px;
  --f-16: 16px;
  --f-14: 14px;
  --f-13: 13px;
  --f-12: 12px;
  --f-11: 11px;
  --f-10: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--f-14);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
/* sticky footer：整页至少占满视口高度，main 撑开中间区，页尾始终贴底（无文章时也不飘空）。 */
.geo-home, .geo-article { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.geo-home > main, .geo-article > main { flex: 1 0 auto; }
.geo-home > .site-footer, .geo-article > .site-footer { flex-shrink: 0; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); overflow: hidden; }

/* ===== 顶栏：毛玻璃 sticky，logo 左 | tabs 居中 | 搜索右 ===== */
.site-header {
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 0.5px 0 rgba(17, 20, 26, .06);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.header-inner { position: relative; height: 100%; display: flex; align-items: center; gap: 48px; }
.brand { height: 32px; display: inline-flex; align-items: center; white-space: nowrap; color: var(--ink); }
.brand-logo { height: 28px; width: auto; display: block; }

.tab-nav { position: absolute; left: 50%; transform: translateX(-50%); height: 100%; display: flex; align-items: center; gap: 8px; }
.tab-nav .tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 100%; padding: 0 14px; color: var(--ink-3); font-size: var(--f-14); line-height: 1; white-space: nowrap; transition: color .16s ease; }
.tab-nav .tab .tab-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: 1; }
.tab-nav .tab:hover { color: var(--ink); }
.tab-nav .tab.active { color: var(--ink); font-weight: 600; }
.tab-nav .tab.active .tab-ic { stroke-width: 1.9; }

.header-actions { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.hsearch { display: flex; align-items: center; height: 38px; padding: 0 10px; border-radius: 999px; background: transparent; transition: background .25s ease; }
.hsearch-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.hsearch-input { width: 0; padding: 0; border: 0; margin-left: 0; background: transparent; font-size: var(--f-13); color: var(--ink); outline: none; transition: width .3s ease, margin-left .3s ease; }
.hsearch-input::-webkit-search-cancel-button, .hsearch-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.hsearch:hover, .hsearch:focus-within { background: var(--soft); }
.hsearch:hover .hsearch-input, .hsearch:focus-within .hsearch-input { width: 150px; margin-left: 8px; }
/* 搜索结果页：有搜索词时常驻展开并回显（无需 hover） */
.hsearch.is-expanded { background: var(--soft); }
.hsearch.is-expanded .hsearch-input { width: 150px; margin-left: 8px; }

.mobile-menu { display: none; margin-left: auto; position: relative; }
.mobile-menu summary { list-style: none; cursor: pointer; color: var(--ink); font-size: var(--f-13); font-weight: 600; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu nav { width: 160px; position: absolute; top: 36px; right: 0; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, .95); box-shadow: 0 16px 40px rgba(17, 20, 26, .10); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); z-index: 30; }
.mobile-menu nav a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--ink); }
.mobile-menu nav a:hover { background: var(--soft); }

/* ===== 二级品类栏（独立一行、胶囊、居中，可横向滚动） ===== */
.cat-bar { background: #fff; }
.cat-bar-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 24px; padding-bottom: 8px; }
.cat-chip { flex: none; display: inline-block; padding: 7px 12px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: var(--f-12); line-height: 1; cursor: pointer; white-space: nowrap; transition: background .16s ease, color .16s ease; }
.cat-chip:hover { background: var(--soft-hover); color: var(--ink); }
.cat-chip.active { background: var(--ink); color: #fff; font-weight: 600; }

/* ===== 首页内容 Feed ===== */
.home-feed { padding: 20px 0 80px; }
.feed-empty { margin: 0; padding: 80px 0; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; color: var(--ink-3); font-size: var(--f-14); }
.feed-empty-ic { width: 48px; height: 48px; fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; opacity: 0.55; }
.feed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin: 0 -12px; }
.feed-card { min-width: 0; }

@keyframes feed-in { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
.feed-card > a { animation: feed-in .5s cubic-bezier(.22, .61, .36, 1) both; }
@media (prefers-reduced-motion: reduce) { .feed-card > a { animation: none; } }

.feed-card > a { display: flex; gap: 14px; align-items: stretch; min-height: 152px; padding: 14px; border-radius: 18px; background: var(--surface); transition: background .4s ease; }
.feed-card > a:hover { background: var(--cover-hover, #f7f3f0); }
.feed-cover { position: relative; flex: none; width: 92px; align-self: stretch; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--cover-hover, #f7f3f0); overflow: hidden; transition: background .4s ease; }
/* 图标占位：统一默认图标（视觉稿单图，文章后续会带专属图标链接再替换） */
.feed-cover-img { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.feed-card > a:hover .feed-cover-img { transform: scale(1.05) rotate(-3deg); }
.feed-card:nth-child(2n) > a:hover .feed-cover-img { transform: scale(1.05) rotate(3deg); }
.feed-card:nth-child(3n) > a:hover .feed-cover-img { transform: scale(1.06) rotate(-4deg); }
.feed-body { min-width: 0; padding-top: 1px; display: flex; flex-direction: column; gap: 4px; }
.feed-tag { align-self: flex-start; color: var(--ink-3); font-size: var(--f-11); line-height: 1.4; }
.feed-heading { display: block; color: var(--ink); font-size: var(--f-16); font-weight: 650; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-sum { color: var(--ink-2); font-size: var(--f-13); line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.feed-foot { margin-top: auto; color: var(--ink-3); font-size: var(--f-11); line-height: 1.4; }

/* ===== 分页器（居中，纯链接：每页独立可爬取 URL） ===== */
.feed-pager { margin-top: 28px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.feed-pager a, .feed-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 8px; font-size: var(--f-13); font-weight: 500; line-height: 1; user-select: none; }
.pager-num, .pager-step { color: var(--ink-2); border: .5px solid var(--line); background: var(--surface); transition: background .14s, color .14s, border-color .14s; cursor: pointer; }
.pager-num:hover, .pager-step:hover { background: var(--soft); color: var(--ink); }
.pager-num.is-current { background: var(--ink); color: #fff; font-weight: 600; border-color: var(--ink); }
.pager-step.is-disabled { opacity: .38; cursor: default; pointer-events: none; border: none; background: none; }
.pager-gap { color: var(--ink-3); min-width: 20px; border: none; background: none; }

/* ===== 深色页尾 ===== */
.site-footer { position: relative; padding: 40px 0; background: #17171a; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask: radial-gradient(180px at var(--mx, -999px) var(--my, -999px), #000, transparent 72%); mask: radial-gradient(180px at var(--mx, -999px) var(--my, -999px), #000, transparent 72%); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.site-footer:hover::before { opacity: 1; }
.site-footer .shell { position: relative; z-index: 1; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.footer-stat { order: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.footer-stat-num { font-family: OswaldNum, "Helvetica Neue", Arial, sans-serif; font-size: 88px; font-weight: 700; letter-spacing: -1px; color: var(--red-text); font-variant-numeric: tabular-nums; line-height: .9; }
.footer-stat-label { font-size: var(--f-14); color: rgba(255, 255, 255, .5); }
.footer-meta { order: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-meta p { margin: 0; max-width: 360px; color: rgba(255, 255, 255, .5); font-size: var(--f-12); line-height: 1.7; text-align: left; }
.footer-note span { display: block; }
.footer-links { display: flex; gap: 18px; color: rgba(255, 255, 255, .5); font-size: var(--f-11); }
.footer-links a { color: rgba(255, 255, 255, .5); }
.footer-links a:hover { color: rgba(255, 255, 255, .8); }

/* ===== 响应式 ===== */
@media (max-width: 1180px) and (min-width: 761px) {
  .header-inner { gap: 10px; }
  .tab-nav { position: static; transform: none; left: auto; margin: 0 auto; gap: 0; }
  .tab-nav .tab { padding: 0 6px; gap: 4px; font-size: var(--f-13); }
  .tab-nav .tab .tab-ic { width: 16px; height: 16px; }
  .header-actions { margin-left: 0; }
  .hsearch:hover .hsearch-input, .hsearch:focus-within .hsearch-input { width: 100px; }
  .hsearch.is-expanded .hsearch-input { width: 100px; }
}

@media (max-width: 760px) {
  .shell { width: min(calc(100% - 40px), 820px); }
  .tab-nav { display: none; }
  .header-actions { display: none; }
  .mobile-menu { display: block; }
  .cat-bar-inner { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cat-bar-inner::-webkit-scrollbar { display: none; }
  .feed-grid { grid-template-columns: 1fr; margin: 0; }
  .feed-card > a { padding: 0; min-height: 145px; }
  .feed-cover { width: 125px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer-stat { order: 1; align-items: flex-start; }
  .footer-meta { order: 2; align-items: flex-start; }
  .footer-stat-num { font-size: 36px; }
  .footer-stat-label { font-size: var(--f-16); }
}

@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  .site-header { height: 56px; }
  .header-inner { gap: 12px; }
  .brand-logo { height: 26px; }
  .feed-pager { justify-content: center; gap: 4px; }
  .feed-pager a, .feed-pager span { min-width: 32px; height: 32px; padding: 0 8px; font-size: var(--f-12); border-radius: 6px; }
  .feed-pager a svg, .feed-pager span svg { width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
