/* ========================================
   XSMPS 欧迅电源科技 - 官网样式表
   Version: 1.0.0
   ======================================== */

/* CSS Variables */
:root {
  --primary-color: #1a3a5c;
  --secondary-color: #e8721c;
  --bg-white: #ffffff;
  --bg-light: #f5f7fa;
  --text-dark: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border-color: #e1e5eb;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --max-width: 1200px;
  --header-height: 70px;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--secondary-color);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dark);
  padding: 8px 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

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

.header-cta {
  background: var(--secondary-color);
  color: var(--bg-white);
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 500;
  transition: background var(--transition-fast);
}

.header-cta:hover {
  background: #d46518;
  color: var(--bg-white);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition-fast);
}

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

  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }

  .nav-list.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .header-cta {
    display: none;
  }
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  padding: calc(var(--header-height) + 80px) 0 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #2a5a8c 100%);
  color: var(--bg-white);
  text-align: center;
}

.hero h1 {
  color: var(--bg-white);
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 40px;
}

.hero-cta {
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--secondary-color);
  color: var(--bg-white);
}

.btn-primary:hover {
  background: #d46518;
  color: var(--bg-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--bg-white);
  border: 2px solid var(--bg-white);
}

.btn-secondary:hover {
  background: var(--bg-white);
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .hero {
    padding: calc(var(--header-height) + 40px) 0 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: 80px 0;
}

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

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

.section-header h2 {
  margin-bottom: 16px;
}

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

/* ========================================
   PRODUCT CARDS
   ======================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.product-card {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--bg-light) 0%, #e8ecf1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-card-image img {
  max-height: 100%;
  object-fit: contain;
}

.product-card-content {
  padding: 24px;
}

.product-card-content h3 {
  margin-bottom: 12px;
}

.product-card-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.product-card-link {
  color: var(--secondary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.product-card-link:hover {
  gap: 10px;
}

/* ========================================
   FEATURES / ADVANTAGES
   ======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #2a5a8c 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-white);
  font-size: 1.5rem;
}

.feature-content h4 {
  margin-bottom: 8px;
}

.feature-content p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
}

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

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.stat-label {
  color: var(--text-light);
  font-size: 0.9rem;
}

.about-image {
  background: linear-gradient(135deg, var(--bg-light) 0%, #e8ecf1 100%);
  border-radius: 12px;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   PRODUCT LIST PAGE
   ======================================== */
.page-header {
  padding: calc(var(--header-height) + 60px) 0 60px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #2a5a8c 100%);
  color: var(--bg-white);
  text-align: center;
}

.page-header h1 {
  color: var(--bg-white);
  margin-bottom: 12px;
}

.page-header p {
  opacity: 0.9;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: rgba(255,255,255,0.8);
}

.breadcrumb a:hover {
  color: var(--bg-white);
}

.breadcrumb span {
  color: rgba(255,255,255,0.6);
}

/* Product List */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.product-item {
  background: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.product-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-item-image {
  height: 180px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-item-content {
  padding: 20px;
}

.product-item-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.product-item-content p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.product-item-link {
  display: inline-block;
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ========================================
   PRODUCT DETAIL PAGE
   ======================================== */
.product-detail {
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 80px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 40px;
}

.product-gallery {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.product-gallery-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.product-gallery-placeholder svg {
  width: 120px;
  height: 120px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.product-info h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.product-info .subtitle {
  color: var(--text-light);
  margin-bottom: 24px;
}

.product-params {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.product-params h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.params-table {
  width: 100%;
}

.params-table tr {
  border-bottom: 1px solid var(--border-color);
}

.params-table tr:last-child {
  border-bottom: none;
}

.params-table th,
.params-table td {
  padding: 10px 0;
  text-align: left;
}

.params-table th {
  color: var(--text-light);
  font-weight: 500;
  width: 40%;
}

.params-table td {
  font-weight: 500;
}

.product-features {
  margin-bottom: 24px;
}

.product-features h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.product-features ul {
  list-style: disc;
  padding-left: 20px;
}

.product-features li {
  padding: 6px 0;
  color: var(--text-light);
}

.product-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Related Products */
.related-products {
  margin-top: 80px;
}

.related-products h2 {
  margin-bottom: 32px;
}

/* ========================================
   CONTACT PAGE
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  margin-top: 40px;
}

.contact-info {
  background: var(--primary-color);
  color: var(--bg-white);
  border-radius: 12px;
  padding: 40px;
}

.contact-info h2 {
  color: var(--bg-white);
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-text h4 {
  color: var(--bg-white);
  margin-bottom: 4px;
  font-size: 1rem;
}

.contact-text p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}

.contact-form-wrapper {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.contact-form-wrapper h2 {
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group .required {
  color: #e74c3c;
}

.form-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.form-error.show {
  display: block;
}

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--secondary-color);
  color: var(--bg-white);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.form-submit:hover {
  background: #d46518;
}

.form-submit:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px;
}

.form-success.show {
  display: block;
}

.form-success svg {
  width: 64px;
  height: 64px;
  color: #27ae60;
  margin-bottom: 16px;
}

.form-success h3 {
  margin-bottom: 8px;
  color: #27ae60;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, #2a5a8c 100%);
  color: var(--bg-white);
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  color: var(--bg-white);
  margin-bottom: 16px;
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: 32px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: #0d1f2d;
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img {
  height: 36px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer h4 {
  color: var(--bg-white);
  margin-bottom: 20px;
  font-size: 1rem;
}

.footer-links a {
  display: block;
  padding: 6px 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

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

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

/* ========================================
   ABOUT PAGE SPECIFIC
   ======================================== */
.about-intro {
  max-width: 900px;
  margin: 0 auto 60px;
  text-align: center;
}

.about-intro p {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.8;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.capability-item {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.capability-item .icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #2a5a8c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--bg-white);
  font-size: 2rem;
}

.capability-item h3 {
  margin-bottom: 12px;
}

.capability-item p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease forwards;
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: var(--bg-white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--secondary-color);
  transform: translateY(-4px);
}

/* Image Placeholder */
.img-placeholder {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}

.img-placeholder svg {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
  opacity: 0.4;
}
