/* fashion-womenswear-280422/frontend/public/css/style.css */

/* 引入字体：使用 Noto Sans SC 作为思源黑体的 Web 替代 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

/* =========================================
   Design Tokens & CSS Variables
   ========================================= */
:root {
  /* 调色板 - 谧境主题 */
  --color-bg-main: #FAF9F7;       /* 浅米白 - 主背景 */
  --color-bg-light: #FFFFFF;      /* 纯白 - 卡片/图片背景 */
  --color-text-primary: #333333;  /* 深炭灰 - 正文 */
  --color-text-secondary: #888888;/* 浅灰色 - 辅助信息 */
  --color-accent: #B0C4DE;        /* 静谧蓝 - 交互高亮 */
  --color-accent-sub: #E6DMD8;    /* 淡漠粉/燕麦 - 装饰线条 */

  /* 排版 */
  --font-family-base: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  
  /* 间距 */
  --spacing-section: 6rem;
  --spacing-element: 1.5rem;
  
  /* 动效 */
  --transition-smooth: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fade: opacity 0.8s ease-out;
}

/* =========================================
   Global Reset & Base Styles
   ========================================= */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-main);
  color: var(--color-text-primary);
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-light);
  line-height: 1.8;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  margin-top: 0;
}

h1 { font-size: 2.5rem; letter-spacing: 0.1em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p { 
  color: var(--color-text-primary); 
  margin-bottom: 1.5rem; 
  text-align: justify;
}

small { color: var(--color-text-secondary); font-size: 0.85rem; }

a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
  background: none;
}
a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* =========================================
   Layout Components
   ========================================= */
/* 导航栏 */
nav.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(8px);
  transition: padding 0.3s ease;
  border-bottom: 1px solid rgba(0,0,0,0.02);
}

nav.main-nav ul {
  display: flex;
  gap: 4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav li a {
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  opacity: 0.7;
}

nav.main-nav li a:hover,
nav.main-nav li a.active {
  opacity: 1;
}

nav.main-nav li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--color-text-primary);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

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

/* 页脚 */
footer.simple-footer {
  padding: 3rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.1em;
  margin-top: auto;
  border-top: 1px solid rgba(0,0,0,0.03);
}

/* 页面主体 */
main {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 全屏 Hero Section */
.hero-section {
  height: 90vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.95);
  transition: transform 10s ease;
}
.hero-section:hover .hero-bg {
  transform: scale(1.02);
}

.hero-text {
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.2s forwards 0.5s;
  max-width: 600px;
  padding: 0 1rem;
}

/* 裳影页面：水平滚动画廊 */
.gallery-section {
  padding: var(--spacing-section) 0;
}

.scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 2rem;
  padding: 1rem 0 3rem 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE */
  cursor: grab;
}
.scroll-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.garment-card {
  min-width: 300px;
  max-width: 300px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.4s ease;
}
.garment-card:hover {
  transform: translateY(-8px);
}
.garment-img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  margin-bottom: 1rem;
}

/* 时刻页面：文章布局 */
.article-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-bottom: var(--spacing-section);
  align-items: center;
}
.article-card:nth-child(even) {
  direction: rtl; 
}
.article-card:nth-child(even) .article-content {
  direction: ltr;
}
.article-img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  filter: grayscale(15%);
  transition: filter 0.8s ease;
}
.article-card:hover .article-img {
  filter: grayscale(0%);
}
.article-content {
  padding: 1rem;
}

/* 灯箱组件 */
.lightbox {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.98);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-content {
  max-width: 1000px;
  width: 90%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}
.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 3rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-text-primary);
  background: none;
  border: none;
  padding: 1rem;
}

/* 动效辅助类 */
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 响应式适配 */
@media (max-width: 768px) {
  nav.main-nav { padding: 1rem 1.5rem; justify-content: space-between; }
  nav.main-nav ul { gap: 1.5rem; }
  nav.main-nav li a { font-size: 0.8rem; }
  
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  
  .hero-section { height: 75vh; }
  
  .article-card { grid-template-columns: 1fr; gap: 2rem; }
  .article-card:nth-child(even) { direction: ltr; }
  .article-img { height: 400px; }
  
  .lightbox-content { 
    grid-template-columns: 1fr; 
    height: 90vh; 
    overflow-y: auto; 
    display: block;
    padding-top: 3rem;
  }
  .lightbox-content img { margin-bottom: 2rem; }
}