/* =============================================
   前台样式 - 企业官网
   蓝白简约大气专业风格
   ============================================= */

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

:root {
  --primary: #1a56db;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --accent: #2563eb;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--bg-white);
}

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

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* =============================================
   Header
   ============================================= */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

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

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

.main-nav {
  display: flex;
  gap: 8px;
}

.main-nav a {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  color: var(--text-gray);
  transition: all 0.2s;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--primary);
  background: rgba(26, 86, 219, 0.06);
}

.main-nav a.active {
  color: var(--primary);
  background: rgba(26, 86, 219, 0.1);
  font-weight: 600;
}

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

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.2s;
}

/* =============================================
   Banner
   ============================================= */
.banner-section {
  position: relative;
  overflow: hidden;
  background: #000;
}

.banner-slider {
  position: relative;
  height: 420px;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.banner-slide.active {
  opacity: 1;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-caption {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 600;
}

.banner-prev,
.banner-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  transition: all 0.2s;
}

.banner-prev:hover,
.banner-next:hover {
  background: #fff;
}

.banner-prev {
  left: 20px;
}

.banner-next {
  right: 20px;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s;
}

.dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* Default Hero (when no banners) */
.hero-default {
  background: linear-gradient(135deg, #1a56db 0%, #1e40af 50%, #1e3a8a 100%);
  position: relative;
  overflow: hidden;
}
.hero-default::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.hero-default::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}
.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 100px 0 80px;
  text-align: center;
  color: #fff;
}
.hero-overlay h1 {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.hero-overlay p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}
.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  transform: translateY(-1px);
}

/* =============================================
   Sections
   ============================================= */
.section {
  padding: 60px 0;
}

.bg-light {
  background: var(--bg-light);
}

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

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-gray);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

/* =============================================
   Page Banner
   ============================================= */
.page-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.page-banner h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-banner p {
  font-size: 14px;
  opacity: 0.8;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* =============================================
   Intro Section
   ============================================= */
.intro-content {
  max-width: 800px;
  margin: 0 auto 50px;
  text-align: center;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-gray);
}

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

.feature-item {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
  background: #fff;
}

.feature-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--primary);
}

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

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

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

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
  display: block;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.product-card-img {
  height: 220px;
  overflow: hidden;
  background: var(--bg-light);
}

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

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

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

.product-category {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-card-info h3 {
  font-size: 16px;
  margin: 6px 0;
  color: var(--text-dark);
}

.product-card-info p {
  font-size: 13px;
  color: var(--text-gray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================
   CTA Section
   ============================================= */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-align: center;
}

.cta-section h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.cta-section p {
  margin-bottom: 24px;
  opacity: 0.9;
  font-size: 16px;
}

/* =============================================
   Product Detail
   ============================================= */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.product-detail-gallery {
  position: sticky;
  top: 84px;
}

.product-main-img {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  margin-bottom: 12px;
}

.product-main-img img {
  width: 100%;
  height: auto;
  display: block;
}

.product-thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.thumb.active,
.thumb:hover {
  border-color: var(--primary);
}

.product-detail-info h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.product-category-badge {
  display: inline-block;
  background: rgba(26, 86, 219, 0.1);
  color: var(--primary);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  font-weight: 600;
}

.product-summary {
  color: var(--text-gray);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.product-actions {
  margin-bottom: 20px;
}

.product-description {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.product-description h3 {
  font-size: 24px;
  margin-bottom: 20px;
}

.rich-content {
  line-height: 1.8;
  color: var(--text-gray);
}

.rich-content p {
  margin-bottom: 12px;
}

.rich-content img {
  max-width: 100%;
  border-radius: var(--radius);
}

/* =============================================
   Category Filter
   ============================================= */
.category-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-gray);
  transition: all 0.2s;
  cursor: pointer;
  background: #fff;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

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

.contact-info h2,
.contact-form-wrapper h2 {
  font-size: 24px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-light);
  transition: all 0.2s;
}

.info-item:hover {
  background: rgba(26, 86, 219, 0.05);
}

.info-icon {
  font-size: 24px;
  color: var(--primary);
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}

.info-item h4 {
  font-size: 14px;
  color: var(--text-gray);
  margin-bottom: 4px;
}

.info-item p {
  font-size: 15px;
  color: var(--text-dark);
}

/* =============================================
   Forms
   ============================================= */
.contact-form .form-group {
  margin-bottom: 16px;
}

.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

.contact-form .required {
  color: #ef4444;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
  background: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

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

/* =============================================
   About Content
   ============================================= */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  color: var(--text-gray);
  font-size: 16px;
}

.about-content h3 {
  color: var(--text-dark);
  font-size: 22px;
  margin: 24px 0 12px;
}

.about-content p {
  margin-bottom: 16px;
}

.about-culture h3 {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--text-dark);
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* =============================================
   Alerts
   ============================================= */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* =============================================
   Pagination
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-gray);
  transition: all 0.2s;
  background: #fff;
}

.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* =============================================
   Empty State
   ============================================= */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
  font-size: 16px;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: #1e293b;
  color: #cbd5e1;
  padding-top: 48px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 32px;
}

.footer-col h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.8;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: #cbd5e1;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .main-nav.open {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .banner-slider {
    height: 250px;
  }

  .intro-features {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 40px 0;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .page-banner {
    padding: 40px 0;
  }

  .page-banner h1 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}
