/* 
 * Fashion Showcase - 全局样式表
 * 风格：现代简约、中性色调、视觉导向
 * 版权：By HAISNAP @2025
 */

:root {
  /* 颜色系统 */
  --bg-primary: #f8f9fa;      /* 浅灰背景 */
  --bg-secondary: #ffffff;    /* 纯白卡片背景 */
  --text-primary: #343a40;    /* 柔黑 - 标题/正文 */
  --text-secondary: #495057;  /* 深灰 - 次要文字 */
  --text-muted: #868e96;      /* 中灰 - 辅助信息 */
  --accent-color: #c92a2a;    /* 暗红 - 强调色 */
  --accent-hover: #a61e1e;    /* 暗红 - 悬停 */
  --border-color: #e9ecef;    /* 边框色 */
  
  /* 排版系统 */
  --font-family: "Noto Sans SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* 布局参数 */
  --container-width: 1200px;
  --grid-gap: 2rem;
  
  /* 动效参数 */
  --transition-speed: 0.4s;
  --transition-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- 基础重置 --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

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

ul {
  list-style: none;
}

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

/* --- 排版 --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; margin-bottom: var(--spacing-md); }
h3 { font-size: 1.5rem; }
p { margin-bottom: var(--spacing-sm); color: var(--text-secondary); }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.text-accent { color: var(--accent-color); }

/* --- 布局工具 --- */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section {
  padding: var(--spacing-xl) 0;
}

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-12 { grid-template-columns: repeat(12, 1fr); } /* 桌面默认 */

/* --- 导航栏 --- */
.navbar {
  background-color: var(--bg-primary); /* 与背景融合 */
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background-color: rgba(248, 249, 250, 0.95);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.navbar.scrolled {
  border-bottom: 1px solid var(--border-color);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
}

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

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

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

/* --- 轮播图/Hero --- */
.hero {
  position: relative;
  height: 85vh;
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
}

.hero-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;
}

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

.hero-content {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  max-width: 800px;
  width: 90%;
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  color: #fff;
}

.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
}

/* --- 卡片与图片效果 --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--grid-gap);
}

.card {
  background: transparent;
  overflow: hidden;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4; /* 时尚摄影常用比例 */
  background-color: #eee;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--transition-ease);
}

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

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.card-info {
  padding-top: var(--spacing-sm);
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

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

/* --- 按钮 --- */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--text-primary);
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 1px solid var(--text-primary);
}

.btn:hover {
  background-color: transparent;
  color: var(--text-primary);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--text-primary);
  color: #fff;
}

/* --- 分类导航 --- */
.category-nav {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.category-link {
  font-size: 1rem;
  color: var(--text-secondary);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

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

/* --- 详情页 --- */
.detail-layout {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
}

.detail-gallery {
  display: grid;
  gap: var(--spacing-sm);
}

.detail-main-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.detail-info h1 {
  font-size: 2.2rem;
  margin-bottom: var(--spacing-sm);
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: var(--spacing-sm) 0;
}

.tag {
  font-size: 0.8rem;
  background: #e9ecef;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  color: var(--text-secondary);
}

/* --- 交互组件 --- */
.like-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s;
}

.like-btn:hover {
  transform: scale(1.1);
}

.like-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 1.5;
}

.like-btn.liked svg {
  fill: var(--accent-color);
  stroke: var(--accent-color);
}

/* --- 页脚 --- */
.footer {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg) 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- 响应式适配 --- */
@media (max-width: 1024px) {
  :root {
    --container-width: 95%;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
}

@media (max-width: 768px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  
  .hero {
    height: 60vh;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
  
  .nav-links {
    display: none; /* 移动端菜单通常需要折叠，这里简化为隐藏或另行实现 */
  }
  
  /* 移动端菜单替代方案 - 简单显示 */
  .mobile-menu-btn {
    display: block;
  }
}

/* 移动端菜单覆盖 */
.mobile-nav-active .nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-primary);
  padding: var(--spacing-sm);
  border-bottom: 1px solid var(--border-color);
}

/* 页面过渡动画 */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

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

/* 动态槽位 */
#slot-dynamic-content {
  min-height: 50px;
  margin: var(--spacing-md) 0;
}