/*
Theme Name: HygieChem
Theme URI: https://www.hygiechem.com
Author: HygieChem
Author URI: https://www.hygiechem.com
Description: HygieChem botanical extracts & pharmaceutical intermediates B2B theme
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: hygiechem
Tags: custom-colors, custom-menu, featured-images
*/

/* ═══════════════════════════════════════
 * HygieChem — 自定义样式
 * 基于 Tailwind CDN v3.4
 * ═══════════════════════════════════════ */

/* ─── Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

/* ─── Root Variables ─── */
:root {
  /* ═══ 主品牌色（深海蓝 - 来自 Logo "Hygie"） ═══ */
  --primary: #0A2D5C;
  --primary-light: #1F4B85;
  --primary-dark: #061F44;

  /* ═══ 次色（青绿 - 来自 Logo "Chem"） ═══ */
  --secondary: #0FA0AB;
  --secondary-light: #E0F4F6;
  --secondary-dark: #0C8A95;

  /* ═══ 强调色（草绿 - 来自 Logo 叶子） ═══ */
  --accent: #0FA0AB;
  --accent-light: #E8F2E0;
  --accent-dark: #3F7530;

  /* ═══ 背景与文本 ═══ */
  --bg-cream: #E0F4F6;       /* 浅青底（替代原米白） */
  --bg-light: #FFFFFF;
  --text-dark: #1F2937;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;

  /* ═══ 阴影 / 圆角 / 过渡 ═══ */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

/* ─── Base ─── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Sans SC', system-ui, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
}

/* ─── Header ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: var(--transition);
  padding: 0.75rem 0;
}
.site-header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  padding: 0.4rem 0;
}
.site-header.transparent {
  background: transparent;
}
.site-header.transparent .nav-link {
  color: rgba(255,255,255,0.9);
}
.site-header.transparent .nav-link:hover {
  color: #fff;
}

/* ─── Navigation ─── */
.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: var(--transition);
  cursor: pointer;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--primary) !important; }

/* ─── Hero Section — 背景图沿用用户提供的样图(纯净插画,无文字),文字层由 HTML 输入 ─── */
.hero-section {
  position: relative;
  min-height: 72vh;            /* 整个版面等比缩小(原84vh的≈0.86),首屏仍可见下方 Our Focus */
  overflow: hidden;
  background: #E6F2F6;         /* 与样图左缘浅蓝一致 */
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;           /* 撑满整个 hero,左右两端完全铺平 */
  object-position: center;
  z-index: 0;
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  line-height: normal;
}
.hero-text-col {
  position: absolute;
  left: 8%;                    /* 略调以补偿缩放后的视觉中心 */
  top: 19%;
  width: 40%;                  /* 样图标题块宽 ≈ 38-40%W */
  transform: scale(0.85);      /* 整个版面(文字+按钮)等比缩小一点 */
  transform-origin: left top;
}
.hero-title {
  font-size: clamp(2rem, 4.3vw, 3.5rem);   /* 等比缩小 ~0.83x */
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.5px;
  margin-bottom: 1.2rem;
}
.hero-navy { color: #0A2D5C; }
.hero-teal { color: #0FA0AB; }
.hero-sub {
  color: #374151;
  font-size: clamp(0.85rem, 1.25vw, 1.05rem); /* 等比缩小 */
  line-height: 1.55;
  margin-bottom: 1.6rem;
  max-width: 95%;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-btn-primary,
.hero-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.35rem;    /* 等比缩小 */
  border-radius: 50px;
  font-weight: 600;
  font-size: clamp(0.8rem, 0.85vw, 0.88rem);
  transition: all 0.2s;
  cursor: pointer;
}
.hero-btn-primary { background: #0FA0AB; color: #fff; }
.hero-btn-primary:hover { background: #0C8A95; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15,160,171,0.35); }
.hero-btn-outline { background: #fff; color: #0A2D5C; border: 2px solid #0FA0AB; }
.hero-btn-outline:hover { background: #0FA0AB; color: #fff; }

.hero-stats {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  /* 样图: 4 个图标直接浮在浅蓝背景上,无白卡片/无分隔线 */
  background: transparent;
  box-shadow: none;
  padding: 0 5%;
  z-index: 3;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}
.hero-stat-icon {
  width: clamp(44px, 4.2vw, 60px);     /* 等比缩小 ~0.83x */
  height: clamp(44px, 4.2vw, 60px);
  border: 2.5px solid #0FA0AB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0FA0AB;
  background: transparent;   /* 样图图标即浮在背景上 */
}
.hero-stat-icon svg { width: 48%; height: 48%; }
.hero-stat-num {
  font-size: clamp(1.2rem, 1.7vw, 1.6rem);
  font-weight: 800;
  color: #0A2D5C;
  line-height: 1.1;
  margin-top: 0.3rem;
}
.hero-stat-label {
  font-size: clamp(0.7rem, 0.82vw, 0.82rem);
  color: #6B7280;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .hero-section { min-height: 68vh; }
  .hero-text-col { left: 5%; top: 12%; width: 90%; }
  .hero-sub { max-width: 100%; }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 0.8rem;
    bottom: 3%;
    padding: 0 4%;
  }
  .hero-stat-icon { width: 46px; height: 46px; }
}

/* ─── 首页：固定导航条改为白色实心（参考图自带导航条，避免叠加混乱） ─── */
body.home .site-header,
body.home .site-header.transparent {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
body.home .site-header .nav-link { color: var(--text-dark); }
body.home .site-header .nav-link:hover { color: var(--primary); }

/* ─── Cards ─── */
.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary);
}

.focus-card {
  background: transparent;
  border-radius: 0;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: var(--transition);
  border: none;                       /* 去掉了外框（按用户要求） */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.focus-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
  transition: transform 0.3s;
}
.focus-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;                /* img 标签:保持比例完整显示 */
}
.focus-card:hover {
  transform: translateY(-3px);
}
.focus-card:hover .focus-icon {
  transform: scale(1.08);
}
/* 5 个卡片 nth-child 已不再需要（去掉了左侧色条） */

.trust-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  background: white;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.trust-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.blog-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary:hover {
  background: #0C8A95;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(15,160,171,0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  background: transparent;
  color: white;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  border: 2px solid rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-outline:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
}

.btn-primary-green {
  background: var(--primary);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  color: white;
  font-weight: 600;
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary-green:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(15,160,171,0.3);
}

/* ─── Certifications Strip ─── */
.cert-strip {
  overflow: hidden;
  white-space: nowrap;
  padding: 1.5rem 0;
}
.cert-track {
  display: inline-flex;
  gap: 3rem;
  animation: certScroll 30s linear infinite;
}
@keyframes certScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.cert-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.5rem;
  background: white;
  border-radius: 50px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
}

/* ─── Section Titles ─── */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
}

/* ─── Footer ─── */
.site-footer {
  background: #061F44;
  color: rgba(255,255,255,0.8);
}
.site-footer a {
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}
.site-footer a:hover {
  color: var(--accent);
}

/* ─── Floating CTA ─── */
.floating-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.floating-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: white;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  cursor: pointer;
}
.floating-cta a:hover {
  transform: scale(1.1);
}
.floating-whatsapp { background: #25D366; }
.floating-email { background: var(--primary); }

/* ─── Product Detail ─── */
.spec-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.spec-table tr:last-child td { border-bottom: none; }
.spec-table td:first-child {
  font-weight: 600;
  color: var(--text-dark);
  width: 40%;
  background: var(--bg-cream);
}

/* ─── Blog ─── */
.blog-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 1rem;
}
.blog-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 1.5rem 0 0.75rem;
}
.blog-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--text-dark);
}
.blog-content blockquote {
  border-left: 4px solid var(--accent);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--bg-cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
}
.blog-content ul, .blog-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  line-height: 2;
}
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.blog-content th, .blog-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}
.blog-content th {
  background: var(--primary);
  color: white;
  font-weight: 600;
}
.blog-content td {
  background: white;
}

/* ─── Form Styling ─── */
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: var(--transition);
  background: white;
  color: var(--text-dark);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,160,171,0.1);
}
.form-textarea { min-height: 120px; resize: vertical; }

/* ─── Section Backgrounds ─── */
.bg-cream { background: var(--bg-cream); }
.section-padding { padding: 2rem 0; }

/* ─── Tags / Badges ─── */
.health-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(15,160,171,0.1);
  color: var(--primary-light);
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}
.app-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  background: var(--bg-cream);
  color: var(--text-dark);
  border: 1px solid var(--border);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ─── Category Filter ─── */
.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); transition: var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .current { color: var(--primary); font-weight: 600; }

/* ─── Tagline Separator ─── */
.tagline-bar {
  width: 60px; height: 3px;
  background: var(--accent);
  margin: 1rem 0;
}

/* ─── Mobile Menu ─── */
.mobile-menu {
  position: fixed;
  top: 0; right: -100%;
  width: 85%;
  max-width: 380px;
  height: 100vh;
  background: white;
  z-index: 1001;
  transition: all 0.35s ease;
  box-shadow: -5px 0 30px rgba(0,0,0,0.15);
  padding: 2rem;
}
.mobile-menu.open { right: 0; }
.mobile-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* ─── Animations ─── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .section-title { font-size: 1.6rem; }
  .section-padding { padding: 1.5rem 0; }
  .hero-section { padding-top: 64px; }
}

/* ═══════════════════════════════════════
 * WordPress 菜单适配（wp_nav_menu 输出）
 * ═══════════════════════════════════════ */
.site-header nav ul.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2rem;
  align-items: center;
}
.site-header nav ul.nav-links li { margin: 0; padding: 0; }
.site-header nav ul.nav-links a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: var(--transition);
  cursor: pointer;
  color: var(--text-dark);
  text-decoration: none;
}
.site-header.transparent nav ul.nav-links a { color: rgba(255,255,255,0.9); }
.site-header.transparent nav ul.nav-links a:hover { color: #fff; }
.site-header nav ul.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.site-header nav ul.nav-links a:hover::after,
.site-header nav ul.nav-links .current-menu-item > a::after,
.site-header nav ul.nav-links .current_page_item > a::after { width: 100%; }
.site-header nav ul.nav-links .current-menu-item > a,
.site-header nav ul.nav-links .current_page_item > a { color: var(--primary) !important; }

/* 移动端菜单 */
.mobile-menu ul.mobile-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mobile-menu ul.mobile-nav li { margin: 0; padding: 0; }
.mobile-menu ul.mobile-nav a {
  display: block;
  padding: 0.8rem 1rem;
  font-size: 1.05rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  text-decoration: none;
}
.mobile-menu ul.mobile-nav a:hover,
.mobile-menu ul.mobile-nav .current-menu-item > a,
.mobile-menu ul.mobile-nav .current_page_item > a {
  color: var(--primary);
  font-weight: 600;
}
