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

/* 引入思源黑体字体 */
@import url('https://fonts.loli.net/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

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

:root {
  --color-primary: #f5f5f0;
  --color-secondary: #d4c5b9;
  --color-accent: #9d8b7e;
  --color-dark: #2c2c2c;
  --color-light: #ffffff;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--color-dark);
  background-color: var(--color-light);
  line-height: 1.8;
  overflow-x: hidden;
}

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

/* 导航栏样式 */
.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition-smooth);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.nav-header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* 图片悬停效果 */
.image-hover {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.image-hover img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.image-hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: var(--transition-smooth);
  pointer-events: none;
}

.image-hover:hover::after {
  background: rgba(0, 0, 0, 0.1);
}

/* 轮播图动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.1);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.carousel-item {
  animation: fadeIn 1.2s ease-out;
}

/* 滚动渐入动画 */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 卡片悬停效果 */
.card-hover {
  transition: var(--transition-smooth);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* 按钮样式 */
.btn-elegant {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.btn-elegant::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-elegant:hover::before {
  width: 300px;
  height: 300px;
}

/* 锚点导航样式 */
.anchor-nav {
  position: sticky;
  top: 80px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.anchor-nav a {
  position: relative;
  transition: var(--transition-smooth);
}

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

.anchor-nav a:hover::after,
.anchor-nav a.active::after {
  width: 100%;
}

/* 色彩渐变背景 */
.gradient-bg {
  background: linear-gradient(135deg, #f5f5f0 0%, #e8ddd0 50%, #c5b9ad 100%);
}

/* 固定侧边栏导航 */
.sidebar-nav {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

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

/* 响应式图片网格 */
.image-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 加载动画 */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* 页脚样式 */
footer {
  background: var(--color-primary);
  color: var(--color-dark);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .image-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .sidebar-nav {
    position: relative;
    top: 0;
    max-height: none;
  }
  
  .anchor-nav {
    top: 60px;
  }
}

/* 文字优化 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  letter-spacing: 0.05em;
}

p {
  letter-spacing: 0.02em;
}

/* 链接样式 */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  color: var(--color-accent);
}

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

/* 隐藏滚动条但保持功能 */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}