/* ===== 全局基础样式 ===== */
:root {
  --primary: #2d8c3c;
  --primary-dark: #1a6b27;
  --primary-light: #4caf50;
  --primary-bg: #f0f9f0;
  --accent: #ffb300;
  --text: #333;
  --text-light: #666;
  --white: #fff;
  --gray: #f5f5f5;
  --gray-dark: #e0e0e0;
  --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 5px 30px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC",
    sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: #fff;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul {
  list-style: none;
}

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

/* ===== 顶部信息栏 ===== */
.top-bar {
  background: var(--primary-dark);
  color: var(--white);
  font-size: 13px;
  padding: 6px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar span {
  opacity: 0.9;
}
.top-bar a {
  color: var(--white);
  margin-left: 15px;
}
.top-bar a:hover {
  color: var(--accent);
}

/* ===== 导航栏 ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 10px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo img {
  height: 50px;
  width: auto;
}
.logo-text {
  display: none;
}
.logo-text h1 {
  font-size: 20px;
  color: var(--primary);
}
.logo-text small {
  font-size: 11px;
  color: var(--text-light);
}
/* 导航菜单 */
.nav {
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav a {
  padding: 8px 16px;
  font-size: 15px;
  color: var(--text);
  border-radius: 6px;
  white-space: nowrap;
}
.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: var(--primary-bg);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}
.nav-toggle span {
  width: 26px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== 页面标题横幅 ===== */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  text-align: center;
  padding: 60px 20px;
}
.page-banner h1 {
  font-size: 36px;
  margin-bottom: 10px;
}
.page-banner p {
  font-size: 16px;
  opacity: 0.9;
}

/* ===== 通用按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* ===== 区块通用 ===== */
.section {
  padding: 80px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 50px;
}
.section-title h2 {
  font-size: 30px;
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.section-title p {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}
.section:nth-child(even) {
  background: var(--primary-bg);
}
/* ===== 卡片网格 ===== */
.grid {
  display: grid;
  gap: 30px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-body {
  padding: 25px;
}
.card-body h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--primary-dark);
}
.card-body p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
}

/* ===== 页脚 ===== */
.footer {
  background: #1a1a2e;
  color: #ccc;
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h3 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 20px;
}
.footer p,
.footer li {
  font-size: 14px;
  line-height: 2;
}
.footer li a:hover {
  color: var(--primary-light);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 12px 16px;
    font-size: 16px;
  }
  .nav-toggle {
    display: flex;
  }
  .page-banner {
    padding: 40px 20px;
  }
  .page-banner h1 {
    font-size: 26px;
  }
  .section {
    padding: 50px 0;
  }
  .section-title h2 {
    font-size: 24px;
  }
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero h1 {
    font-size: 28px;
  }
  .hero p {
    font-size: 15px;
  }
  .top-bar .container {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
  .top-bar a {
    margin: 0 8px;
  }
  .about-content {
    flex-direction: column;
  }
  .contact-wrap {
    grid-template-columns: 1fr;
  }
  .product-table {
    overflow-x: auto;
  }
}

/* ===== 首页特有 ===== */
.hero {
  background: linear-gradient(135deg, #1a6b27 0%, #2d8c3c 50%, #4caf50 100%);
  color: var(--white);
  padding: 80px 0;
  min-height: 500px;
  display: flex;
  align-items: center;
}
.hero-content {
  max-width: 600px;
}
.hero h1 {
  font-size: 40px;
  margin-bottom: 20px;
  line-height: 1.2;
}
.hero p {
  font-size: 17px;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.8;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 50px;
}
.stat-item {
  text-align: center;
}
.stat-item .num {
  font-size: 36px;
  font-weight: 700;
  display: block;
}
.stat-item .label {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 5px;
}
.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image img {
  max-height: 400px;
  object-fit: contain;
}

/* ===== 产品表格 ===== */
.product-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.product-table th,
.product-table td {
  border: 1px solid var(--gray-dark);
  padding: 10px 12px;
  text-align: center;
}
.product-table th {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}
.product-table tr:nth-child(even) {
  background: var(--primary-bg);
}
.product-table tr:hover {
  background: #e8f5e9;
}

/* ===== 产品导航菜单 ===== */
.product-nav {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  max-width: 800px;
  margin: 0 auto;
}
.nav-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-item {
  position: relative;
  padding: 0 15px;
  margin: 0;
}
.nav-item::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: var(--transition);
}
.nav-link:hover {
  background: var(--primary);
  color: var(--white);
}
.nav-arrow {
  margin-left: 6px;
  font-size: 12px;
  transition: transform var(--transition);
}
.nav-item:hover .nav-arrow {
  transform: rotate(180deg);
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 155%;
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 220px;
  padding: 8px 0;
  list-style: none;
  z-index: 100;
  margin: 0;
  border: 1px solid rgba(45, 140, 60, 0.1);
  margin-top: -12px;
}
.nav-item:hover .nav-dropdown {
  display: block;
}
.nav-dropdown li {
  padding: 0;
  margin: 0;
}
.nav-item-link {
  display: block;
  padding: 10px 20px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition);
}
.nav-item-link:hover {
  background: rgba(45, 140, 60, 0.1);
  padding-left: 24px;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ===== 解决方案 ===== */
.solution-card .card-img {
  height: 180px;
}

/* ===== 案例 ===== */
.case-card .card-img {
  height: 220px;
}

/* ===== 关于我们 ===== */
.about-content {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}
.about-text {
  flex: 1;
}
.about-text p {
  margin-bottom: 15px;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
}
.about-image {
  flex: 1;
  min-width: 400px;
}
.about-image img {
  border-radius: var(--radius);
  width: 100%;
}

/* ===== 合作伙伴 ===== */
.partner-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}
.partner-item {
  background: var(--white);
  border: 1px solid var(--gray-dark);
  border-radius: 8px;
  padding: 15px 25px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ===== 联系页面 ===== */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
}
.contact-info h3 {
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-size: 18px;
}
.contact-info p {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.6;
}
.contact-info i {
  color: var(--primary);
  margin-right: 8px;
}
.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-dark);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
  transition: var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 140, 60, 0.15);
}
.contact-form textarea {
  height: 120px;
  resize: vertical;
}

/* ===== 荣誉 ===== */
.honor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  margin-top: 30px;
}
.honor-item {
  background: var(--white);
  border: 1px solid var(--gray-dark);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}

/* ===== 弹窗 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 1280px;
  width: 90%;
  max-height: 85vh;
  overflow: hidden;
  position: relative;
  animation: modalFadeIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}
.modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
}
.modal-header {
  padding: 25px 30px;
  border-bottom: 1px solid var(--gray-dark);
}
.modal-header h3 {
  font-size: 22px;
  color: var(--primary-dark);
  margin: 0;
}
.modal-body {
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  max-height: calc(85vh - 100px);
  overflow-y: auto;
}
.modal-img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: var(--radius);
  object-fit: contain;
}
.storage-case {
  cursor: pointer;
}

/* ===== about 页面图片 hover 放大效果 ===== */
.about-page .card:hover img,
.about-page .about-image:hover img {
  transform: scale(1.1);
  transition: transform 0.4s ease;
}

.about-page .about-image {
  overflow: hidden;
  border-radius: var(--radius);
}

/* ===== about 页面图片点击预览弹窗 ===== */
.about-page .image-preview-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}
.about-page .image-preview-overlay.active {
  display: flex;
}
.about-page .image-preview-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  padding: 20px;
  animation: imagePreviewFadeIn 0.3s ease;
}
@keyframes imagePreviewFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.about-page .image-preview-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 26px;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}
.about-page .image-preview-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}
.about-page .image-preview-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.about-page .section img {
  cursor: zoom-in;
}

/* ===== 产品列表 ===== */
.product-list {
  max-width: 600px;
  margin: 0 auto;
  background: var(--primary-bg);
  border-radius: var(--radius);
  padding: 15px 0;
}

.product-item {
  display: block;
  padding: 12px 20px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px solid rgba(45, 140, 60, 0.1);
}

.product-item:last-child {
  border-bottom: none;
}

.product-item:hover {
  background: rgba(45, 140, 60, 0.1);
}

.product-model {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin-right: 16px;
}

.product-spec {
  font-size: 13px;
  color: var(--text-light);
}

/* ===== 产品详情预览弹窗 ===== */
.product-preview-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(8px);
}

.product-preview-overlay.active {
  display: flex;
}

.product-preview-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  padding: 30px;
  background: var(--white);
  border-radius: var(--radius);
  text-align: center;
  animation: productPreviewFadeIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

@keyframes productPreviewFadeIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.product-preview-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 26px;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.product-preview-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.product-preview-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
}

.product-preview-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.product-preview-desc {
  font-size: 14px;
  color: var(--text-light);
}

.footer-contact {
  width: max-content;
}
