
/* 搜索区域 */
  .search-section {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    gap: 0.5rem;
  }
  .search-box {
    padding: 0.5rem 1rem;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  .search-btn {
    padding: 0.5rem 1.2rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  .search-btn:hover {
    background-color: #0056b3;
  }

  /* 分类按钮容器 */
  .categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0;
  }
  .category-btn {
    padding: 0.4rem 1rem;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  @media(max-width:768px){
     .category-btn {padding: 0.4rem 0.7rem;} 
  }
  
  
  .category-btn.active,
  .category-btn:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
  }

  /* 产品展示区：一行5个 */
  .products {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    /*justify-content: center;*/
    justify-content: left;
    margin: 2rem 0;
  }
  .product-card {
    width: calc(20% - 1.5rem); /* 5列：100%/5 - 间距 */
    min-width: 200px; /* 防止在小屏上过窄 */
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
  }
  .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid blue;
  }
  .product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
  }
  .product-info {
    padding: 1rem;
  }
  .product-info h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    color: #333;
  }
  .product-info p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
  }

  /* 分页样式 */
.pagination-container {
  width: 100%;
  margin: 2rem 0;
  display: flex;
  justify-content: center;
}

.pagination {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination button {
  min-width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  background-color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

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

.pagination button.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}
.product-card a{
    text-decoration: none;
}
.product-card h3{
    /*text-align: center;*/
}
  /* 响应式：小屏幕下变为2列或1列 */
  @media (max-width: 1200px) {
    .product-card {
      width: calc(25% - 1.5rem); /* 4列 */
    }
  }
  @media (max-width: 992px) {
    .product-card {
      width: calc(33.333% - 1.5rem); /* 3列 */
    }
  }
  @media (max-width: 768px) {
    .product-card {
      width: calc(50% - 1.5rem); /* 2列 */
    }
    .search-box {
      width: 200px;
    }
  }
  @media (max-width: 576px) {
    .product-card {
      width: 100%; /* 单列 */
    }
    .search-section {
      /*flex-direction: column;*/
      align-items: center;
    }
    .search-box {
      width: 90%;
      max-width: 200px;
    }
    .search-section{display: flex;}
  }
  
  