/* 暇米企业官网 - H5兼容样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #3d8b35;
  --primary-dark: #2d6b27;
  --accent: #c9a227;
  --accent-light: #f5e6c0;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg: #faf8f5;
  --white: #fff;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --radius: 12px;
  --header-h: 60px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,.97);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo img { height: 40px; width: auto; }

.nav { display: flex; gap: 32px; }

.nav a {
  font-size: 15px;
  color: var(--text);
  position: relative;
  padding: 4px 0;
  transition: color .2s;
}

.nav a:hover, .nav a.active { color: var(--primary); }

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .3s;
}

.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Hero ===== */
.hero {
  position: relative;
  margin-top: var(--header-h);
  width: 100%;
  overflow: hidden;
}

.hero-media {
  width: 100%;
  line-height: 0;
  background: #e8e4df;
}

.hero-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.hero h1 {
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.hero .subtitle {
  font-size: clamp(14px, 3vw, 18px);
  opacity: .92;
  margin-bottom: 24px;
  max-width: 560px;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-tags span {
  padding: 6px 16px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px;
  font-size: 13px;
  backdrop-filter: blur(4px);
}

/* ===== Section ===== */
.section { padding: 56px 0; }

.section-alt { background: var(--white); }

.section-header { text-align: center; margin-bottom: 40px; }

.section-header h2 {
  font-size: clamp(22px, 4vw, 28px);
  color: var(--text);
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--primary);
  margin: 10px auto 0;
  border-radius: 2px;
}

.section-header p {
  color: var(--text-light);
  font-size: 14px;
  max-width: 600px;
  margin: 12px auto 0;
}

/* ===== Intro Cards ===== */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.intro-text p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 15px;
  text-align: justify;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.stat-item {
  text-align: center;
  padding: 16px 8px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-item .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-item .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.intro-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #f0ede8;
  line-height: 0;
}

.intro-img img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1698 / 926;
  object-fit: contain;
  object-position: center;
}

/* ===== Products ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}

.product-card .img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f8f6f3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .4s;
}

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

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

.product-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}

.product-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.product-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  background: var(--accent-light);
  color: #8a6d1a;
  font-size: 12px;
  border-radius: 10px;
}

/* ===== Features ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-item {
  text-align: center;
  padding: 28px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feature-item h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-item p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact-info { display: flex; flex-direction: column; gap: 20px; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-item .icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.contact-item h4 {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: normal;
}

.contact-item p, .contact-item a {
  font-size: 16px;
  color: var(--text);
  font-weight: 500;
}

.contact-item a.phone {
  color: var(--primary);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 260px;
}

.contact-map .map-icon { font-size: 48px; margin-bottom: 16px; }
.contact-map h3 { font-size: 18px; margin-bottom: 8px; }
.contact-map p { font-size: 14px; color: var(--text-light); }

/* ===== About Page ===== */
.page-banner {
  margin-top: var(--header-h);
  padding: 48px 0;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  text-align: center;
}

.page-banner h1 { font-size: clamp(24px, 5vw, 32px); margin-bottom: 8px; }
.page-banner p { opacity: .85; font-size: 14px; }

.content-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.content-block h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

.content-block p {
  color: var(--text-light);
  font-size: 15px;
  text-align: justify;
  margin-bottom: 12px;
  line-height: 1.8;
}

.content-block p:last-child { margin-bottom: 0; }

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--accent-light);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -25px; top: 8px;
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item h4 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}

.timeline-item p {
  font-size: 14px;
  color: var(--text-light);
}

/* ===== Products Page ===== */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.product-detail {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.product-detail .detail-img {
  overflow: hidden;
  background: #f8f6f3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
}

.product-detail .detail-img img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
}

.product-detail .detail-body { padding: 28px; }

.product-detail h2 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--text);
}

.product-detail .slogan {
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 16px;
  font-style: italic;
}

.product-detail .desc {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

.spec-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.spec-list li {
  font-size: 14px;
  color: var(--text-light);
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
}

.spec-list li strong { color: var(--text); font-weight: 500; }

/* ===== CTA ===== */
.cta-bar {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  text-align: center;
  padding: 40px 16px;
  border-radius: var(--radius);
  margin-top: 16px;
}

.cta-bar h3 { font-size: 20px; margin-bottom: 8px; }
.cta-bar p { opacity: .88; font-size: 14px; margin-bottom: 20px; }

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--white);
  color: var(--primary);
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
}

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

/* ===== Footer ===== */
.footer {
  background: #2a2a2a;
  color: #bbb;
  padding: 40px 0 24px;
  margin-top: 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #444;
  margin-bottom: 24px;
}

.footer-brand img { height: 36px; margin-bottom: 12px; filter: brightness(1.1); }

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: #999;
}

.footer h4 {
  color: var(--white);
  font-size: 15px;
  margin-bottom: 16px;
}

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  font-size: 13px;
  color: #999;
  transition: color .2s;
}

.footer-links a:hover { color: var(--white); }

.footer-contact li {
  font-size: 13px;
  margin-bottom: 10px;
  color: #999;
}

.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: #777;
  line-height: 2;
}

.footer-bottom a { color: #999; }
.footer-bottom a:hover { color: #ccc; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    gap: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transform: translateY(-120%);
    opacity: 0;
    transition: .3s;
    pointer-events: none;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
  }

  .section { padding: 40px 0; }

  .intro-grid,
  .contact-grid,
  .product-detail-grid { grid-template-columns: 1fr; }

  .intro-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-item .num { font-size: 18px; }

  .feature-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature-item { padding: 20px 12px; }

  .footer-top { grid-template-columns: 1fr; gap: 24px; }

  .spec-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-tags span { font-size: 12px; padding: 4px 12px; }
}
