/* products.css - 产品中心与详情页独立样式 */
:root{
  --pf-orange: #ff8912;
  --pf-text-muted: #6c6c7a;
}

/* 移除所有产品页中列表的默认圆点 */
.products-page .category-list,
.products-page .category-list ul,
.products-page .category-list li,
.products-page .pagination,
.products-page .pagination ul,
.products-page .pagination li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.products-page .section-heading { margin-top: 2.5rem; }
.products-layout {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 4rem;
}
.products-sidebar {
  order: 0;
  flex: 0 0 260px;
  width: 260px;
  background: #ffffff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}
.products-sidebar h4 { margin: 0 0 0.75rem; font-size: 1.05rem; }
.category-list { padding: 0; margin: 0; }
.category-list li { list-style: none; margin: 0.35rem 0; }
.category-list a { display: block; text-decoration: none; color: #333; padding: 0.55rem 0.6rem; border-radius: 8px; transition: background 0.18s ease; }
.category-list a:hover { background: rgba(0,0,0,0.04); }
.category-list a.active { background: var(--pf-orange); color: #111; font-weight: 700; }

.products-grid { order: 1; flex: 1; }
.grid-top { display:flex; justify-content:flex-end; margin-bottom: 0.75rem; color: var(--pf-text-muted); }
.grid-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.product-card { background:#fff; border-radius: 8px; overflow:hidden; box-shadow: 0 18px 48px rgba(0,0,0,0.06); display:flex; flex-direction:column; }
.product-card .thumb img { width: 100%; height: 200px; object-fit: cover; }
.product-card .card-body { padding: 0.8rem 1rem; text-align: center; color: #000}
.product-card .excerpt { color: var(--pf-text-muted); font-size: 0.95rem; margin-top: 0.5rem; }
.card-foot { display:flex; justify-content:center; padding: 0.6rem 0 1.2rem; }
.btn-more { display:inline-block; background: var(--pf-orange); color:#fff; padding:0.5rem 0.9rem; border-radius:999px; text-decoration:none; font-weight:700; }
.pagination { text-align:center; margin-top: 1.5rem; }

/* 详情页 */
.product-detail-page .product-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 45%) minmax(360px, 55%);
  gap: 1.5rem;
  margin: 2rem auto 3rem;
  align-items: start;
  width: min(1180px, calc(100% - 2rem));
}
.product-detail-page .product-detail-layout .detail-gallery {
  display:flex;
  justify-content:center;
  align-items:flex-start;
}
.detail-gallery img {
  width:100%;
  max-width:100%;
  height: auto;
  max-height: 640px;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.08);
  object-fit: contain;
  display:block;
}
.detail-info {
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.06);
}
.detail-info h3 { margin-top: 0; }
.detail-content { line-height: 1.8; color: #444; }
.detail-meta { margin-top: 1rem; color: var(--pf-text-muted); }
.detail-meta p { margin: 0.25rem 0; }
.detail-actions { margin-top: 1.5rem; }
.btn-back { display:inline-block; padding: 0.55rem 0.9rem; background:#111; color:#fff; border-radius: 999px; text-decoration:none; }

.related-products .related-list { display:flex; gap: 1rem; flex-wrap:wrap; margin-top: 0.75rem; }
.related-card { width: 130px; text-align:center; background: #fff; padding: 0.6rem; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.related-card .thumb img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; }
.related-card p { margin: 0.5rem 0 0; font-size: 0.9rem; color: #333; }

@media (max-width: 980px) {
  .products-page .products-layout { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 1.5rem !important; }
  .products-page .products-layout > .products-sidebar,
  .products-page .products-layout > .products-grid { width: 100% !important; max-width: 100% !important; }
  .products-page .products-layout > .products-sidebar { flex: 0 0 auto !important; order: -1 !important; padding: 1rem !important; margin-bottom: 1rem !important; box-shadow: 0 12px 30px rgba(0,0,0,0.04) !important; background: #fff !important; }
  .products-page .products-layout > .products-grid { flex: 1 1 auto !important; order: 1 !important; }
  .products-page .grid-top { justify-content: space-between !important; flex-wrap: wrap !important; gap: 0.75rem !important; }
  .products-page .grid-list { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .product-detail-page .product-detail-layout { grid-template-columns: 1fr !important; }
}

@media (max-width: 760px) {
  .products-page .products-layout { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 1rem !important; }
  .products-page .products-layout > .products-sidebar { width: 100% !important; flex: 0 0 auto !important; order: -1 !important; padding: 1rem !important; margin-bottom: 1rem !important; box-shadow: none !important; background: transparent !important; }
  .products-page .products-layout > .products-grid { width: 100% !important; }
  .products-page .grid-top { justify-content: center !important; }
  .products-page .grid-list { grid-template-columns: 1fr !important; }
  .products-page .category-list a { padding: 0.65rem 0.85rem !important; font-size: 0.95rem !important; }
  .products-page .product-card { min-height: auto !important; }
  .products-page .btn-more { width: auto !important; padding: 0.55rem 0.9rem !important; font-size: 0.92rem !important; }
  .products-page .card-foot { padding-bottom: 0.8rem !important; }
  .related-card { width: 100% !important; }
}
