/* 全局重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 核心：设备类型显示控制 */
.pc-only {
  display: block !important;
}

.mobile-only {
  display: none !important;
}

/* Banner样式（首尾通用，不修改） */
.banner {
  position: relative;
  width: 100%;
}

.banner img {
  width: 100%;
  height: auto;
  z-index: 1;
}

.banner-title {
  position: absolute;
  top: 86%;
  left: 7.2%;
  transform: translate(10%, -50%);
  z-index: 10;
  color: white;
  font-family:
    "Source Han Serif SC", "Microsoft Yahei", "PingFang SC", sans-serif;
  font-size: 3.8rem;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 4px;
}

html {
  scroll-behavior: smooth;
}

/* 核心产品布局 - PC端（完全保留原有样式，不修改） */
.product-container {
  width: 100%;
  background-color: #fff;
  font-family:
    "Source Han Serif SC", "Microsoft Yahei", "PingFang SC", sans-serif;
}

.product-layout {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
}

/* 左侧分类栏 - PC端 */
.product-categories {
  width: 420px;
  padding: 60px 40px 60px 130px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: #fff;
  border-right: 1px solid #eee;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.product-categories h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.product-type-item {
  padding: 12px 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-type-item p {
  font-size: 1.1rem;
  color: #666;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.product-type-item.active p {
  color: #1a1a1a;
  font-weight: 600;
  border-left: 3px solid #1a1a1a;
  padding-left: 12px;
}

.product-type-item:hover p {
  color: #1a1a1a;
}

/* 右侧产品列表 - PC端 */
.product-list {
  flex: 1;
  overflow-y: auto;
  height: 100vh;
  padding: 80px 50px;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.product-list::-webkit-scrollbar {
  display: none;
}

/* 产品卡片容器（PC端） */
.product-card {
  width: 100%;
  margin-bottom: 80px;
  scroll-margin-top: 120px;
  min-height: 400px;
}

/* 分类标题（PC端） */
.category-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

/* 核心横向滚动样式（PC端） */
.scroll-wrapper {
  width: 100%;
  overflow: hidden !important;
  margin-bottom: 12px;
}

.product-cards {
  display: flex !important;
  gap: 32px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 10px 0 !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

.product-cards::-webkit-scrollbar {
  display: none !important;
}

/* 产品卡片样式（PC端） */
.product-img-card {
  flex: 0 0 280px !important;
  height: 380px !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.product-img-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-img-item {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 滚动控制区域（PC端） */
.scrollbar-with-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.scroll-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #8b572a;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.scroll-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.scroll-btn:hover:not(:disabled) {
  background-color: #8b572a;
}

.scroll-btn:hover:not(:disabled) svg {
  stroke: #fff !important;
}

.scrollbar-container {
  flex: 1;
  height: 6px;
  background-color: #f5f5f5;
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.scrollbar-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #8b572a;
  border-radius: 3px;
  cursor: grab;
}

.scrollbar-track:active {
  cursor: grabbing;
}

/* 移动端适配 - 仅保留产品名+描述+图片+按钮 */
@media (max-width: 1024px) {
  .banner-title {
    top: 80%;
    left: 5%;
    transform: translateY(-50%);
    font-size: 2rem;
    letter-spacing: 2px;
    line-height: 1.2;
  }

  /* 切换显示状态 */
  .pc-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  /* 移动端产品容器 */
  .mobile-product-container {
    width: 100%;
    padding: 30px 20px;
    background-color: #fff;
  }

  /* 移动端产品列表容器 */
  .mobile-product-list {
    width: 100%;
  }

  /* 移动端产品项（核心样式） */
  .mobile-product-item {
    width: 92%;
    margin-bottom: 40px;
    margin-left: 4%;
  }

  /* 移动端产品图片 */
  .mobile-product-img {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .mobile-product-img img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* 移动端产品标题 */
  .mobile-product-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 1px;
    margin-top: 20px;
  }

  /* 移动端产品描述 */
  .mobile-product-desc {
    font-size: 1rem;
    color: #666;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 25px;
    padding: 0 10px;
  }

  /* 移动端探索按钮 */
  .mobile-product-btn {
    display: block;
    width: 140px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    border: 1px solid #1a1a1a;
    border-radius: 22px;
    margin: 0 auto;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
  }

  .mobile-product-btn:hover {
    background-color: #1a1a1a;
    color: #fff;
  }

  /* 768px以下适配 */
  @media (max-width: 768px) {
    .mobile-product-container {
      padding: 20px 15px;
    }

    .banner-title {
      top: 80%;
      left: 5%;
      transform: translateY(-50%);
      font-size: 2rem;
      letter-spacing: 2px;
      line-height: 1.2;
    }

    .mobile-product-title {
      font-size: 1.6rem;
    }

    .mobile-product-desc {
      font-size: 0.95rem;
      margin-bottom: 20px;
    }

    .mobile-product-btn {
      width: 120px;
      height: 40px;
      line-height: 40px;
    }
  }

  /* 480px以下适配 */
  @media (max-width: 480px) {
    .mobile-product-item {
      margin-bottom: 30px;
      margin-top: 88px;
    }

    .banner-title {
      top: 80%;
      left: 5%;
      transform: translateY(-50%);
      font-size: 2rem;
      letter-spacing: 2px;
      line-height: 1.2;
      font-family:
        "Source Han Serif SC", "Microsoft Yahei", "PingFang SC", sans-serif;
    }

    .mobile-product-title {
      font-size: 1.3rem;
    }

    .mobile-product-desc {
      font-size: 0.9rem;
    }
  }
}