/* 安和光电 - 静态网站样式 */
:root {
  --primary: #1a56a0;
  --primary-dark: #0d3b6e;
  --accent: #f5a623;
  --text-dark: #2c3e50;
  --text-light: #666;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "Microsoft YaHei", "Segoe UI", sans-serif; color: var(--text-dark); line-height: 1.6; background: var(--white); }

a { text-decoration: none; color: inherit; transition: opacity .2s; }
a:hover { opacity: .8; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header { background: var(--primary); color: var(--white); padding: 15px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 24px; font-weight: 700; letter-spacing: 1px; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 30px; }
.nav a { color: var(--white); font-size: 15px; position: relative; }
.nav a::after { content:''; position:absolute; bottom:-4px; left:0; width:0; height:2px; background:var(--accent); transition:.2s; }
.nav a:hover::after { width:100%; opacity:1; }
.nav a.active::after { width:100%; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--white); padding: 80px 0; text-align: center; }
.hero h1 { font-size: 36px; margin-bottom: 16px; letter-spacing: 2px; }
.hero p { font-size: 18px; opacity: .9; max-width: 600px; margin: 0 auto 30px; }
.btn { display: inline-block; background: var(--accent); color: var(--white); padding: 12px 32px; border-radius: 4px; font-weight: 600; font-size: 15px; border: none; cursor: pointer; }
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--white); margin-left: 12px; }

/* Section */
.section { padding: 60px 0; }
.section-title { text-align: center; font-size: 28px; margin-bottom: 12px; color: var(--text-dark); }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 40px; font-size: 15px; }

/* Advantages */
.advantages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.adv-item { text-align: center; padding: 30px 20px; background: var(--bg-light); border-radius: 8px; transition: transform .2s, box-shadow .2s; }
.adv-item:hover { transform: translateY(-4px); box-shadow: 0 10px 30px var(--shadow); }
.adv-icon { font-size: 40px; margin-bottom: 14px; }
.adv-item h3 { font-size: 17px; margin-bottom: 8px; }
.adv-item p { font-size: 13px; color: var(--text-light); line-height: 1.7; }

/* Products Grid */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px var(--shadow); }
.product-img { aspect-ratio: 1; object-fit: cover; background: var(--bg-light); }
.product-info { padding: 16px; }
.product-info h3 { font-size: 15px; margin-bottom: 6px; }
.product-info p { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }
.product-btn { display: inline-block; background: var(--primary); color: var(--white); padding: 6px 18px; border-radius: 4px; font-size: 13px; }

/* New Product Highlight */
.new-product-highlight { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border: 2px solid var(--accent); border-radius: 12px; padding: 40px; margin: 40px 0; }
.new-product-highlight h2 { color: #92400e; font-size: 26px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.new-badge { background: #dc2626; color: white; font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 700; vertical-align: middle; }
.new-product-images { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.new-product-images img { border-radius: 8px; width: 100%; aspect-ratio: 1; object-fit: cover; }
.new-product-desc { color: #78350f; font-size: 15px; line-height: 1.8; margin-bottom: 16px; }
.new-product-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.feature-tag { background: white; padding: 12px 16px; border-radius: 6px; font-size: 14px; color: #92400e; text-align: center; font-weight: 500; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; padding: 50px 0; background: var(--bg-light); border-radius: 12px; margin: 40px 0; }
.stat-num { font-size: 42px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 14px; color: var(--text-light); margin-top: 4px; }

/* About */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-text p { color: var(--text-light); margin-bottom: 16px; font-size: 15px; line-height: 1.8; }
.about-values { list-style: none; margin-top: 20px; }
.about-values li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.about-values strong { color: var(--primary); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info { background: var(--bg-light); padding: 40px; border-radius: 12px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.contact-icon { font-size: 28px; min-width: 40px; }
.contact-detail h4 { font-size: 16px; margin-bottom: 4px; }
.contact-detail p { font-size: 14px; color: var(--text-light); }

/* ===== 中英一键切换 ===== */
html[lang="zh-CN"] .en { display: none !important; }
html[lang="en"] .zh { display: none !important; }
.lang-toggle {
  margin-left: 6px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-toggle:hover { background: rgba(255,255,255,.32); transform: translateY(-1px); }
.header-inner { gap: 14px; }
@media (max-width: 900px) {
  .lang-toggle { margin-left: 0; padding: 5px 12px; }
}

/* Footer */
.footer { background: var(--primary-dark); color: var(--white); padding: 40px 0 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-col h4 { font-size: 16px; margin-bottom: 16px; color: var(--accent); }
.footer-col a { display: block; color: rgba(255,255,255,.7); font-size: 13px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; text-align: center; font-size: 13px; color: rgba(255,255,255,.5); }

/* Category Section in products */
.category-section { margin-bottom: 50px; }
.category-title { font-size: 22px; color: var(--primary); margin-bottom: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); display: inline-block; }
.category-desc { color: var(--text-light); font-size: 14px; margin-bottom: 20px; }

/* Responsive */
@media (max-width: 900px) {
  .advantages, .products-grid, .stats, .footer-grid, .new-product-images, .new-product-features { grid-template-columns: repeat(2, 1fr); }
  .about-content, .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .nav { display: none; }
}
@media (max-width: 500px) {
  .advantages, .products-grid, .stats, .new-product-images, .new-product-features { grid-template-columns: 1fr; }
}
