/* modern-theme.css - 山井电源网站现代主题样式 */

/* 导入Inter字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* 颜色变量 */
  --primary-color: #0A2A4E; /* 深蓝色主题色 */
  --secondary-color: #1C3A5E; /* 次要蓝色 */
  --accent-color: #FF8C00; /* 橙色强调色 */
  --text-color: #333333;
  --light-text: #FFFFFF;
  --background-color: #F9F9F9;
  --card-bg: #FFFFFF;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  
  /* 字体变量 */
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* 过渡动画变量 */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
}

/* 基础样式重置与设置 */
body {
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

/* 响应式字体大小 */
@media (min-width: 768px) {
  body {
    font-size: 17px;
  }
}

@media (min-width: 1200px) {
  body {
    font-size: 18px;
  }
}

/* 标题样式增强 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--body-font);
  font-weight: 600;
  color: var(--primary-color);
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.2rem;
  position: relative;
}

h2:after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
  margin-top: 0.8rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* 链接样式增强 */
a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* 按钮样式增强 */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-weight: 500;
  text-align: center;
  border-radius: 4px;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--light-text);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--light-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 卡片样式 */
.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

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

/* 产品卡片样式 */
.product-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin: 2rem 0;
}

.category-item {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-medium);
}

.category-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
}

.category-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform var(--transition-medium);
}

.category-item:hover img {
  transform: scale(1.05);
}

.category-item h3 {
  padding: 15px;
  margin: 0;
  text-align: center;
  font-size: 1.2rem;
  color: var(--primary-color);
}

/* 特性网格样式 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin: 2rem 0;
}

.feature-item {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 25px;
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: all var(--transition-medium);
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.feature-item img {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
}

.feature-item h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

/* 页面标题横幅增强 */
.page-title-banner {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-title-banner:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 42, 78, 0.9) 0%, rgba(28, 58, 94, 0.8) 100%);
  z-index: 1;
}

.page-title-banner .container {
  position: relative;
  z-index: 2;
}

.page-title-banner h1 {
  color: var(--light-text);
  margin-top: 0;
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-title-banner p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* 公司简介部分增强 */
.company-intro-summary {
  padding: 60px 0;
  background-color: var(--background-color);
}

/* 动画效果 */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 联系表单样式增强 */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 2rem 0;
}

.contact-info-details,
.contact-form-section {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 30px;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-medium);
}

.contact-info-details:hover,
.contact-form-section:hover {
  box-shadow: var(--hover-shadow);
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(28, 58, 94, 0.1);
  outline: none;
}

.form-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.form-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.map-placeholder {
  margin-top: 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

/* 导航栏滚动效果 */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast);
}

.header-hidden {
  transform: translateY(-100%);
}

.header-scrolled {
  background-color: rgba(10, 42, 78, 0.95);
  padding: 10px 0;
}

/* 产品详情页样式 */
.product-detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 3rem 0;
}

.product-gallery {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.product-gallery-main {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.product-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.product-thumbnail:hover,
.product-thumbnail.active {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.product-info h1 {
  margin-top: 0;
  color: var(--primary-color);
}

.product-price {
  font-size: 1.8rem;
  color: var(--accent-color);
  font-weight: 700;
  margin: 1rem 0;
}

.product-description {
  margin: 1.5rem 0;
  line-height: 1.8;
}

.product-meta {
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.product-meta-item {
  display: flex;
  margin-bottom: 10px;
}

.meta-label {
  font-weight: 600;
  width: 120px;
  color: var(--primary-color);
}

/* 波纹按钮效果 */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.btn-ripple:active:after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.7);
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  animation: ripple 0.6s linear;
  transform: scale(0);
  opacity: 1;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* 防止滚动 */
.no-scroll {
  overflow: hidden;
}

/* 表格样式 */
.table-container {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background-color: var(--primary-color);
  color: var(--light-text);
}

th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}

/* 斑马条纹效果 */
tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* 表格行悬停效果 */
tbody tr {
  transition: background-color var(--transition-fast);
}

tbody tr:hover {
  background-color: rgba(10, 42, 78, 0.05);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .product-categories-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
  }
  
  .product-detail-container {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.7rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  .page-title-banner {
    padding: 40px 0;
  }
  
  .page-title-banner h1 {
    font-size: 2.2rem;
  }
}

/* 移动端汉堡菜单 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--light-text);
  border-radius: 3px;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: var(--primary-color);
  z-index: 1000;
  padding: 80px 20px 20px;
  transition: right var(--transition-medium);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul li {
  margin-bottom: 15px;
}

.mobile-nav ul li a {
  color: var(--light-text);
  font-size: 1.1rem;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  header nav ul {
    display: none;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .product-gallery-main {
    height: 300px;
  }
  
  .product-thumbnail {
    width: 60px;
    height: 60px;
  }
  
  .product-price {
    font-size: 1.5rem;
  }


}