/* 
 * File: fashion-showcase-250414/frontend/public/assets/css/style.css
 * Description: 全局样式文件，定义现代极简风格、响应式布局和交互效果
 * Author: HAISNAP
 */

:root {
  /* 高级感配色方案 */
  --color-bg: #f9f9f9; /* 浅灰/米白基调 */
  --color-surface: #ffffff;
  --color-text-primary: #1a1a1a; /* 接近纯黑 */
  --color-text-secondary: #666666; /* 灰色辅助文本 */
  --color-text-light: #999999;
  --color-accent: #000000;
  --color-border: #e5e5e5;
  
  /* 字体系统 */
  --font-primary: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  
  /* 布局参数 */
  --container-width: 1200px;
  --header-height: 80px;
  --spacing-unit: 8px;
  
  /* 动效 */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-primary);
  font-size: 16px;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* --- Utility Classes --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.section-padding {
  padding: 120px 0;
}

.text-center { text-align: center; }
.text-light { color: var(--color-text-secondary); }
.text-accent { color: var(--color-accent); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
}

.page-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background-color: var(--color-text-primary);
  margin: 20px auto 0;
}

/* --- Header & Navigation --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(249, 249, 249, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: var(--transition-smooth);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.02);
}

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

.brand-logo {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1001;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  position: relative;
  padding: 5px 0;
}

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

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

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

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

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

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

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 微弱的缩放效果增加动感 */
  transform: scale(1.05); 
  transition: transform 6s ease-out;
}

.carousel-slide.active img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.1); /* 极轻微遮罩 */
  z-index: 3;
}

.hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  color: white;
  mix-blend-mode: difference; /* 高级文字混合模式 */
}

.hero-text {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  opacity: 0.9;
  text-transform: uppercase;
}

/* --- Home: Featured Section --- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.feature-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1; /* 正方形 */
  cursor: pointer;
}

.feature-item img {
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

.feature-item:hover img {
  transform: scale(1.1);
}

.feature-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  color: white;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition-smooth);
}

.feature-item:hover .feature-caption {
  opacity: 1;
  transform: translateY(0);
}

/* --- Collection Page --- */
.filter-tags {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  padding: 8px 16px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  cursor: default; /* 仅视觉分类 */
}

.tag:hover {
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 20px;
}

.collection-item {
  display: flex;
  flex-direction: column;
}

.collection-img-wrap {
  overflow: hidden;
  margin-bottom: 15px;
  aspect-ratio: 3/4; /* 竖向比例 */
}

.collection-img-wrap img {
  width: 100%;
  height: 100%;
  transition: transform 0.8s ease;
}

.collection-item:hover .collection-img-wrap img {
  transform: scale(1.03);
}

.collection-desc {
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
}

/* --- Philosophy Page --- */
.philosophy-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: 80vh;
}

.philosophy-text {
  padding-right: 40px;
}

.philosophy-section {
  margin-bottom: 50px;
}

.philosophy-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 500;
}

.philosophy-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  text-align: justify;
}

.philosophy-visuals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.visual-large {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.visual-small {
  grid-column: 2 / 3;
  margin-top: 60px; /* 错位布局 */
}

.philosophy-quote {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 80px;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-text-light);
}

/* --- Footer --- */
footer {
  padding: 60px 0;
  text-align: center;
  background-color: var(--color-bg);
  margin-top: auto;
}

.copyright {
  font-size: 0.75rem;
  color: #cccccc;
  letter-spacing: 0.1em;
}

/* --- Loading & Utilities --- */
.slot-container {
  min-height: 200px; /* 避免布局抖动 */
}

.fade-in-up {
  animation: fadeInUp 1s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

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

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .container { max-width: 960px; }
  .collection-grid { gap: 30px 15px; }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }
  
  .menu-toggle { display: block; }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--color-surface);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    overflow: hidden;
    transition: height 0.4s ease;
    border-bottom: 1px solid var(--color-border);
  }
  
  .nav-links.open { height: 250px; }

  .featured-grid,
  .collection-grid {
    grid-template-columns: repeat(1, 1fr); /* 手机端单列 */
  }

  .philosophy-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .philosophy-text { padding-right: 0; }
  
  .philosophy-visuals {
    margin-top: 40px;
  }
  
  .page-title { font-size: 2rem; }
}