/* 全站样式 - 浅蓝色商务风 */

/* ===== 基础样式 ===== */
:root {
  --primary-color: #0066cc;
  --primary-light: #3388dd;
  --primary-dark: #004499;
  --secondary-color: #f0f7ff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #ddd;
  --white: #ffffff;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body {
  font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
  color: var(--text-color);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}

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

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

/* ===== 导航栏 ===== */
.navbar {
  background: var(--white);
  border-bottom: 3px solid var(--primary-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 10px 20px;
  box-shadow: var(--shadow);
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.navbar-brand:hover {
  opacity: 0.8;
}

.navbar-logo {
  height: 50px;
  width: auto;
}

.navbar-company {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.lang-switch:hover {
  background: var(--primary-dark);
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 5px;
}

.navbar-menu li a {
  display: block;
  padding: 10px 20px;
  color: var(--text-color);
  border-radius: 4px;
  transition: all 0.3s;
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
  background: var(--secondary-color);
  color: var(--primary-color);
}

/* 移动端汉堡按钮 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary-color);
}

/* ===== 页面主体 ===== */
.page-content {
  margin-top: 120px;
  padding: 20px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.page-title {
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
}

/* ===== 底部版权栏 ===== */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

.footer-text {
  font-size: 14px;
}

/* ===== 图片预览模态框 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  max-width: 90vw;
  max-height: 80vh;
  position: relative;
}

.modal-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.modal-controls {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,0.2);
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 2001;
}

.modal-btn {
  background: var(--white);
  border: none;
  padding: 10px 20px;
  min-width: 80px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
  white-space: nowrap;
}

.modal-btn:hover {
  background: var(--secondary-color);
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.3);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  color: var(--white);
  z-index: 2001;
}

.modal-close:hover {
  background: rgba(255,255,255,0.5);
}

/* ===== 首页轮播 ===== */
.carousel {
  position: relative;
  width: 100%;
  margin-bottom: 40px;
}

.carousel-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  padding: 0 50px;
}

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

.carousel-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s;
  border: 2px solid var(--secondary-color);
}

.carousel-item img:hover {
  transform: scale(1.05);
  border-color: var(--primary-color);
}

.carousel-item-title {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-color);
  color: var(--white);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.carousel-nav:hover {
  opacity: 1;
}

.carousel-prev { left: 5px; }
.carousel-next { right: 5px; }

/* 响应式轮播 */
@media (max-width: 1023px) {
  .carousel-inner {
    grid-template-columns: repeat(4, 1fr);
    padding: 0 50px;
  }
  .carousel-item img {
    height: 200px;
  }
}

/* ===== 首页联系信息 ===== */
.contact-info {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
}

.contact-section {
  margin-bottom: 20px;
}

.contact-section h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.contact-section p {
  margin: 5px 0;
}

/* ===== 公司简介页 ===== */
.about-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.about-image {
  flex: 0 0 400px;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.about-content {
  flex: 1;
}

.about-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab-btn {
  background: var(--secondary-color);
  border: none;
  padding: 10px 30px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
}

.tab-btn.active {
  background: var(--primary-color);
  color: var(--white);
}

.tab-content {
  display: none;
  padding: 20px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.tab-content.active {
  display: block;
}

.tab-content p {
  margin-bottom: 15px;
  text-align: justify;
}

/* ===== 产品页 ===== */
.products-container {
  display: flex;
  gap: 20px;
  min-height: 500px;
}

.tree-menu {
  flex: 0 0 250px;
  background: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  overflow-y: auto;
  max-height: 600px;
}

.tree-item {
  margin: 5px 0;
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s;
}

.tree-node:hover {
  background: var(--white);
}

.tree-node.active {
  background: var(--primary-color);
  color: var(--white);
}

.tree-toggle {
  font-size: 12px;
  width: 20px;
  text-align: center;
}

.tree-children {
  padding-left: 20px;
  display: none;
}

.tree-children.expanded {
  display: block;
}

.products-main {
  flex: 1;
}

.breadcrumb {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 15px;
  background: var(--secondary-color);
  border-radius: 4px;
}

.breadcrumb-item {
  color: var(--text-light);
  cursor: pointer;
}

.breadcrumb-item:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--primary-color);
  font-weight: bold;
}

.breadcrumb-separator {
  color: var(--border-color);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.grid-folder {
  text-align: center;
  padding: 20px;
  background: var(--secondary-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.grid-folder:hover {
  background: var(--white);
  box-shadow: var(--shadow);
}

.folder-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.folder-name {
  font-size: 14px;
  color: var(--text-color);
}

.grid-image {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.grid-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.3s;
}

.grid-image:hover img {
  transform: scale(1.1);
}

.image-name {
  padding: 10px;
  font-size: 12px;
  text-align: center;
  color: var(--text-light);
  background: var(--secondary-color);
}

/* ===== 展会页 ===== */
.exhibition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.exhibition-item {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.exhibition-item img {
  width: 100%;
  height: auto;
  transition: transform 0.3s;
}

.exhibition-item:hover img {
  transform: scale(1.02);
}

/* ===== 联系方式页 ===== */
.contact-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.contact-card {
  background: var(--secondary-color);
  padding: 30px;
  border-radius: 8px;
}

.contact-card h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 20px;
}

.contact-card h3 {
  color: var(--text-color);
  margin: 20px 0 10px;
  font-size: 16px;
}

.contact-card p {
  margin: 8px 0;
  color: var(--text-light);
}

/* ===== 响应式适配 ===== */
@media (max-width: 1023px) {
  .about-container {
    flex-direction: column;
  }

  .about-image {
    flex: none;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
  }

  .products-container {
    flex-direction: column;
  }

  .tree-menu {
    flex: none;
    width: 100%;
    max-height: 300px;
  }

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

@media (max-width: 767px) {
  .navbar-inner {
    flex-wrap: wrap;
  }

  .navbar-brand {
    flex: 1;
  }

  .menu-toggle {
    display: block;
    order: 2;
  }

  .lang-switch {
    order: 3;
  }

  .navbar-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 4;
    padding-top: 10px;
  }

  .navbar-menu.expanded {
    display: flex;
  }

  .navbar-menu li a {
    padding: 15px 20px;
  }

  .page-content {
    margin-top: 150px;
    padding: 15px;
  }

  .page-title {
    font-size: 22px;
  }

  .carousel-inner {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 50px;
  }
  .carousel-item img {
    height: 160px;
  }
  .carousel-nav {
    width: 35px;
    height: 35px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .grid-image img {
    height: 140px;
  }

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

  .about-tabs {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
  }
}