/* 引入字体资源 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* 全局变量定义 */
:root {
  /* 色彩系统 */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F5;
  --bg-tertiary: #FAF9F6;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #888888;
  --accent-pink: #E8B4B8;
  --accent-blue: #B0C4DE;
  --accent-oat: #D4C5B2;
  --border-color: #E0E0E0;

  /* 排版系统 */
  --font-serif: 'Playfair Display', 'Noto Serif SC', serif;
  --font-sans: 'HarmonyOS Sans', system-ui, -apple-system, sans-serif;
  
  /* 布局与间距 */
  --container-width: 1400px;
  --header-height: 80px;
  --spacing-section: 120px;
  
  /* 交互与动画 */
  --transition-base: 0.4s ease;
  --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

/* 极简排版工具类 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; color: var(--text-primary); }
h3 { font-size: 1.5rem; letter-spacing: 0.05em; }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  max-width: 65ch;
}

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

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

ul { list-style: none; }

/* 布局容器 */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

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

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

.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 60px;
  background: transparent;
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.03);
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  z-index: 1001;
}

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

.nav-link {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  opacity: 0.7;
}

.nav-link:hover, .nav-link.active {
  opacity: 1;
}

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

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

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

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

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

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 6s ease-out;
}

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

.slide-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
  color: white;
  width: 80%;
}

.slide-text {
  font-family: var(--font-serif);
  font-size: 4rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease 0.4s;
}

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

/* 内容组件：卡片 */
.card {
  background: var(--bg-primary);
  transition: var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card-image-wrapper {
  overflow: hidden;
  position: relative;
  aspect-ratio: 3/4;
  background-color: var(--bg-secondary);
}

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

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

.card-content {
  padding: 25px 0;
  text-align: center;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.btn-link {
  display: inline-block;
  margin-top: 15px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.card:hover .btn-link {
  border-bottom-color: var(--text-primary);
}

/* 瀑布流 */
.masonry-grid {
  columns: 3 300px;
  column-gap: 30px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 30px;
  position: relative;
}

.masonry-tag {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(255,255,255,0.9);
  padding: 8px 16px;
  font-size: 0.8rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.masonry-item:hover .masonry-tag {
  opacity: 1;
  transform: translateY(0);
}

/* 详情页组件 */
.details-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  padding-top: 120px;
}

.product-gallery {
  display: grid;
  gap: 20px;
}

.main-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  background: var(--bg-secondary);
  cursor: zoom-in;
}

.detail-info {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.detail-meta {
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
}

.meta-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.meta-icon {
  width: 24px;
  height: 24px;
  margin-right: 15px;
  opacity: 0.6;
}

/* 选项卡 */
.tabs {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 60px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  padding: 15px 0;
  cursor: pointer;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.3s;
}

.tab-btn.active {
  color: var(--text-primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
}

/* 页脚 */
.footer {
  text-align: center;
  padding: 40px 0;
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
}

/* 辅助动画 */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* 响应式适配 */
@media (max-width: 1024px) {
  :root { --container-width: 90%; --spacing-section: 80px; }
  h1 { font-size: 2.8rem; }
  .grid-cols-3, .grid-cols-2 { grid-template-columns: 1fr; gap: 40px; }
  .details-layout { grid-template-columns: 1fr; gap: 40px; }
  .detail-info { position: static; }
  .masonry-grid { columns: 2 200px; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 20px; }
  .nav-links { display: none; } /* 可扩展汉堡菜单 */
  .slide-text { font-size: 2.2rem; }
  .masonry-grid { columns: 1 auto; }
}