/* 
 * 现代时尚女装展示网站全局样式
 * @version 1.0.0
 * @author HAISNAP
 */

:root {
  /* 核心色彩系统 */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f9f9f9;
  --color-bg-accent: #f2efe9; /* 米色调 */
  
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --color-text-light: #999999;
  
  --color-accent: #d4b89c; /* 香槟金 */
  --color-border: #e5e5e5;
  
  /* 排版 */
  --font-family-base: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-family-serif: "Songti SC", "Noto Serif SC", "Times New Roman", serif; /* 用于标题增加优雅感 */
  
  /* 间距与尺寸 */
  --spacing-unit: 8px;
  --container-width: 1200px;
  --header-height: 80px;
  
  /* 动效 */
  --transition-base: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =========================================
   基础重置 (Reset & Base)
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

ul, ol {
  list-style: none;
}

/* =========================================
   排版 (Typography)
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-serif);
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: 0.05em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: 0.03em; }
h3 { font-size: 1.5rem; letter-spacing: 0.02em; }

p {
  margin-bottom: 1rem;
  font-weight: 300;
}

.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.1em; }
.text-serif { font-family: var(--font-family-serif); }

/* =========================================
   布局组件 (Layout)
   ========================================= */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 6rem 0;
}

.section-full {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 导航栏 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: var(--transition-base);
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: var(--font-family-serif);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  gap: 3rem;
}

.nav-link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  color: var(--color-text-secondary);
}

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

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

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

/* 页脚 */
.site-footer {
  padding: 3rem 0;
  background-color: var(--color-bg-primary);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
}

/* =========================================
   组件 (Components)
   ========================================= */

/* 按钮 */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 1px solid var(--color-text-primary);
  background: transparent;
  color: var(--color-text-primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: var(--transition-base);
}

.btn:hover {
  background-color: var(--color-text-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline-white {
  border-color: #fff;
  color: #fff;
}

.btn-outline-white:hover {
  background-color: #fff;
  color: #000;
}

/* 图片容器与悬停效果 */
.img-wrapper {
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg-secondary); /* 占位色 */
}

.img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

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

/* 轮播图 (首页) */
.hero-slider {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

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

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.2); /* 遮罩增加文字可读性 */
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 800px;
  padding: 2rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.8s ease 0.3s;
}

.slide.active .slide-content {
  transform: translateY(0);
  opacity: 1;
}

/* 网格系统 */
.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2px; /* 极简分割 */
}

/* 系列展示卡片 */
.collection-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  group: pointer;
}

.collection-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-base);
  padding: 2rem;
  text-align: center;
}

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

/* 单品鉴赏布局 */
.piece-layout {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
  padding-top: var(--header-height);
}

.piece-nav {
  width: 250px;
  padding: 2rem;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
}

.piece-nav ul li {
  margin-bottom: 1rem;
}

.piece-nav a {
  display: block;
  padding: 0.5rem 0;
  color: var(--color-text-secondary);
  transition: var(--transition-base);
}

.piece-nav a:hover, .piece-nav a.active {
  color: var(--color-text-primary);
  padding-left: 10px;
}

.piece-gallery {
  flex: 1;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
}

.piece-item {
  margin-bottom: 2rem;
}

.piece-info {
  margin-top: 1rem;
}

.piece-title {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.piece-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* 页面过渡与加载 */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 预留槽位 */
.slot-container {
  min-height: 50px;
  display: none; /* 默认隐藏，有内容时JS开启 */
}

/* =========================================
   响应式 (Responsive)
   ========================================= */
@media (max-width: 992px) {
  .grid-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .nav-menu {
    display: none; /* 移动端菜单逻辑在JS中处理或简化 */
  }
  
  /* 移动端简单菜单 */
  .mobile-nav-toggle {
    display: block; 
    /* 需要JS实现打开侧边栏 */
  }

  .piece-layout {
    flex-direction: column;
  }
  
  .piece-nav {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
    overflow-x: auto;
    display: flex;
    padding: 1rem;
  }
  
  .piece-nav ul {
    display: flex;
    gap: 1.5rem;
  }
  
  .piece-nav ul li { margin-bottom: 0; }

  .grid-gallery {
    grid-template-columns: 1fr;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}