/* ============================================
   equipment.css - 全部设备列表页样式
   ============================================ */

:root {
  --primary: #002b5c;
  --primary-dark: #001736;
  --accent: #fea619;
  --text-main: #191c1d;
  --text-sub: #43474f;
  --text-light: #757684;
  --bg-page: #f8f9fa;
  --bg-white: #fff;
  --border: #c4c6d0;
  --radius-sm: 2px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --header-h: 159px;
  --cat-h: 50px;
  --filter-h: 192px;
}

/* 不覆盖全站 reset，避免破坏 header/footer（与 detail.css 同理） */
body.page-equipment {
  background: var(--bg-page);
}

/* 头部搜索栏使用 style.css + site_header，此处勿重复定义 .search-* / .btn-login 等全局类 */

/* ============== CATEGORIES BAR ============== */
.page-equipment .categories-bar {
  background: #fff;
  border-bottom: 2px solid var(--primary);
  overflow: visible;
  position: relative;
  z-index: 200;
}
.page-equipment .categories-container {
  max-width: 1500px; margin: 0 auto;
  padding: 0 16px;
  display: flex; align-items: flex-end; height: 50px;
  min-width: 0;
}
.page-equipment .cat-all-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  padding: 0 24px; height: 40px;
  border-radius: 12px 12px 0 0;
  font-size: 16px; font-weight: 700; cursor: pointer;
  flex-shrink: 0;
  border: none;
  font-family: inherit;
}
.page-equipment .cat-all-btn img { width: 15px; height: 10px; flex-shrink: 0; }
.page-equipment .cat-nav {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0 0 0 24px;
  height: 50px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.page-equipment .cat-nav::-webkit-scrollbar { display: none; }
.page-equipment .cat-nav-link {
  font-size: 14px; font-weight: 700; color: #111827;
  padding: 0 0 0 32px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}
.page-equipment .cat-nav-link:first-child { padding-left: 0; }
.page-equipment .cat-nav-link.active, .page-equipment .cat-nav-link:hover { color: var(--primary); }
.page-equipment .cat-with-icon { display: flex; align-items: center; gap: 4px; }
.page-equipment .cat-with-icon img { width: 13.5px; height: 12px; flex-shrink: 0; }
.page-equipment .cat-all-wrap { position: relative; flex-shrink: 0; z-index: 201; }
.page-equipment .cat-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 202;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 8px;
  box-shadow: 0 8px 24px rgba(0,43,92,.12);
  overflow: hidden;
}
.page-equipment .cat-dropdown.open { display: block; }

/* 双栏分类：左一级 / 右二级 */
.page-equipment .cat-mega {
  display: flex;
  align-items: stretch;
  min-width: 520px;
  max-width: min(720px, calc(100vw - 32px));
  min-height: 280px;
  max-height: 420px;
}
.page-equipment .cat-mega-left {
  width: 200px;
  flex-shrink: 0;
  background: #f8f9fb;
  border-right: 1px solid #eef0f3;
  overflow-y: auto;
  padding: 8px 0;
}
.page-equipment .cat-mega-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  text-align: left;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.page-equipment .cat-mega-item:hover,
.page-equipment .cat-mega-item.active {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
}
.page-equipment .cat-mega-all { border-bottom: 1px solid #eef0f3; margin-bottom: 4px; }
.page-equipment .cat-mega-arrow {
  font-size: 16px;
  line-height: 1;
  color: #9ca3af;
  flex-shrink: 0;
  margin-left: 8px;
}
.page-equipment .cat-mega-parent.active .cat-mega-arrow { color: var(--primary); }

.page-equipment .cat-mega-right {
  flex: 1;
  min-width: 0;
  padding: 16px 20px;
  overflow-y: auto;
  position: relative;
}
.page-equipment .cat-mega-tip {
  margin: 0;
  padding: 48px 16px;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
}
.page-equipment .cat-mega-tip[hidden] { display: none; }
.page-equipment .cat-mega-panel { display: none; }
.page-equipment .cat-mega-panel.active { display: flex; flex-wrap: wrap; gap: 8px 12px; align-content: flex-start; }
.page-equipment .cat-mega-sub {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: #43474f;
  background: #f3f4f6;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.page-equipment .cat-mega-sub:hover {
  background: #eef3ff;
  color: var(--primary);
}
.page-equipment .cat-mega-sub.active {
  background: rgba(0, 43, 92, 0.1);
  color: var(--primary);
  font-weight: 700;
}

/* ============== 筛选区 Figma 1:1450 ============== */
.page-equipment .eq-filter-panel {
  background: #fff;
  border-bottom: 1px solid #c4c6d0;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

.page-equipment .filter-matrix {
  background: transparent;
  border: none;
}

.page-equipment .filter-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-equipment .filter-row {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.page-equipment .filter-label {
  width: 96px;
  flex-shrink: 0;
  padding: 4px 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #43474f;
}

.page-equipment .filter-opts {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
  min-width: 0;
}

.page-equipment .fopt {
  display: inline-block;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #1f2937;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.page-equipment .fopt:hover {
  color: #002b5c;
}

.page-equipment .fopt.active {
  background: rgba(0, 43, 92, 0.1);
  color: #002b5c;
  font-weight: 700;
}

/* ============== 排序栏 Figma 1:1541 ============== */
.page-equipment .main-content {
  padding: 24px 0 32px;
}

.page-equipment .page-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 16px;
  min-width: 0;
}

.page-equipment .eq-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 24px;
  padding: 9px 17px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.page-equipment .sort-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
  min-width: 0;
}

.page-equipment .sort-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 6px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #1f2937;
  border-bottom: 2px solid transparent;
  margin-right: 24px;
  transition: color 0.15s, border-color 0.15s;
}

.page-equipment .sort-tab:last-child {
  margin-right: 0;
}

.page-equipment .sort-tab:hover {
  color: #002b5c;
}

.page-equipment .sort-tab.active {
  color: #002b5c;
  font-weight: 700;
  border-bottom-color: #002b5c;
}

.page-equipment .sort-arrows {
  display: inline-flex;
  flex-direction: column;
  font-size: 8px;
  line-height: 1;
  color: #9ca3af;
  margin-left: 2px;
}

.page-equipment .eq-result-count {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
}

.page-equipment .eq-result-num {
  color: #e02020;
  font-weight: 700;
}

/* ============== 设备卡片网格 Figma 1:1560 ============== */
.page-equipment.product-grid-5col,
.page-equipment .product-grid-5col {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  margin-bottom: 40px;
  min-width: 0;
}

.page-equipment .eq-card,
.page-equipment a.eq-card-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 9px;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 0;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.page-equipment .eq-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.page-equipment .eq-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.page-equipment .eq-card-media {
  position: relative;
  background: #f9fafb;
  overflow: hidden;
}

.page-equipment .eq-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s;
}

.page-equipment .eq-card:hover .eq-card-img {
  transform: scale(1.03);
}

.page-equipment .eq-card-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 13px;
}

.page-equipment .eq-card-media-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.page-equipment .eq-verified-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 15px;
  color: #fff;
  background: rgba(0, 43, 92, 0.8);
  border-radius: 4px;
}

.page-equipment .eq-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(2px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-equipment .eq-fav-icon {
  display: block;
  width: 16px;
  height: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 16' fill='none'%3E%3Cpath d='M8.5 14.5l-1.1-1C3.7 10.1 1 7.6 1 4.6 1 2.4 2.7.7 4.9.7c1.2 0 2.4.6 3.1 1.5.7-.9 1.9-1.5 3.1-1.5 2.2 0 3.9 1.7 3.9 3.9 0 3-2.7 5.5-6.4 8.9l-1.1 1z' stroke='%23D1D5DB' stroke-width='1.2' fill='none'/%3E%3C/svg%3E") center / contain no-repeat;
}

.page-equipment .eq-fav-btn.faved .eq-fav-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 16'%3E%3Cpath d='M8.5 14.5l-1.1-1C3.7 10.1 1 7.6 1 4.6 1 2.4 2.7.7 4.9.7c1.2 0 2.4.6 3.1 1.5.7-.9 1.9-1.5 3.1-1.5 2.2 0 3.9 1.7 3.9 3.9 0 3-2.7 5.5-6.4 8.9l-1.1 1z' fill='%23E02020'/%3E%3C/svg%3E");
}

.page-equipment .eq-list-tag {
  display: inline-block;
  margin-right: 4px;
  padding: 0.5px 4px;
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  color: #fff;
  border-radius: 2px;
  vertical-align: 2px;
}

.page-equipment .eq-list-tag-premium {
  background: #002b5c;
}

.page-equipment .eq-list-tag-new {
  background: #16a34a;
}

.page-equipment .eq-card-title {
  margin: 0;
  min-height: 38px;
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-equipment .eq-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 19px;
}

.page-equipment .eq-tag-star {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  color: #855300;
  background: rgba(254, 166, 25, 0.1);
  border: 1px solid #fea619;
  border-radius: 4px;
}

.page-equipment .eq-tag-deposit {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  line-height: 15px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
}

.page-equipment .eq-card-price-row {
  display: flex;
  align-items: baseline;
  min-height: 28px;
  line-height: 28px;
}

.page-equipment .eq-price-currency,
.page-equipment .eq-price-num {
  font-size: 18px;
  font-weight: 700;
  color: #e02020;
}

.page-equipment .eq-price-unit {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #e02020;
}

.page-equipment .eq-price-negotiable {
  font-size: 18px;
  font-weight: 700;
  color: #e02020;
}

.page-equipment .eq-card-foot {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid #e5e7eb;
}

.page-equipment .eq-card-seller {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  overflow: hidden;
}

.page-equipment .eq-seller-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  border-radius: 2px;
}

.page-equipment .eq-seller-badge-icon {
  flex-shrink: 0;
  display: block;
  width: 9px;
  height: 9px;
}

.page-equipment .eq-seller-badge-star {
  color: #fff;
  background: #fea619;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.page-equipment .eq-seller-badge-merchant {
  color: #855300;
  font-weight: 700;
  background: rgba(254, 166, 25, 0.1);
  border: 1px solid #fea619;
  box-shadow: none;
}

.page-equipment .eq-seller-badge-personal {
  color: #fff;
  font-weight: 600;
  background: #2563eb;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.page-equipment .eq-seller-name {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 17px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-equipment .eq-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.page-equipment .eq-update-time {
  font-size: 10px;
  line-height: 15px;
  color: #9ca3af;
}

.page-equipment .eq-location {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  line-height: 15px;
  color: #9ca3af;
  white-space: nowrap;
}

.page-equipment .eq-loc-icon {
  flex-shrink: 0;
}

/* Pagination */
.page-equipment .pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.page-equipment .page-btn {
  min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--border);
  background: #fff; border-radius: 4px; font-size: 14px; cursor: pointer;
  transition: all 0.15s;
}
.page-equipment .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-equipment .page-btn:hover:not(.active):not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-equipment .page-btn:disabled { cursor: default; opacity: 0.5; }
.page-equipment .page-ellipsis { font-size: 16px; color: var(--text-sub); }

/* 分类下拉（旧选择器兼容，已迁移至 .page-equipment 块内） */

.page-equipment .eq-empty {
  padding: 64px 24px;
  text-align: center;
  color: #9ca3af;
  font-size: 15px;
  background: #fff;
  border-radius: 8px;
}
.page-equipment .eq-card-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 13px;
  min-height: 160px;
}
.page-equipment .eq-card { cursor: default; }
.page-equipment .eq-fav-btn.faved { color: #e74c3c; }
.page-equipment .filter-opts-check .fcheck { text-decoration: none; color: inherit; }
.page-equipment .sort-arrows .arrow.on { color: var(--primary); font-weight: 700; }
.page-equipment .eq-pagination .pagination {
  display: flex; justify-content: center; gap: 6px;
  list-style: none; padding: 24px 0; margin: 0; flex-wrap: wrap;
}
.page-equipment .eq-pagination .pagination li { display: inline-block; }
.page-equipment .eq-pagination .pagination li a,
.page-equipment .eq-pagination .pagination li span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; color: #374151; background: #fff;
}
.page-equipment .eq-pagination .pagination li.active span {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.page-equipment .search-tag-empty { color: #9ca3af; cursor: default; }

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1400px) {
  .page-equipment.product-grid-5col,
  .page-equipment .product-grid-5col { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
  .page-equipment.product-grid-5col,
  .page-equipment .product-grid-5col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-equipment .filter-opts { gap: 16px; }
}

@media (max-width: 991px) {
  .page-equipment .categories-container { padding: 0 12px; }
  .page-equipment .cat-all-btn { padding: 0 16px; font-size: 14px; height: 38px; }
  .page-equipment .cat-nav { padding-left: 12px; }
  .page-equipment .cat-nav-link { padding-left: 20px; font-size: 13px; }
  .page-equipment .filter-container { padding: 12px 16px; }
  .page-equipment .filter-opts { gap: 12px 16px; }
  .page-equipment.product-grid-5col,
  .page-equipment .product-grid-5col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .page-equipment .eq-sort-bar { padding: 10px 12px; }
  .page-equipment .sort-tab { margin-right: 16px; font-size: 13px; }
}

@media (max-width: 767px) {
  .page-equipment .main-content { padding: 16px 0 24px; }
  .page-equipment .page-container { padding: 0 12px; }
  .page-equipment .filter-container { padding: 12px; gap: 12px; }
  .page-equipment .filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .page-equipment .filter-label { width: auto; font-weight: 700; }
  .page-equipment .filter-opts { gap: 8px 12px; }
  .page-equipment .fopt { font-size: 13px; padding: 3px 6px; }
  .page-equipment.product-grid-5col,
  .page-equipment .product-grid-5col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
  }
  .page-equipment .eq-card,
  .page-equipment a.eq-card-link { padding: 8px; }
  .page-equipment .eq-card-title { font-size: 13px; min-height: 34px; line-height: 17px; }
  .page-equipment .eq-price-currency,
  .page-equipment .eq-price-num,
  .page-equipment .eq-price-negotiable { font-size: 16px; }
  .page-equipment .eq-sort-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .page-equipment .sort-tabs { width: 100%; }
  .page-equipment .sort-tab { margin-right: 12px; }
  .page-equipment .eq-result-count { white-space: normal; }
  .page-equipment .eq-pagination .pagination li a,
  .page-equipment .eq-pagination .pagination li span {
    min-width: 32px; height: 32px; font-size: 13px; padding: 0 8px;
  }
}

@media (max-width: 767px) {
  .page-equipment .cat-mega {
    flex-direction: column;
    min-width: min(320px, calc(100vw - 24px));
    max-height: 70vh;
    min-height: 0;
  }
  .page-equipment .cat-mega-left {
    width: 100%;
    max-height: 160px;
    border-right: none;
    border-bottom: 1px solid #eef0f3;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    gap: 8px;
  }
  .page-equipment .cat-mega-item {
    width: auto;
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
  }
  .page-equipment .cat-mega-all { margin-bottom: 0; border-bottom: none; }
  .page-equipment .cat-mega-right { padding: 12px; min-height: 120px; }
  .page-equipment .cat-mega-tip { padding: 24px 12px; }
}

@media (max-width: 479px) {
  .page-equipment .categories-container { height: 46px; }
  .page-equipment .cat-all-btn {
    padding: 0 12px;
    font-size: 13px;
    gap: 6px;
    border-radius: 8px 8px 0 0;
  }
  .page-equipment .cat-nav-link { padding-left: 16px; font-size: 12px; }
  .page-equipment .page-container { padding: 0 10px; }
  .page-equipment .filter-container { padding: 10px; }
  .page-equipment.product-grid-5col,
  .page-equipment .product-grid-5col { gap: 8px; }
  .page-equipment .eq-card,
  .page-equipment a.eq-card-link { padding: 6px; gap: 6px; }
  .page-equipment .eq-fav-btn { width: 28px; height: 28px; top: 6px; right: 6px; }
  .page-equipment .eq-fav-icon { width: 14px; height: 13px; }
  .page-equipment .eq-card-title { font-size: 12px; min-height: 32px; }
  .page-equipment .eq-price-currency,
  .page-equipment .eq-price-num,
  .page-equipment .eq-price-negotiable { font-size: 15px; }
  .page-equipment .eq-seller-name { font-size: 10px; }
  .page-equipment .sort-tab { margin-right: 8px; padding: 4px 4px 6px; }
  .page-equipment .eq-result-count { font-size: 11px; }
}
