/* 全局样式文件 - 时尚服饰展示网站 */

/* 导入字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;600;700&display=swap');

/* CSS 变量定义 */
:root {
  --primary-color: #1a1a1a;
  --secondary-color: #666;
  --accent-color: #c9a961;
  --background-light: #fafafa;
  --background-dark: #f5f5f5;
  --text-light: #999;
  --border-color: #e0e0e0;
  --shadow-subtle: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Noto Serif SC', serif;
  color: var(--primary-color);
  background-color: var(--background-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

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

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

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

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

/* 英雄区域 */
.hero {
  margin-top: 80px;
  position: relative;
  height: 70vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-content {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  z-index: 2;
}

.hero-title {
  font-size: 48px;
  font-weight: 300;
  margin-bottom: 10px;
  letter-spacing: 4px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 2px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 网格布局 */
.grid {
  display: grid;
  gap: 30px;
  margin: 60px 0;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
}

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

.card-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.card-content {
  padding: 25px;
}

.card-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.card-description {
  color: var(--secondary-color);
  font-size: 14px;
  line-height: 1.6;
}

/* 文章卡片样式 */
.article-card {
  display: flex;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
  transition: var(--transition-smooth);
}

.article-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateX(5px);
}

.article-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 30px;
  flex: 1;
}

.article-title {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.article-excerpt {
  color: var(--secondary-color);
  line-height: 1.6;
  margin-bottom: 15px;
}

.article-meta {
  color: var(--text-light);
  font-size: 14px;
}

/* 瀑布流布局 */
.masonry {
  column-count: 4;
  column-gap: 20px;
  margin: 40px 0;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
}

.masonry-image {
  width: 100%;
  border-radius: 8px;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.masonry-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-medium);
}

/* 筛选标签 */
.filter-tags {
  display: flex;
  gap: 15px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.tag {
  padding: 8px 20px;
  background: var(--background-dark);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 14px;
}

.tag:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.tag.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* 风格分类 */
.style-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.style-category {
  text-align: center;
  padding: 30px 20px;
  background: white;
  border-radius: 12px;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid var(--border-color);
}

.style-category:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent-color);
}

.style-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  background: var(--background-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.style-name {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
}

.style-desc {
  font-size: 14px;
  color: var(--secondary-color);
}

/* 风格详情区域 */
.style-detail {
  padding: 60px 0;
  margin: 40px 0;
  background: white;
  border-radius: 12px;
}

.style-header {
  text-align: center;
  margin-bottom: 40px;
}

.style-title {
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 15px;
  color: var(--primary-color);
}

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

.key-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.key-item {
  text-align: center;
}

.key-item-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.key-item-name {
  font-size: 14px;
  color: var(--secondary-color);
}

/* 标题样式 */
.section-title {
  font-size: 32px;
  font-weight: 300;
  text-align: center;
  margin: 60px 0 40px;
  color: var(--primary-color);
  letter-spacing: 2px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--accent-color);
}

/* 页脚 */
footer {
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
}

.footer-text {
  color: var(--text-light);
  font-size: 14px;
  letter-spacing: 1px;
}

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

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .masonry {
    column-count: 3;
  }
  
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 20px;
  }
  
  .hero {
    height: 50vh;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .masonry {
    column-count: 2;
  }
  
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .article-card {
    flex-direction: column;
  }
  
  .article-image {
    width: 100%;
    height: 250px;
  }
  
  .article-content {
    padding: 20px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .style-title {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 15px;
  }
  
  .hero {
    height: 40vh;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .masonry {
    column-count: 1;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .style-categories {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 24px;
  }
}

/* 加载动画 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 滚动行为 */
html {
  scroll-behavior: smooth;
}

/* 图片覆盖层效果 */
.image-overlay {
  position: relative;
  overflow: hidden;
}

.image-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
  opacity: 1;
}

.image-text {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: white;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.image-overlay:hover .image-text {
  opacity: 1;
}