/* 全局样式 */
:root {
  --primary-color: #1a1a1a;
  --secondary-color: #f5f5f5;
  --accent-color: #e8d5c4;
  --text-color: #333;
  --light-text: #666;
  --border-color: #e0e0e0;
  --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-color);
  background-color: var(--secondary-color);
  line-height: 1.6;
}

/* 导航栏样式 */
nav {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 1px;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary-color);
  transition: var(--transition);
}

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

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--primary-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* 主要内容区域 */
main {
  margin-top: 70px;
  min-height: calc(100vh - 110px);
}

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

/* 主视觉大图 */
.hero {
  width: 100%;
  height: 70vh;
  overflow: hidden;
  position: relative;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.hero:hover img {
  transform: scale(1.05);
}

/* 内容区块 */
.section {
  margin: 80px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 300;
  margin-bottom: 50px;
  letter-spacing: 2px;
  color: var(--primary-color);
}

/* 产品网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: white;
  transition: var(--transition);
}

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

.grid-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: var(--transition);
}

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

.item-info {
  padding: 20px;
  text-align: center;
}

.item-title {
  font-size: 18px;
  font-weight: 300;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.item-desc {
  font-size: 14px;
  color: var(--light-text);
  line-height: 1.6;
}

/* 分类筛选 */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  color: var(--light-text);
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-family: inherit;
  letter-spacing: 1px;
}

.filter-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--primary-color);
  transition: var(--transition);
}

.filter-tab:hover::after,
.filter-tab.active::after {
  width: 100%;
}

.filter-tab.active {
  color: var(--primary-color);
}

/* 灵感故事 */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
}

.story-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
}

.story-item:hover {
  box-shadow: var(--hover-shadow);
}

.story-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.story-content {
  padding: 30px;
}

.story-title {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.story-text {
  font-size: 15px;
  color: var(--light-text);
  line-height: 1.8;
}

/* 关于我们 */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 40px;
}

.about-image {
  width: 100%;
  max-width: 600px;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto;
}

/* 页脚 */
footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  letter-spacing: 1px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

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

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .container {
    padding: 20px 15px;
  }

  .section-title {
    font-size: 24px;
  }

  .hero {
    height: 50vh;
  }

  .grid-item img {
    height: 250px;
  }

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

  .filter-tabs {
    gap: 15px;
  }

  .about-text {
    font-size: 16px;
  }
}

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

  .filter-tabs {
    gap: 10px;
  }

  .filter-tab {
    padding: 8px 15px;
    font-size: 14px;
  }
}

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

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

/* 图片懒加载 */
.lazy-img {
  filter: blur(5px);
  transition: filter 0.5s;
}

.lazy-img.loaded {
  filter: blur(0);
}