/* 全局样式文件 - 时尚女装展示网站 */

/* Tailwind 配置 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500&family=Inter:wght@300;400;500;600&display=swap');

/* 全局变量 */
:root {
  --color-primary: #333333;
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #FAFAFA;
  --color-accent: #A78B7C;
  --color-text: #000000;
  --color-text-secondary: #666666;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Noto Serif SC', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* 英雄图轮播 */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

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

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

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

/* 图片加载优化 */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* 悬停效果 */
.hover-scale {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 网格布局 */
.grid-masonry {
  column-count: 3;
  column-gap: 2rem;
}

.grid-masonry-item {
  break-inside: avoid;
  margin-bottom: 2rem;
}

/* 卡片样式 */
.card-overlay {
  position: relative;
  overflow: hidden;
}

.card-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card-overlay:hover::before {
  opacity: 1;
}

.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
}

.card-overlay:hover .card-content {
  transform: translateY(0);
}

/* 筛选标签 */
.filter-tags {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.filter-tags::-webkit-scrollbar {
  width: 4px;
}

.filter-tags::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 2px;
}

.tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  margin: 0.25rem;
  background: var(--color-bg-secondary);
  border: 1px solid transparent;
  border-radius: 2rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

/* 按钮样式 */
.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--color-primary);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--color-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 1px solid var(--color-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

/* 渐入动画 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

/* 页脚样式 */
footer {
  padding: 3rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .grid-masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .grid-masonry {
    column-count: 1;
  }
  
  .hero-slider {
    height: 70vh;
  }
  
  .filter-tags {
    position: static;
    max-height: none;
  }
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-bg-secondary);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 文字效果 */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 分隔线 */
.divider {
  width: 60px;
  height: 2px;
  background: var(--color-accent);
  margin: 2rem auto;
}

/* 视差效果 */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}