/* 现代极简风格全局样式 */
:root {
  --primary-color: #f5f5f0;
  --text-color: #2c2c2c;
  --accent-color: #8b7355;
  --border-color: #e0e0e0;
  --max-width: 1200px;
  --spacing-unit: 2rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--primary-color);
  overflow-x: hidden;
}

/* 导航栏样式 */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(245, 245, 240, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: var(--spacing-unit);
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
}

nav a:hover {
  color: var(--accent-color);
}

/* 主内容区域 */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--spacing-unit) * 3) 2rem;
  padding-top: calc(var(--spacing-unit) * 4);
}

/* 标题样式 */
h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 200;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  text-align: center;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 300;
  margin-bottom: var(--spacing-unit);
  text-align: center;
}

/* 段落样式 */
p {
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: var(--spacing-unit);
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* 轮播图容器 */
.carousel {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  margin: var(--spacing-unit) 0;
  background: #fff;
}

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

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

/* 理念卡片 */
.philosophy-card {
  margin: var(--spacing-unit) 0;
  padding: var(--spacing-unit);
  border: 1px solid var(--border-color);
}

.philosophy-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-unit);
  align-items: center;
}

.philosophy-text {
  padding: 1rem;
}

.philosophy-text h3 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.philosophy-image {
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.philosophy-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 画廊样式 */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: var(--spacing-unit);
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-item.hidden {
  display: none;
}

/* 工艺之旅样式 */
.craft-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-unit);
  align-items: center;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.craft-item:nth-child(even) {
  direction: rtl;
}

.craft-item:nth-child(even) > * {
  direction: ltr;
}

.craft-image {
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.craft-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.craft-text {
  padding: 2rem;
}

.craft-text h3 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: var(--accent-color);
}

/* 页脚样式 */
footer {
  text-align: center;
  padding: var(--spacing-unit);
  border-top: 1px solid var(--border-color);
  margin-top: calc(var(--spacing-unit) * 3);
  font-size: 0.9rem;
  color: var(--text-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  :root {
    --spacing-unit: 1rem;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  nav a {
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
  }

  main {
    padding: calc(var(--spacing-unit) * 2) 1rem;
    padding-top: calc(var(--spacing-unit) * 3);
  }

  .philosophy-content,
  .craft-item {
    grid-template-columns: 1fr;
  }

  .craft-item:nth-child(even) {
    direction: ltr;
  }

  .philosophy-image,
  .craft-image {
    height: 300px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .carousel {
    height: 50vh;
    min-height: 400px;
  }

  .gallery-filters {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
  }
}