/* ==========================================================================
   AntCMS - Web_1 主题产品列表页专属样式 (product-list.css)
   ========================================================================== */

/* ===== 面包屑导航 ===== */
.breadcrumb {
  font-size: 13px;
  color: var(--muted, #667085);
  padding: 18px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.breadcrumb a {
  color: var(--muted, #667085);
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--brand, #0f62fe);
}
.breadcrumb .crumb-sep {
  color: #98a2b3;
}
.breadcrumb .crumb-cur {
  color: var(--text, #101828);
  font-weight: 600;
}

/* ===== 首屏 Hero 区域 ===== */
.hero {
  padding: 8px 0 32px;
  border-bottom: 1px solid #eef2f6;
  background: #ffffff;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
}
.hero small {
  display: inline-block;
  color: var(--brand, #0f62fe);
  font-weight: 900;
  letter-spacing: 1.2px;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 6px 0 10px;
  color: var(--text, #101828);
  font-weight: 800;
}
.hero p {
  max-width: 790px;
  color: var(--muted, #667085);
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}
.hero-stat {
  display: flex;
  gap: 12px;
}
.stat {
  min-width: 118px;
  padding: 15px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
}
.stat strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--brand, #0f62fe);
  line-height: 1.2;
}
.stat span {
  font-size: 12px;
  color: var(--muted, #667085);
  margin-top: 2px;
  display: block;
}

/* ===== 主布局与侧边栏 ===== */
.main {
  padding: 38px 0 70px;
}
.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* PC 侧边栏 */
.sidebar {
  position: sticky;
  top: 94px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.03);
}
.side-head {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line, #e4e7ec);
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
}
.side-head small {
  display: block;
  color: var(--brand, #0f62fe);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.side-head h2 {
  font-size: 19px;
  margin: 4px 0 0;
  color: var(--text, #101828);
}
.side-group {
  margin: 10px 10px 0;
  padding: 0;
  border: 1px solid #eef1f5;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}
.side-group:last-child {
  margin-bottom: 10px;
}
.side-group h3 {
  margin: 0;
  padding: 12px 14px 10px;
  background: linear-gradient(180deg, #f8fbff, #f3f7fd);
  border-bottom: 1px solid #edf2f6;
  font-size: 13px;
  font-weight: 800;
  color: #101828;
  display: flex;
  align-items: center;
}
.side-group h3:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-right: 8px;
  background: #8bb7ff;
}
.side-group a {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 10px 26px;
  font-size: 13px;
  color: #475467;
  transition: all 0.15s ease;
}
.side-group a + a {
  border-top: 1px dashed #f0f2f5;
}
.side-group a:before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c5cfdb;
  transform: translateY(-50%);
}
.side-group a:hover,
.side-group a.active {
  background: #f8fbff;
  color: var(--brand, #0f62fe);
  font-weight: 600;
}
.side-group a:hover:before,
.side-group a.active:before {
  background: var(--brand, #0f62fe);
}
.side-group a:after {
  content: "›";
  color: #a0acba;
  font-size: 16px;
  line-height: 1;
}

/* ===== 移动端专题快速列表 ===== */
.mobile-topics {
  display: none;
  margin-bottom: 20px;
}
.mobile-topic-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.mobile-topic-head h2 {
  font-size: 20px;
  margin: 0;
}
.mobile-topic-head p {
  font-size: 12px;
  color: var(--muted, #667085);
  margin: 2px 0 0;
}
.topic-btn {
  border: 0;
  background: none;
  color: var(--brand, #0f62fe);
  font-weight: 800;
  padding: 4px 0;
  cursor: pointer;
  font-size: 13px;
}
.topic-list {
  display: grid;
  gap: 10px;
  width: 100%;
}
.topic-list-item {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 14px;
  background: #ffffff;
}
.topic-list-item > div {
  min-width: 0;
}
.topic-list-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  color: #101828;
}
.topic-list-item span {
  display: block;
  font-size: 12px;
  color: var(--muted, #667085);
}
.topic-list-item b {
  flex: 0 0 auto;
  color: #98a2b3;
  font-size: 20px;
  font-weight: 400;
}

/* ===== 内容区头部 & 筛选 Pills ===== */
.content-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.content-head h2 {
  font-size: 28px;
  margin: 0;
  font-weight: 800;
  color: var(--text, #101828);
}
.content-head p {
  margin: 4px 0 0;
  color: var(--muted, #667085);
  font-size: 13px;
}
.count {
  font-size: 13px;
  color: var(--muted, #667085);
  white-space: nowrap;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 12px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 15px;
  background: #ffffff;
  margin-bottom: 22px;
}
.filters::-webkit-scrollbar {
  display: none;
}
.filter-btn {
  flex: 0 0 auto;
  border: 0;
  background: #f8fafc;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #475467;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--brand, #0f62fe);
  color: #ffffff;
}

/* ===== 产品列表网格 ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.product-card {
  min-width: 0;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 17px;
  overflow: hidden;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}
.product-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-image {
  aspect-ratio: 1/1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #edf1f5, #c9d1da);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 无图时的拟态机器插画 */
.product-image.no-img:before {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 14%;
  height: 35%;
  border-radius: 14px;
  background: linear-gradient(145deg, #d8dee5, #818d9b);
}
.product-image.no-img:after {
  content: "";
  position: absolute;
  right: 17%;
  top: 18%;
  width: 24%;
  height: 44%;
  border-radius: 10px;
  background: linear-gradient(145deg, #e4e9ef, #8793a1);
}
.product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #ffffff;
  padding: 8px;
  transition: transform 0.3s ease;
}
.product-card:hover .product-image img {
  transform: scale(1.03);
}

.product-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-cat {
  font-size: 11px;
  color: var(--brand, #0f62fe);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-body h3 {
  font-size: 17px;
  line-height: 1.4;
  margin: 6px 0 8px;
  color: var(--text, #101828);
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-body p {
  font-size: 13px;
  color: var(--muted, #667085);
  margin: 0 0 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}
.tags span {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
}
.detail-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--brand, #0f62fe);
  font-weight: 800;
  transition: transform 0.15s ease;
}
.product-card:hover .detail-link {
  transform: translateX(3px);
}

/* 空列表状态 */
.empty-product-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px dashed var(--line, #e4e7ec);
}
.empty-product-state i {
  font-size: 40px;
  color: #94a3b8;
  margin-bottom: 12px;
}
.empty-product-state h4 {
  font-size: 16px;
  color: #1e293b;
  margin: 0 0 6px;
}
.empty-product-state p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

/* ===== 分页控件 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #475467;
  background: #ffffff;
  transition: all 0.15s ease;
}
.pagination a:hover {
  border-color: var(--brand, #0f62fe);
  color: var(--brand, #0f62fe);
}
.pagination .active {
  background: var(--brand, #0f62fe);
  color: #ffffff;
  border-color: var(--brand, #0f62fe);
}
.pagination .disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== 通用板块与网格 ===== */
.section {
  padding: 64px 0;
}
.section.soft {
  background: var(--soft, #f7f9fc);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head small {
  display: block;
  color: var(--brand, #0f62fe);
  font-weight: 900;
  letter-spacing: 1.1px;
  font-size: 12px;
  text-transform: uppercase;
}
.section-head h2 {
  font-size: 30px;
  margin: 5px 0 0;
  color: var(--text, #101828);
  font-weight: 800;
}
.section-head p {
  color: var(--muted, #667085);
  max-width: 640px;
  margin: 0;
  font-size: 14px;
}

/* 选型要素网格 */
.choose-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.choose {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 15px;
  padding: 20px 18px;
  background: #ffffff;
}
.choose b {
  display: block;
  color: var(--brand, #0f62fe);
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.choose strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--text, #101828);
}
.choose span {
  font-size: 13px;
  color: var(--muted, #667085);
  line-height: 1.5;
}

/* 热门专题与推荐链接网格 */
.links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.link-card {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 16px;
  padding: 20px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
}
.link-card small {
  color: var(--brand, #0f62fe);
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.link-card h3 {
  font-size: 17px;
  margin: 8px 0 6px;
  color: var(--text, #101828);
}
.link-card p {
  font-size: 13px;
  color: var(--muted, #667085);
  margin: 0;
  line-height: 1.5;
}

/* 常见问题 FAQ */
.faq details {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 14px;
  padding: 16px 20px;
  background: #ffffff;
  margin-bottom: 10px;
  transition: background 0.15s;
}
.faq details[open] {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.04);
}
.faq summary {
  font-weight: 800;
  cursor: pointer;
  color: var(--text, #101828);
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:after {
  content: "+";
  color: #98a2b3;
  font-size: 18px;
  font-weight: 400;
}
.faq details[open] summary:after {
  content: "－";
  color: var(--brand, #0f62fe);
}
.faq p {
  font-size: 13px;
  color: var(--muted, #667085);
  margin: 10px 0 0;
  line-height: 1.6;
}

/* ===== 移动端专题抽屉 ===== */
.topic-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88vw, 360px);
  background: #ffffff;
  z-index: 5100;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}
.topic-drawer.open {
  transform: translateX(0);
}
.topic-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line, #e4e7ec);
}
.topic-drawer-head strong {
  display: block;
  font-size: 17px;
  color: var(--text, #101828);
}
.topic-drawer-head .drawer-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted, #667085);
}
.topic-drawer-head button {
  border: 0;
  background: #f2f4f7;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.topic-drawer-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}
.drawer-stack {
  display: grid;
  gap: 14px;
}
.drawer-card {
  border: 1px solid var(--line, #e4e7ec);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}
.drawer-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f8fbff, #f3f7fd);
  border-bottom: 1px solid #edf2f6;
}
.drawer-card-head .icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, #eaf2ff, #b7d2ff);
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--brand, #0f62fe);
}
.drawer-card-head strong {
  display: block;
  font-size: 14px;
  color: #101828;
}
.drawer-links {
  padding: 6px 10px 8px;
}
.drawer-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 8px 10px 12px;
  margin: 2px 0;
  border-radius: 10px;
  font-size: 13px;
  color: #344054;
}
.drawer-links a:hover,
.drawer-links a.active {
  background: #f7faff;
  color: var(--brand, #0f62fe);
  font-weight: 600;
}
.drawer-links a:after {
  content: "›";
  color: #98a2b3;
  font-size: 16px;
}

/* 抽屉蒙层 */
.topic-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  z-index: 5050;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.topic-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ===== 响应式适配 ===== */
@media (max-width: 1000px) {
  .container,
  .container.layout {
    width: min(1220px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
  }
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .mobile-topics {
    display: block;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .choose-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .links-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container,
  .container.layout {
    width: calc(100% - 28px);
    margin-left: auto;
    margin-right: auto;
  }
  .hero {
    padding-bottom: 24px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 30px;
  }
  .hero-stat {
    display: none;
  }
  .main {
    padding: 24px 0 48px;
  }
  .content-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .content-head h2 {
    font-size: 22px;
  }
  .product-grid {
    gap: 12px;
  }
  .product-body {
    padding: 12px;
  }
  .product-body h3 {
    font-size: 15px;
  }
  .product-body p {
    display: none;
  }
  .tags span {
    display: none;
  }
  .tags span:first-child {
    display: inline-block;
  }
  .section {
    padding: 44px 0;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .section-head h2 {
    font-size: 24px;
  }
  .choose-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}
