@charset "UTF-8";
/* 产品搜索 */
.product-search {
  padding-top: 50px;
}
.product-search form {
  position: relative;
  z-index: 1;
  border: 1px solid #666;
  width: 500px;
  margin: 20px auto;
}

.product-search input {
  width: 100%;
  height: 45px;
  padding: 0 10px 0 50px;
  border-radius: 0;
  outline: none;
  background-color: transparent;
}

.product-search button {
  position: absolute;
  top: 0;
  left: 0;
  width: 45px;
  height: 45px;
  border: 1px solid #eee;
  border-radius: 0;
  background-color: transparent;
  border: none;
  outline: none;
}

/*  */
.product-series {
  margin-top: 50px;
}

.product-series ul {
  justify-content: center;
}

.product-series ul li {
  padding: 0 40px;
}

.product-series ul li a {
  text-align: center;
}

.product-series .cp-ico {
  margin: 0 auto;
  width: 40px;
}

.product-series .cp-icon img {
  display: block;
  width: 100%;
}

.product-series ul li.active a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* 产品筛选 */
.product-filter {
  margin-top: 40px;
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
}

.filter-item {
  position: relative;
  flex: 1 1 0;
  width: 100%;
}

.filter-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  height: 45px;
  padding: 0 18px;
  border: 1px solid #666;
  border-radius: 0;
  background: #f5f5f5;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* 触发按钮内文字布局：标签在左，计数+箭头在右 */
.filter-trigger .filter-label {
  flex: 1;
  text-align: left;
}

.filter-trigger .filter-count {
  margin-right: 4px;
}

.filter-item.active .filter-trigger,
.filter-item.open .filter-trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(0, 114, 206, 0.08);
}

.filter-count {
  color: var(--color-primary);
  font-weight: 600;
}

.filter-arrow {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 5px 0 5px;
  border-color: #666 transparent transparent transparent;
  transition: transform 0.25s ease;
}

.filter-item.open .filter-arrow {
  transform: rotate(180deg);
}

.filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  z-index: 20;
  min-width: 180px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s;
}

.filter-item.open .filter-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 0;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.filter-opt:hover {
  background: #f5f5fa;
  transform: translateX(2px);
}

/* 选项已勾选高亮 */
.filter-opt.checked {
  color: var(--color-primary);
  font-weight: 600;
  background: #eef0ff;
}

.filter-opt input {
  -webkit-appearance: checkbox;
  appearance: checkbox;
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--color-primary);
  cursor: pointer;
  transition: transform 0.18s ease;
}

.filter-opt.checked input {
  transform: scale(1.12);
}

/* 面板底部确认按钮 */
.filter-confirm {
  margin-top: 6px;
  padding: 8px 0;
  width: 100%;
  border: none;
  border-radius: 0;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.filter-confirm:hover {
  background: #005bb0;
}

/* 已选标签 */
.filter-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f0f0f8;
  border: 1px solid #d9d9ec;
  border-radius: 0;
  font-size: 13px;
  color: #333;
  animation: tag-pop 0.25s ease;
}

@keyframes tag-pop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.filter-tag-remove {
  font-style: normal;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.filter-tag-remove:hover {
  color: #e03c3c;
  transform: rotate(90deg);
}

.filter-clear-all {
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.filter-clear-all:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* 产品列表 */
.product-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 50px;
}

.product-card {
  flex: 0 0 calc((100% - 72px) / 4);
  border: 1px solid #eee;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  transform: translateY(16px);
  animation: card-in 0.4s ease forwards;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

/* 筛选变更/移除标签的无动画模式：直接可见，避免重播进场动画的「刷新」感 */
.product-card.no-anim {
  opacity: 1;
  transform: none;
  animation: none;
}

@keyframes card-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.product-card-img {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7fb;
}

.product-card-img img {
  width: 60%;
  height: auto;
}

.product-card-info {
  padding: 14px 16px 18px;
}

.product-card-info h4 {
  font-size: 16px;
  color: #222;
}

.product-card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

.product-empty {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: #999;
  font-size: 15px;
}

.product-loading {
  width: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 15px;
}

.product-loading::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  vertical-align: -3px;
  border: 2px solid #ddd;
  border-top-color: #888;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 加载更多按钮 loading 态：文字保留，右侧显示 spinner */
#loadMore.is-loading {
  pointer-events: none;
}

#loadMore.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.product-more {
  margin: 40px 0;
  text-align: center;
}

/* 响应式 */
@media (max-width: 1024px) {
  .product-card {
    flex-basis: calc((100% - 48px) / 3);
  }
}

@media (max-width: 768px) {
  .product-card {
    flex-basis: calc((100% - 24px) / 2);
  }
  .filter-bar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .filter-item {
    flex: 1 1 100%;
  }
}

@media (max-width: 480px) {
  .product-card {
    flex-basis: 100%;
  }
}

/* 产品分类导航条（product-nav 菜单） */
.product-nav {
  background: #fff;
  border-bottom: 1px solid #eee;
}
.product-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.product-nav-list li {
  position: relative;
}
.product-nav-list li a {
  display: block;
  line-height: 52px;
  padding: 0 4px;
  font-size: 15px;
  color: #333;
  transition: color 0.2s ease;
}
.product-nav-list li.current-menu-item > a,
.product-nav-list li a:hover {
  color: var(--color-primary);
}
