/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-gold: #d4af37;
  --primary-dark: #1a1a2e;
  --primary-red: #8b2332;
  --text-light: #f5f5f5;
  --text-dark: #333;
  --bg-light: #faf8f5;
  --bg-card: #ffffff;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-light);
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  color: var(--text-light);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-gold);
}

.nav-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--primary-gold);
  font-size: 1.5rem;
  cursor: pointer;
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  list-style: none;
  padding: 1rem;
  text-align: center;
}

.nav-menu.active {
  display: block;
}

.nav-menu li {
  margin: 0.5rem 0;
}

.nav-menu a {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: block;
  border-radius: 4px;
  transition: background 0.3s;
}

.nav-menu a:hover {
  background: var(--primary-gold);
  color: var(--primary-dark);
}

/* 首页横幅 */
.hero {
  margin-top: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary-red) 100%
  );
  color: var(--text-light);
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-gold);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.hero-desc {
  opacity: 0.8;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-block;
  background: var(--primary-gold);
  color: var(--primary-dark);
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* 产品分类 */
.products {
  padding: 3rem 1rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  position: relative;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab-btn {
  background: var(--bg-card);
  border: 2px solid var(--primary-gold);
  color: var(--primary-dark);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--primary-gold);
  color: var(--primary-dark);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.product-name {
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-dark);
  background: var(--bg-card);
}

/* 关于我们 */
.about {
  background: var(--primary-dark);
  color: var(--text-light);
  padding: 3rem 1rem;
}

.about .section-title {
  color: var(--text-light);
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.about-card {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.about-card .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.about-card h3 {
  color: var(--primary-gold);
  margin-bottom: 0.5rem;
}

.about-card p {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* 联系方式 */
.contact {
  padding: 3rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
}

.contact-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
}

.contact-info h4 {
  color: var(--primary-dark);
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.contact-info p {
  color: #666;
  margin: 0;
}

.wechat-qr {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  margin-top: 0.5rem;
  display: block;
}

.contact-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 0.5rem 0;
}

/* 背景音乐控制按钮 */
.music-control {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-gold);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.music-control:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.music-icon {
  font-size: 1.5rem;
  animation: rotate 3s linear infinite;
}

.music-control.paused .music-icon {
  animation-play-state: paused;
  opacity: 0.5;
}

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

/* 图片放大弹窗 */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: -2rem;
  right: 0;
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  color: #fff;
  z-index: 10;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  padding: 1rem;
  border-radius: 8px;
  transition: background 0.3s;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: -4rem;
}

.lightbox-next {
  right: -4rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }

  .lightbox-nav {
    padding: 0.5rem;
    font-size: 1.5rem;
  }
}

.lightbox-caption {
  position: absolute;
  bottom: -2.5rem;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 1rem;
  padding: 0.5rem;
}

/* 页脚 */
.footer {
  background: var(--primary-dark);
  color: var(--text-light);
  text-align: center;
  padding: 2rem 1rem;
}

.footer p {
  margin-bottom: 0.5rem;
}

.copyright {
  opacity: 0.7;
  font-size: 0.85rem;
}

/* 响应式设计 - 平板 */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    position: static;
    background: none;
    padding: 0;
  }

  .nav-menu li {
    margin: 0 0.5rem;
  }

  .hero {
    padding: 6rem 2rem;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .products,
  .about,
  .contact {
    padding: 4rem 2rem;
  }

  .contact-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 响应式设计 - 桌面 */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .about-content {
    grid-template-columns: repeat(3, 1fr);
  }
}
