/* ========================================
   Corvia Wood Products - 样式表
   ======================================== */

/* --- 变量定义 --- */
:root {
  --primary-color: #2c5530;
  --primary-dark: #1e3d22;
  --secondary-color: #8b6914;
  --accent-color: #c9a227;
  --bg-light: #f8f6f1;
  --bg-white: #ffffff;
  --text-dark: #1a1a1a;
  --text-gray: #666666;
  --text-light: #999999;
  --border-color: #e5e5e5;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
  --transition: all 0.3s ease;
  --max-width: 1200px;
  --header-height: 70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
}

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

img {
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

/* --- 容器 --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- 语言切换 --- */
.lang-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.95);
  padding: 8px 16px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.lang-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-gray);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 20px;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--primary-color);
}

.lang-btn.active {
  background: var(--primary-color);
  color: white;
}

/* --- 导航栏 --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow);
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

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

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

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- Hero 横幅 --- */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
              url('../images/hero-bg.jpg') center / cover no-repeat;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero-content {
  max-width: 800px;
  padding: 20px;
  color: white;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 32px;
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-color);
}

/* --- 区块标题 --- */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2.25rem;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-gray);
  font-size: 1.1rem;
}

/* --- 关于我们 --- */
.about {
  background: var(--bg-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-gray);
  margin-bottom: 16px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.feature-text h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.feature-text p {
  font-size: 0.9rem;
  color: var(--text-light);
}

.about-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

/* --- 产品分类 --- */
.categories {
  background: var(--bg-white);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.category-card {
  background: var(--bg-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.category-card .content {
  padding: 20px;
}

.category-card h3 {
  font-size: 1.25rem;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.category-card p {
  color: var(--text-gray);
  font-size: 0.95rem;
}

/* --- 联系区域 --- */
.contact {
  background: var(--bg-light);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
}

.contact-info h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 24px;
}

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

.contact-item .icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--text-gray);
  font-size: 0.95rem;
}

/* --- 表单样式 --- */
.contact-form {
  background: var(--bg-white);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.form-group label .required {
  color: #e74c3c;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-submit {
  text-align: center;
}

.form-submit .btn {
  min-width: 200px;
}

.form-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.form-success.show {
  display: block;
}

.form-success .icon {
  width: 80px;
  height: 80px;
  background: #27ae60;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  margin: 0 auto 20px;
}

.form-success h3 {
  color: #27ae60;
  margin-bottom: 12px;
}

.form-success p {
  color: var(--text-gray);
}

/* --- 页脚 --- */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.footer p,
.footer a {
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
}

.footer a:hover {
  color: white;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* --- 响应式 --- */
@media (max-width: 992px) {
  .about-content,
  .contact-content,
  .footer-content {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 2.25rem;
  }

  .about-image {
    order: -1;
  }

  .about-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    height: auto;
  }

  .header .container {
    flex-wrap: wrap;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 20px 0;
    gap: 16px;
  }

  .nav.show {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .lang-switch {
    top: 10px;
    right: 60px;
    padding: 6px 12px;
  }

  .lang-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .section {
    padding: 60px 0;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 24px;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 滚动动画 --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- 加载占位图 --- */
.placeholder-img {
  background: linear-gradient(135deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
