/* ============================================================
   GreenLife Packaging — 样式表
   无外部依赖,不加载第三方字体/CDN,加载快且隐私友好
   ============================================================ */

:root {
  --green-900: #0b3d26;
  --green-800: #0f5132;
  --green-600: #16a34a;
  --green-300: #86efac;
  --green-050: #e8f3ec;
  --ink: #16211c;
  --ink-soft: #4b5b53;
  --line: #dde5e0;
  --bg: #ffffff;
  --bg-alt: #f6f9f7;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(11, 61, 38, .06), 0 4px 14px rgba(11, 61, 38, .05);
  --shadow-md: 0 8px 30px rgba(11, 61, 38, .10);
  --wrap: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- 语言切换机制 ---------- */
html[data-lang="zh"] .lang-en { display: none !important; }
html[data-lang="en"] .lang-zh { display: none !important; }

img, svg { max-width: 100%; }

a { color: var(--green-800); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

mark {
  background: linear-gradient(transparent 62%, var(--green-300) 62%);
  color: inherit;
  padding: 0 .1em;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green-800); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--green-600); outline-offset: 2px; border-radius: 4px; }

/* ==================== 头部 ==================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--green-900); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; color: var(--green-600); flex: none; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.12rem; letter-spacing: -.02em; }
.brand-text em { font-style: normal; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--green-600); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 14px; border-radius: 8px; color: var(--ink); font-size: .95rem; font-weight: 500;
}
.site-nav a:hover { background: var(--green-050); color: var(--green-900); text-decoration: none; }

.lang-switch {
  margin-left: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--green-800); font: inherit; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: .18s;
}
.lang-switch:hover { border-color: var(--green-600); background: var(--green-050); }

.nav-toggle {
  display: none; width: 42px; height: 38px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; cursor: pointer; padding: 9px 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--green-900); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

/* ==================== 首屏 ==================== */
.hero {
  background:
    radial-gradient(950px 480px at 88% -8%, var(--green-050) 0%, rgba(232, 243, 236, 0) 62%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-alt) 100%);
  padding: clamp(48px, 8vw, 92px) 0 clamp(40px, 6vw, 76px);
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(24px, 4vw, 56px); align-items: center; }

.eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 5px 12px;
  background: var(--green-050); color: var(--green-800);
  border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 { color: var(--green-900); margin-bottom: .35em; }
.lead { font-size: 1.06rem; max-width: 40em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 30px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: .97rem; font-weight: 600; cursor: pointer; transition: .18s; text-align: center;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green-800); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-900); box-shadow: var(--shadow-md); }
.btn-ghost { background: #fff; color: var(--green-800); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green-600); background: var(--green-050); }
.btn-block { width: 100%; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 0; padding: 22px 0 0; list-style: none; border-top: 1px solid var(--line); }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.4rem; color: var(--green-800); line-height: 1.2; }
.hero-stats span { font-size: .82rem; color: var(--ink-soft); }

.hero-art { max-width: 280px; justify-self: center; }
.hero-art svg, .hero-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 26px rgba(11, 61, 38, .12)); }

/* ==================== 通用分节 ==================== */
.section { padding: clamp(52px, 7vw, 88px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 40px; }
.section-sub { font-size: 1rem; }

/* ==================== 卡片网格 ==================== */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow-sm); transition: .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green-300); }
.card-icon {
  width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--green-050); border-radius: 12px; font-size: 1.4rem;
}
.card h3 { color: var(--green-900); }
.card p { margin: 0; font-size: .93rem; }

.feature { padding: 22px 20px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.feature h3 { color: var(--green-800); font-size: 1rem; }
.feature p { margin: 0; font-size: .9rem; }

/* ==================== 关于 ==================== */
.about-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(24px, 4vw, 52px); align-items: start; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--ink-soft); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .48em; width: 16px; height: 9px;
  border-left: 3px solid var(--green-600); border-bottom: 3px solid var(--green-600);
  transform: rotate(-45deg);
}

.about-card { background: var(--green-900); color: #dff3e6; border-radius: var(--radius); padding: 26px 24px; }
.about-card h3 { color: #fff; }
.about-card dl { margin: 0; }
.about-card dt { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green-300); margin-top: 16px; }
.about-card dt:first-child { margin-top: 0; }
.about-card dd { margin: 2px 0 0; color: #fff; font-size: .95rem; }

/* ==================== 联系 ==================== */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }

.contact-list { list-style: none; margin: 26px 0 0; padding: 0; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-label { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green-600); font-weight: 700; }
.contact-list a, .contact-list span:not(.contact-label) { font-size: 1rem; color: var(--ink); }
.contact-list a:hover { color: var(--green-800); }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; font-weight: 600; color: var(--green-900); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px; transition: .16s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px var(--green-050); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #dc2626; }

.form-note { margin: 12px 0 0; font-size: .86rem; min-height: 1.3em; }
.form-note.ok { color: var(--green-800); font-weight: 600; }
.form-note.err { color: #b91c1c; font-weight: 600; }

/* ==================== 页脚 ==================== */
.site-footer { background: var(--green-900); color: #c9e6d5; padding: 44px 0 26px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.site-footer strong { color: #fff; font-size: 1.05rem; }
.site-footer p { color: #9fc9b3; font-size: .88rem; margin: 6px 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-nav a { color: #dff3e6; padding: 6px 12px; border-radius: 8px; font-size: .9rem; }
.footer-nav a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.footer-bottom p { color: #8fbfa8; font-size: .82rem; margin: 0; }

/* ==================== 404 ==================== */
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.notfound .code { font-size: clamp(3.4rem, 12vw, 6rem); font-weight: 800; color: var(--green-050); line-height: 1; margin: 0; }

/* ==================== 响应式 ==================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 240px; margin: 0 auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 10px 16px 18px; box-shadow: var(--shadow-md);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 12px; }
  .lang-switch { margin: 8px 0 0; align-self: flex-start; }
  .hero-stats { gap: 18px; }
  .hero-stats li { flex: 1 1 40%; }
}

@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
}

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

/* ==================== 打印 ==================== */
@media print {
  .site-header, .site-nav, .hero-actions, .contact-form, .site-footer { display: none; }
  body { color: #000; }
}

/* ============================================================
   以下为产品详情页 / 新闻列表 / 文章页 追加样式
   ============================================================ */

/* ---------- 可点击的产品卡片 ---------- */
a.card { display: block; color: inherit; text-decoration: none; position: relative; }
a.card:hover { text-decoration: none; }
a.card:focus-visible { outline: 3px solid var(--green-600); outline-offset: 2px; }
.card-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; font-size: .86rem; font-weight: 700; color: var(--green-800);
}
.card-more::after { content: "→"; transition: transform .18s; }
a.card:hover .card-more::after { transform: translateX(4px); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 18px 0 0; font-size: .84rem; color: var(--ink-soft);
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--green-800); }
.breadcrumb .sep { color: var(--line); }
.breadcrumb .here { color: var(--green-900); font-weight: 600; }

/* ---------- 详情页头部 ---------- */
.page-head {
  padding: clamp(22px, 4vw, 40px) 0 clamp(26px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--green-900); margin-bottom: .25em; }
.page-head .kicker {
  display: inline-block; margin-bottom: 12px; padding: 4px 12px;
  background: var(--green-050); color: var(--green-800);
  border-radius: 999px; font-size: .75rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.page-head .lead { font-size: 1.04rem; max-width: 44em; margin-bottom: 0; }

/* ---------- 占位块 ---------- */
.placeholder {
  display: grid; place-items: center; text-align: center;
  min-height: 260px; padding: 36px 24px;
  background: var(--bg-alt);
  border: 2px dashed var(--line); border-radius: var(--radius);
  color: var(--ink-soft);
}
.placeholder .ph-icon { font-size: 2rem; margin-bottom: 10px; opacity: .6; }
.placeholder p { margin: 0; font-size: .95rem; }
.placeholder .ph-hint { margin-top: 8px; font-size: .82rem; color: #8a9a92; }

/* ---------- 规范表 ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; background: #fff; }
.spec-table caption {
  caption-side: top; text-align: left; padding-bottom: 10px;
  font-weight: 700; color: var(--green-900); font-size: .95rem;
}
.spec-table th, .spec-table td {
  padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top;
}
.spec-table th {
  width: 34%; background: var(--bg-alt); font-weight: 600; color: var(--green-900); white-space: nowrap;
}
.spec-table td { color: var(--ink-soft); }

/* ---------- 排版区块 ---------- */
.prose-block h2 { margin-top: 0; }
.prose-block + .prose-block { margin-top: 40px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }

/* ---------- 新闻列表 ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow-sm); transition: .2s;
  color: inherit;
}
.news-card:hover {
  text-decoration: none; transform: translateY(-3px);
  box-shadow: var(--shadow-md); border-color: var(--green-300);
}
.news-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: .76rem; color: var(--ink-soft); margin-bottom: 10px;
}
.news-tag {
  padding: 2px 9px; border-radius: 999px; font-weight: 700;
  background: var(--green-050); color: var(--green-800);
}
.news-tag.tag-knowledge { background: #fdf3e3; color: #92580b; }
.news-card h3 { color: var(--green-900); font-size: 1.02rem; margin-bottom: .4em; }
.news-card p { font-size: .89rem; margin: 0; flex: 1; }

.news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.news-filter button {
  padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); font: inherit; font-size: .88rem;
  cursor: pointer; transition: .16s;
}
.news-filter button:hover { border-color: var(--green-600); color: var(--green-800); }
.news-filter button[aria-pressed="true"] {
  background: var(--green-800); border-color: var(--green-800); color: #fff; font-weight: 600;
}

/* ---------- 文章页 ---------- */
.article { max-width: 760px; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  font-size: .84rem; color: var(--ink-soft);
  padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line);
}
.article-body h2 { font-size: 1.32rem; margin-top: 2em; color: var(--green-900); }
.article-body h3 { font-size: 1.08rem; margin-top: 1.6em; color: var(--green-900); }
.article-body p { font-size: 1rem; line-height: 1.85; }
.article-body ul, .article-body ol { color: var(--ink-soft); padding-left: 1.3em; }
.article-body li { margin-bottom: .5em; }
.article-body blockquote {
  margin: 1.4em 0; padding: 14px 20px;
  border-left: 4px solid var(--green-300); background: var(--bg-alt);
  color: var(--ink-soft);
}
.article-body img { border-radius: var(--radius); }
.article-foot { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- 空状态 ---------- */
.empty-state {
  padding: 50px 24px; text-align: center;
  background: var(--bg-alt); border: 2px dashed var(--line); border-radius: var(--radius);
  color: var(--ink-soft);
}

/* ---------- 响应式补充 ---------- */
@media (max-width: 980px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .spec-table th { white-space: normal; }
}

