/* 全局变量 */
:root {
  --primary-color: #f5f5f0;
  --secondary-color: #e8e8e3;
  --text-color: #333;
  --text-light: #666;
  --border-color: #ddd;
  --hover-color: #666;
  --transition: all 0.3s ease;
}

/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Source Han Sans CN', 'PingFang SC', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--primary-color);
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(245, 245, 240, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

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

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

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

/* 主容器 */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 40px;
}

/* 轮播图样式 */
.carousel {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-content {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slogan {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 2rem;
  letter-spacing: 2px;
}

.explore-btn {
  padding: 12px 40px;
  background: transparent;
  border: 1px solid white;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.explore-btn:hover {
  background: white;
  color: var(--text-color);
}

/* 瀑布流布局 */
.masonry {
  column-count: 3;
  column-gap: 20px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

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

/* 系列标题 */
.series-title {
  text-align: center;
  margin: 3rem 0;
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 1px;
}

/* 美学页面交替布局 */
.aesthetic-section {
  display: flex;
  align-items: center;
  margin: 60px 0;
  gap: 60px;
}

.aesthetic-section:nth-child(even) {
  flex-direction: row-reverse;
}

.aesthetic-image {
  flex: 1;
  overflow: hidden;
}

.aesthetic-image img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.aesthetic-image:hover img {
  transform: scale(1.03);
}

.aesthetic-content {
  flex: 1;
  padding: 20px;
}

.aesthetic-title {
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.aesthetic-text {
  color: var(--text-light);
  line-height: 1.8;
  font-size: 1rem;
}

/* 工艺页面 */
.craft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin: 60px 0;
}

.craft-item {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.craft-item:hover {
  transform: translateY(-5px);
}

.craft-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.craft-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 4px;
}

.craft-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.craft-image:hover img {
  transform: scale(1.05);
}

.craft-title {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.craft-desc {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 30px;
  right: 50px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: #ccc;
}

/* 页脚 */
footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.slide-in-up {
  animation: slideInUp 0.8s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .masonry {
    column-count: 2;
  }

  .aesthetic-section,
  .aesthetic-section:nth-child(even) {
    flex-direction: column;
    gap: 30px;
  }

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

  .slogan {
    font-size: 1.5rem;
  }

  .carousel-content {
    bottom: 50px;
  }
}

@media (max-width: 480px) {
  .masonry {
    column-count: 1;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .main-container {
    padding: 80px 15px 30px;
  }
}

/* 图片懒加载 */
.lazy {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy.loaded {
  opacity: 1;
}