/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: #000;
  background-color: #f9f9f9;
  line-height: 2;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Navigation */
.navbar {
  background-color: #000;
  color: white;
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: #ccc;
}

.lang-switch {
  font-weight: 600;
}

/* Hero Section */
.hero {
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden; /* 防止图片溢出 */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 85%;;
  padding: 0 1.5rem;
}

.hero h1 {
  font-size: 2rem; /* 基础大小 */
  font-weight: 700;
  margin-bottom: 1.2rem;
  line-height: 1.4;
  text-align: center;
}

/* 专门放大第一行 */
.hero h1 .highlight {
  font-size: 2.7rem; /* 比基础大一点 */
  font-weight: 700;
  display: block;
  white-space: nowrap; /* ← 关键！防止换行 */
  overflow: hidden;    /* 防止溢出 */
  text-overflow: ellipsis; /* 超出时显示省略号（可选） */
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #000;
  color: white;
}

.btn-primary:hover {
  background-color: #333;
}

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

.btn-outline:hover {
  background: white;
  color: #000;
}

/* Categories */
.categories {
  padding: 5rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  background: white;
}

.category-card {
  padding: 2.5rem;
  border: 1px solid #eee;
  transition: transform 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.category-card p {
  color: #555;
  margin-bottom: 1.2rem;
}

.link-arrow {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

.link-arrow:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: #000;
  color: white;
  padding: 1.5rem 0;
  text-align: center;
}

/* 新增：增加主内容区段落间距 */
main p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.3;
  }
  .hero p {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
}
/* Product Page Styles */
.product-category {
  margin-bottom: 0; /* 修改后的样式 */
}

.product-category h2 {
  margin-bottom: 1.5rem;
  color: #333;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.8rem;
}

.product-card {
  display: block;
  background: #fff;
  border-radius: 8px;
  padding: 1.2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover; /* 保持比例，填充容器 */
  border-radius: 6px;
  margin-bottom: 1rem;
}

.product-card h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: #333;
}

.product-card p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  color: #555;
}

.price {
  color: #d32f2f;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .product-grid { grid-template-columns: 1fr; }
}
/* Product Detail Page */
/* Product Detail Page */
.product-detail-page {
  padding: 2rem 0;
}

/* ==================== Product Header Layout ==================== */
.product-header {
  display: flex;
  align-items: flex-start; /* 关键：让图片和文字顶部对齐 */
  gap: 2rem;
}

.product-info {
  flex: 1;
  font-size: 16px;
  line-height: 1.6;
}

.main-image {
  flex-shrink: 0;
}

.main-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.product-detail-page {
  padding: 2rem 0;
}

/* =============== Optimized Product Gallery =============== */
.product-gallery {
  display: flex;
  gap: 20px; /* 减小间距，腾出更多空间 */
  margin: 2.5rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-img {
  width: 360px;       /* ← 增大宽度 */
  height: 240px;      /* ← 按 3:2 比例调整高度 */
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* =============== Optimized Video Section (16:9) =============== */
.video-wrapper h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
}

.aspect-ratio-box {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 比例 */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.aspect-ratio-box video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}


.aspect-ratio-box video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
/* =============== Product Detail Layout: Video + Specs Side by Side =============== */
.product-detail-layout {
  display: flex;
  gap: 2rem;
  margin: 2.5rem 0;
  align-items: flex-start; /* ← 关键：顶部对齐 */
}

.video-wrapper,
.specifications {
  flex: 1;
  min-width: 300px;
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
  .product-detail-layout {
    flex-direction: column;
  }
}
/* ==================== NEW: Product Detail Page - Left Text / Right Media ==================== */
.product-detail-page {
  padding: 2rem 0;
}

.product-layout {
  display: flex;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

/* 左侧文字区域 */
.product-text {
  flex: 1;
  min-width: 300px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.product-text h2 {
  margin: 1.8rem 0 1rem;
  font-size: 1.4rem;
  color: #333;
}

/* 表格样式 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.spec-table td {
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
}

.spec-table td:first-child {
  font-weight: 600;
  width: 45%;
  color: #333;
}

/* 支付方式 */
.payment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.payment-badge {
  background: #f0f0f0;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #333;
}

/* 右侧媒体区域：三图 + 视频 */
.product-media {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem; /* 控制图片/视频间距 */
}

.media-item {
  width: 100%;
}

.media-img {
  width: 100%;
  aspect-ratio: 1 / 1; /* 正方形 */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 视频容器 */
.video-wrapper h2 {
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
  color: #333;
}

.aspect-ratio-box {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.aspect-ratio-box video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 响应式：移动端堆叠 */
@media (max-width: 768px) {
  .product-layout {
    flex-direction: column;
  }

  .product-media {
    order: -1; /* 可选：让图片视频显示在文字上方 */
  }
}/* ==================== NEW: Product Detail Page - Fixed Layout ==================== */
.product-layout {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.product-text {
  flex: 1;
  min-width: 300px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.product-media {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 图片容器：控制尺寸，防止过大 */
.media-item {
  width: 100%;
  max-width: 400px; /* ← 控制最大宽度，避免撑满 */
  margin: 0 auto;   /* ← 居中 */
}

.media-img {
  width: 100%;
  aspect-ratio: 1 / 1; /* 正方形 */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  height: 200px; /* ← 固定高度，确保三图等高 */
}

/* 视频容器：与图片同宽，高度适配 16:9 */
.video-wrapper {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.video-wrapper h2 {
  margin: 0 0 0.8rem;
  font-size: 1.2rem;
  color: #333;
}

.aspect-ratio-box {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.aspect-ratio-box video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 移动端堆叠 */
@media (max-width: 768px) {
  .product-layout {
    flex-direction: column;
  }

  .media-item,
  .video-wrapper {
    max-width: none;
    margin: 0;
  }
}
/* 分页按钮样式 */
.pagination {
  text-align: center;
  margin: 2rem 0;
}

.pagination button {
  background-color: #333;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.pagination button:hover {
  background-color: #555;
}

.pagination span {
  font-weight: 500;
  color: #333;
}
/* ====================== MOBILE-FIRST FIXES (DO NOT AFFECT DESKTOP) ====================== */

/* 防止任何横向溢出（安全兜底） */
html, body {
  overflow-x: hidden;
}

/* 容器在小屏进一步收缩 */
@media (max-width: 768px) {
  .container {
    width: 95%;
    padding: 0 10px;
  }

  /* 导航栏：堆叠或缩小间距 */
  .navbar .container {
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav-menu {
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-menu a {
    font-size: 0.9rem;
    padding: 4px 8px;
  }

  /* Hero 区域：允许换行，降低高度，调整字体 */
  .hero {
    height: auto;
    min-height: 60vh;
    padding: 40px 0;
  }
  .hero h1 .highlight {
    white-space: normal; /* ← 允许换行！关键修复 */
    font-size: 2.2rem;
    text-align: center;
  }
  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  .hero p {
    font-size: 1.1rem;
    padding: 0 10px;
  }
  .hero-content {
    max-width: 100%;
    padding: 0 15px;
  }

  /* CTA 按钮垂直排列 */
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .btn {
    width: 90%;
    max-width: 300px;
    text-align: center;
  }

  /* 分类卡片：确保单列 */
  .categories {
    grid-template-columns: 1fr !important;
    padding: 30px 15px;
  }
  .category-card {
    padding: 20px;
  }

  /* Footer 字体微调 */
  .footer {
    padding: 1rem 0;
    font-size: 0.9rem;
  }
}

/* 超小屏（iPhone SE 等）进一步优化 */
@media (max-width: 480px) {
  .hero h1 .highlight {
    font-size: 1.8rem;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .nav-menu a {
    font-size: 0.85rem;
  }
}
