/* ============================================================
   锦凌五金 - 企业展示网站样式
   ============================================================ */

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

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --secondary: #f97316;
  --dark: #1a1a2e;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--gray-700);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  line-height: 1.5;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--dark); }

.btn-block { display: block; width: 100%; }

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--gray-200);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
}

.logo-img { height: 40px; width: auto; border-radius: 4px; }

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: 1px;
}

.nav-menu { display: flex; gap: 4px; }

.nav-link {
  display: block;
  padding: 8px 18px;
  border-radius: var(--radius);
  color: var(--gray-600);
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}
.nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-link.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hero */
.hero {
  position: relative;
  height: 520px;
  overflow: hidden;
}

.hero-slider { position: relative; height: 100%; }

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.active { opacity: 1; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,26,46,0.85) 0%, rgba(26,26,46,0.5) 100%);
  display: flex;
  align-items: center;
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 560px;
}

.hero .btn { margin-right: 12px; margin-bottom: 10px; }

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}
.dot.active { background: var(--white); width: 28px; border-radius: 5px; }

/* Sections */
.section { padding: 80px 0; }
.section-gray { background: var(--gray-50); }

.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--dark);
  margin-bottom: 12px;
}
.text-left { text-align: left; }

.section-desc {
  text-align: center;
  color: var(--gray-500);
  font-size: 16px;
  margin-bottom: 48px;
}

.section-cta { text-align: center; margin-top: 40px; }

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  display: block;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  transition: var(--transition);
  color: var(--gray-700);
  text-decoration: none;
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: var(--gray-700);
}

.category-icon { font-size: 48px; margin-bottom: 16px; }

.category-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.category-card p { color: var(--gray-500); font-size: 15px; }

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-img {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img img { transform: scale(1.05); }

.product-img-placeholder {
  color: var(--gray-400);
  font-size: 16px;
}

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

.product-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.product-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
}

/* Advantages */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.advantage-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border-top: 4px solid var(--primary);
}
.advantage-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.advantage-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.2;
  margin-bottom: 12px;
}
.advantage-card h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.advantage-card p { color: var(--gray-500); font-size: 14px; line-height: 1.7; }

/* Company Brief (Homepage) */
.company-brief {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.company-brief-img img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.company-brief-text p {
  color: var(--gray-500);
  margin: 16px 0;
  line-height: 1.8;
}

.company-stats {
  display: flex;
  gap: 32px;
  margin: 24px 0 32px;
}
.company-stats li { text-align: center; }
.company-stats strong {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}
.company-stats span { font-size: 13px; color: var(--gray-500); }

/* Page Banner */
.page-banner {
  background: linear-gradient(135deg, var(--dark) 0%, #2d3748 100%);
  padding: 60px 0;
  text-align: center;
  color: var(--white);
}
.page-banner h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.page-banner p { font-size: 16px; color: rgba(255,255,255,0.75); }

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 24px;
  border: 2px solid var(--gray-200);
  background: var(--white);
  border-radius: 30px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: var(--gray-100);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); color: var(--dark); }

.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.modal-gallery { background: var(--gray-100); padding: 24px; display: flex; flex-direction: column; align-items: center; }
.gallery-main { width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--white); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }
.gallery-thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0.6;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--primary); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.modal-info { padding: 32px 24px; }
.modal-info h2 { font-size: 24px; font-weight: 700; color: var(--dark); margin: 8px 0 20px; }
.modal-section { margin-bottom: 20px; }
.modal-section h4 { font-size: 15px; font-weight: 700; color: var(--dark); margin-bottom: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--gray-100); }
.modal-section p { color: var(--gray-500); line-height: 1.8; font-size: 14px; white-space: pre-line; }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; }

/* Company Detail Page */
.company-intro-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.company-intro-img img {
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}
.company-intro-text p { line-height: 1.9; color: var(--gray-500); margin-top: 16px; }

/* Equipment Grid */
.equipment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.equipment-item {
  padding: 10px 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-700);
  font-weight: 500;
  transition: var(--transition);
}
.equipment-item:hover { border-color: var(--primary); color: var(--primary); }

/* Advantages Detail */
.advantages-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}
.advantage-detail-card {
  display: flex;
  gap: 20px;
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.advantage-detail-card:hover { box-shadow: var(--shadow-lg); }
.advantage-icon {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.advantage-content h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.advantage-content p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* Promise Grid */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.promise-card {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}
.promise-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.promise-icon { font-size: 36px; margin-bottom: 12px; }
.promise-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* Industry Grid */
.industry-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.industry-card {
  padding: 12px 28px;
  background: var(--primary-light);
  border: 1px solid rgba(26,115,232,0.2);
  border-radius: var(--radius);
  transition: var(--transition);
}
.industry-card:hover { background: var(--primary); border-color: var(--primary); }
.industry-card:hover .industry-name { color: var(--white); }
.industry-name { font-size: 15px; font-weight: 600; color: var(--primary); }

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

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

.contact-items { margin-top: 24px; }

.contact-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-100);
}
.contact-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-text h4 { font-size: 14px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.contact-text p { font-size: 15px; color: var(--gray-500); }
.contact-text a { color: var(--primary); font-weight: 600; }

.service-areas { margin-top: 24px; }
.service-areas h4 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 12px; }
.area-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.area-tag {
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* Contact Form */
.contact-form-wrapper { }
.form-note { color: var(--gray-500); margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--gray-700);
  transition: var(--transition);
  background: var(--white);
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}
.form-tip { margin-top: 12px; text-align: center; font-size: 13px; color: var(--gray-500); }

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 60px 0;
  text-align: center;
  color: var(--white);
}
.cta-section h2 { font-size: 30px; font-weight: 700; margin-bottom: 8px; }
.cta-section p { font-size: 16px; opacity: 0.9; margin-bottom: 24px; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 16px; }
.cta-divider { opacity: 0.7; }
.cta-phone { font-size: 22px; font-weight: 700; }

/* Footer */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-col p, .footer-col li { font-size: 14px; line-height: 2; }
.footer-col a { color: rgba(255,255,255,0.6); }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    gap: 4px;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-link { padding: 12px 16px; }

  .hero { height: 380px; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 15px; }

  .section { padding: 48px 0; }
  .section-title { font-size: 26px; }

  .company-brief,
  .company-intro-detail,
  .contact-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

  .advantages-detail { grid-template-columns: 1fr; }

  .modal-body { grid-template-columns: 1fr; }
  .modal-container { max-height: 90vh; }
  .modal-info { padding: 20px; }

  .company-stats { gap: 20px; }
  .company-stats strong { font-size: 24px; }

  .contact-grid { gap: 32px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 24px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-img { height: 160px; }
  .product-info { padding: 10px 12px 14px; }
  .product-name { font-size: 14px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .btn { padding: 10px 20px; font-size: 14px; }
}
