/* ============================================================
   雾培智能 · aj-smartagri.top  官网样式
   设计基调：农业科技 + 现代简洁
   ============================================================ */

:root {
  --green: #2ecc71;
  --green-dark: #1e8449;
  --green-deep: #145a32;
  --green-soft: #e8f8f1;
  --blue: #3498db;
  --ink: #1f2d28;
  --muted: #5f6f68;
  --muted-2: #9ca3af;
  --accent: #e8590c;
  --line: #e4e6e8;          /* 中性浅灰边框（微博风：去绿色调） */
  --bg-soft: #f5faf7;
  --white: #ffffff;
  --shadow: 0 6px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 14px 40px rgba(15, 23, 42, .10);
  --radius: 16px;
  --maxw: 1200px;
  --font-sans: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.7;
  /* 微博风：页面浅灰底，卡片用纯白形成对比 */
  background: #f2f3f5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 粘底页脚：内容短时页脚也贴到视口底部，不“浮”在页面中间 */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh; /* Safari 移动端真实可视高度 */
}
#site-footer { margin-top: auto; }

img { max-width: 100%; display: block; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { opacity: .85; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
#site-nav { position: sticky; top: 0; z-index: 100; }
.nav {
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow .2s ease;
}
.nav.scrolled { box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--ink); }
.logo .mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); font-size: 15px; font-weight: 500;
}
.nav-links a:hover { background: var(--green-soft); color: var(--green-dark); }
.nav-links a.active { background: var(--green); color: #fff; font-weight: 700; }
.nav-links a.active:hover { opacity: 1; }
.nav-cta { background: var(--green) !important; color: #fff !important; font-weight: 600; }
.nav-cta:hover { background: var(--green-dark) !important; opacity: 1; }

.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--ink); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--green-dark); opacity: 1; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { border: 2px solid var(--green); color: var(--green-dark); background: transparent; }
.btn-outline:hover { background: var(--green-soft); opacity: 1; }
.btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.26); opacity: 1; }

/* ---------- 页面区块 ---------- */
section { padding: 64px 0; }
.pad-t0 { padding-top: 0 !important; }
.section-title { text-align: center; margin-bottom: 26px; }
.section-title.h-sm h2 { font-size: 26px; }
.section-title .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 14px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 8px;
}
.section-title .eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px rgba(46, 204, 113, .16);
}
.section-title h2 { font-size: clamp(24px, 3.6vw, 32px); font-weight: 800; line-height: 1.15; }
.section-title p { margin-top: 6px; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #eefcf3 0%, #e8f4fd 100%);
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px); /* Safari 移动端 100vh 含浏览器工具栏，svh 才是真实可视高度 */
  padding: 56px 0;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero .container { width: 100%; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 15% 20%, rgba(46,204,113,.12) 0 220px, transparent 221px),
                    radial-gradient(circle at 85% 75%, rgba(52,152,219,.10) 0 260px, transparent 261px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.25; font-weight: 800; }
.hero h1 .hl { color: var(--green-dark); }
.hero .sub { margin: 20px 0 8px; font-size: 18px; color: var(--ink); font-weight: 600; }
.hero .desc { color: var(--muted); font-size: 16px; max-width: 520px; }
.hero .actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero .mini-stats { display: flex; gap: 32px; margin-top: 38px; flex-wrap: wrap; }
.hero .stat b { font-size: 26px; color: var(--green-dark); display: block; }
.hero .stat span { font-size: 14px; color: var(--muted); }

/* Hero 动画场景（智慧供需网络） */
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-scene { position: relative; width: 100%; max-width: 520px; margin: -16px -8px -10px -22px; }
.hero-scene svg { width: 100%; height: auto; display: block; }
.hmx-particles { position: absolute; inset: 0; pointer-events: none; }
.hmx-cloud { position: absolute; width: 120px; height: 34px; border-radius: 999px; background: rgba(255, 255, 255, .82); filter: blur(7px); opacity: .7; pointer-events: none; }
.hmx-cloud.c1 { top: 11%; left: -90px; animation: hmxDrift 24s linear infinite; }
.hmx-cloud.c2 { top: 62%; left: -140px; animation: hmxDrift 33s linear infinite 7s; }
@keyframes hmxDrift { to { transform: translateX(640px); } }
@media (prefers-reduced-motion: reduce) { .hero-scene .hp, .hmx-cloud, .hero-scene animate, .hero-scene animateTransform { animation: none !important; } }
.device-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 28px; width: 100%; max-width: 380px; border: 1px solid var(--line);
}
.device-card .dc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.device-card .dc-head h3 { font-size: 18px; }
.pill { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.online { background: var(--green-soft); color: var(--green-dark); }
.sensor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sensor {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.sensor .k { font-size: 12px; color: var(--muted); }
.sensor .v { font-size: 19px; font-weight: 700; }
.sensor .v small { font-size: 12px; color: var(--muted); font-weight: 500; }
.meter { height: 8px; border-radius: 999px; background: #eef1f3; overflow: hidden; margin-top: 14px; }
.meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--blue)); }

/* ---------- 功能卡片 ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 52px; height: 52px; border-radius: 14px; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-soft); margin-bottom: 16px;
}
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- 亮点条（为什么选择我们） ---------- */
.highlights { background: var(--green-deep); color: #fff; }
.highlights .section-title h2 { color: #fff; }
.highlights .section-title p { color: rgba(255,255,255,.75); }
.hl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hl {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 26px 24px;
}
.hl .n { font-size: 40px; font-weight: 800; color: var(--green); line-height: 1; }
.hl h3 { margin: 10px 0 6px; font-size: 17px; }
.hl p { color: rgba(255,255,255,.72); font-size: 15px; }

/* ---------- 数据/指标 ---------- */
.stats-band { background: var(--green-soft); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; text-align: center; }
.stat-big .num { font-size: 40px; font-weight: 800; color: var(--green-dark); }
.stat-big .lab { color: var(--muted); font-size: 15px; margin-top: 4px; }

/* ---------- 工作原理 / 流程 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 30px; font-weight: 800; color: var(--green);
  opacity: .25; display: block; margin-bottom: 10px; line-height: 1;
}
.step h4 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- 关于 / 内容页通用 ---------- */
.page-hero {
  background: linear-gradient(135deg, #eefcf3 0%, #e8f4fd 100%);
  padding: 64px 0 56px; text-align: center;
}
.page-hero h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.page-hero p { color: var(--muted); margin-top: 10px; max-width: 640px; margin-inline: auto; }

/* 顶尖技术页 hero（微博式搜索栏 + 光斑装饰；上滑时滑出导航栏） */
.hero-split { text-align: center; background: linear-gradient(135deg, #eefcf3 0%, #e8f4fd 100%); overflow: hidden; }
.hero-split::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 12% 18%, rgba(46,204,113,.13) 0 200px, transparent 201px),
                    radial-gradient(circle at 88% 78%, rgba(52,152,219,.11) 0 250px, transparent 251px);
}
.hero-split > .container { position: relative; z-index: 1; }
/* 高度为原 hero 的 2 倍；sticky 负 top 让滚动时整条搜索栏滑出、回到顶部时滑入 */
#agri-hero { position: sticky; top: -252px; height: 252px; display: flex; align-items: center; justify-content: center; padding: 0; z-index: 50; }
#agri-hero .container { width: 100%; }
.agri-search {
  position: relative; z-index: 1;
  display: flex; align-items: center; margin-inline: auto;
  width: min(620px, 100%); background: #fff;
  border: 1px solid rgba(20,90,50,.14); border-radius: 999px;
  box-shadow: 0 8px 24px rgba(20,90,50,.10); overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.agri-search:focus-within { box-shadow: 0 10px 30px rgba(20,90,50,.16); border-color: rgba(46,204,113,.55); }
.agri-search-ico { padding: 0 2px 0 22px; font-size: 17px; color: var(--muted); }
.agri-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 16px 6px; font-size: 15px; color: var(--ink); }
.agri-search input::placeholder { color: var(--muted-2); }
.agri-search button { align-self: stretch; border: none; cursor: pointer; background: var(--green); color: #fff; font-size: 15px; font-weight: 700; padding: 0 32px; transition: background .18s ease; }
.agri-search button:hover { background: var(--green-dark); }

/* ---- hero 动态背景：遥感地球 + 风电 + 农田丘陵 + 云 + 粒子（铺满整个横栏） ---- */
.hero-anim { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ha-globe {
  position: absolute; right: -36px; bottom: 14px;
  width: 300px; height: 300px; opacity: .9;
  filter: drop-shadow(0 8px 22px rgba(20,90,50,.16));
}
.ha-turbine {
  position: absolute; left: 22px; bottom: 10px;
  width: 215px; height: 215px; opacity: .9;
  filter: drop-shadow(0 4px 12px rgba(20,90,50,.10));
}
.ha-fields {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 92px;
}
.ha-cloud {
  position: absolute; width: 140px; height: 40px; border-radius: 999px;
  background: rgba(255, 255, 255, .82); filter: blur(7px); opacity: .7;
}
.hc1 { top: 7%;  left: -160px; animation: haDrift 30s linear infinite; }
.hc2 { top: 38%; left: -210px; animation: haDrift 38s linear infinite 7s; }
.hc3 { top: 66%; left: -260px; animation: haDrift 46s linear infinite 14s; }
@keyframes haDrift { to { transform: translateX(1900px); } }
.ha-particles { position: absolute; inset: 0; }
.hp {
  position: absolute; width: var(--s, 6px); height: var(--s, 6px); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c6f7d9, #2ecc71);
  box-shadow: 0 0 8px rgba(46, 204, 113, .55);
  opacity: 0; animation: haFloat 5.5s linear infinite; animation-delay: var(--d, 0s);
}
@keyframes haFloat {
  0%   { transform: translateY(0); opacity: 0; }
  15%  { opacity: .85; }
  80%  { opacity: .45; }
  100% { transform: translateY(-170px); opacity: 0; }
}

/* 门户三栏布局（宽度沿用全局 1200px，与商城/供求等页一致） */
#agri-list-section { scroll-margin-top: 84px; }
.portal { display: grid; grid-template-columns: 150px minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.p-left { position: sticky; top: 88px; }
.p-right { position: sticky; top: 88px; }
.p-main { min-width: 0; }
.side-title { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.side-title::before { content: ""; display: inline-block; width: 4px; height: 14px; border-radius: 2px; background: var(--green); margin-right: 8px; vertical-align: -2px; }
.side-cats {
  display: flex; flex-direction: column; gap: 3px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
  padding: 8px; min-height: calc(100vh - 106px);
}
.s-nav {
  display: flex; align-items: center; justify-content: center; height: 44px; width: 100%;
  padding: 0 12px; text-align: center; border: none; border-radius: 10px;
  background: transparent; color: var(--ink); font-size: 14px; cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.s-nav:hover { background: rgba(46, 204, 113, .08); color: var(--green-dark); }
.s-nav.active { background: var(--green); color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(46, 204, 113, .25); }

/* 左栏顶部「全部」独立按钮：仿右栏投稿按钮，浮在白色分类盒上方 */
.cat-all {
  width: 100%; height: 44px; margin-bottom: 8px;
  border: 1px solid var(--green); border-radius: 12px;
  background: #fff; color: var(--green-dark); font-weight: 700;
  box-shadow: 0 2px 8px rgba(46, 204, 113, .14);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.cat-all:hover { background: var(--green-soft); }
.cat-all.active { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(46, 204, 113, .28); }

/* 中栏信息流标题行（吸顶） */
.feed-head { display: flex; align-items: center; justify-content: flex-end; margin: 2px 0 14px; }
.feed-head h2 { font-size: 21px; font-weight: 800; }
.feed-head .lang-switch { margin: 0; }

/* 右栏卡片 */
.side-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 18px 16px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(15, 23, 42, .04); }
.feat-row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0 10px; border-bottom: 1px solid var(--line); text-decoration: none; }
.feat-row:last-child { border-bottom: none; }
.feat-no { font-size: 14px; font-weight: 800; color: var(--green); width: 20px; flex-shrink: 0; line-height: 1.4; }
.feat-row.hot .feat-no { color: #e8590c; }
.feat-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.45; transition: color .18s ease; }
.feat-row:hover .feat-t { color: var(--green); }
.feat-m { display: block; font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.feat-cta { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px dashed var(--green); border-radius: 10px; background: var(--green-soft); color: var(--green-dark); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease; }
.p-right .submit-cta {
  width: 100%; height: 44px; margin-bottom: 8px; padding: 0 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(46, 204, 113, .18);
}
.feat-cta:hover { background: var(--green); color: #fff; }

@media (max-width: 1080px) {
  .portal { grid-template-columns: 1fr; gap: 24px; }
  .side-cats { flex-direction: row; flex-wrap: wrap; gap: 8px; min-height: auto; }
  .s-nav { width: auto; }
}
@media (max-width: 1280px) {
  .agri-search { width: min(540px, 100%); }
  .ha-globe { right: -30px; width: 260px; height: 260px; }
  .ha-turbine { left: 18px; width: 180px; height: 180px; }
}
@media (max-width: 1080px) {
  .ha-globe, .ha-turbine { display: none; }
}
@media (max-width: 900px) {
  .agri-search input { padding: 13px 6px; }
  .agri-search button { padding: 0 20px; }
  .feed-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 700px) {
  .hero-anim { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-anim .hp, .hero-anim .ha-cloud,
  .hero-anim animate, .hero-anim animateTransform { animation: none !important; }
}
.prose h3 { font-size: 21px; margin: 34px 0 14px; color: var(--green-deep); }
.prose p { color: var(--muted); margin-bottom: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.two-col .col img, .two-col .col .mock { border-radius: var(--radius); box-shadow: var(--shadow); }

/* 系统架构图 */
.arch {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: grid; gap: 16px; margin-top: 20px;
}
.arch-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.arch-box {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; text-align: center; box-shadow: var(--shadow);
}
.arch-box .big { font-size: 30px; }
.arch-box h5 { font-size: 15px; margin: 6px 0 2px; }
.arch-box span { font-size: 12.5px; color: var(--muted); }
.arch-arrow { text-align: center; color: var(--green); font-size: 22px; letter-spacing: 6px; }

/* 参数表 */
table.spec { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 15px; }
table.spec th, table.spec td { border: 1px solid var(--line); padding: 12px 16px; text-align: left; }
table.spec th { background: var(--green-soft); color: var(--green-deep); font-weight: 700; width: 34%; }
table.spec tr:nth-child(even) td { background: #fafdfb; }

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.contact-info .ci { display: flex; gap: 14px; margin-bottom: 22px; align-items: flex-start; }
.contact-info .ci .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.contact-info .ci b { display: block; font-size: 15px; }
.contact-info .ci span { color: var(--muted); font-size: 15px; }
.contact-form { display: grid; gap: 16px; }
.contact-form input, .contact-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-size: 15px; font-family: inherit; background: var(--white);
  transition: border-color .15s ease;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--green); }
.contact-form textarea { resize: vertical; min-height: 130px; }

/* ---------- Footer ---------- */
.footer { background: var(--green-deep); color: rgba(255,255,255,.8); padding: 30px 0 0; }
.footer .container { max-width: 1000px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; padding-bottom: 20px; }
.footer h5 { color: #fff; font-size: 14.5px; margin-bottom: 9px; }
.footer .brand { font-size: 17px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 5px; font-size: 13.5px; }
.footer .f-links { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 24px; }
.footer .f-links li { margin-bottom: 0; }
.footer ul a { color: rgba(255,255,255,.8); font-size: 13.5px; }
.footer ul a:hover { color: var(--green); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 12px 0; font-size: 12.5px; text-align: center; color: rgba(255,255,255,.55); }

/* ---------- 滚动浮现（渐进增强：无 JS 时默认可见，杜绝整页空白） ---------- */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 两行截断工具 ---------- */
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hl-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .two-col, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  section { padding: 44px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; background: var(--white); border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .feature-grid, .hl-grid, .steps, .stats-grid { grid-template-columns: 1fr; }
  .arch-row { grid-template-columns: 1fr; }
}

/* ============================================================
   智慧农业服务平台 · 平台扩展样式
   ============================================================ */

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 28px; }
.filter-pill { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 14px; cursor: pointer; transition: .15s; }
.filter-pill:hover { border-color: var(--green); color: var(--green-dark); }
.filter-pill.active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.search-row { display: flex; gap: 10px; margin-bottom: 24px; max-width: 480px; }
.search-row input { flex: 1; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.search-row input:focus { outline: none; border-color: var(--green); }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }

/* ---------- 商品网格 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pcard .pimg { position: relative; background: var(--bg-soft); overflow: hidden; }
.pcard .pimg::before { content: ''; display: block; width: 100%; padding-top: 75%; } /* 4:3 撑高，兼容不支持 aspect-ratio 的浏览器 */
.pcard .pimg img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.pcard .p-emoji { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.pcard:hover .pimg img { transform: scale(1.07); }
.pcard .pimg::after { content: '查看详情 →'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(20, 90, 50, .32); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 2px; opacity: 0; transition: opacity .25s; }
.pcard:hover .pimg::after { opacity: 1; }
.pcard .pbody { padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 5px; background: #f7fbf9; border-top: 1px solid var(--line); }
.pcard .ptitle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pcard .ptitle { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.45; min-height: 1.45em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .ptitle-row .cat-tag { flex-shrink: 0; margin-top: 1px; }
.pcard .pmeta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pcard .price { font-size: 17px; font-weight: 800; color: var(--accent); display: inline-flex; align-items: baseline; gap: 4px; flex-shrink: 0; background: rgba(232, 89, 12, .1); padding: 1px 9px; border-radius: 999px; }
.pcard .price small { font-size: 11.5px; font-weight: 500; color: var(--accent); opacity: .7; }
.pcard .origin { font-size: 12.5px; color: var(--muted); }
.cat-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 12px; font-weight: 600; }
.cat-grain { background: #fdf3e7; color: #b26a00; }
.cat-veg { background: #e8f8f1; color: #1e8449; }
.cat-fruit { background: #fdeee7; color: #e8590c; }
.cat-aqua { background: #e8f1fd; color: #2c6fbb; }
.cat-agri { background: #f1eafa; color: #7a4fd0; }
.cat-flower { background: #fde9f0; color: #d23f8a; }
.cat-seed { background: #e6f7f8; color: #0e7a8a; }
.cat-mach { background: #eef0f3; color: #5f6f8a; }
.pcard .origin:not(:empty)::before { content: '📍 '; }

/* ---------- 农产品交易合并区（热门商品 + 供求速递） ---------- */
.two-col.eq { align-items: stretch; }
.mp-col { grid-template-columns: 1.15fr 1fr; gap: 28px; }
.mp-col .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* 供求为空、商品面板收成单栏全宽时，商品网格加宽到 3 列，避免单卡过大 */
@media (min-width: 981px) {
  .two-col.solo .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
}
.sec-sub { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 16px; text-align: center; }
.more-row { text-align: right; margin-top: 16px; }
.more-link { font-size: 14px; font-weight: 700; color: var(--green-dark); text-decoration: none; }
.more-link:hover { color: var(--green); }

/* ---------- 等高白色面板（合并区 / 文章基地 共用，保证两栏底部对齐） ---------- */
.panel { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 24px; box-shadow: var(--shadow); }
.panel .more-row { margin-top: auto; }
.panel .empty { padding: 40px 0; }
/* 面板内元素去重阴影，避免「卡片套卡片」的视觉堆叠 */
.panel .pcard, .panel .trade-item, .panel .article-item, .panel .base-card { box-shadow: none; }
/* 面板底部整块按钮（等高面板内靠 margin-top:auto 压底，两栏底部严格对齐） */
.panel .more-btn { display: block; width: 100%; margin-top: auto; }

/* 精选农产品：进入商城大按钮 */
.cta-row { text-align: center; margin-top: 30px; }
.btn-lg { padding: 15px 46px; font-size: 17px; }

/* ---------- 紧凑公告卡 ---------- */
.ann-card { padding: 16px 20px; margin-bottom: 12px; }
.announce-panel { padding: 8px 24px; }
.announce-panel .card { border: none; box-shadow: none; background: transparent; border-radius: 0; border-bottom: 1px solid var(--line); padding: 16px 4px; margin-bottom: 0; }
.announce-panel .card:last-child { border-bottom: none; }
.announce-panel .card:hover { transform: none; }

/* ---------- 商品详情（淘宝式右侧信息） ---------- */
/* 商品详情双栏：左侧(图片+详情tab)内部独立滚动，右侧信息栏固定不跟随 */
.goods-section { height: calc(100vh - 68px); padding: 24px 0 0; box-sizing: border-box; }
.goods-section .container { height: 100%; display: flex; flex-direction: column; }
.goods-back { margin-bottom: 16px; flex: 0 0 auto; font-size: 14px; }
.goods-grid {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 460px) 1fr; gap: 36px;
}
.goods-left {
  min-width: 0; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding-right: 6px;
}
.ginfo {
  min-height: 0;
  overflow-y: auto;
}
.gallery .main { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 64px; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery .thumbs .t { width: 76px; height: 60px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.gallery .thumbs .t.active { border-color: var(--green); }
.gallery .thumbs .t img { width: 100%; height: 100%; object-fit: cover; }

/* 标题 */
.g-title { font-size: clamp(21px, 2.6vw, 28px); font-weight: 800; line-height: 1.45; margin-bottom: 14px; }

/* 醒目价格带 */
.g-priceband { background: linear-gradient(180deg, #fff7ef 0%, #ffeede 100%); border: 1px solid #ffd9b3; border-radius: 14px; padding: 13px 18px 12px; margin-bottom: 16px; }
.g-priceband .g-p-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.g-priceband .g-p-label { font-size: 13px; color: var(--muted); }
.g-priceband .g-p-val { font-size: 33px; font-weight: 900; color: var(--accent); line-height: 1; }
.g-priceband .g-p-unit { font-size: 14px; color: var(--muted); font-weight: 500; }
.g-priceband .g-p-extra { margin-top: 8px; font-size: 12.5px; color: #b3541e; }

/* 服务信息（两列参数行） */
.g-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 22px; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 14px 0; margin-bottom: 16px; }
.g-row { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.g-row span { color: var(--muted); flex-shrink: 0; }
.g-row b { font-weight: 600; color: var(--green-dark); text-align: right; margin-left: auto; word-break: break-all; }

/* 购买 / 预购区块 */
.g-buy { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 16px; background: #fff; box-shadow: var(--shadow); }
.g-qty-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.g-qty-label { font-size: 14px; color: var(--muted); font-weight: 600; }
.g-qty-row input[type=number] { flex: 0 1 110px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; font-family: inherit; }
.g-qty-row input:focus { outline: none; border-color: var(--accent); }
.g-qty-unit { color: var(--muted); font-size: 14px; }
.g-qty-total { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.g-qty-total b { font-size: 18px; color: var(--accent); }
.g-btns { display: grid; grid-template-columns: 1fr 1.35fr; gap: 12px; }
.g-btn { display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; padding: 14px 10px; font-size: 16px; font-weight: 700; cursor: pointer; transition: .15s; border: 2px solid transparent; font-family: inherit; }
.g-btn-pre { background: #fff; border-color: var(--accent); color: var(--accent); }
.g-btn-pre:hover { background: #fff7ef; }
.g-btn-buy { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(232, 89, 12, .25); }
.g-btn-buy:hover { background: #d24f0a; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(232, 89, 12, .3); }
.g-btns-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.g-own-note { margin-top: 4px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13.5px; color: var(--muted); background: var(--bg-soft); }

/* 预购面板 */
.pre-panel { border: 1.5px solid var(--accent); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; background: #fffdf9; }
.pre-panel-head { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.pre-panel-head button { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 6px; }
.pre-panel .f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pre-panel .f2 label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 5px; }
.pre-panel input, .pre-panel textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 14.5px; font-family: inherit; }
.pre-panel input:focus, .pre-panel textarea:focus { outline: none; border-color: var(--accent); }
.pre-panel textarea { resize: vertical; min-height: 76px; margin-top: 12px; }
.pre-submit { width: 100%; margin-top: 12px; background: var(--accent); color: #fff; border: none; border-radius: 12px; padding: 13px; font-size: 15.5px; font-weight: 700; cursor: pointer; font-family: inherit; transition: .15s; }
.pre-submit:hover { background: #d24f0a; }
.pre-hint { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }

/* 描述 / 卖家 / 留言 */
.gdesc { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.gdesc h3 { font-size: 17px; margin-bottom: 10px; }
.gdesc p { color: var(--muted); font-size: 15px; white-space: pre-line; }
.seller-box { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--green-soft); padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.seller-box b { font-size: 15px; }
.seller-box .tel { font-size: 18px; font-weight: 800; color: var(--green-dark); letter-spacing: 1px; }
.inquiry-form { display: grid; gap: 12px; margin-top: 16px; }
.inquiry-form input, .inquiry-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-family: inherit; }
.inquiry-form input:focus, .inquiry-form textarea:focus { outline: none; border-color: var(--green); }
.inquiry-form textarea { resize: vertical; min-height: 100px; }

/* ---------- 结算 / 支付页 ---------- */
.ck-sum, .ck-card { padding: 24px; margin-bottom: 16px; }
.ck-sum-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.ck-sum-head h3 { font-size: 16px; }
.ck-prod { display: flex; gap: 16px; align-items: center; }
.ck-pimg { width: 84px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.ck-pimg img { width: 100%; height: 100%; object-fit: cover; }
.ck-pmain { flex: 1; min-width: 0; }
.ck-ptitle { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.ck-pprice { color: var(--accent); font-weight: 700; font-size: 14px; }
.ck-pqty { font-size: 13px; color: var(--muted); margin-top: 6px; }
.ck-pqty input { width: 70px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 13px; }
.ck-ptotal { text-align: right; font-size: 13px; color: var(--muted); }
.ck-ptotal b { display: block; color: var(--accent); font-size: 18px; margin-top: 2px; }
.ck-h { font-size: 16px; margin-bottom: 4px; }
.ck-card .f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pm-list { display: grid; gap: 10px; margin-top: 12px; }
.pm-item { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.pm-item.sel { border-color: var(--green); background: var(--green-soft); }
.pm-ico { font-size: 22px; }
.pm-name { font-weight: 600; font-size: 15px; }
.pm-sim { margin-left: auto; font-size: 11px; color: var(--muted); background: #eef0f3; padding: 2px 8px; border-radius: 999px; }
.pm-item input { display: none; }
.ck-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.ck-amount { font-size: 14px; }
.ck-amount b { color: var(--accent); font-size: 20px; }

.pay-box { padding: 26px 24px; }
.pay-money { text-align: center; padding: 10px 0 18px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.pay-money span { display: block; font-size: 13px; color: var(--muted); }
.pay-money b { font-size: 34px; color: var(--accent); }
.pay-paid { text-align: center; font-size: 22px; font-weight: 800; color: var(--green-dark); padding: 12px 0 18px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.pay-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid #f0f4f1; }
.pay-row span { color: var(--muted); flex-shrink: 0; }
.pay-row b { font-weight: 600; word-break: break-all; }
.pay-sim { font-style: normal; font-size: 11px; color: var(--muted); background: #eef0f3; padding: 1px 8px; border-radius: 999px; }
.pay-btn { margin-top: 18px; }
.pay-ok-actions { margin-top: 18px; text-align: center; }
@media (max-width: 640px) { .ck-card .f2 { grid-template-columns: 1fr; } }

/* ---------- 供求卡片网格（5 列 × 3 行 = 15 张/页） ---------- */
.trade-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
/* 供求工具栏：一条扁平白条，筛选按钮 + 搜索平铺其上（不再套内层框），发布按钮独立在右侧 */
.trade-toolbar {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 24px;
}
.toolbar-bar {
  width: fit-content;
  display: flex; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 5px 6px; box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
.tb-seg { display: flex; gap: 2px; }
.tb-seg .filter-pill {
  border: none; background: transparent; cursor: pointer;
  padding: 0 16px; height: 34px; line-height: 34px; border-radius: 8px;
  color: var(--muted); font-size: 14px; font-weight: 500;
  white-space: nowrap; transition: all .18s ease;
}
.tb-seg .filter-pill:hover { background: #eef2f0; color: var(--green-dark); }
.tb-seg .filter-pill.active { background: var(--green); color: #fff; font-weight: 600; }
.trade-search {
  display: flex; align-items: center;
  margin-left: 8px; padding-left: 14px;
  border-left: 1px solid var(--line); /* 竖分隔线代替内层框 */
}
.trade-search .ts-ico { color: var(--muted-2); font-size: 14px; flex-shrink: 0; }
.trade-search input {
  border: none; outline: none; background: transparent;
  font-size: 14px; padding: 0 12px; width: 220px; color: var(--ink);
}
.trade-search input::placeholder { color: var(--muted-2); }
.trade-search button {
  flex-shrink: 0;
  border: none; cursor: pointer;
  background: var(--green); color: #fff;
  font-size: 14px; font-weight: 600; height: 34px; padding: 0 22px;
  border-radius: 8px; transition: background .18s ease, transform .18s ease;
}
.trade-search button:hover { background: var(--green-dark); }
.trade-search button:active { transform: scale(.97); }
/* 发布信息：独立放在工具条右侧 */
#btn-publish {
  height: 40px; padding: 0 26px; border-radius: 999px;
  flex-shrink: 0; white-space: nowrap;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(46, 204, 113, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}
#btn-publish:hover { box-shadow: 0 4px 14px rgba(46, 204, 113, .35); transform: translateY(-1px); }
#btn-publish:active { transform: scale(.97); }
@media (max-width: 700px) {
  .trade-toolbar { flex-wrap: wrap; }
  #btn-publish { flex: 1; }
  /* 工具条占满整行，搜索框自适应收缩，避免横向滚动 */
  .toolbar-bar { width: 100%; }
  .trade-search { flex: 1; min-width: 0; }
  .trade-search input { flex: 1; min-width: 0; width: auto; }
}
/* 图文分离：图片独立 4:3、文字在下，不做整卡盒子（与基地页一致） */
.tcard { display: block; text-decoration: none; color: inherit; }
.tcard .timg { position: relative; border-radius: 12px; background: var(--bg-soft); overflow: hidden; }
.tcard .timg::before { content: ''; display: block; width: 100%; padding-top: 75%; } /* 4:3 撑高，兼容不支持 aspect-ratio 的浏览器 */
.tcard .timg img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.tcard:hover .timg img { transform: scale(1.05); }
.tcard .t-noimg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 40px; }
.tbadge { position: absolute; top: 8px; left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18); z-index: 1; }
.tbadge.supply { background: var(--green); }
.tbadge.demand { background: var(--blue); }
/* 图片下方文字装饰：标题类型色竖条、价格药丸、绿色分类 chip、虚线分隔脚部 */
.tcard .tbody { padding: 9px 2px 0; display: flex; flex-direction: column; gap: 6px; }
.tcard .t-title { font-size: 14px; font-weight: 600; line-height: 1.4; min-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; padding-left: 9px; transition: color .18s ease, transform .18s ease; }
.tcard .t-title::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--green); }
.tcard.t-demand .t-title::before { background: var(--blue); }
.tcard:hover .t-title { color: var(--green-dark); transform: translateY(-1px); }
.tcard .t-meta-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.tcard .t-price { font-size: 16px; font-weight: 800; color: var(--accent); background: rgba(232, 89, 12, .1); padding: 1px 10px; border-radius: 999px; flex-shrink: 0; display: inline-flex; align-items: baseline; gap: 3px; line-height: 1.5; }
.tcard .t-price small { font-size: 11px; font-weight: 500; color: var(--accent); opacity: .7; }
.tcard .t-price.t-na { font-size: 14px; color: var(--muted); background: rgba(100, 116, 139, .1); font-weight: 700; }
.tcard .t-cat { font-size: 11px; font-weight: 600; color: #fff; background: var(--green); padding: 2px 9px; border-radius: 999px; flex-shrink: 0; }
.tcard .t-foot { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.tcard .t-date { flex-shrink: 0; opacity: .8; display: inline-flex; align-items: center; gap: 3px; }

/* ---------- 供求详情 ---------- */
.trade-detail-page { max-width: 780px; margin: 0 auto; padding: 24px 40px 100px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(15, 23, 42, .04); }
.td-title { font-size: clamp(21px, 3vw, 28px); font-weight: 800; line-height: 1.4; margin: 18px 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-type { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.t-type.supply { background: var(--green-soft); color: var(--green-dark); }
.t-type.demand { background: #eaf3fd; color: var(--blue); }
.td-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.td-meta span { padding: 4px 13px; border-radius: 999px; background: var(--bg-soft); font-size: 13px; color: var(--muted); }
.td-meta span:first-child { background: rgba(232, 89, 12, .1); color: var(--accent); font-weight: 700; }
.td-desc { margin: 18px 0; padding: 16px 18px; background: var(--bg-soft); border-radius: 12px; font-size: 14.5px; line-height: 1.8; color: var(--ink); }
/* 顶部客服标：SVG 耳机图标在上 + 「客服」文字在下 */
.td-act { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 46px; height: 44px; flex-shrink: 0; text-decoration: none; cursor: pointer; border: 1px solid #dbe7ff; background: linear-gradient(180deg, #f6faff, #eef4ff); border-radius: 12px; box-shadow: 0 1px 3px rgba(37, 99, 235, .06); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.td-act:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(37, 99, 235, .18); border-color: #bcd2ff; }
.td-act-ico { width: 19px; height: 19px; color: #2563eb; }
.td-act-lbl { font-size: 10px; line-height: 1; color: #4b6bb3; font-weight: 600; letter-spacing: .5px; }

/* 客服聊天浮窗：只有聊天界面 + 角落小关闭钮 */
.cm-modal { position: relative; max-width: 420px; padding: 0; overflow: hidden; border-radius: 16px; }
.cm-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .92); color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer; box-shadow: 0 1px 4px rgba(15, 23, 42, .1); transition: background .15s, color .15s; }
.cm-x:hover { background: #fff; color: var(--ink); }
#chat-modal-body .chat-card { margin-top: 0; border: none; border-radius: 0; box-shadow: none; }
#chat-modal-body .chat-list { max-height: 46vh; }
#chat-modal-body .chat-head { padding-right: 54px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 30px 0 6px; }
.pg-btn { padding: 9px 20px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; transition: .15s; }
.pg-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green-dark); }
.pg-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-info { font-size: 13px; color: var(--muted); }
.pg-info b { color: var(--green-dark); }

@media (max-width: 1100px) {
  .trade-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tcard .t-date { display: none; }
}
@media (max-width: 900px) {
  .trade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .trade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .trade-detail-page { padding: 20px 16px 96px; }
}

/* ---------- 文章列表 ---------- */
.article-list { display: grid; gap: 14px; }
.article-item { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); transition: .15s; }
.article-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.article-item .a-cat { color: var(--green-dark); font-size: 13px; font-weight: 700; }
.article-item .a-title { font-size: 17px; font-weight: 700; margin: 6px 0; }
.article-item .a-excerpt { color: var(--muted); font-size: 14px; }
.article-item .a-date { font-size: 12.5px; color: var(--muted-2); margin-top: 8px; }
.article-body { max-width: 760px; margin: 0 auto; padding: 36px 40px 48px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(15, 23, 42, .04); }
.article-body h1 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; line-height: 1.4; }
.article-body .a-meta { color: var(--muted); font-size: 14px; margin: 14px 0 26px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.article-body .content { line-height: 1.85; font-size: 16px; color: #3a4a43; }
.article-body .content p { margin-bottom: 18px; }
.article-body .content h3 { margin: 30px 0 12px; color: var(--green-deep); font-size: 19px; }
.article-body .content li { margin-left: 1.4em; margin-bottom: 6px; }

/* ---------- 基地/合作社 ---------- */
/* ---------- 基地/合作社（采购找货源） ---------- */
.base-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 14px; }
/* 图文分离：图片就是图片（方形），文字就是文字，不做整卡盒子 */
.base-card { display: block; text-decoration: none; color: inherit; }
.base-card .b-img { position: relative; border-radius: 12px; background: var(--bg-soft); overflow: hidden; }
.base-card .b-img::before { content: ''; display: block; width: 100%; padding-top: 75%; } /* 4:3 撑高，兼容不支持 aspect-ratio 的浏览器 */
.base-card .b-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.base-card:hover .b-img img { transform: scale(1.05); }
.base-card .b-img .b-noimg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 40px; }
.b-badge { position: absolute; top: 8px; left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; z-index: 1; }
.b-badge.base { background: var(--green); color: #fff; }
.b-badge.coop { background: var(--blue); color: #fff; }
.base-card .b-body { padding: 9px 2px 0; display: flex; flex-direction: column; gap: 4px; }
.base-card .b-title { font-size: 14px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.base-card .b-region { color: var(--green-dark); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.base-card .b-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.base-card .b-tag { background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); font-size: 11px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.base-card .b-tag.cert { background: #fff7e6; border-color: #ffd591; color: #ad6800; }

/* 基地工具条：与供求对接同一套 toolbar-bar 结构 */
.base-toolbar { margin-bottom: 22px; }
.base-toolbar .tb-seg { flex-shrink: 0; }

/* 基地详情页 */
.base-detail-page { max-width: 820px; margin: 0 auto; padding: 24px 40px 56px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(15, 23, 42, .04); }
.detail-crumb { margin-bottom: 16px; }
.detail-crumb a { font-size: 14px; }
/* 图片轮播：左右滑动 + 箭头 + 圆点 */
.b-carousel { position: relative; border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
.b-car-viewport { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.b-car-viewport::-webkit-scrollbar { display: none; }
.b-car-slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); }
.b-car-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-car-slide .b-noimg { font-size: 72px; }
.b-car-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.92); border: none; box-shadow: 0 2px 8px rgba(15,23,42,.18); font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; opacity: 0; transition: opacity .18s ease; }
.b-carousel:hover .b-car-arrow { opacity: 1; }
.b-car-arrow.prev { left: 12px; }
.b-car-arrow.next { right: 12px; }
.b-car-dots { display: flex; justify-content: center; gap: 7px; padding: 10px 0 0; }
.b-car-dots span { width: 7px; height: 7px; border-radius: 999px; background: var(--line); cursor: pointer; transition: all .18s ease; }
.b-car-dots span.on { background: var(--green); width: 20px; }
.bd-title { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.bd-title .b-badge { position: static; }
.bd-region { color: var(--green-dark); font-size: 14px; margin-top: 6px; }
.bd-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.bd-m { background: var(--bg-soft); border-radius: 10px; padding: 10px 14px; }
.bd-m span { display: block; font-size: 12px; color: var(--muted-2); margin-bottom: 4px; }
.bd-m b { font-size: 14.5px; }
.bd-intro h3, .bd-contact h3 { font-size: 16px; margin-bottom: 10px; color: var(--green-deep); }
.bd-intro p { color: var(--muted); line-height: 1.85; font-size: 15px; }
/* 发布者可选排版：文字在前（轮播图移到介绍后面） */
.bd-layout-first .b-carousel { margin-top: 22px; }
.bd-contact { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.bd-crow { display: flex; gap: 12px; padding: 8px 0; font-size: 14.5px; }
.bd-cname { color: var(--muted); min-width: 90px; }
.bd-call { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; background: var(--green); color: #fff; font-weight: 600; padding: 10px 26px; border-radius: 999px; transition: background .18s ease, transform .18s ease; }
.bd-call:hover { background: var(--green-dark); color: #fff; opacity: 1; transform: translateY(-1px); }
.bd-nocontact { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 16px; background: var(--bg-soft); border-radius: 10px; color: var(--muted); font-size: 14px; }

/* ---------- 平台入口（首页） ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.entry {
  position: relative; display: block; background: #fff;
  border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 54px 26px 26px; box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease; overflow: hidden;
}
.entry::before {
  content: ""; position: absolute; top: 0; left: 26px; right: 26px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--ea), transparent 88%); opacity: .8;
  transition: opacity .2s ease;
}
.entry::after {
  content: ""; position: absolute; right: -30px; bottom: -30px;
  width: 118px; height: 118px; border-radius: 50%;
  background: radial-gradient(circle, var(--ea-glow), transparent 70%); opacity: .45;
  pointer-events: none;
}
.entry:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.entry:hover::before { opacity: 1; }
.entry .e-ico {
  width: 56px; height: 56px; border-radius: 18px; font-size: 28px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--ea-soft), var(--ea-bg));
  box-shadow: inset 0 0 0 1px var(--ea-line);
  transition: transform .25s ease;
}
.entry:hover .e-ico { transform: scale(1.12) rotate(-6deg); }
.entry .e-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.entry .e-desc { color: var(--muted); font-size: 14px; }
.entry .e-go {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ea-soft); color: var(--ea);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.entry:hover .e-go { transform: translateY(-50%) translateX(3px); background: var(--ea); color: #fff; }
/* 平台入口配色（每格独立强调色） */
.entry.e-green  { --ea: #2ecc71; --ea-soft: rgba(46, 204, 113, .13); --ea-bg: rgba(46, 204, 113, .04); --ea-line: rgba(46, 204, 113, .28); --ea-glow: rgba(46, 204, 113, .22); }
.entry.e-orange { --ea: #e8590c; --ea-soft: rgba(232, 89, 12, .13); --ea-bg: rgba(232, 89, 12, .04); --ea-line: rgba(232, 89, 12, .26); --ea-glow: rgba(232, 89, 12, .20); }
.entry.e-blue   { --ea: #3498db; --ea-soft: rgba(52, 152, 219, .13); --ea-bg: rgba(52, 152, 219, .04); --ea-line: rgba(52, 152, 219, .28); --ea-glow: rgba(52, 152, 219, .20); }
.entry.e-purple { --ea: #9b59b6; --ea-soft: rgba(155, 89, 182, .13); --ea-bg: rgba(155, 89, 182, .04); --ea-line: rgba(155, 89, 182, .28); --ea-glow: rgba(155, 89, 182, .20); }

/* ---------- CTA 卡片（横向平铺横幅：左文案 + 右按钮） ---------- */
.cta-band { padding: 0 0 56px; background: linear-gradient(135deg, #eefcf3, #e8f4fd); }
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; text-align: left; padding: 40px clamp(24px, 5vw, 72px); border: none; box-shadow: none; }
.cta-card h2 { margin: 0; font-size: clamp(22px, 3.2vw, 30px); font-weight: 800; }
.cta-card p { color: var(--muted); margin: 8px 0 0; }
.cta-card .btn { flex-shrink: 0; font-size: 16px; padding: 12px 30px; }
@media (max-width: 640px) {
  .cta-card { justify-content: center; text-align: center; padding: 32px 20px; }
  .cta-card p { margin: 8px auto 0; }
}

/* ---------- 状态徽章 ---------- */
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-pending { background: #fff7e6; color: #b45309; }
.badge-approved { background: var(--green-soft); color: var(--green-dark); }
.badge-rejected { background: #fdecea; color: #c0392b; }
.badge-offline { background: #eef0f3; color: var(--muted); }
.badge-unread { background: var(--green-soft); color: var(--green-dark); }
.badge-read { background: #eef0f3; color: var(--muted); }

/* ---------- 通用表单 ---------- */
.mp-form { display: grid; gap: 16px; }
.mp-form label { font-size: 14px; font-weight: 600; }
.mp-form input, .mp-form select, .mp-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; font-size: 15px; font-family: inherit; background: #fff; }
.mp-form input:focus, .mp-form select:focus, .mp-form textarea:focus { outline: none; border-color: var(--green); }
.mp-form textarea { resize: vertical; min-height: 110px; }
.form-hint { font-size: 12.5px; color: var(--muted-2); }

/* ---------- 认证卡片 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 60px 0; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 34px 32px; box-shadow: var(--shadow-lg); }
.auth-tabs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.auth-tabs button { flex: 1; border: none; background: none; padding: 9px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: var(--green); color: #fff; }

/* ---------- 图片上传 ---------- */
.upload-zone { border: 2px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; }
.upload-zone:hover { border-color: var(--green); color: var(--green-dark); }
.upload-previews { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.up-item { position: relative; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.up-item img { width: 100%; height: 100%; object-fit: cover; }
.up-item .x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; border: none; cursor: pointer; font-size: 12px; line-height: 20px; }

/* ---------- 我的中心 ---------- */
.me-tabs { display: flex; gap: 6px; margin-bottom: 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.me-tabs button { border: none; background: none; padding: 12px 18px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.me-tabs button.active { color: var(--green-dark); border-bottom-color: var(--green); }
.me-subtabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.me-subtabs button { border: 1px solid var(--line); background: #fff; color: var(--muted); padding: 7px 16px; border-radius: 999px; font-size: 13.5px; cursor: pointer; transition: .15s; }
.me-subtabs button.active { background: var(--green); border-color: var(--green); color: #fff; }
.me-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.me-item .mi-main { flex: 1; }
.me-item .mi-title { font-size: 16px; font-weight: 700; }
.me-item .mi-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.me-item .mi-actions { display: flex; gap: 8px; flex-shrink: 0; }
.mini-btn { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; cursor: pointer; transition: .15s; }
.mini-btn:hover { border-color: var(--green); color: var(--green-dark); }
.mini-btn.danger:hover { border-color: #c0392b; color: #c0392b; }
.mini-btn.primary { border-color: var(--green); background: var(--green); color: #fff; }
.mini-btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--muted); padding: 50px 0; font-size: 15px; }
.empty .e-ico { font-size: 44px; display: block; margin-bottom: 10px; }

/* ---------- 模态 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(20,40,32,.45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 20px; max-width: 560px; width: 100%; padding: 28px; box-shadow: var(--shadow-lg); max-height: 88vh; overflow: auto; }
.modal h3 { font-size: 19px; margin-bottom: 20px; }

/* ---------- 提示条 ---------- */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 24px; border-radius: 999px; font-size: 14px; z-index: 300; box-shadow: var(--shadow-lg); opacity: 0; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; }

/* ---------- 响应式补充 ---------- */
@media (max-width: 1200px) {
  .base-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .product-grid, .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-col { grid-template-columns: 1fr; }
  .base-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* 单列布局：取消双栏固定高度，恢复正常页面滚动 */
  .goods-section { height: auto; padding: 50px 0; }
  .goods-section .container { height: auto; display: block; }
  .goods-grid { flex: none; min-height: 0; grid-template-columns: 1fr; gap: 24px; }
  .goods-left { overflow: visible; padding-right: 0; }
  .ginfo { overflow: visible; }
  .detail-tabs { position: sticky; top: 68px; }
}
@media (max-width: 640px) {
  .product-grid, .entry-grid { grid-template-columns: 1fr; }
  .base-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .pre-panel .f2 { grid-template-columns: 1fr; }
  .g-btns { grid-template-columns: 1fr; }
  .g-rows { grid-template-columns: 1fr; }
  .base-detail-page { padding: 20px 18px 44px; }
  .base-toolbar .toolbar-bar { width: 100%; justify-content: center; }
  .base-toolbar .tb-seg .filter-pill { flex: 1; }
  .b-car-arrow { opacity: 1; width: 32px; height: 32px; }
  .bd-title { font-size: 20px; }
}

/* ============================================================
   今日农业资讯 · 样式
   ============================================================ */

/* ---------- 首页资讯条 ---------- */
.news-band { background: var(--bg-soft); }

/* 今日精选大卡 */
.news-lead-card {
  display: grid; grid-template-columns: 340px 1fr; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.news-lead-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.news-lead-card .nl-img { background: var(--green-soft); display: flex; align-items: center; justify-content: center; min-height: 210px; }
.news-lead-card .nl-img img { width: 100%; height: 100%; aspect-ratio: 16/10; object-fit: cover; }
.news-lead-card .nl-body { padding: 26px 30px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.nl-cat { padding: 3px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 12.5px; font-weight: 700; }
.nl-lang { padding: 2px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.nl-lang.zh { background: var(--green); color: #fff; }
.nl-lang.en { background: #eaf3fd; color: var(--blue); }
.news-lead-card .nl-title { font-size: 22px; font-weight: 800; line-height: 1.4; }
.news-lead-card .nl-summary { color: var(--muted); font-size: 14.5px; }
.news-lead-card .nl-meta { margin-top: auto; color: var(--muted-2); font-size: 12.5px; }

/* 横向无缝滚动 marquee */
.marquee { margin-top: 24px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.marquee-track { display: flex; gap: 18px; width: max-content; padding: 6px 0 10px; }
/* 无缝滚动：间距改用每卡片 margin-right，使循环周期 = 每段宽度（gap 会导致半缝错位、接缝跳动） */
.marquee-track.animate { gap: 0; animation: marquee 42s linear infinite; }
.marquee-track.animate .ncard { margin-right: 18px; }
.marquee:hover .marquee-track.animate { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-track.no-anim { flex-wrap: wrap; justify-content: center; width: 100%; }
.marquee-track .ncard { flex: 0 0 auto; width: 280px; }

/* 资讯卡片 */
.ncard {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.ncard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ncard .nimg { position: relative; aspect-ratio: 16/10; background: var(--green-soft); display: flex; align-items: center; justify-content: center; font-size: 40px; overflow: hidden; }
.ncard .nimg img { width: 100%; height: 100%; object-fit: cover; }
.noverlay { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; }
.nlang { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.nlang.zh { background: rgba(46,204,113,.94); color: #fff; }
.nlang.en { background: rgba(52,152,219,.94); color: #fff; }
.ncat { padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--green-dark); font-size: 11px; font-weight: 700; }
.ncard .ntitle {
  padding: 12px 14px 4px; font-size: 14.5px; font-weight: 600; line-height: 1.5;
  min-height: calc(2 * 1.5em); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ncard .nmeta { padding: 0 14px 14px; font-size: 12px; color: var(--muted-2); }

/* ---------- 资讯推荐位：大图轮播 ---------- */
.news-carousel { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow-lg); margin-bottom: 26px; }
.car-track { display: flex; transition: transform .55s cubic-bezier(.25, .8, .35, 1); }
.car-slide { position: relative; flex: 0 0 100%; }
.car-slide a { display: block; }
.car-slide .cs-img { aspect-ratio: 21/8; background: var(--green-soft); display: flex; align-items: center; justify-content: center; font-size: 60px; }
.car-slide .cs-img img { width: 100%; height: 100%; object-fit: cover; }
.car-slide .cs-body {
  position: absolute; inset: auto 0 0 0; padding: 34px 38px;
  background: linear-gradient(180deg, transparent, rgba(8, 28, 18, .82)); color: #fff;
}
.car-slide .cs-tags { display: flex; gap: 8px; margin-bottom: 10px; }
.cs-tag { padding: 3px 14px; border-radius: 999px; background: var(--green); color: #fff; font-size: 12.5px; font-weight: 700; }
.cs-lang { padding: 3px 14px; border-radius: 999px; background: rgba(255,255,255,.22); color: #fff; font-size: 12.5px; font-weight: 700; }
.car-slide .cs-title { font-size: clamp(20px, 3vw, 30px); font-weight: 800; line-height: 1.35; max-width: 72%; }
.car-slide .cs-summary { color: rgba(255,255,255,.85); font-size: 14.5px; margin-top: 8px; max-width: 62%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.88); color: var(--ink); font-size: 24px; line-height: 1;
  opacity: 0; transition: opacity .2s ease;
}
.news-carousel:hover .car-arrow { opacity: 1; }
.car-arrow.prev { left: 16px; }
.car-arrow.next { right: 16px; }
.car-dots { position: absolute; bottom: 16px; right: 22px; display: flex; gap: 8px; z-index: 5; }
.car-dots button { width: 9px; height: 9px; border-radius: 999px; border: none; background: rgba(255,255,255,.5); cursor: pointer; transition: .2s; }
.car-dots button.active { width: 24px; background: #fff; }

/* 资讯工具栏：分类 + 语言切换 */
.news-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.news-toolbar .filter-bar { margin-bottom: 0; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.lang-switch button { border: none; background: none; padding: 7px 18px; border-radius: 999px; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: .15s; }
.lang-switch button:hover { color: var(--green-dark); }
.lang-switch button.active { background: var(--green); color: #fff; font-weight: 600; }

/* ---------- 资讯列表页 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.related h3 { font-size: 19px; margin: 36px 0 18px; }

/* ---------- 资讯详情 ---------- */
/* 次级页面（单栏文章）：去掉 hero 与三栏门户，正文居中可读列 */
.agri-detail-page { max-width: 780px; margin: 0 auto; padding: 36px 40px 64px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(15, 23, 42, .04); }
.detail-crumb { margin-bottom: 24px; font-size: 13px; color: var(--muted); }
.detail-crumb a { color: var(--green); text-decoration: none; font-weight: 600; }
.detail-crumb a:hover { text-decoration: underline; }
.detail-crumb .sep { margin: 0 6px; color: var(--muted); }
.detail-crumb .cur { font-weight: 600; color: var(--ink); }
.detail-crumb .cur::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-right: 7px; vertical-align: 1px; }
.news-detail { max-width: 760px; margin: 0 auto; }
.nd-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; background: var(--green-soft); box-shadow: var(--shadow); }
.nd-hero img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.news-detail h1 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; line-height: 1.4; }
.nd-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.nd-meta span { padding: 3px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); font-size: 12.5px; }
.nd-lead { font-size: 16px; color: #3a4a43; background: var(--bg-soft); border-left: 4px solid var(--green); padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; }
.nd-body { line-height: 1.85; font-size: 16px; color: #3a4a43; }
.nd-body p { margin-bottom: 18px; }
.nd-body h2 { font-size: 21px; font-weight: 800; margin: 28px 0 12px; color: var(--ink); }
.nd-body h3 { font-size: 18px; font-weight: 800; margin: 22px 0 10px; color: var(--ink); }
.nd-body h4 { font-size: 16.5px; font-weight: 800; margin: 18px 0 8px; color: var(--ink); }
.nd-body img { max-width: 100%; border-radius: 12px; margin: 12px 0 20px; display: block; box-shadow: var(--shadow); }
.nd-body ul, .nd-body ol { margin: 0 0 18px; padding-left: 26px; }
.nd-body li { margin-bottom: 6px; }
.nd-body blockquote { border-left: 4px solid var(--green); background: var(--bg-soft); padding: 10px 16px; border-radius: 10px; margin: 0 0 18px; color: var(--muted); }
.nd-body a { color: var(--green-dark); text-decoration: underline; }
.nd-body strong { color: var(--ink); }

/* 投稿富文本编辑器（Word 式） */
.rte { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.rte-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.rte-toolbar button { min-width: 30px; height: 30px; padding: 0 9px; border: none; border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; font-family: inherit; cursor: pointer; transition: background .15s ease, color .15s ease; }
.rte-toolbar button:hover { background: var(--green-soft); color: var(--green-dark); }
.rte-toolbar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; align-self: center; }
.rte-body { min-height: 200px; max-height: 420px; overflow-y: auto; padding: 12px 14px; font-size: 15px; line-height: 1.8; color: var(--ink); outline: none; }
.rte-body:focus { box-shadow: inset 0 0 0 2px rgba(46, 204, 113, .35); }
.rte-body:empty::before { content: attr(data-placeholder); color: var(--muted-2); pointer-events: none; }
.rte-body img { max-width: 100%; border-radius: 10px; margin: 10px 0; display: block; box-shadow: var(--shadow); }
.rte-body h2 { font-size: 20px; font-weight: 800; margin: 14px 0 8px; }
.rte-body h3 { font-size: 17px; font-weight: 800; margin: 12px 0 6px; }
.rte-body blockquote { border-left: 4px solid var(--green); background: var(--bg-soft); padding: 8px 12px; border-radius: 8px; margin: 10px 0; color: var(--muted); }
.rte-body ul, .rte-body ol { margin: 8px 0 12px; padding-left: 24px; }
.rte-tip { padding: 4px 12px 8px; font-size: 12px; color: var(--muted-2); min-height: 18px; }
.nd-summary p { line-height: 1.85; font-size: 16px; color: #3a4a43; margin-bottom: 18px; }

/* ---------- 顶尖农业技术 ---------- */

/* 顶尖技术卡片角标（复用 .ncard/.noverlay） */
.acard .noverlay { align-items: flex-start; }
.acard .ntags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.atag { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; }
.atag.at-video { background: rgba(232, 89, 12, .94); }
.atag.at-image { background: rgba(52, 152, 219, .94); }
.atag.at-article { background: rgba(46, 204, 113, .94); }
.atag.region.dom { background: rgba(20, 90, 50, .88); }
.atag.region.intl { background: rgba(52, 152, 219, .88); }
.acard .nmeta { display: flex; justify-content: space-between; gap: 8px; }
.acard .nm-loc { color: var(--muted); }
.acard .nm-src { color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 微博式信息流 */
.feed-list { display: flex; flex-direction: column; gap: 18px; }
.fcard {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 6px; box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
  transition: box-shadow .2s ease, transform .2s ease; text-decoration: none; color: inherit;
}
.fcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.fc-img img { transition: transform .35s ease; }
.fcard:hover .fc-img img { transform: scale(1.07); }
/* 分类彩色胶囊（fcard 头） */
.at { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; }
.at.cat-equip { background: rgba(232,89,12,.94); }
.at.cat-smart { background: rgba(46,204,113,.94); }
.at.cat-vertical { background: rgba(52,152,219,.94); }
.at.cat-breeding { background: rgba(122,79,208,.94); }
.at.cat-plant { background: rgba(20,90,50,.88); }
.at.cat-other { background: rgba(95,111,138,.9); }
.at.cat-default { background: rgba(129,140,145,.9); }
.fc-head { display: flex; align-items: center; gap: 12px; }
.fc-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--green-soft); }
.fc-who { min-width: 0; flex: 1; }
.fc-name { font-size: 15px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; }
.fc-verify { font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: var(--green); border-radius: 4px; padding: 1px 5px; }
.fc-verify[title="用户投稿"] { background: #e8590c; }
.fc-sub { display: block; font-size: 12px; color: var(--muted-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-tags { display: flex; gap: 6px; flex-shrink: 0; }
.fc-title { font-size: 19px; font-weight: 700; line-height: 1.5; margin: 14px 0 6px; color: var(--ink); }
.fc-summary { font-size: 14px; line-height: 1.7; color: var(--muted); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-media { margin-bottom: 12px; }
.fc-img { position: relative; border-radius: 10px; overflow: hidden; background: var(--green-soft); aspect-ratio: 16/9; }
.fc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-video img { filter: brightness(.82); }
.fc-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; background: rgba(232, 89, 12, .92); color: #fff;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28); text-indent: 3px;
}
.fc-foot { display: flex; align-items: center; gap: 18px; padding: 12px 2px; border-top: 1px solid var(--line); }
.fc-stat { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.fc-stat b { color: var(--ink); font-weight: 700; }
.fc-v { color: #e8590c; font-weight: 700; }
.fc-more { margin-left: auto; font-size: 13px; color: var(--green); font-weight: 700; }

/* 相关技术（紧凑行） */
.related-list { display: flex; flex-direction: column; gap: 12px; }
.rel-row { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-decoration: none; color: inherit; transition: box-shadow .2s ease; }
.rel-row:hover { box-shadow: var(--shadow); }
.rel-row img { width: 108px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--green-soft); transition: transform .3s ease; }
.rel-row:hover img { transform: scale(1.05); }
.rel-body { min-width: 0; }
.rel-t { font-size: 14.5px; font-weight: 700; line-height: 1.45; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel-s { font-size: 12.5px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rel-m { font-size: 12px; color: var(--muted-2); margin-top: 6px; }

/* 视频内嵌（16/9） */
.video-embed { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16/9; margin-bottom: 26px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 投稿弹窗 */
.modal.m-lg { max-width: 660px; }
.modal .m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.modal .m-head h3 { margin-bottom: 0; }
.m-close { width: 34px; height: 34px; border: none; border-radius: 50%; background: var(--bg-soft); color: var(--muted); font-size: 15px; cursor: pointer; flex-shrink: 0; }
.m-close:hover { background: var(--green-soft); color: var(--green-dark); }
.modal .m-foot { display: flex; gap: 12px; margin-top: 4px; }
.upload-tip { font-size: 12.5px; color: var(--muted-2); margin-top: 8px; min-height: 16px; }

/* 底部「平台技术能力」与精选内容的分隔 */
.cap-sec { border-top: 1px dashed var(--line); }

/* ---------- 资讯响应式 ---------- */
@media (max-width: 980px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .news-lead-card { grid-template-columns: 1fr; }
  .news-lead-card .nl-img { min-height: 0; }
  .news-lead-card .nl-img img { aspect-ratio: 16/9; }
}
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .car-slide .cs-img { aspect-ratio: 16/9; }
  .car-slide .cs-body { padding: 16px 18px; }
  .car-slide .cs-title { max-width: 100%; font-size: 18px; }
  .car-slide .cs-summary { display: none; }
  .car-dots { bottom: 10px; right: 14px; }
  .car-arrow { width: 34px; height: 34px; font-size: 20px; opacity: 1; }
  .news-toolbar { flex-direction: column; align-items: stretch; }
  .lang-switch { align-self: flex-start; }
  /* 移动端 marquee 降级为横向触摸滚动 */
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track.animate { animation: none; }
  .marquee-track { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; padding-bottom: 12px; }
  .marquee-track .ncard { width: 240px; }
  #news-lead { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track.animate { animation: none; }
  html.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- 商品详情导航条（图片下方，收在左侧图片列）：评价 / 参数 / 图文详情 / 留言 ---------- */
.goods-left { min-width: 0; }
.detail-wrap { margin-top: 20px; }
.detail-tabs {
  position: sticky; top: 0; z-index: 50;
  display: flex; gap: 2px;
  background: var(--white);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 0 8px;
  box-shadow: 0 1px 0 var(--line);
  overflow-x: auto;
}
.dtab {
  flex: 1 0 auto;
  padding: 12px 10px;
  font-size: 14px; font-weight: 600;
  color: var(--muted); background: transparent;
  border: none; cursor: pointer;
  position: relative;
  font-family: inherit; white-space: nowrap;
  transition: color .15s;
}
.dtab:hover { color: var(--green-dark); }
.dtab.active { color: var(--accent); }
.dtab.active::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.detail-body {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  padding: 26px 30px;
  min-height: 120px;
}
.detail-panel { display: none; }

/* 参数信息 */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th {
  width: 140px; text-align: left;
  padding: 12px 16px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--line);
}
.spec-table td { padding: 12px 16px; font-size: 14.5px; border: 1px solid var(--line); color: var(--ink); }

/* 图文详情 */
.dp-sec { margin-bottom: 26px; }
.dp-sec:last-child { margin-bottom: 0; }
.dp-h { font-size: 17px; margin-bottom: 14px; padding-left: 10px; border-left: 3px solid var(--accent); }
.dp-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.dp-desc { font-size: 15px; line-height: 1.9; color: #3a4a43; white-space: pre-line; }
.dp-imgs { display: grid; gap: 16px; }
.dimg { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
.dimg-err { padding: 40px; text-align: center; color: var(--muted); background: var(--bg-soft); border-radius: 12px; }

/* 用户评价 */
.rev-summary {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 18px;
}
.rev-avg { font-size: 40px; font-weight: 900; color: var(--accent); line-height: 1; }
.rev-avg-side { display: flex; flex-direction: column; gap: 4px; }
.stars { color: #ffa940; letter-spacing: 2px; font-size: 16px; }
.rev-count { font-size: 13px; color: var(--muted); }

.rev-form { border: 1px dashed var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; background: #fff; }
.rev-form-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.rev-stars { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.rev-star { font-size: 30px; color: #d8dde0; cursor: pointer; transition: transform .1s, color .1s; user-select: none; }
.rev-star:hover { transform: scale(1.15); }
.rev-star.on { color: #ffa940; }
.rev-star-tip { font-size: 13px; color: var(--muted); margin-left: 8px; }
.rev-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-family: inherit; resize: vertical; min-height: 90px; margin-bottom: 12px; }
.rev-form textarea:focus { outline: none; border-color: var(--green); }
.rev-mine { padding: 12px 16px; background: var(--green-soft); border-radius: 10px; font-size: 14px; margin-bottom: 16px; }

.rev-list { display: grid; }
.rev-item { padding: 16px 4px; border-bottom: 1px dashed var(--line); }
.rev-item:last-child { border-bottom: none; }
.rev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.rev-user { font-size: 14px; font-weight: 600; }
.rev-date { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.rev-content { font-size: 14.5px; line-height: 1.75; color: #3a4a43; }

@media (max-width: 640px) {
  .detail-tabs { padding: 0 6px; }
  .detail-body { padding: 18px 16px; }
  .dtab { padding: 12px 14px; font-size: 14px; }
  .rev-summary { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fcard { padding: 14px 14px 4px; border-radius: 12px; }
  .fc-avatar { width: 38px; height: 38px; font-size: 19px; }
  .fc-title { font-size: 17px; }
  .fc-sub { max-width: 70%; }
  .fc-play { width: 46px; height: 46px; font-size: 18px; }
  .fc-foot { gap: 12px; flex-wrap: wrap; }
  .rel-row img { width: 92px; height: 64px; }
}

/* ---------- 私信沟通（详情页在线沟通 + 我的中心消息） ---------- */
.chat-card { margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
/* 客服小标头：圆形头像 + 在线状态徽章 */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #f0faf4, #eefbf4); }
.ch-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 21px; background: linear-gradient(135deg, var(--green), #27ae60); color: #fff; box-shadow: 0 3px 10px rgba(46, 204, 113, .35); }
.ch-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-name { font-size: 14.5px; font-weight: 700; color: var(--green-deep); }
.ch-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-status { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; font-size: 11.5px; font-weight: 600; color: var(--green-dark); background: rgba(46, 204, 113, .12); padding: 3px 10px; border-radius: 999px; }
.ch-status i { width: 7px; height: 7px; border-radius: 50%; background: #27ae60; animation: ch-pulse 1.8s infinite; }
@keyframes ch-pulse {
  0% { box-shadow: 0 0 0 0 rgba(39, 174, 96, .45); }
  70% { box-shadow: 0 0 0 6px rgba(39, 174, 96, 0); }
  100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}
.chat-list { max-height: 340px; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-soft); }
.chat-empty { text-align: center; color: var(--muted-2); font-size: 13px; padding: 18px 0 10px; }
.chat-row { display: flex; gap: 8px; align-items: flex-start; }
.chat-row.mine { flex-direction: row-reverse; }
.cb-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.chat-row.mine .cb-avatar { background: var(--accent); }
.cb-main { max-width: 72%; display: flex; flex-direction: column; gap: 3px; }
.chat-row.mine .cb-main { align-items: flex-end; }
.cb-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted-2); }
.cb-owner { display: inline-block; background: var(--green); color: #fff; font-size: 10px; padding: 0 6px; border-radius: 999px; line-height: 16px; }
.cb-content { padding: 9px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--ink); word-break: break-word; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.chat-row.mine .cb-content { background: linear-gradient(135deg, var(--green), #27ae60); border-color: transparent; color: #fff; }
.chat-inputbar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-inputbar input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 14px; outline: none; color: var(--ink); background: var(--bg-soft); }
.chat-inputbar input:focus { border-color: var(--green); background: #fff; }
.chat-inputbar button { border: none; cursor: pointer; background: linear-gradient(135deg, var(--green), #27ae60); color: #fff; font-size: 13.5px; font-weight: 600; padding: 0 22px; border-radius: 999px; box-shadow: 0 3px 10px rgba(46, 204, 113, .3); transition: transform .18s ease, box-shadow .18s ease; }
.chat-inputbar button:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(46, 204, 113, .4); }
.chat-login { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.chat-login button { margin-top: 10px; border: none; cursor: pointer; background: var(--green); color: #fff; font-weight: 600; padding: 9px 24px; border-radius: 999px; }
.chat-self { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* 我的中心：会话列表 + 线程 */
.conv-list { display: grid; gap: 10px; }
.conv-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: .15s; text-align: left; width: 100%; font-family: inherit; }
.conv-row:hover { border-color: var(--green); transform: translateY(-1px); box-shadow: var(--shadow); }
.conv-img { width: 56px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--bg-soft); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.conv-body { flex: 1; min-width: 0; }
.conv-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-last { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.conv-right { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv-time { font-size: 11px; color: var(--muted-2); }
.conv-unread { min-width: 18px; height: 18px; border-radius: 999px; background: #f04141; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.conv-type { font-size: 10px; color: var(--muted-2); background: var(--bg-soft); border-radius: 999px; padding: 1px 7px; }
.chat-thread-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chat-back { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--ink); }
.chat-thread-title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }

/* ============================================================
   技术指导 articles：精选大卡 + 卡片网格 + 详情页
   图片高度统一走 padding-top 撑高法（兼容旧浏览器，不用 aspect-ratio）
   ============================================================ */

/* ---------- 分类角标 / 徽章（按分类配色） ---------- */
.a-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: 999px;
  color: #fff; font-size: 12px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.22); line-height: 1.5; max-width: calc(100% - 24px);
}
.a-badge.grow   { background: var(--green-dark); }
.a-badge.pest   { background: #c0392b; }
.a-badge.soil   { background: #b45309; }
.a-badge.smart  { background: #2563eb; }
.a-badge.policy { background: #7c3aed; }

/* ---------- 封面图片：padding-top 撑高 + 绝对定位填满 ---------- */
.ac-img, .ad-cover { position: relative; overflow: hidden; background: var(--green-soft); }
.ac-img::before, .ad-cover::before { content: ''; display: block; width: 100%; }
.ac-img::before { padding-top: 62.5%; } /* 16:10 网格卡片 */
.ad-cover::before { padding-top: 41%; } /* ~2.4:1 详情横幅 */
.ac-img img, .ad-cover img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
}
.ac-img:hover img { transform: scale(1.045); }

/* 无图 / 图加载失败兜底：分类 emoji 绝对居中 */
.art-noimg {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 56px; line-height: 1; display: block;
}

/* ---------- 精选大卡（顶部主视觉，替代原 Hero） ---------- */
.art-feat {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(20, 90, 50, .08), 0 2px 8px rgba(15, 23, 42, .04);
  transition: transform .3s ease, box-shadow .3s ease;
}
.art-feat:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(20, 90, 50, .15); }
.af-media { position: relative; overflow: hidden; background: var(--green-soft); }
.af-media::before { content: ''; display: block; width: 100%; padding-top: 50%; } /* 2:1（原 4:3 的 2/3） */
.af-media img {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .55s ease;
}
.art-feat:hover .af-media img { transform: scale(1.055); }
/* 图片底部渐变遮罩，与文字区自然过渡 */
.af-media::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: linear-gradient(180deg, transparent, rgba(14, 50, 32, .22));
  pointer-events: none;
}
.af-media > .art-noimg { font-size: 72px; }
/* 「最新推荐」丝带角标 */
.af-ribbon {
  position: absolute; top: 16px; left: -34px; z-index: 3;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, var(--accent), #f59f00);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  padding: 5px 40px; box-shadow: 0 2px 10px rgba(232, 89, 12, .35);
}
/* 精选卡内分类徽章移到图片左下角，避开丝带 */
.art-feat .a-badge { top: auto; bottom: 14px; left: 14px; }
.af-body {
  position: relative;
  padding: 32px 34px 28px 38px;
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
/* 左侧竖向渐变条装饰 */
.af-body::before {
  content: ''; position: absolute; left: 0; top: 26px; bottom: 26px; width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green), #a8e063);
}
.af-title { font-size: clamp(21px, 2.7vw, 27px); font-weight: 800; line-height: 1.45; }
.af-title:hover { color: var(--green-dark); }
.af-excerpt {
  color: var(--muted); font-size: 14.5px; line-height: 1.8;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.af-foot {
  margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; width: 100%;
}
.af-date { color: var(--muted-2); font-size: 13px; }
.af-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 20px; border-radius: 999px;
  background: linear-gradient(135deg, var(--green), #27ae60);
  color: #fff; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(46, 204, 113, .3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.art-feat:hover .af-btn { transform: translateX(3px); box-shadow: 0 6px 18px rgba(46, 204, 113, .4); }

/* ---------- 卡片网格 ---------- */
.art-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.art-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .05);
  transition: transform .28s ease, box-shadow .28s ease;
}
.art-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.ac-body { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.ac-title { font-size: 16.5px; font-weight: 700; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-title:hover { color: var(--green-dark); }
.ac-excerpt { color: var(--muted); font-size: 13.5px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted-2); font-size: 12.5px; }
.ac-more { color: var(--green-dark); font-weight: 700; font-size: 13px; }

/* ---------- 详情页 ---------- */
.art-detail { max-width: 860px; margin: 0 auto; }
.art-detail-back { margin-bottom: 18px; font-size: 14px; }
.art-detail-back a { color: var(--muted); }
.art-detail-back a:hover { color: var(--green-dark); opacity: 1; }
.art-detail .article-body { max-width: 100%; padding: 0; border: none; box-shadow: none; background: transparent; }
.ad-cover { border-radius: var(--radius); }
.ad-cover-noimg { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--green-soft), #fdf6ec); }
.ad-title { margin-top: 26px; font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; line-height: 1.4; }
.ad-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--muted); font-size: 13.5px; margin: 14px 0 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.ad-cat { display: inline-flex; align-items: center; gap: 4px; padding: 3px 12px; border-radius: 999px; color: #fff; font-size: 12.5px; font-weight: 600; }
.ad-cat.grow   { background: var(--green-dark); }
.ad-cat.pest   { background: #c0392b; }
.ad-cat.soil   { background: #b45309; }
.ad-cat.smart  { background: #2563eb; }
.ad-cat.policy { background: #7c3aed; }
.ad-tail { text-align: center; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.ad-tail-line { display: block; width: 60px; height: 3px; border-radius: 999px; background: var(--green); margin: 0 auto 14px; }
.ad-tail-note { color: var(--muted-2); font-size: 12.5px; margin-bottom: 18px; }

/* ---------- 技术指导响应式 ---------- */
@media (max-width: 980px) {
  .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-feat { grid-template-columns: minmax(0, 1fr); }
  .af-media::before { padding-top: 37.5%; } /* 堆叠时 16:9 的 2/3 */
  .af-body { padding: 22px 26px 22px 30px; }
}
@media (max-width: 640px) {
  .art-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .af-body { padding: 18px 22px 20px 26px; }
  .af-excerpt { -webkit-line-clamp: 2; }
  .af-ribbon { font-size: 10px; padding: 4px 36px; left: -32px; }
  .ad-cover::before { padding-top: 56.25%; }
  .ad-title { margin-top: 20px; }
}
