/* ========================================
   五月豆香 H5 站点 - 主样式
   黄豆黄 #F5C518 + 嫩绿 #4CAF50
   ======================================== */

:root {
  --color-yellow: #F5C518;
  --color-yellow-light: #FFD933;
  --color-yellow-dark: #D9A800;
  --color-green: #4CAF50;
  --color-green-light: #66BB6A;
  --color-green-dark: #2E7D32;
  --color-cream: #FFFBF0;
  --color-bg: #FAFAF5;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #E8E8E0;
  --color-white: #FFFFFF;
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-shadow-strong: rgba(0, 0, 0, 0.15);
  --color-danger: #E53935;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;

  --transition: all 0.3s ease;
  --max-width: 1200px;

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--color-green);
}

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

/* ====== 顶部导航 ====== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition);
}

.navbar-scrolled {
  box-shadow: 0 2px 12px var(--color-shadow);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-green-dark);
}

.navbar-brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.navbar-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 8px 0;
}

.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-green);
  transition: width 0.3s ease;
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
  width: 100%;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* ====== Hero 区 ====== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(46,125,50,0.7), rgba(245,197,24,0.5));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 20px;
  color: white;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  letter-spacing: 2px;
}

.hero-content .slogan {
  font-size: 1.25rem;
  margin-bottom: 36px;
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-green);
  color: white;
}

.btn-primary:hover {
  background: var(--color-green-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76,175,50,0.4);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.8);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.btn-yellow {
  background: var(--color-yellow);
  color: var(--color-text);
}

.btn-yellow:hover {
  background: var(--color-yellow-dark);
  color: white;
  transform: translateY(-2px);
}

/* ====== 区块通用 ====== */
.section {
  padding: 64px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
}

.section-title .subtitle {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--color-yellow), var(--color-green));
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ====== 企业速览 ====== */
.stats-section {
  background: var(--color-white);
  padding: 48px 0;
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item .value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-green-dark);
  line-height: 1.2;
}

.stat-item .label {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-top: 8px;
}

/* ====== 产品网格 ====== */
.products-section {
  background: var(--color-bg);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--color-shadow-strong);
}

.product-card .img-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}

.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .img-wrap img {
  transform: scale(1.08);
}

.product-card .hot-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-danger);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.product-card .info {
  padding: 16px;
}

.product-card .name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.product-card .tag {
  font-size: 0.7rem;
  color: var(--color-green-dark);
  background: rgba(76,175,50,0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.product-card .price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.product-card .price-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-danger);
}

.product-card .price-unit {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.product-card .inquiry-tag {
  font-size: 0.85rem;
  color: var(--color-yellow-dark);
  font-weight: 600;
}

/* ====== 企业介绍 ====== */
.about-section {
  background: var(--color-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--color-text-light);
  font-size: 1rem;
  line-height: 1.8;
}

.about-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.about-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ====== 荣誉资质 ====== */
.honors-section {
  background: var(--color-cream);
}

.honors-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.honors-scroll::-webkit-scrollbar {
  height: 6px;
}

.honors-scroll::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 3px;
}

.honors-scroll::-webkit-scrollbar-thumb {
  background: var(--color-green-light);
  border-radius: 3px;
}

.honor-item {
  flex-shrink: 0;
  width: 200px;
  scroll-snap-align: start;
  text-align: center;
}

.honor-item img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px var(--color-shadow);
  transition: var(--transition);
  cursor: pointer;
}

.honor-item img:hover {
  transform: scale(1.04);
}

.honor-item .honor-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 12px;
}

.honor-item .honor-year {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* ====== 询价区 ====== */
.inquiry-section {
  background: var(--color-white);
}

.inquiry-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
}

.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-group label .required {
  color: var(--color-danger);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: var(--transition);
  background: var(--color-white);
  color: var(--color-text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-green);
  box-shadow: 0 0 0 3px rgba(76,175,50,0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.inquiry-contact {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
}

.inquiry-contact h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--color-green-dark);
}

.contact-list {
  text-align: left;
  margin-bottom: 24px;
}

.contact-list li {
  list-style: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list .icon {
  width: 20px;
  text-align: center;
  color: var(--color-green);
}

.qr-code {
  display: inline-block;
  padding: 10px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px var(--color-shadow);
}

.qr-code img {
  width: 140px;
  height: 140px;
  border-radius: 4px;
}

.qr-code-tip {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* ====== Footer ====== */
.footer {
  background: #2D322E;
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-brand .name {
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h4 {
  color: white;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-links li,
.footer-contact li {
  list-style: none;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

/* ====== 返回顶部 ====== */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--color-green);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 12px rgba(76,175,50,0.4);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--color-green-dark);
  transform: translateY(-2px);
}

/* ====== Toast 提示 ====== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  z-index: 3000;
  opacity: 0;
  transition: var(--transition);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ====== Lightbox ====== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  border-radius: var(--radius-sm);
}

/* ====== 询价弹窗 ====== */
.inquiry-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 3500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.inquiry-modal.show {
  display: flex;
}

.inquiry-modal-content {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.inquiry-modal-content h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  color: var(--color-green-dark);
}

.inquiry-text-box {
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 20px;
  max-height: 240px;
  overflow-y: auto;
}

.inquiry-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inquiry-modal-buttons .btn {
  width: 100%;
}