/* ============================================
   深圳市恒诚威科技有限公司 - 官方网站样式
   Shenzhen Hengchengwei Technology Co., Ltd.
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1e50ae;
  --primary-dark: #153d85;
  --primary-light: #e8f0fb;
  --text: #333;
  --text-light: #666;
  --bg: #fff;
  --bg-gray: #f5f7fa;
  --border: #e0e0e0;
  --accent: #ff6b35;
  --max-width: 1200px;
  --header-height: 80px;
}

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

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

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* === Header === */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08);
  height: var(--header-height);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: 10px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; max-width: 55%; }
.logo img { height: 40px; width: auto; flex-shrink: 0; }
.logo span {
  font-size: 1.1rem; font-weight: 700; color: var(--primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Nav */
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 6px;
  font-size: .9rem; color: var(--text); font-weight: 500;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--primary); background: var(--primary-light);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: block; padding: 8px 12px; border-radius: 6px; font-size: .9rem; color: var(--text); font-weight: 500; transition: all .2s; }
.nav-dropdown:hover > a { color: var(--primary); background: var(--primary-light); }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0;
  background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.12);
  border-radius: 8px; min-width: 160px; padding: 6px 0; z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 8px 20px; font-size: .9rem; color: var(--text);
  border-radius: 0; white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); }

/* MORE+ link */
.more-link {
  display: inline-block; margin-top: 12px; padding: 6px 20px;
  font-size: .85rem; font-weight: 600; color: var(--primary);
  border: 1px solid var(--primary); border-radius: 4px; transition: all .2s;
}
.more-link:hover { background: var(--primary); color: #fff; }

/* Category card update for MORE+ */
.category-card { display: flex; flex-direction: column; }
.category-card p { flex: 1; }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); border-radius: 2px; transition: .3s;
}

/* === Hero Section === */
.hero {
  background: linear-gradient(135deg, #0d2b5e 0%, #1e50ae 50%, #2980b9 100%);
  color: #fff; padding: 80px 0; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('../images/ABUIABACGAAgh9yHpAYo2NDggAUw0Bc40Bc.jpg') center/cover;
  opacity: .15;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; letter-spacing: 2px; }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 600px; margin: 0 auto; }

/* === Section Common === */
.section { padding: 60px 0; }
.section-title {
  text-align: center; font-size: 1.75rem; font-weight: 700;
  color: var(--primary); margin-bottom: 12px;
}
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 40px; }
.bg-gray { background: var(--bg-gray); }

/* === Brand Logos Strip === */
.brand-strip {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 30px; padding: 30px 0;
}
.brand-strip img { height: 50px; width: auto; opacity: .8; transition: opacity .2s; filter: grayscale(20%); }
.brand-strip img:hover { opacity: 1; filter: grayscale(0); }

/* === Product Categories Grid === */
.categories-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px; margin-top: 20px;
}
.category-card {
  background: #fff; border-radius: 12px; padding: 30px 24px;
  text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .3s, box-shadow .3s; border: 1px solid var(--border);
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.category-card img { width: 80px; height: 80px; margin: 0 auto 16px; object-fit: contain; }
.category-card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--primary); }
.category-card p { font-size: .9rem; color: var(--text-light); line-height: 1.6; }

/* === Stats Bar === */
.stats-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; text-align: center;
}
.stat-item .stat-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-item .stat-label { font-size: .95rem; color: var(--text-light); margin-top: 4px; }
.stat-suffix { font-size: 1.5rem; }

/* === About Blurb === */
.about-blurb { max-width: 800px; margin: 0 auto; text-align: center; }
.about-blurb p { font-size: 1.05rem; line-height: 1.9; margin-bottom: 24px; }

/* === Button === */
.btn {
  display: inline-block; padding: 12px 32px; border-radius: 6px;
  font-size: 1rem; font-weight: 600; cursor: pointer; transition: all .2s;
  border: none; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* === Product Search === */
.product-search {
  margin-bottom: 30px; display: flex; gap: 12px;
  max-width: 500px; margin-left: auto; margin-right: auto;
}
.product-search input {
  flex: 1; padding: 12px 20px; border: 2px solid var(--border);
  border-radius: 8px; font-size: 1rem; outline: none; transition: border-color .2s;
}
.product-search input:focus { border-color: var(--primary); }

/* === Product Grid === */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.product-card {
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; text-align: center; transition: box-shadow .2s;
}
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.product-card .product-img {
  width: 100%; height: 160px; object-fit: contain;
  background: var(--bg-gray); border-radius: 6px; margin-bottom: 12px;
}
.product-card .product-name {
  font-size: .85rem; font-weight: 500; color: var(--text);
  word-break: break-all; line-height: 1.4;
}
.product-count { text-align: center; color: var(--text-light); margin-bottom: 20px; font-size: .9rem; }
.no-results { text-align: center; padding: 40px; color: var(--text-light); display: none; }

/* === Product Category Filters === */
.category-filters {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px; margin-bottom: 24px;
}
.category-filters button {
  padding: 8px 18px; border: 1px solid var(--border); border-radius: 20px;
  background: #fff; cursor: pointer; font-size: .9rem; color: var(--text);
  transition: all .2s;
}
.category-filters button:hover, .category-filters button.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* === News Grid === */
.news-list { max-width: 800px; margin: 0 auto; }
.news-item {
  display: flex; gap: 20px; padding: 20px 0;
  border-bottom: 1px solid var(--border); align-items: flex-start;
}
.news-item:last-child { border-bottom: none; }
.news-item .news-date {
  font-size: .85rem; color: var(--text-light); white-space: nowrap;
  padding-top: 3px; min-width: 100px;
}
.news-item .news-title { font-size: 1.05rem; font-weight: 600; }
.news-item .news-excerpt { font-size: .9rem; color: var(--text-light); margin-top: 6px; }

/* === News Article === */
.article-detail { max-width: 800px; margin: 0 auto; }
.article-detail h1 { font-size: 1.75rem; color: var(--primary); margin-bottom: 12px; }
.article-detail .article-date { color: var(--text-light); font-size: .9rem; margin-bottom: 30px; }
.article-detail .article-body { font-size: 1.05rem; line-height: 1.9; }
.article-detail .article-body p { margin-bottom: 16px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--primary); }

/* === About Page === */
.about-nav {
  display: flex; justify-content: center; gap: 16px; margin-bottom: 40px;
  flex-wrap: wrap;
}
.about-nav a {
  padding: 10px 24px; border-radius: 6px; color: var(--text); font-weight: 500;
  transition: all .2s; border: 1px solid var(--border);
}
.about-nav a:hover, .about-nav a:focus { background: var(--primary); color: #fff; border-color: var(--primary); }

.about-section { margin-bottom: 50px; }
.about-section h2 { font-size: 1.5rem; color: var(--primary); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); }
.about-section p { margin-bottom: 12px; line-height: 1.9; }

/* Timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
  width: 3px; background: var(--primary-light); border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-item::before {
  content: ''; position: absolute; left: -26px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.timeline-item .year { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.timeline-item p { margin-top: 4px; }

/* Warehouse Gallery */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-grid img {
  width: 100%; height: 200px; object-fit: cover;
  border-radius: 8px; transition: transform .3s;
}
.gallery-grid img:hover { transform: scale(1.03); }

/* === Contact Page === */
.contact-info { max-width: 600px; margin: 0 auto; }
.contact-item {
  display: flex; gap: 16px; padding: 20px 0;
  border-bottom: 1px solid var(--border); align-items: flex-start;
}
.contact-item:last-child { border-bottom: none; }
.contact-icon {
  font-size: 1.5rem; min-width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light); border-radius: 8px;
}
.contact-label { font-size: .85rem; color: var(--text-light); }
.contact-value { font-size: 1.05rem; margin-top: 2px; }

/* === Footer === */
.site-footer {
  background: #f5f5f5; color: var(--text); padding: 30px 0 15px;
  font-size: .9rem; line-height: 2; text-align: center;
}
.site-footer .copyright {
  margin-top: 15px; padding-top: 10px;
  border-top: 1px solid var(--border); color: var(--text-light); font-size: .8rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  :root { --header-height: 64px; }
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 50px 0; }
  .section { padding: 40px 0; }
  .section-title { font-size: 1.4rem; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-item .stat-number { font-size: 1.8rem; }
  .categories-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: var(--header-height);
    left: 0; right: 0; background: #fff; flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,.1); padding: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; border-radius: 0; }

  .news-item { flex-direction: column; gap: 4px; }
  .brand-strip { gap: 16px; }
  .brand-strip img { height: 36px; }
  .about-nav { gap: 8px; }
  .about-nav a { padding: 8px 16px; font-size: .9rem; }
}
