/* 产品页面专用样式 */

/* 产品页面顶部横幅 */
.product-banner {
  height: 450px;

  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 65px;
  position: relative;
}

.product-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.01);
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.product-banner h1 {
  color: #fff;
  font-size: 40px;
  font-weight: 300;
  margin: 0;
}

/* 面包屑导航 - 胶囊形状 */
.breadcrumb {
  position: absolute;
  bottom: -26px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}

.breadcrumb .container {
  display: inline-flex
  ;
      justify-content: center;
      align-items: center;
      width: auto;
      height: 52px;
      background: #FFFFFF;
      box-shadow: 0px 0px 25px 0px rgba(0, 0, 0, 0.1);
      border-radius: 26px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      font-size: 14px;
      color: #2C2C2C;
      text-align: center;
      padding: 0 44px;
  
}

.breadcrumb a {
  color: #2C2C2C;
  text-decoration: none;
  margin-right: 5px;
}

.breadcrumb a:hover {
  color: #66cc33;
}

/* 产品搜索区域 */
.product-search {
  display: flex;
  align-items: center;
  margin: 50px auto 30px;
  padding: 0 15px;
  gap: 30px;
}

.search-input {
  position: relative;
 flex: 0 0 250px;
}

.search-input input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: none;
  /* border-radius: 20px; */
  font-size: 14px;
  outline: none;
  border-bottom: 1px solid #eee;
}

.search-input button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
}

.search-icon {
  display: inline-block;
  width: 23px;
  height: 23px;
  background: url('/template/boyan/images/search.png') no-repeat center;
  background-size: contain;
}

.product-count {
  font-size: 14px;
  color: #666;
}

/* 产品区域布局 */
.product-section {
  margin: 30px auto 60px;
}

.product-container {
  display: flex;
  gap: 30px;
}

/* 左侧分类菜单 */
.product-categories {
  flex: 0 0 250px;
  border: 1px solid #eee;
  max-height:max-content;

}

.category-item {
  padding: 15px;
  /* border-bottom: 1px solid #eee; */
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-item:last-child {
  border-bottom: none;
}

.category-item.active {
  /* background-color: #f6f6f6; */
  font-weight: bold;
}

.category-item:hover {
  background-color: #f9f9f9;
}

.category-arrow {
  width: 7px;
  height: 12px;
  transition: transform 0.3s ease;
}

/* .category-item.active .category-arrow {
  transform: rotate(90deg);
} */

.subcategory-list {
  padding: 15px;
  /* background-color: #f9f9f9; */
  line-height: 1.8;
  font-size: 14px;
  color: #666;
}

/* 右侧产品列表 */
.product-list {
  flex: 1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.product-item {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 15px;
}

.product-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.product-image {
  width: 100%;
  /* height: 200px; */
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  height: 300px;
}

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

.product-name {
  margin: 15px 0;
  font-size: 16px;
  font-weight: normal;
  text-align: center;
}

/* 修改查看详情按钮，默认白色，悬停时变绿色 */
.product-detail-btn {
  display: inline-block;
  padding: 6px 30px;
  background-color: #fff;
  color: #666;
  text-decoration: none;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 1px solid #ddd;
}

.product-detail-btn:hover {
  background-color: #66cc33;
  color: #fff;
  border-color: #66cc33;
}

/* 分页 - 圆形样式 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.page-num {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  /* border: 1px solid #ddd; */
  color: #666;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 50%; /* 改为圆形 */
  background-color: #F5F7FA;
}

.page-num-current,
.page-num-current:hover {
  background-color: #77aa4a;
  border-color: #77aa4a;
  color: white;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .product-container {
    flex-direction: column;
  }
  
  .product-categories {
    flex: none;
    width: 100%;
  }
  
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-banner {
    height: 300px;
  }
  
  .product-search {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .search-input {
    width: 100%;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* 响应式面包屑 */
  .breadcrumb .container {
    width: auto;
    height: 45px;
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .product-banner {
    height: 200px;
  }
  
  .product-banner h1 {
    font-size: 24px;
  }
  
  /* 小屏幕下胶囊更小 */
  .breadcrumb {
    bottom: -22px;
  }
  
  .breadcrumb .container {
    width: auto;
    height: 40px;
    font-size: 12px;
  }
  
  .category-item {
    padding: 12px;
  }
  
  .page-item {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
} 