/* ===== 产品列表页样式 ===== */
/* 后续产品列表相关样式请在此文件修改 */

.product-listing-page {
  padding-bottom: 2rem;
}

.listing-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 1.25rem;
}

.listing-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.listing-toolbar {
  margin-bottom: 1rem;
}

.listing-toolbar .btn-primary {
  font-weight: 600;
  white-space: nowrap;
}

.listing-toolbar .input-group-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  background-color: #f8f9fa;
  border-color: #dee2e6;
}

.listing-toolbar .form-select {
  font-size: 0.875rem;
  border-color: #dee2e6;
}

.search-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  box-shadow: var(--box-shadow-sm);
}

.listing-empty {
  background: #f8fafc;
  border-radius: var(--border-radius-md);
  border: 1px dashed #cbd5e0;
}

/* 子分类 */
.subcategory-section {
  background: #f8fafc;
  border-radius: var(--border-radius-md);
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
}

.subcategory-link {
  display: block;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  color: #4a5568;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  text-align: center;
}

.subcategory-link:hover {
  color: var(--brand-primary);
  border-color: rgba(var(--brand-primary-rgb), 0.35);
  background: rgba(var(--brand-primary-rgb), 0.04);
}

.subcategory-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.subcategory-list li a {
  display: block;
  padding: 0.35rem 0;
  color: #4a5568;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.subcategory-list li a:hover {
  color: var(--brand-primary);
}

/* 分类页头部 */
.category-header-banner {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.category-image img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
}

.category-description {
  background-color: #ffffff;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  margin-top: 15px;
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.6;
}

/* 产品卡片 */
.product-thumb {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--box-shadow-sm);
  transition: var(--transition-smooth);
}

.product-thumb:hover {
  transform: translateY(-6px);
  box-shadow: var(--box-shadow-md);
  border-color: rgba(var(--brand-primary-rgb), 0.25);
}

.product-thumb .image {
  text-align: center;
  padding: 20px;
  background-color: #ffffff;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.product-thumb .image a {
  display: inline-block;
}

.product-thumb .image img {
  max-width: 100%;
  max-height: 180px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.product-thumb:hover .image img {
  transform: scale(1.04);
}

.product-thumb .content {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-thumb .description {
  padding: 0;
  margin-bottom: 12px;
  flex-grow: 1;
}

.product-thumb .description h4 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.product-thumb .description h4 a {
  color: #2d3748;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.product-thumb .description h4 a:hover {
  color: var(--brand-primary);
}

.product-thumb .description p {
  font-size: 0.8rem;
  color: #718096;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  line-height: 1.5;
}

.product-thumb .wishlist-btn,
.product-thumb .compare-btn {
  position: absolute;
  top: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #718096;
  box-shadow: var(--box-shadow-sm);
  transition: var(--transition-smooth);
  z-index: 10;
  cursor: pointer;
  padding: 0;
}

.product-thumb .wishlist-btn {
  right: 15px;
}

.product-thumb .compare-btn {
  right: 56px;
}

.product-thumb .wishlist-btn:hover,
.product-thumb .compare-btn:hover {
  background-color: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  transform: scale(1.1);
}

.product-thumb .btn-add-cart {
  width: 100%;
  background-color: var(--brand-primary);
  color: #ffffff;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 0;
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.product-thumb .btn-add-cart:hover {
  background-color: var(--brand-primary-hover);
  color: #ffffff;
}

.product-thumb .button {
  display: none;
}

.rating .fa-star {
  color: var(--brand-secondary);
  font-size: 0.8rem;
  margin-right: 2px;
}

.price {
  margin-bottom: 8px;
}

.price-new {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.price-old {
  font-size: 0.85rem;
  color: #a0aec0;
  text-decoration: line-through;
  margin-left: 6px;
}

.price-tax {
  color: #718096;
  font-size: 0.75rem;
  display: block;
  margin-top: 2px;
}

.related-products-section {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 767.98px) {
  .listing-page-title {
    font-size: 1.35rem;
  }

  .product-thumb .image {
    height: 160px;
    padding: 12px;
  }

  .product-thumb .image img {
    max-height: 140px;
  }
}
