/* 全局样式重置与基础配置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-dark-gray: #2C2C2C;
  --color-light-gray: #F5F5F5;
  --color-white: #FFFFFF;
  --color-copper: #B76E3A;
  --color-blue: #0A2463;
  --color-text-primary: #333333;
  --color-text-secondary: #777777;
  --color-footer: #AAAAAA;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 轮播图容器 */
.carousel-container {
  position: relative;
  width: 100%;
  height: 60vh;
  overflow: hidden;
}

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

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

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-caption {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  font-size: 2rem;
  font-weight: 300;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
  z-index: 2;
}

/* 图片悬停效果 */
.image-hover {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.image-hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.image-hover:hover img {
  transform: scale(1.03);
}

.image-hover:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 编辑精选区图片描述 */
.image-description {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: var(--color-white);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-align: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

.image-hover:hover .image-description {
  opacity: 1;
}

/* 风格标签导航 */
.style-nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--color-light-gray);
}

.style-tag {
  display: inline-block;
  padding: 1rem 2rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
  border-bottom: 3px solid transparent;
  font-weight: 500;
  letter-spacing: 1px;
}

.style-tag:hover {
  color: var(--color-copper);
  border-bottom-color: var(--color-copper);
}

/* 风格区域背景 */
.style-section {
  min-height: 100vh;
  position: relative;
  padding: 4rem 2rem;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.style-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 1;
}

.style-section > * {
  position: relative;
  z-index: 2;
}

/* 返回按钮 */
.back-button {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-dark-gray);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.back-button:hover {
  background: var(--color-copper);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 页脚样式 */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--color-footer);
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 2px;
  background: var(--color-white);
}

/* 加载动画 */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--color-light-gray);
  border-top-color: var(--color-copper);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 工艺细节卡片 */
.craft-card {
  position: relative;
  overflow: hidden;
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: var(--transition-smooth);
}

.craft-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .carousel-caption {
    font-size: 1.5rem;
  }
  
  .style-tag {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .carousel-container {
    height: 50vh;
  }
  
  .carousel-caption {
    font-size: 1.25rem;
    bottom: 5%;
  }
  
  .style-tag {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .style-section {
    padding: 2rem 1rem;
    min-height: auto;
  }
  
  .back-button {
    width: 50px;
    height: 50px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

@media (max-width: 640px) {
  .carousel-caption {
    font-size: 1rem;
    letter-spacing: 1px;
  }
  
  .image-description {
    font-size: 0.8rem;
    padding: 0.75rem;
  }
}

/* 淡入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

/* 视差滚动效果 */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}