/* ============================================================
   LLADESSENSE 全站样式
   风格：简约现代 × 温暖治愈（"有温度的精品香氛买手店"）
   ============================================================ */

/* ---------- 1. 设计变量（全站配色 / 字体 / 圆角 / 阴影） ---------- */
:root {
  --bg: #faf6f0;            /* 页面背景：暖米白 */
  --surface: #ffffff;       /* 卡片/表面：纯白 */
  --primary: #5c7a5e;       /* 品牌主色：温暖鼠尾草绿 */
  --primary-dark: #47604a;  /* 主色加深（hover / 页脚背景） */
  --accent: #c9a961;        /* 强调色：暖金（CTA / 徽章） */
  --peach: #f3ded0;         /* 辅助治愈色：柔桃 */
  --peach-light: #faf0e8;   /* 柔桃更浅（渐变端点） */
  --green-light: #eef3ee;   /* 淡绿底（徽章/高亮） */
  --text: #2f2a26;          /* 正文主文字：深暖灰（对比度≥4.5:1） */
  --text-muted: #6b635c;    /* 次级文字：暖灰 */
  --border: #e8e0d5;        /* 边框/分隔线：浅暖灰 */
  --radius-card: 14px;      /* 卡片圆角 */
  --radius-pill: 999px;     /* 胶囊圆角（按钮/徽章） */
  --radius-tag: 8px;        /* 小标签圆角 */
  --shadow-sm: 0 2px 10px rgba(47, 42, 38, 0.06);
  --shadow-md: 0 6px 20px rgba(47, 42, 38, 0.10);
  --font-head: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
  --max-w: 1140px;          /* 内容最大宽度 */
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;               /* ≥16px，防止 iOS 输入框自动放大 */
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;            /* 兜底：禁止横向滚动 */
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.3; color: var(--text); }

/* 键盘焦点态：暖金色 focus ring */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ---------- 3. 顶部导航（白底 + 浅阴影，固定吸顶） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo .logo-mark { color: var(--accent); }
.logo-icon {
  width: 34px; height: 34px;
  background: var(--green-light);
  color: var(--primary);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}

/* ===== LLADESSENSE 品牌 logo（改版新增，原图标/文字 logo 由真实 logo 图替代） ===== */
.logo-img {
  width: 38px; height: 38px;
  border-radius: 50%;              /* 圆形 logo 标记 */
  flex-shrink: 0;
  display: block;
}
.logo-word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--primary);           /* 鼠尾草绿，与品牌色一致 */
}
.footer-logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 12px;             /* 与下方 tagline 保持间距 */
}
@media (max-width: 640px) {
  .logo-word { font-size: 0.92rem; }   /* 小屏防止导航溢出 */
}

.main-nav ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: inline-block;
  padding: 10px 12px;               /* 触控目标 ≥44px 高 */
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-pill);
}
.main-nav a:hover { background: var(--green-light); color: var(--primary-dark); text-decoration: none; }
.main-nav a.active { color: var(--primary-dark); background: var(--green-light); }

/* 汉堡按钮：默认桌面端隐藏 */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;        /* 触控目标 44×44 */
  border: none; background: transparent;
  font-size: 1.4rem; color: var(--text);
  cursor: pointer; border-radius: 10px;
}
.nav-toggle:hover { background: var(--green-light); }

/* ---------- 4. Hero 区（暖米白→淡桃柔和渐变） ---------- */
.hero {
  background: linear-gradient(135deg, var(--bg) 0%, var(--peach-light) 60%, var(--peach) 100%);
  padding: 72px 0 64px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 3.1rem);  /* 手机端自动收缩不溢出 */
  font-weight: 700;
  max-width: 800px;
  margin: 0 auto 16px;
}
.hero p {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 28px;
}
.hero .hero-image { max-width: 920px; margin: 36px auto 0; border-radius: var(--radius-card); box-shadow: var(--shadow-md); }

/* ---------- 5. 按钮（胶囊形） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;                  /* 触控目标 */
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: var(--text); }   /* 暖金底 + 深色文字 */
.btn-accent:hover { background: #b9994f; color: var(--text); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--green-light); }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: 0.9rem; }

/* ---------- 6. 区块标题 ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-bottom: 8px; }
.section-head p { color: var(--text-muted); }

/* H2 下划线装饰（文章正文用） */
.article-body h2 {
  font-size: 1.55rem;
  margin: 40px 0 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}
.article-body h3 { font-size: 1.2rem; margin: 28px 0 10px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body li { margin-bottom: 8px; }

/* ---------- 7. 卡片网格（入口卡 / 栏目卡 / 文章卡） ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.08rem; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--primary-dark); text-decoration: none; }
.card-body p { color: var(--text-muted); font-size: 0.93rem; flex: 1; }

.card-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--peach);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.card-link { font-weight: 600; font-size: 0.93rem; margin-top: auto; }

/* 文章卡元信息（日期 / 阅读时长） */
.card-meta { font-size: 0.82rem; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.card-meta i { margin-right: 4px; }

/* ---------- 8. 徽章 / 标签（药丸形 + 柔色底） ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--peach);
  color: var(--text);
}
.badge-green { background: var(--green-light); color: var(--primary-dark); }
.badge-gold { background: var(--accent); color: var(--text); }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-tag);
  font-size: 0.78rem;
  background: var(--green-light);
  color: var(--primary-dark);
}

/* ---------- 9. Featured 大图区 ---------- */
.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.featured img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.featured-body { padding: 32px 32px 32px 0; }
.featured-body h3 { font-size: 1.5rem; margin: 10px 0 12px; }
.featured-body p { color: var(--text-muted); margin-bottom: 20px; }

/* ---------- 10. 邮件订阅区 ---------- */
.newsletter {
  background: linear-gradient(135deg, var(--green-light), var(--peach-light));
  border-radius: var(--radius-card);
  padding: 44px 28px;
  text-align: center;
}
.newsletter h2 { margin-bottom: 8px; }
.newsletter p { color: var(--text-muted); max-width: 520px; margin: 0 auto 22px; }
.newsletter-form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.newsletter-form input {
  flex: 1;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 16px;                 /* ≥16px 防 iOS 缩放 */
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text);
}

/* ---------- 11. YouTube 引导条 ---------- */
.yt-strip {
  background: var(--primary-dark);
  color: #fdfbf7;
  border-radius: var(--radius-card);
  padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.yt-strip i { font-size: 1.6rem; color: var(--accent); margin-right: 10px; }
.yt-strip .btn { flex-shrink: 0; }

/* ---------- 12. 文章页布局（正文 + 侧边栏） ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  padding: 40px 0 56px;
}
.article-header { max-width: 760px; margin-bottom: 24px; }
.article-header h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 12px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-muted); font-size: 0.9rem; }
.article-hero { border-radius: var(--radius-card); margin: 24px 0 32px; box-shadow: var(--shadow-sm); }

/* 面包屑 */
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); padding: 18px 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li::after { content: "/"; margin-left: 6px; color: var(--border); }
.breadcrumb li:last-child::after { content: ""; }

/* 目录 TOC：桌面端粘性侧边栏 */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  position: sticky;
  top: 84px;
}
.toc h2 { font-size: 1rem; margin-bottom: 12px; }
.toc ul { list-style: none; }
.toc li { margin-bottom: 6px; }
.toc a {
  display: block;
  padding: 6px 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
}
.toc a:hover { color: var(--primary-dark); text-decoration: none; background: var(--green-light); }
.toc a.active { color: var(--primary-dark); border-left-color: var(--primary); background: var(--green-light); font-weight: 600; }

/* 手机端 TOC 折叠（details 实现，无需 JS） */
.toc-toggle { display: none; }

/* 专家注记区块（E-E-A-T 核心占位） */
.expert-note {
  background: var(--peach-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  padding: 18px 22px;
  margin: 24px 0;
}
.expert-note .expert-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 0.85rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.expert-note p { margin: 0; font-size: 0.95rem; color: var(--text); }

/* ---------- 13. 产品推荐卡 ---------- */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin: 20px 0;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: center;
}
.product-card img { border-radius: 10px; width: 140px; height: 140px; object-fit: cover; }
.product-card h3 { font-size: 1.1rem; margin: 6px 0 8px; }
.product-card p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 14px; }
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 14. 对比表格（斑马纹 + 移动端横滚 + 首列冻结） ---------- */
.table-scroll { overflow-x: auto; margin: 24px 0; border-radius: var(--radius-card); border: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.table-hint { font-size: 0.82rem; color: var(--text-muted); text-align: center; margin: 8px 0 0; display: none; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 620px; background: var(--surface); font-variant-numeric: tabular-nums; }
.compare-table th {
  background: var(--primary);
  color: #fff;
  text-align: left;
  padding: 12px 14px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  white-space: nowrap;
}
.compare-table td { padding: 12px 14px; font-size: 0.92rem; border-bottom: 1px solid var(--border); }
.compare-table tr:nth-child(even) td { background: var(--bg); }   /* 暖色斑马纹 */
.compare-table th:first-child, .compare-table td:first-child {
  position: sticky; left: 0; background: var(--surface); z-index: 1;  /* 首列冻结 */
}
.compare-table th:first-child { background: var(--primary-dark); }
.compare-table tr:nth-child(even) td:first-child { background: var(--bg); }
.compare-table a { font-weight: 600; }

/* ---------- 15. FAQ ---------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  padding: 16px 20px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-head);
  font-size: 1rem;
  min-height: 44px;
  display: flex; align-items: center;
}
.faq details p { margin-top: 10px; color: var(--text-muted); }

/* ---------- 16. 作者简介框 ---------- */
.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--green-light);
  border-radius: var(--radius-card);
  padding: 22px;
  margin: 36px 0 24px;
}
.author-box .author-avatar {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.author-box h3 { font-size: 1rem; margin-bottom: 6px; }
.author-box p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* ---------- 17. FTC 联盟免责声明（文章底部固定） ---------- */
.affiliate-disclosure {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 32px;
}

/* ---------- 18. 分享按钮 / 回到顶部 ---------- */
.share-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 28px 0; }
.share-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}
.share-btn:hover { background: var(--green-light); color: var(--primary-dark); transform: translateY(-2px); }

.back-to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); }

/* ---------- 19. 广告占位（仅 Native Banner / 标准 Banner） ---------- */
.ad-slot {
  background: #f5f2ec;
  border: 2px dashed var(--border);
  border-radius: var(--radius-tag);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 24px auto;
}
.ad-slot-leaderboard { width: 728px; max-width: 100%; height: 90px; }
.ad-slot-rect { width: 300px; max-width: 100%; height: 250px; }

/* ---------- 20. 页脚（鼠尾草绿深色底 + 暖白文字） ---------- */
.site-footer {
  background: var(--primary-dark);
  color: #f3efe7;
  margin-top: 56px;
  padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 32px; }
.footer-grid h2, .footer-grid h3 { color: #fdfbf7; font-size: 1rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #e8e2d6; font-size: 0.9rem; padding: 6px 0; display: inline-block; }
.footer-grid a:hover { color: var(--accent); text-decoration: none; }
.footer-brand p { font-size: 0.9rem; color: #d8d2c4; margin-top: 10px; max-width: 260px; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex; align-items: center; justify-content: center;
  color: #f3efe7; font-size: 1.05rem;
}
.social-row a:hover { background: var(--accent); color: var(--text); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
  font-size: 0.82rem;
  color: #cfc8b8;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ---------- 21. 栏目列表页 ---------- */
.category-hero {
  background: linear-gradient(135deg, var(--bg), var(--peach-light));
  padding: 48px 0 36px;
  text-align: center;
}
.category-hero h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 10px; }
.category-hero p { color: var(--text-muted); max-width: 640px; margin: 0 auto; }

/* ---------- 22. 404 页 ---------- */
.not-found { text-align: center; padding: 80px 0; }
.not-found .code { font-family: var(--font-head); font-size: 5rem; color: var(--accent); font-weight: 700; }

/* ---------- 23. 通用页面正文（about / privacy 等） ---------- */
.page-body { max-width: 760px; margin: 0 auto; padding: 40px 0 56px; }
.page-body h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin-bottom: 18px; }
.page-body h2 { font-size: 1.35rem; margin: 32px 0 12px; }
.page-body p, .page-body li { color: var(--text); margin-bottom: 14px; }
.page-body ul { margin-left: 22px; }

/* ============================================================
   响应式（移动端优先调整，断点 640 / 768 / 1024 / 1280）
   ============================================================ */

@media (max-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* 汉堡菜单：抽屉式展开 */
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    padding: 12px 20px 20px;
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav a { display: block; padding: 14px 16px; font-size: 1.05rem; }  /* 大字号易点 */

  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .featured-body { padding: 24px; }

  /* 文章页：侧边栏移到正文下方 */
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  /* 手机端 TOC 折叠为可展开按钮 */
  .toc-mobile { display: block; }
  .toc-mobile .toc-list { display: none; }
  .toc-mobile.open .toc-list { display: block; }
  .toc-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; min-height: 48px;
    background: none; border: none; cursor: pointer;
    font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--text);
    padding: 4px 0;
  }

  /* 728x90 → 320x100 降级 */
  .ad-slot-leaderboard { width: 320px; height: 100px; }

  .hero { padding: 48px 0 44px; }
  .section { padding: 40px 0; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .btn { width: 100%; }   /* 提交按钮全宽易点 */
  .product-card { grid-template-columns: 1fr; }
  .product-card img { width: 100%; height: 180px; }
  .footer-grid { grid-template-columns: 1fr; }
  .table-hint { display: block; }          /* "← 滑动查看 →" 提示 */
  .yt-strip { justify-content: center; text-align: center; }
}

/* 降低动效偏好：尊重系统设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
