/* ================================================================
   products.css — 产品列表页样式
   包含: 展示卡片 / 视图切换 / Table View / 筛选折叠
   ================================================================ */

/* ===== 视图切换按钮 ===== */
.product-view-toggle {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
}
.view-toggle-btn {
  width: 34px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, color 0.18s ease;
}
.view-toggle-btn.is-active {
  background: #fff;
  color: var(--accent, #0b7cff);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.view-toggle-btn:hover:not(.is-active) {
  color: #334155;
}

/* ===== Advanced filter toggle ===== */
.product-filter-advanced-toggle {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}
.product-filter-advanced-toggle summary {
  font-size: 13px;
  font-weight: 700;
  color: #48617f;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  user-select: none;
}
.product-filter-advanced-toggle summary:hover {
  color: #16345b;
}

/* ===== 产品卡片网格 ===== */
.product-card-grid-v26 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* ===== 紧凑型产品展示卡片 ===== */
.product-showcase-card {
  display: flex;
  gap: 0;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(14,34,66,.04);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
}
.product-showcase-card:hover {
  border-color: #bac8d8;
  box-shadow: 0 4px 18px rgba(14,34,66,.08);
}

/* --- 左侧图片 --- */
.showcase-card-image {
  width: 135px;
  min-height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafbfc;
  border-right: 1px solid #eef2f6;
  padding: 16px 10px;
  text-decoration: none;
}
.showcase-card-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.18s ease;
}
.product-showcase-card:hover .showcase-card-image img {
  transform: scale(1.06);
}

/* --- 右侧信息 --- */
.showcase-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 14px 12px;
  gap: 8px;
}
.showcase-card-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.showcase-card-main h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.2;
  color: #0e2540;
}
.showcase-card-main h3 a {
  color: inherit;
  text-decoration: none;
}
.showcase-card-main h3 a:hover {
  color: var(--accent, #0b7cff);
}

/* Brand */
.showcase-brand {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent, #0b7cff);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #eef5ff;
  padding: 1px 7px;
  border-radius: 4px;
  width: fit-content;
}

/* Description */
.showcase-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #5a6f88;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tags row */
.showcase-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.showcase-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: #48617f;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* Availability */
.showcase-availability {
  font-size: 11px;
  color: #6b8099;
  font-style: italic;
}

/* --- 按钮 --- */
.showcase-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.showcase-card-actions .btn {
  width: auto;
  min-width: 110px;
  max-width: 130px;
  justify-content: center;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 7px;
  line-height: 1.3;
  flex: none;
}

/* ===== Table View v26 ===== */
.product-table-view-v26 {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 4px rgba(14,34,66,.04);
}
.product-table-wrap-v26 {
  overflow-x: auto;
}
.product-table-v26 {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.product-table-v26 thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.product-table-v26 th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  white-space: nowrap;
}
.product-table-v26 tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}
.product-table-v26 tbody tr:hover {
  background: #fafcfe;
}
.product-table-v26 tbody tr:last-child {
  border-bottom: none;
}
.product-table-v26 td {
  padding: 10px 14px;
  color: #334155;
  vertical-align: middle;
}
.product-table-v26 td a {
  color: var(--accent, #0b7cff);
  text-decoration: none;
  font-weight: 700;
}
.product-table-v26 td a:hover {
  text-decoration: underline;
}
.product-table-v26 td .btn {
  white-space: nowrap;
}

/* ===== Products 页面专用 ===== */
.public-page-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.public-page-shell .products-banner-section-v24 {
  width: 100%;
  margin: 0;
}
.public-page-shell .inner-page-banner-section {
  padding: 18px 0 0;
}
/* Filter + Products 主体 — 宽度统一由 public-fix.css 控制 */
.public-page-shell .product-archive-v24-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) !important;
  gap: 24px !important;
}

/* ===== 目录页标题 ===== */
.catalog-page-heading {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #0e2540;
  line-height: 1.15;
}

/* ===== 可点击分页 ===== */
.catalog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 0;
}
.catalog-page-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
}
.catalog-page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.catalog-page-num:hover {
  background: #f1f5f9;
  border-color: #bac8d8;
}
.catalog-page-num.is-active {
  background: var(--accent, #0b7cff);
  border-color: var(--accent, #0b7cff);
  color: #fff;
  cursor: default;
}
.catalog-page-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  height: 36px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.catalog-page-nav {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
}
.catalog-page-nav:hover {
  background: #f1f5f9;
}
.catalog-page-nav.is-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .product-card-grid-v26 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .product-showcase-card {
    flex-direction: column;
  }
  .showcase-card-image {
    width: 100%;
    height: 150px;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid #eef2f6;
    padding: 14px;
  }
  .showcase-card-image img {
    max-height: 122px;
  }
  .showcase-card-body {
    padding: 12px 14px 10px;
    gap: 6px;
  }
  .showcase-card-actions .btn {
    min-width: 0;
    max-width: none;
    flex: 1;
    font-size: 11px;
    padding: 6px 10px;
  }

  .product-table-v26 thead { display: none; }
  .product-table-v26 tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 12px;
  }
  .product-table-v26 td {
    padding: 5px 0;
    display: grid;
    gap: 2px;
  }
  .product-table-v26 td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: .03em;
  }
}
