/* 围巾展示网站全局样式 */
:root {
  /* 设计令牌 - 中性色、大地色 */
  --color-beige: #f5f5f0;
  --color-light-gray: #f8f8f8;
  --color-camel: #d4b896;
  --color-oatmeal: #e8dcc9;
  --color-dark-gray: #333333;
  
  /* 间距系统 */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  
  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  
  /* 阴影 */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
}

/* 基础重置和排版 */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: var(--color-dark-gray);
  background-color: var(--color-beige);
  margin: 0;
  padding: 0;
}

/* 容器布局 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* 导航栏样式 */
.navbar {
  background-color: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-camel);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-md);
}

.nav-link {
  color: var(--color-dark-gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-camel);
}

/* 主视觉区域 */
.hero {
  height: 70vh;
  background: linear-gradient(135deg, var(--color-beige) 0%, var(--color-oatmeal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  z-index: 2;
  max-width: 600px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: var(--space-sm);
  color: var(--color-dark-gray);
}

/* 精选展示区 */
.featured-section {
  padding: var(--space-xl) 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: var(--space-lg);
  color: var(--color-dark-gray);
}

.scarf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.scarf-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.scarf-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.scarf-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.scarf-info {
  padding: var(--space-md);
  text-align: center;
}

.scarf-name {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  color: var(--color-dark-gray);
}

/* 材质介绍样式 */
.material-section {
  padding: var(--space-xl) 0;
}

.material-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-bottom: var(--space-xl);
}

.material-item:nth-child(even) .material-image {
  order: 2;
}

.material-item:nth-child(even) .material-content {
  order: 1;
}

.material-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.material-content {
  padding: var(--space-md);
}

.material-title {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: var(--space-sm);
  color: var(--color-dark-gray);
}

/* 系法展示样式 */
.style-section {
  padding: var(--space-xl) 0;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-lg);
}

.style-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.style-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.step-list {
  list-style: none;
  padding: 0;
}

.step-item {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
  position: relative;
}

.step-item:before {
  content: "•";
  color: var(--color-camel);
  position: absolute;
  left: 0;
}

/* Masonry图片墙样式 */
.gallery-section {
  padding: var(--space-xl) 0;
}

.masonry-grid {
  columns: 3 300px;
  column-gap: var(--space-md);
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: var(--space-md);
}

.gallery-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.gallery-image:hover {
  transform: scale(1.02);
}

/* 页脚样式 */
.footer {
  background-color: var(--color-dark-gray);
  color: white;
  text-align: center;
  padding: var(--space-md) 0;
  margin-top: var(--space-xl);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .nav-menu {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .material-item {
    grid-template-columns: 1fr;
  }
  
  .material-item:nth-child(even) .material-image,
  .material-item:nth-child(even) .material-content {
    order: unset;
  }
  
  .masonry-grid {
    columns: 2 250px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-xs);
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .masonry-grid {
    columns: 1;
  }
  
  .scarf-grid {
    grid-template-columns: 1fr;
  }
  
  .style-grid {
    grid-template-columns: 1fr;
  }
}

/* 工具类 */
.text-center {
  text-align: center;
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

/* 加载状态 */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* 优雅降级支持 */
@supports not (display: grid) {
  .scarf-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .scarf-card {
    flex: 0 0 calc(33.333% - var(--space-lg));
    margin: var(--space-sm);
  }
}