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

:root {
  --color-primary: #f5f5f0;
  --color-secondary: #e8e8e3;
  --color-text: #2c2c2c;
  --color-text-light: #666666;
  --color-accent: #8b8b8b;
  --color-overlay: rgba(0, 0, 0, 0.3);
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 96px;
  --transition-base: 0.3s ease;
  --font-primary: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-primary);
  line-height: 1.8;
  font-weight: 300;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition-base);
}

a:hover {
  opacity: 0.7;
}

/* 顶部导航 */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(245, 245, 240, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-secondary);
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  padding: var(--spacing-md) 0;
  gap: var(--spacing-lg);
}

nav ul li a {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  font-weight: 400;
  position: relative;
}

nav ul li a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--color-text);
}

/* 轮播图区域 */
.hero-slider {
  width: 100%;
  height: 100vh;
  position: relative;
  margin-top: 80px;
}

.slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

.slide.active {
  opacity: 1;
}

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

.slide-text {
  position: absolute;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.slider-controls {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--spacing-sm);
  z-index: 10;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.slider-dot.active {
  background-color: #ffffff;
}

/* 内容区域 */
.content-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
}

.intro-text {
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
  text-align: center;
  font-size: 1.1rem;
  line-height: 2;
  color: var(--color-text-light);
}

/* 网格布局 */
.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-lg);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
}

.grid-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3/4;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.grid-item:hover .overlay {
  opacity: 1;
}

/* 编辑推荐区 */
.editorial {
  max-width: 600px;
  margin: 0 auto;
}

.editorial-item {
  position: relative;
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.editorial-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: #ffffff;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-align: center;
}

/* 系列页面布局 */
.collections-layout {
  display: flex;
  gap: var(--spacing-lg);
  max-width: 1600px;
  margin: 100px auto 0;
  padding: var(--spacing-lg) var(--spacing-md);
  min-height: calc(100vh - 200px);
}

.sidebar {
  width: 250px;
  flex-shrink: 0;
  position: sticky;
  top: 120px;
  height: fit-content;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: var(--spacing-md);
  cursor: pointer;
  font-size: 1rem;
  letter-spacing: 0.05em;
  padding: var(--spacing-sm);
  transition: background-color var(--transition-base);
}

.sidebar-menu li:hover {
  background-color: var(--color-secondary);
}

.sidebar-menu li.active {
  background-color: var(--color-secondary);
  font-weight: 500;
}

.collections-content {
  flex: 1;
  min-width: 0;
}

.collection-section {
  display: none;
  animation: fadeIn 0.5s ease;
}

.collection-section.active {
  display: block;
}

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

.collection-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.collection-text {
  max-width: 800px;
  margin: var(--spacing-lg) 0;
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text-light);
}

/* 风格指南页面 */
.style-guide-layout {
  margin-top: 100px;
  padding: var(--spacing-lg) var(--spacing-md);
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.filter-tab {
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: transparent;
  border: 1px solid var(--color-accent);
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: all var(--transition-base);
}

.filter-tab:hover,
.filter-tab.active {
  background-color: var(--color-text);
  color: var(--color-primary);
  border-color: var(--color-text);
}

.masonry-grid {
  column-count: 3;
  column-gap: var(--spacing-md);
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.masonry-item img {
  width: 100%;
  transition: transform 0.6s ease;
}

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

.masonry-caption {
  padding: var(--spacing-sm) 0;
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* 页脚 */
footer {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  color: var(--color-text-light);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  border-top: 1px solid var(--color-secondary);
  margin-top: var(--spacing-xl);
}

/* 响应式设计 */
@media (max-width: 1199px) {
  .masonry-grid {
    column-count: 2;
  }
  
  .collections-layout {
    gap: var(--spacing-md);
  }
}

@media (max-width: 767px) {
  :root {
    --spacing-lg: 48px;
    --spacing-xl: 64px;
  }
  
  nav ul {
    gap: var(--spacing-md);
  }
  
  .slide-text {
    font-size: 1.5rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .collections-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    position: static;
  }
  
  .sidebar-menu {
    display: flex;
    overflow-x: auto;
    gap: var(--spacing-sm);
  }
  
  .sidebar-menu li {
    white-space: nowrap;
    margin-bottom: 0;
  }
  
  .masonry-grid {
    column-count: 1;
  }
  
  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}