/*
Theme Name: 上甫科技 Smart Farm
Theme URI: https://www.ishangfu.cn
Author: Smart Farm
Author URI: https://www.ishangfu.cn
Description: 上甫科技官方网站主题 - 专注家庭园艺与植物健康，支持 Elementor 页面构建器完整编辑所有内容。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: Private
Text Domain: shangfu
Tags: elementor, chinese, garden, green, one-page
*/

/* ===========================
   上甫科技 · Smart Farm
   全站样式表 (WordPress版)
   =========================== */

:root {
  --green-primary: #4E9A2B;
  --green-light: #7DC04A;
  --green-dark: #2D5A1B;
  --green-deep: #1E3D10;
  --olive: #4A5C2A;
  --cream: #F7F4EE;
  --warm-white: #FAFAF7;
  --text-dark: #1A2410;
  --text-mid: #3D4A2D;
  --text-light: #6B7A5A;
  --gold: #C8A84B;
  --amber: #D4882A;
  --font-serif: 'Noto Serif SC', 'STSong', serif;
  --font-sans: 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-display: 'Playfair Display', serif;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(30,61,16,0.10);
  --shadow-lg: 0 12px 48px rgba(30,61,16,0.16);
  --transition: 0.3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--warm-white);
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
address { font-style: normal; }
img { max-width: 100%; height: auto; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 80px 0; }

/* ===========================
   HEADER / NAV
   =========================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(250,250,247,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(78,154,43,0.12);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.site-logo img { height: 48px; width: auto; display: block; }
.footer-logo img { height: 44px; width: auto; display: block; margin-bottom: 16px; }

.nav-links {
  display: flex; align-items: center; gap: 8px;
  padding: 0; margin: 0; list-style: none;
}
.nav-links li { position: relative; }
.nav-links a {
  padding: 6px 14px; border-radius: 20px;
  font-size: 0.92rem; font-weight: 500; color: var(--text-mid);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a {
  color: var(--green-primary);
  background: rgba(78,154,43,0.08);
}

/* Dropdown */
.nav-links .menu-item-has-children > a::after {
  content: ' ▾';
  font-size: 0.7rem;
}
.nav-links .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px; padding: 8px 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: all var(--transition);
  border: 1px solid rgba(78,154,43,0.1);
  list-style: none;
}
.nav-links .menu-item-has-children:hover .sub-menu {
  opacity: 1; visibility: visible; pointer-events: all;
  top: calc(100% + 4px);
}
.nav-links .sub-menu a {
  display: block; padding: 8px 18px; font-size: 0.88rem;
  color: var(--text-mid); border-radius: 0;
  background: none;
}
.nav-links .sub-menu a:hover {
  background: rgba(78,154,43,0.06); color: var(--green-primary);
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--green-dark); border-radius: 2px;
  transition: all var(--transition);
}

/* ===========================
   PAGE HERO (inner pages)
   =========================== */
.page-hero {
  background: linear-gradient(135deg, var(--green-deep), var(--green-dark));
  padding: 120px 0 60px;
  text-align: center;
  color: white;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 0.95rem;
  opacity: 0.75;
  letter-spacing: 0.05em;
}

/* ===========================
   SECTION LABELS & HEADERS
   =========================== */
.section-label {
  display: block; text-align: center;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green-primary);
  margin-bottom: 10px;
}
.section-header { text-align: center; margin-bottom: 48px; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text-dark); margin-bottom: 12px;
}
.section-desc { color: var(--text-light); max-width: 560px; margin: 0 auto; font-size: 0.92rem; }

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-block; padding: 13px 30px;
  border-radius: 32px; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--green-primary); color: white;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline {
  border-color: rgba(255,255,255,0.5); color: white;
}
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.1); }
.btn-white { background: white; color: var(--green-dark); }
.btn-white:hover { background: var(--cream); transform: translateY(-2px); }
.btn-outline-white { border-color: rgba(255,255,255,0.6); color: white; }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }

/* ===========================
   FEATURES BAR
   =========================== */
.features-bar { background: var(--cream); padding: 32px 0; }
.features-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 24px;
}
.feature-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; background: white;
  border-radius: var(--radius);
  border: 1px solid rgba(78,154,43,0.08);
}
.feature-icon { font-size: 1.5rem; flex-shrink: 0; }
.feature-item h4 { font-size: 0.92rem; color: var(--text-dark); margin-bottom: 2px; font-weight: 600; }
.feature-item p { font-size: 0.78rem; color: var(--text-light); }

/* ===========================
   HERO (homepage)
   =========================== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-dark) 40%, var(--olive) 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding-top: 68px;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.leaf {
  position: absolute; border-radius: 50% 10% 50% 10%;
  background: rgba(125,192,74,0.08);
  animation: floatLeaf 8s ease-in-out infinite;
}
.leaf-1 { width: 400px; height: 600px; top: -100px; right: -80px; transform: rotate(30deg); }
.leaf-2 { width: 300px; height: 450px; bottom: -80px; left: -60px; transform: rotate(-20deg); animation-delay: 2s; background: rgba(125,192,74,0.05); }
.leaf-3 { width: 200px; height: 320px; top: 30%; right: 20%; transform: rotate(60deg); animation-delay: 4s; background: rgba(200,168,75,0.06); }
@keyframes floatLeaf {
  0%,100% { transform: rotate(30deg) translateY(0); }
  50% { transform: rotate(32deg) translateY(-20px); }
}
.hero-content { position: relative; z-index: 1; text-align: center; padding: 40px 24px; }
.hero-badge {
  display: inline-block; padding: 6px 18px; border-radius: 20px;
  background: rgba(125,192,74,0.2); color: rgba(255,255,255,0.9);
  font-size: 0.82rem; letter-spacing: 0.1em; margin-bottom: 24px;
  border: 1px solid rgba(125,192,74,0.3);
}
.hero-title {
  font-family: var(--font-serif); font-size: clamp(2.2rem,6vw,4rem);
  color: white; line-height: 1.25; margin-bottom: 20px;
}
.hero-title .accent { color: var(--green-light); }
.hero-sub {
  color: rgba(255,255,255,0.75); font-size: clamp(0.9rem,1.5vw,1.05rem);
  max-width: 560px; margin: 0 auto 36px; line-height: 1.8;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.5); font-size: 0.72rem; letter-spacing: 0.1em;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{opacity:0.4;} 50%{opacity:1;} }

/* ===========================
   PRODUCTS GRID (homepage)
   =========================== */
.products-section { background: white; }
.products-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 24px;
}
.product-card {
  padding: 36px 28px; border-radius: var(--radius);
  border: 1.5px solid rgba(78,154,43,0.1);
  background: white; transition: all var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { border-color: var(--green-primary); transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2rem; margin-bottom: 16px; }
.product-card h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--text-dark); margin-bottom: 10px; }
.product-card p { font-size: 0.88rem; color: var(--text-light); line-height: 1.7; flex: 1; }
.card-link { display: inline-block; margin-top: 18px; font-size: 0.85rem; color: var(--green-primary); font-weight: 600; }

/* ===========================
   ABOUT STRIP
   =========================== */
.about-strip { background: var(--cream); }
.about-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: center; }
.about-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-stat-card {
  background: white; border-radius: var(--radius); padding: 28px 20px;
  text-align: center; border: 1px solid rgba(78,154,43,0.08);
  box-shadow: var(--shadow);
}
.stat-num {
  font-family: var(--font-display); font-size: 2.8rem;
  color: var(--green-primary); font-weight: 700; line-height: 1;
}
.stat-num span { font-size: 1.4rem; }
.stat-label { font-size: 0.78rem; color: var(--text-light); margin-top: 6px; letter-spacing: 0.04em; }
.about-text h2 { font-family: var(--font-serif); font-size: clamp(1.4rem,2.5vw,2rem); color: var(--text-dark); margin-bottom: 16px; }
.about-text p { color: var(--text-light); line-height: 1.9; margin-bottom: 14px; font-size: 0.92rem; }
.about-values { margin: 20px 0; }
.value-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 0.88rem; color: var(--text-mid); }
.dot { width: 6px; height: 6px; background: var(--green-primary); border-radius: 50%; flex-shrink: 0; }

/* ===========================
   FEATURED PRODUCTS
   =========================== */
.featured-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.featured-card {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(78,154,43,0.1);
  transition: all var(--transition); background: white;
}
.featured-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.featured-img { height: 200px; overflow: hidden; }
.featured-img img { width:100%; height:100%; object-fit:cover; transition: transform 0.5s ease; }
.featured-card:hover .featured-img img { transform: scale(1.05); }
.featured-info { padding: 18px 20px; }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 0.72rem; background: rgba(78,154,43,0.1); color: var(--green-primary);
  margin-bottom: 8px; font-weight: 500;
}
.featured-info h4 { font-family: var(--font-serif); font-size: 0.95rem; color: var(--text-dark); margin-bottom: 6px; }
.featured-info p { font-size: 0.78rem; color: var(--text-light); line-height: 1.5; }

/* ===========================
   CTA SECTION
   =========================== */
.cta-section {
  background: linear-gradient(135deg, var(--green-dark), var(--green-deep));
  position: relative; overflow: hidden;
}
.cta-inner { text-align: center; position: relative; z-index: 1; }
.cta-leaf-deco {
  position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: rgba(125,192,74,0.08); top: -100px; right: -100px; pointer-events: none;
}
.cta-section h2 { font-family: var(--font-serif); font-size: clamp(1.5rem,3vw,2.2rem); color: white; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.75); margin-bottom: 32px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.cta-contact-bar {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  color: rgba(255,255,255,0.6); font-size: 0.85rem;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--green-deep); color: rgba(255,255,255,0.7);
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 48px;
  padding: 64px 0 48px;
}
.footer-desc { font-size: 0.85rem; line-height: 1.8; margin-top: 4px; }
.footer-col h5 {
  font-size: 0.88rem; color: white; font-weight: 600;
  margin-bottom: 16px; letter-spacing: 0.06em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 0.85rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--green-light); }
.footer-col address p { font-size: 0.82rem; margin-bottom: 6px; line-height: 1.6; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 0.78rem; color: rgba(255,255,255,0.4);
}
.footer-bottom a { color: rgba(255,255,255,0.4); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--green-light); }

/* ===========================
   TABLE (landscape page)
   =========================== */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: white; font-size: 0.88rem; }
thead { background: var(--green-dark); color: white; }
th { padding: 14px 18px; text-align: left; font-weight: 600; font-size: 0.85rem; white-space: nowrap; }
td { padding: 13px 18px; border-bottom: 1px solid rgba(78,154,43,0.08); color: var(--text-mid); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(78,154,43,0.03); }
.feature-tag {
  display: inline-block; padding: 5px 14px; border-radius: 16px;
  background: rgba(78,154,43,0.1); color: var(--green-primary);
  font-size: 0.82rem; font-weight: 500; margin: 3px 2px;
}

/* ===========================
   MISSION / VALUES GRID
   =========================== */
.mission-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.mission-card {
  padding: 36px 28px; background: white; border-radius: var(--radius);
  border: 1.5px solid rgba(78,154,43,0.08); text-align: center;
  transition: all var(--transition);
}
.mission-card:hover { border-color: var(--green-primary); transform: translateY(-4px); box-shadow: var(--shadow); }
.mission-icon { font-size: 2rem; margin-bottom: 14px; }
.mission-card h4 { font-family: var(--font-serif); font-size: 1.05rem; color: var(--text-dark); margin-bottom: 10px; }
.mission-card p { font-size: 0.85rem; color: var(--text-light); line-height: 1.7; }

/* ===========================
   CONTACT PAGE
   =========================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start; }
.contact-info-card {
  background: white; border-radius: var(--radius); padding: 36px;
  box-shadow: var(--shadow); border: 1px solid rgba(78,154,43,0.08);
}
.contact-info-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.contact-info-item:last-child { border: none; }
.ci-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.ci-label { font-size: 0.78rem; color: var(--text-light); margin-bottom: 3px; }
.ci-value { font-size: 0.92rem; color: var(--text-dark); font-weight: 500; }
.contact-form { background: white; border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 16px;
  border: 1.5px solid rgba(78,154,43,0.2); border-radius: 8px;
  font-size: 0.9rem; font-family: var(--font-sans); color: var(--text-dark);
  transition: border-color var(--transition);
  background: white;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(78,154,43,0.08);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .nav-links {
    display: none; position: fixed; top: 68px; left: 0; right: 0;
    background: white; flex-direction: column; align-items: stretch;
    padding: 16px; gap: 4px; box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 16px; border-radius: 8px; }
  .nav-links .sub-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    pointer-events: all; box-shadow: none; border: none;
    padding: 0 0 0 16px; background: transparent;
  }
  .nav-toggle { display: flex; }
  .products-grid { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .mission-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .cta-contact-bar { flex-direction: column; gap: 10px; }
}
@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .about-visual { grid-template-columns: 1fr 1fr; }
}

/* ===========================
   ELEMENTOR OVERRIDES
   =========================== */
.elementor-section .elementor-container { max-width: 1200px; }
body.elementor-editor-active .site-header { position: relative; }
