/* 产品页面样式 */
.products-main {
  background: #f8f9fa;
  min-height: 100vh;
  padding-top: 80px;
}

.products-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
  padding: 2rem;
}

/* 左侧侧边栏 */
.product-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.sidebar-section {
  border-bottom: 1px solid #e9ecef;
  padding: 0;
}

.sidebar-section:last-child {
  border-bottom: none;
}

.sidebar-title {
  background: #000;
  color: #fff;
  margin: 0;
  padding: 0.5rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-list li {
  border-bottom: 1px solid #f1f3f4;
}

.category-list li:last-child {
  border-bottom: none;
}

.category-link {
  display: block;
  padding: 1rem 1.5rem;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.category-link:hover {
  background: #f8f9fa;
  color: #000;
}

.category-link.active {
  background: #f8f9fa;
  color: #000;
  border-left-color: #000;
  font-weight: 500;
}

/* 推荐产品 */
.recommended-products {
  padding: 1rem;
}

.recommended-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.recommended-item:hover {
  background: #f8f9fa;
}

.recommended-img {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  background: linear-gradient(45deg, #ddd, #eee);
  object-fit: cover;
  flex-shrink: 0;
}

.recommended-name {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

/* 右侧产品内容区域 */
.product-content {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 2rem;
}

.content-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page-title {
  font-size: 2rem;
  font-weight: 400;
  color: #333;
  margin: 0;
  letter-spacing: 1px;
}

/* 产品网格 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.product-card {
  background: #f7f7f7;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  /* padding: 1.5rem; */
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #ddd;
}

.product-image {
  width: 100%;
  height: 180px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(45deg, #f0f0f0, #f8f8f8);
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.02);
}

.product-title {
  font-size: 1.1rem;
  font-weight: 400;
  color: #333;
  margin: 0;
  letter-spacing: 0.5px;
  line-height: 1.4;
  text-align: left;
  padding-left: 15px;
  text-decoration: none;
}

/* 分页导航 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  border-top: 1px solid #e9ecef;
  margin-top: 2rem;
}

.pagination-btn {
  background: transparent;
  border: 1px solid #ddd;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn a{
  color: #666;
  text-decoration: none;
}

.pagination-btn:hover {
  background: #f8f9fa;
  border-color: #999;
  color: #333;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-decoration: none;
}

.page-number:hover {
  background: #f8f9fa;
  border-color: #999;
  color: #333;
}

.page-number.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

.page-dots {
  color: #999;
  padding: 0 0.5rem;
}

.page-info {
  color: #666;
  font-size: 0.9rem;
  white-space: nowrap;
}

.current-page,
.total-pages {
  font-weight: 500;
  color: #333;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .products-container {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .product-sidebar {
    width: 250px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
}

@media (max-width: 968px) {
  .products-container {
    flex-direction: column;
    padding: 1rem;
  }

  .product-sidebar {
    width: 100%;
    order: 2;
  }

  .product-content {
    order: 1;
    padding: 1.5rem;
  }

  .recommended-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .recommended-item {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .product-content {
    padding: 1rem;
  }

  .pagination {
    flex-direction: column;
    gap: 1rem;
  }

  .page-numbers {
    order: 1;
  }

  .pagination-btn {
    min-width: 120px;
    justify-content: center;
  }

  .page-info {
    order: 3;
  }
}

@media (max-width: 480px) {
  .products-container {
    padding: 0.5rem;
  }

  .product-content {
    padding: 1rem 0.5rem;
    border-radius: 0;
  }

  .product-sidebar {
    border-radius: 0;
  }

  .page-numbers {
    flex-wrap: wrap;
    justify-content: center;
  }

  .recommended-products {
    grid-template-columns: 1fr;
  }

  .product-image {
    height: 150px;
  }
}

/* 过滤动画效果 */
.product-card.hidden {
  display: none;
}

.product-card.filtering {
  opacity: 0.3;
  transform: scale(0.95);
}

/* 加载状态 */
.products-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

.products-grid.loading .product-card {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
