/* 全局基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #F5F5DC;
  color: #3E2723;
  font-family: 'Inter', system-ui, sans-serif;
}

/* 自定义颜色变量 */
:root {
  --color-primary: #8B4513;      /* 棕色（五金行业感） */
  --color-secondary: #3E2723;    /* 深棕色 */
  --color-accent: #D2B48C;       /* 棕褐色 */
  --color-light: #F5F5DC;        /* 米白色 */
}

/* 导航栏样式 */
.header {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  z-index: 50;
  transition: all 0.3s ease;
}

/* 移动端菜单样式 */
.mobile-menu {
  position: fixed;
  inset: 0;
  background-color: rgba(62, 39, 35, 0.95);
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  gap: 1.5rem;
}

/* 英雄区样式 */
.hero-section {
  padding-top: 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

/* 通用区块样式 */
.section-padding {
  padding: 5rem 1rem;
  margin: 0 auto;
  max-width: 1280px;
}

/* 卡片通用样式 */
.feature-card {
  background-color: var(--color-light);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.product-card {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 响应式图片 */
.responsive-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-primary);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 50;
}

/* 文字自适应样式 */
.hero-text {
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

/* 移动端适配（核心修复） */
@media (max-width: 768px) {
  .section-padding {
    padding: 3rem 1rem;
  }
  .hero-section {
    padding-top: 4rem;
  }
  .contact-grid {
    gap: 1.5rem;
  }
  .product-img {
    height: 12rem;
  }
  .header {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .nav-link {
    font-size: 1.125rem;
  }
  .btn-primary {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
  }
}