/* style.css — 农产热带水果大全 · 首页布局
   分区高度按 03-ui/home-ui-desktop.png 的量稿预算落位（见 03-ui/compare-log.md）。 */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-2);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

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

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: 0; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-size: var(--fs-1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
  font-weight: 700;
}

/* ── M0 site-header ────────────────────────────────────────── */
.site-header {
  background: var(--bg);
  position: relative;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 76px;
}

.brand { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
.brand-name { font-size: var(--fs-5); font-weight: 700; color: var(--accent-strong); letter-spacing: 0.01em; }
.brand-sub { font-size: var(--fs-1); color: var(--muted); letter-spacing: 0.08em; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-left: auto;
  font-size: var(--fs-2);
  color: var(--ink-soft);
}
.site-nav a { padding: 4px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.header-search {
  position: relative;
  flex: 0 0 236px;
  margin-left: 8px;
}
.header-search input {
  width: 100%;
  height: 34px;
  padding: 0 30px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg-elevated);
  font-family: inherit;
  font-size: var(--fs-1);
  color: var(--ink);
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-key {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-1);
  color: var(--muted);
}

.nav-toggle { display: none; cursor: pointer; }

/* ── M1 hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 430px;
  background: var(--bg);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(253, 250, 241, 0.40) 0%, rgba(253, 250, 241, 0.36) 30%, rgba(253, 250, 241, 0.24) 46%, rgba(253, 250, 241, 0.08) 62%, rgba(253, 250, 241, 0) 76%),
    linear-gradient(270deg, rgba(12, 26, 7, 0.34) 0%, rgba(12, 26, 7, 0.16) 16%, rgba(12, 26, 7, 0.02) 30%, rgba(12, 26, 7, 0) 42%);
}
.hero-inner { position: relative; height: 100%; display: flex; align-items: center; }
.hero-copy { width: 740px; max-width: 100%; color: var(--ink); padding: 4px 0 0; }
.hero-copy .eyebrow { color: var(--accent-soft); margin-bottom: 8px; }
.hero h1 {
  font-size: var(--fs-8);
  line-height: 1.52;
  color: var(--accent-strong);
  margin-bottom: 10px;
  max-width: 700px;
}
.hero-lede {
  font-size: var(--fs-2);
  line-height: 1.72;
  color: var(--ink-soft);
  max-width: 660px;
}
.hero-actions { display: flex; gap: 10px; margin-top: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-size: var(--fs-2);
  font-weight: 700;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-solid { background: var(--accent); color: #fdfaf1; }
.btn-solid:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--accent-soft); color: var(--accent-strong); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(47, 83, 38, 0.07); }

.hero-stats {
  display: flex;
  gap: 26px;
  margin-top: 20px;
  font-size: var(--fs-1);
  color: var(--muted);
}
.hero-stats b { color: var(--accent-strong); font-size: var(--fs-5); margin-right: 3px; }

/* ── M2 season ──────────────────────────────────────────────── */
.season { background: var(--bg); padding: 30px 0 0; }

.head-sub { font-size: var(--fs-3); color: var(--muted); margin-top: 2px; }

.season-head, .cat-head, .rip-head, .feat-head, .pick-head, .st-head,
.og-head, .sf-head, .faq-head, .notes-head { margin-bottom: 6px; }
.season h2, .categories h2, .ripening h2, .featured h2, .picking h2,
.storage h2, .origin h2, .safety h2, .closing h2, .notes h2 {
  font-size: var(--fs-6);
  color: var(--accent-strong);
  line-height: 1.3;
  margin-top: 2px;
}

.season-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
  padding-bottom: 82px;
}
.season-item { border-top: 1px solid var(--line); padding-top: 12px; }
.season-month { font-size: var(--fs-3); font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.season-item p + p { font-size: var(--fs-2); line-height: 1.62; color: var(--ink-soft); }

.season-note-band { background: var(--bg-gold); margin-top: 0; }
.season-note {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 8px 0;
  font-size: var(--fs-3);
  color: #33401f;
  font-weight: 500;
}
.season-note::before {
  content: "";
  width: 3px; height: 16px;
  background: var(--accent);
  margin-right: 12px;
  flex: 0 0 auto;
}

/* ── M3 categories ──────────────────────────────────────────── */
.categories { background: var(--bg); padding: 0; }

.cat-cols {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
}
.cat-item { display: block; }
.cat-photo { display: block; aspect-ratio: 128 / 96; overflow: hidden; background: var(--bg-gold-soft); }
.cat-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.cat-item:hover .cat-photo img { transform: scale(1.04); }
.cat-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  background: var(--bg-gold);
  padding: 4px 9px;
  margin-top: 2px;
}
.cat-no { font-size: var(--fs-1); color: var(--accent-soft); font-weight: 700; }
.cat-name { font-size: var(--fs-3); font-weight: 700; color: var(--accent-strong); }

/* 分类内容模块（每个方向 = 标题 + 最新 4 篇文章卡片） */
.cat-modules { display: grid; gap: 26px; }
.cat-module-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-bottom: 8px;
}
.cat-module-title { font-size: var(--fs-5); color: var(--accent-strong); }
.cat-module-count { font-size: var(--fs-1); color: var(--muted); }
.cat-module-more { margin-left: auto; font-size: var(--fs-1); color: var(--accent); font-weight: 700; }
.cat-module-more:hover { text-decoration: underline; }

.cat-module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card { display: block; min-width: 0; }
.cat-card .cat-photo { display: block; }
.cat-card .cat-label { display: block; }
.cat-card .cat-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--fs-2);
  line-height: 1.4;
  word-break: break-word;
}
.cat-card:hover .cat-name { color: var(--accent); }

.feat-body h3 a { color: inherit; }
.feat-body h3 a:hover { color: var(--accent); }
.feat-body h3 { word-break: break-word; }

.cat-note, .rip-note, .feat-note, .pick-note, .st-note, .og-note, .sf-note {
  font-size: var(--fs-1);
  line-height: 1.45;
  color: var(--muted);
  margin-top: 5px;
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
}

/* ── band 通用 ──────────────────────────────────────────────── */
.band { padding-top: 2px; padding-bottom: 6px; }
.band-pick { display: grid; grid-template-columns: 0.92fr 1fr; gap: 48px; align-items: start; padding: 2px var(--gutter) 6px; max-width: var(--wrap); margin: 0 auto; }
.band-three { display: grid; grid-template-columns: 1.1fr 0.9fr 0.9fr; gap: 38px; align-items: start; padding: 2px var(--gutter) 6px; max-width: var(--wrap); margin: 0 auto; }

/* ── M4 ripening ────────────────────────────────────────────── */
.ripening { padding: 0; }

.rip-cols {
  display: grid;
  grid-template-columns: 1.05fr 0.72fr 0.74fr 0.42fr;
  gap: 22px;
  align-items: start;
}
.rip-item { border-left: 1px solid var(--line); padding-left: 14px; }
.rip-item h3 { font-size: var(--fs-2); color: var(--accent-strong); margin-bottom: 3px; }
.rip-item p { font-size: var(--fs-1); line-height: 1.52; color: var(--ink-soft); }
.rip-photo { overflow: hidden; border-radius: var(--r-2); }
.rip-photo img { width: 100%; height: 100%; max-height: 78px; object-fit: cover; }

/* ── M5 featured ────────────────────────────────────────────── */
.featured { padding: 0 0 0; }
.feat-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px 26px;
}
.feat-card { display: flex; gap: 11px; align-items: flex-start; }
.feat-thumb { flex: 0 0 30px; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--r-2); background: var(--bg-gold-soft); }
.feat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feat-body h3 { font-size: var(--fs-2); color: var(--accent-strong); margin-bottom: 2px; }
.feat-body p { font-size: var(--fs-1); line-height: 1.3; color: var(--ink-soft); }

/* ── M6 picking ─────────────────────────────────────────────── */
.pick-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.pick-step { border-top: 1px solid var(--line); padding-top: 3px; }
.pick-no { font-size: var(--fs-1); font-weight: 700; color: var(--accent-soft); letter-spacing: 0.08em; }
.pick-step h3 { font-size: var(--fs-2); color: var(--accent-strong); margin: 1px 0 2px; }
.pick-step p { font-size: var(--fs-1); line-height: 1.45; color: var(--ink-soft); }

/* ── M7 storage ─────────────────────────────────────────────── */
.st-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.st-item h3 { display: flex; align-items: baseline; gap: 6px; font-size: var(--fs-2); color: var(--accent-strong); margin-bottom: 2px; }
.st-no { font-size: var(--fs-1); color: var(--bg); background: var(--accent-soft); border-radius: var(--r-pill); width: 17px; height: 17px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-weight: 700; }
.st-item p { font-size: var(--fs-1); line-height: 1.45; color: var(--ink-soft); }

/* ── M8 origin ──────────────────────────────────────────────── */
.og-rows { display: grid; gap: 0; }
.og-row { border-top: 1px solid var(--line-soft); padding: 2px 0; }
.og-row:first-child { border-top-color: var(--line); }
.og-row h3 { font-size: var(--fs-2); color: var(--accent-strong); margin-bottom: 2px; }
.og-row p { font-size: var(--fs-1); line-height: 1.45; color: var(--ink-soft); }

/* ── M9 safety ──────────────────────────────────────────────── */
.sf-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-3);
  padding: 8px;
}
.sf-item h3 { font-size: var(--fs-3); color: var(--accent-strong); margin-bottom: 3px; }
.sf-item p { font-size: var(--fs-1); line-height: 1.2; color: var(--ink-soft); }
.sf-alert h3 { color: var(--accent); }
.sf-alert h3::after { content: ""; display: block; width: 18px; height: 2px; background: var(--gold); margin-top: 4px; }

/* ── M10 faq ────────────────────────────────────────────────── */
.faq-list { display: grid; gap: 0; }
.faq-item { border-top: 1px solid var(--line-soft); }
.faq-item:first-child { border-top-color: var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  font-size: var(--fs-2);
  font-weight: 500;
  color: var(--accent-strong);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: var(--fs-5);
  color: var(--accent-soft);
  line-height: 1;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { font-size: var(--fs-1); line-height: 1.5; color: var(--ink-soft); padding: 0 0 12px; }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── M11 notes ──────────────────────────────────────────────── */
.notes { background: var(--bg-mint); padding: 2px 0 0; }
.notes-cols { display: grid; grid-template-columns: 1fr 0.78fr 0.9fr; gap: 36px; }
.note-item h3 { font-size: var(--fs-3); color: var(--accent-strong); margin-bottom: 5px; }
.note-item p { font-size: var(--fs-1); line-height: 1.45; color: var(--ink-soft); }

/* ── M12 footer ─────────────────────────────────────────────── */
.site-footer { background: var(--bg-deep); color: var(--ink-invert); padding: 9px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.25fr 0.62fr 0.62fr 1.1fr; gap: 30px; padding-bottom: 10px; }
.footer-logo { font-size: var(--fs-5); font-weight: 700; color: #fdfaf1; }
.footer-tag { font-size: var(--fs-1); color: #c8cfad; margin-top: 2px; letter-spacing: 0.06em; }
.footer-desc { font-size: var(--fs-2); color: #d3d8bc; margin-top: 10px; line-height: 1.5; }
.footer-title { font-size: var(--fs-1); font-weight: 700; letter-spacing: 0.12em; color: #c8cfad; margin: 0 0 8px; }
.footer-col a { display: block; font-size: var(--fs-1); color: #eef1dc; padding: 1px 0; }
.footer-col a:hover { color: var(--bg-gold); }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(4, auto); column-gap: 18px; }
.footer-links .footer-title { grid-column: 1 / -1; grid-row: auto; }
.footer-note p { font-size: var(--fs-1); line-height: 1.5; color: #cfd5b6; }
.footer-bottom { border-top: 1px solid var(--line-invert); padding: 9px 0 10px; }
.footer-bottom p { font-size: var(--fs-1); color: #bfc7a6; }

/* ── 响应式 ─────────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .header-inner { gap: 16px; }
  .site-nav { gap: 12px; font-size: var(--fs-1); }
  .header-search { flex-basis: 180px; }
  .hero { height: auto; padding: 42px 0 40px; }
  .hero-inner { display: block; }
  .hero-copy { width: auto; }
  .season-cols { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .cat-cols { grid-template-columns: repeat(4, 1fr); }
  .cat-module-grid { grid-template-columns: repeat(3, 1fr); }
  .rip-cols { grid-template-columns: 1fr 1fr; gap: 22px; }
  .rip-photo { display: none; }
  .feat-cols { grid-template-columns: repeat(2, 1fr); }
  .band-pick { grid-template-columns: 1fr; gap: 28px; }
  .band-three { grid-template-columns: 1fr 1fr; gap: 26px; }
  .closing { grid-column: 1 / -1; }
  .notes-cols { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 767px) {
  :root { --gutter: 20px; }
  .header-inner { height: 64px; }
  .brand-name { font-size: var(--fs-4); }
  .header-search { display: none; }
  .nav-toggle {
    display: inline-flex;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    margin-left: auto;
    width: 40px; height: 36px;
    padding: 0 8px;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--r-2);
    cursor: pointer;
  }
  .nav-toggle span { display: block; height: 1.5px; background: var(--ink); }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 64px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 6px var(--gutter) 10px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { width: 100%; padding: 9px 0; font-size: var(--fs-3); border-bottom: 1px solid var(--line-soft); }

  .hero { padding: 30px 0 32px; }
  .hero h1 { font-size: var(--fs-7); }
  .hero-lede { font-size: var(--fs-3); }
  .hero-actions { flex-wrap: wrap; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }

  .season-cols { grid-template-columns: 1fr; gap: 16px; }
  .season-note { font-size: var(--fs-2); }
  .cat-cols { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-module-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-module-head { flex-wrap: wrap; }
  .cat-module-more { margin-left: 0; width: 100%; }
  .band { padding-top: 26px; padding-bottom: 24px; }
  .rip-cols { grid-template-columns: 1fr; gap: 16px; }
  .rip-item { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-soft); padding-top: 10px; }
  .feat-cols { grid-template-columns: 1fr; }
  .st-cols { grid-template-columns: 1fr; gap: 16px; }
  .band-three { grid-template-columns: 1fr; gap: 26px; }
  .closing { grid-column: auto; }
  .sf-list { grid-template-columns: 1fr; }
  .notes-cols { grid-template-columns: 1fr; gap: 18px; }
  .footer-top { grid-template-columns: 1fr; gap: 20px; padding-bottom: 18px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
}

/* ── 导航下拉（主类 → 子类） ───────────────────────────────── */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-drop-toggle { display: inline-flex; align-items: center; gap: 4px; }
.nav-drop-toggle::after {
  content: "";
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .55;
}
.nav-drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 148px;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 0;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-1);
  z-index: 30;
}
.nav-drop:hover .nav-drop-menu { display: block; }
.nav-drop-menu a {
  display: block;
  padding: 6px 16px;
  font-size: var(--fs-2);
  color: var(--ink-soft);
  white-space: nowrap;
  border-bottom: 0;
}
.nav-drop-menu a:hover { background: var(--bg-gold-soft); color: var(--accent); border-bottom: 0; }

/* 页脚备案号 */
.footer-icp { margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .cat-item:hover .cat-photo img { transform: none; }
}

/* ── 移动端：下拉改为常显分组 ──────────────────────────────── */
@media (max-width: 767px) {
  .nav-item { display: block; width: 100%; }
  .nav-drop { display: flex; flex-direction: column; align-items: flex-start; }
  .nav-drop-toggle { width: 100%; padding: 9px 0; }
  .nav-drop-toggle::after { display: none; }
  .nav-drop-menu {
    display: block;
    position: static;
    transform: none;
    min-width: 0;
    max-height: none;
    overflow: visible;
    padding: 0 0 4px 12px;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav-drop-menu a { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
}

/* skip-link：无障碍跳转链接，默认移出视口，Tab 聚焦时归位 */
.skip-link{position:absolute;left:-9999px;top:0;z-index:200;padding:8px 14px;background:#fff;color:#111;border-radius:6px;font-size:14px;text-decoration:none}
.skip-link:focus{left:8px;top:8px;outline:2px solid currentColor}
