/* 全局样式文件 - 时尚美学线上画廊 */

/* 设计令牌 */
:root {
  --primary-color: #3a3a3a;
  --secondary-color: #8b7355;
  --background-color: #faf7f2;
  --card-background: #ffffff;
  --text-primary: #2c2c2c;
  --text-secondary: #666666;
  --border-color: #e8e4dd;
  --hover-color: #5c4a3a;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
}

/* 导航栏样式 */
.nav-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.nav-brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
}

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

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

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

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

/* 轮播图样式 */
.carousel-container {
  position: relative;
  height: 80vh;
  overflow: hidden;
  background: linear-gradient(135deg, #faf7f2 0%, #f0ebe0 100%);
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.carousel-content {
  position: absolute;
  text-align: center;
  color: white;
  z-index: 2;
}

.carousel-title {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
}

.carousel-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
}

.carousel-indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 3;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  background: white;
  transform: scale(1.2);
}

/* 内容区域样式 */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.page-header {
  text-align: center;
  margin-bottom: 4rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--primary-color);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 300;
}

.intro-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 0;
}

/* 网格布局样式 */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.item-card {
  background: var(--card-background);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.item-image {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.item-content {
  padding: 1.5rem;
}

.item-name {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.item-description {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* 穿搭图鉴样式 */
.outfit-container {
  margin-bottom: 4rem;
}

.outfit-header {
  text-align: center;
  margin-bottom: 2rem;
}

.outfit-title {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.outfit-subtitle {
  color: var(--secondary-color);
  font-size: 1rem;
  font-weight: 300;
}

.outfit-image {
  width: 100%;
  max-width: 800px;
  height: 500px;
  object-fit: cover;
  margin: 0 auto 2rem;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.outfit-description {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* 设计文章样式 */
.article-container {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 2rem;
  background: var(--card-background);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.article-title {
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.article-content {
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 1rem;
}

.article-content p {
  margin-bottom: 1rem;
}

/* 页脚样式 */
footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .nav-content {
    padding: 1rem;
  }
  
  .nav-menu {
    gap: 1rem;
  }
  
  .carousel-title {
    font-size: 2rem;
  }
  
  .carousel-subtitle {
    font-size: 1rem;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .content-container {
    padding: 2rem 1rem;
  }
  
  .outfit-image {
    height: 300px;
  }
}

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

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

/* 聚焦状态 */
.nav-link:focus,
.item-card:focus,
.indicator:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}