/* 产品中心 页面样式（由原型导出） */
/* ============================================================
   产品中心页 — 分类树 + 筛选 + 产品网格
   ============================================================ */
.products-page { padding: 72px 0 100px; background: var(--bg); }

.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* ---------- 左侧边栏 ---------- */
.side-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 20px;
  overflow: hidden;
}

.side-block-title {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.side-block-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--brand-red);
}

.side-block-title .en {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.35);
}

/* 分类树 */
.cat-tree { padding: 8px 0; }

.cat-group > .cat-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  user-select: none;
}
.cat-group-head:hover { color: var(--brand-red); background: var(--bg-soft); }
.cat-group-head .cnt {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--gray);
  background: var(--bg-soft);
  padding: 1px 8px;
  border-radius: 10px;
}
.cat-group-head .arrow {
  width: 14px; height: 14px;
  transition: transform 0.25s;
  color: var(--gray);
  flex-shrink: 0;
}
.cat-group.open .cat-group-head .arrow { transform: rotate(90deg); }

.cat-children {
  display: none;
  border-top: 1px dashed var(--line);
  padding: 6px 0;
}
.cat-group.open .cat-children { display: block; }

.cat-children a {
  display: flex;
  align-items: center;
  padding: 8px 20px 8px 34px;
  font-size: 13px;
  color: var(--steel);
  transition: all 0.2s;
  position: relative;
}
.cat-children a::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--gray-light);
  transform: rotate(45deg);
  margin-right: 10px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.cat-children a:hover { color: var(--brand-red); background: rgba(200,16,46,0.04); }
.cat-children a.active {
  color: var(--brand-red);
  font-weight: 700;
  background: rgba(200,16,46,0.06);
  border-right: 3px solid var(--brand-red);
}
.cat-children a.active::before { background: var(--brand-red); }
.cat-children a .cnt { margin-left: auto; font-size: 11px; color: var(--gray); }

/* 筛选面板 */
.filter-body { padding: 16px 20px 20px; }

.filter-group { margin-bottom: 18px; }
.filter-group:last-child { margin-bottom: 0; }

.filter-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group-title::before {
  content: "";
  width: 3px; height: 12px;
  background: var(--brand-red);
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--steel);
  cursor: pointer;
  user-select: none;
}
.filter-check input { display: none; }
.filter-check .box {
  width: 15px; height: 15px;
  border: 1px solid var(--gray-light);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  background: #fff;
}
.filter-check .box svg { opacity: 0; transition: opacity 0.15s; }
.filter-check input:checked + .box {
  background: var(--brand-red);
  border-color: var(--brand-red);
}
.filter-check input:checked + .box svg { opacity: 1; }
.filter-check:hover { color: var(--brand-red); }

.filter-clear {
  width: 100%;
  margin-top: 14px;
  padding: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  background: var(--bg-soft);
  border: 1px dashed var(--gray-light);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-clear:hover { color: var(--brand-red); border-color: var(--brand-red); }

/* 侧边联系卡 */
.side-contact {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
  border: none;
  padding: 28px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.side-contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}
.side-contact > * { position: relative; z-index: 1; }
.side-contact h4 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.side-contact p { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.7; margin-bottom: 18px; }
.side-contact .phone {
  font-size: 20px;
  font-weight: 900;
  color: var(--brand-red-light);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

/* ---------- 右侧内容 ---------- */
.products-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.products-search {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.products-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  pointer-events: none;
}
.products-search .form-input { padding-left: 40px; }

.products-sort { width: 170px; flex-shrink: 0; }

.products-count {
  font-size: 13px;
  color: var(--gray);
  white-space: nowrap;
}
.products-count b { color: var(--brand-red); }

/* 已选条件 chips */
.active-filters {
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: 4px;
  font-size: 13px;
  color: var(--gray);
}
.active-filters.show { display: flex; }

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-red);
  background: rgba(200,16,46,0.08);
  border: 1px solid rgba(200,16,46,0.2);
  border-radius: 2px;
  cursor: pointer;
}
.active-chip:hover { background: rgba(200,16,46,0.15); }

/* 产品网格 */
.plist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.p-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.p-item::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  z-index: 2;
}

.p-item:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
  transform: translateY(-4px);
  border-color: rgba(200,16,46,0.2);
}
.p-item:hover::after { transform: scaleX(1); }

.p-item-img {
  height: 190px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.p-item-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 18px;
  transition: transform 0.4s ease;
}
.p-item:hover .p-item-img img { transform: scale(1.06); }

/* 无图占位：工业图标风格 */
.p-item-img--ph {
  background:
    linear-gradient(rgba(20,23,28,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,23,28,0.02) 1px, transparent 1px),
    linear-gradient(135deg, #F5F6F8, #ECEEF2);
  background-size: 24px 24px, 24px 24px, 100% 100%;
}
.p-item-img--ph svg { color: var(--gray-light); width: 64px; height: 64px; }

.p-item-badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.p-item-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.p-item-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--gray);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.p-item-body h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  transition: color 0.2s;
}
.p-item:hover .p-item-body h4 { color: var(--brand-red); }

.p-item-body p {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.7;
  flex: 1;
}

.p-item-spec {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--brand-red);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-item-spec .go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gray);
  font-weight: 500;
  transition: all 0.2s;
}
.p-item:hover .p-item-spec .go { color: var(--brand-red); gap: 8px; }

/* 空状态 */
.plist-empty {
  display: none;
  text-align: center;
  padding: 80px 20px;
  color: var(--gray);
}
.plist-empty.show { display: block; }
.plist-empty svg { width: 64px; height: 64px; color: var(--gray-light); margin: 0 auto 16px; }
.plist-empty h4 { font-size: 16px; color: var(--steel); margin-bottom: 6px; }
.plist-empty p { font-size: 13px; }

@media (max-width: 1024px) {
  .products-layout { grid-template-columns: 1fr; }
  .plist-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .plist-grid { grid-template-columns: 1fr; }
  .products-sort { width: 100%; }
}
