/* 产品中心 */
.page-banner {
  background-image: url("../images/banner/banner-products.jpg");
}

.products-page .container {
  width: calc(100% - 3.6rem);
  max-width: 16.44rem;
  margin: 0 auto;
}

.products-page {
  padding: 0.8rem 0;
  background: #f8fafc;
}

.products-page .sec-head-left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  margin-bottom: 0;
}

.products-page .sec-head-left .sec-rail {
  flex: none;
  width: 100%;
  height: 0;
  background: none;
  border-bottom: 1px solid #cfcfcf;
}

.products-page .tabs {
  justify-content: flex-start;
  margin: 0.3rem 0 0.45rem;
}

.products-page .tab-btn {
  width: auto;
  min-width: 1.36rem;
  height: 0.46rem;
  padding: 0 0.28rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

.agent-layout {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.agent-layout .sidebar {
  width: 3.09rem;
  height: 12.94rem;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border-radius: 0.08rem 0.08rem 0 0;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.05);
  display: block;
}

.agent-layout .sidebar a {
  position: relative;
  width: 100%;
  height: 1.2rem;
  min-height: 1.2rem;
  max-height: 1.2rem;
  padding: 0 0.24rem 0 0.4rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  font-size: 0.28rem;
  font-style: normal;
  color: #1e2538;
  text-align: left;
  text-transform: none;
  background: transparent;
  border-bottom: none;
  line-height: 1.2;
  flex: none;
}

.agent-layout .sidebar .sidebar-l1-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-layout .sidebar a:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2.27rem;
  height: 1px;
  background: #eef0f4;
  transform: translateX(-50%);
  pointer-events: none;
}

.agent-layout .sidebar a:hover,
.agent-layout .sidebar a.is-active {
  color: #dc2626;
  background: transparent;
}

.agent-layout .layout-side-main {
  width: 12.04rem;
  max-width: 12.04rem;
  height: 12.94rem;
  flex: none;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.21rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 4px 0 rgba(141, 155, 185, 0.25);
  border-radius: 0.08rem;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.products-page.is-loading .layout-side-main {
  opacity: 0.45;
  pointer-events: none;
}

.products-page .product-grid {
  display: grid;
  grid-template-columns: repeat(4, 2.61rem);
  justify-content: space-between;
  align-content: start;
  align-items: start;
  column-gap: 0.21rem;
  row-gap: 0.44rem;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.products-page .pagination {
  margin-top: auto;
  margin-bottom: 0.64rem;
  padding-top: 0.24rem;
  justify-content: flex-start;
  gap: 0.12rem;
  font-size: 0.16rem;
  line-height: 1;
  flex-shrink: 0;
}

.products-page .product-card {
  display: flex;
  flex-direction: column;
  width: 2.61rem;
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.products-page .product-card:hover {
  border: none;
  box-shadow: none;
}

.products-page .product-card-img {
  width: 2.61rem;
  height: 2.62rem;
  padding: 0.21rem;
  margin: 0;
  box-sizing: border-box;
  background: #f6f6f6;
  border: 1px solid #9ba6bc;
  border-radius: 0.08rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.products-page .product-card-img img {
  width: 2.19rem;
  height: 2.2rem;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}

.products-page .product-card-title {
  width: 2.61rem;
  height: 0.72rem;
  min-height: 0.72rem;
  max-height: 0.72rem;
  margin: 0;
  box-sizing: border-box;
  background: transparent;
  padding: 0.1rem 0 0.1rem;
  border-bottom: 1px solid #9ba6bc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.08rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 500;
  font-size: 0.2rem;
  font-style: normal;
  color: #1e2538;
  text-align: left;
  text-transform: none;
  transition: color 0.2s;
}

.products-page .product-card-title span {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  line-height: 1.3;
  max-height: 2.6em;
  word-break: break-word;
}

.products-page .product-card-title::after {
  content: "";
  width: 0.12rem;
  height: 0.12rem;
  flex-shrink: 0;
  margin-left: 0.04rem;
  border-right: 2px solid #9ba6bc;
  border-top: 2px solid #9ba6bc;
  transform: rotate(45deg);
  box-sizing: border-box;
}

.products-page .product-card:hover .product-card-img {
  border-color: #dc2626;
}

.products-page .product-card:hover .product-card-title {
  color: #dc2626;
}

.products-page .product-card:hover .product-card-title::after {
  border-color: #dc2626;
}

.products-page .pagination a,
.products-page .pagination span,
.products-page .pagination li a,
.products-page .pagination li span {
  width: 0.6rem;
  min-width: 0.6rem;
  height: 0.6rem;
  box-sizing: border-box;
  background: #fff;
  border-radius: 0.08rem;
  border: 1px solid #e2e8f0;
  font-size: 0.16rem;
  color: #1e2538;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.products-page .pagination a:hover,
.products-page .pagination li a:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fff;
}

.products-page .pagination a.is-active,
.products-page .pagination .is-active,
.products-page .pagination .current,
.products-page .pagination span.current,
.products-page .pagination li.active a,
.products-page .pagination li.active span {
  background: #dc2626;
  border: 1px solid #dc2626;
  color: #fff;
}

/* 上一页 / 下一页：隐藏文字，统一箭头（兼容 a / span、有无 li；排除当前页） */
.products-page .pagination .page-prev,
.products-page .pagination .page-next,
.products-page .pagination > a:first-child,
.products-page .pagination > a:last-child,
.products-page .pagination > span.disabled:first-child,
.products-page .pagination > span.disabled:last-child,
.products-page .pagination > li:first-child > a,
.products-page .pagination > li:first-child > span.disabled,
.products-page .pagination > li:last-child > a,
.products-page .pagination > li:last-child > span.disabled {
  font-size: 0 !important;
  color: transparent !important;
  line-height: 0;
  overflow: hidden;
}

.products-page .pagination .page-prev::before,
.products-page .pagination .page-next::before,
.products-page .pagination > a:first-child::before,
.products-page .pagination > a:last-child::before,
.products-page .pagination > span.disabled:first-child::before,
.products-page .pagination > span.disabled:last-child::before,
.products-page .pagination > li:first-child > a::before,
.products-page .pagination > li:first-child > span.disabled::before,
.products-page .pagination > li:last-child > a::before,
.products-page .pagination > li:last-child > span.disabled::before {
  content: "";
  width: 0.12rem;
  height: 0.12rem;
  box-sizing: border-box;
  border-top: 2px solid #9ba6bc;
  border-right: 2px solid #9ba6bc;
}

.products-page .pagination .page-prev::before,
.products-page .pagination > a:first-child::before,
.products-page .pagination > span.disabled:first-child::before,
.products-page .pagination > li:first-child > a::before,
.products-page .pagination > li:first-child > span.disabled::before {
  transform: rotate(-135deg);
}

.products-page .pagination .page-next::before,
.products-page .pagination > a:last-child::before,
.products-page .pagination > span.disabled:last-child::before,
.products-page .pagination > li:last-child > a::before,
.products-page .pagination > li:last-child > span.disabled::before {
  transform: rotate(45deg);
}

.products-page .pagination .page-prev:hover::before,
.products-page .pagination .page-next:hover::before,
.products-page .pagination > a:first-child:hover::before,
.products-page .pagination > a:last-child:hover::before,
.products-page .pagination > li:first-child > a:hover::before,
.products-page .pagination > li:last-child > a:hover::before {
  border-color: #dc2626;
}

.products-page .pagination .current,
.products-page .pagination span.current {
  font-size: 0.16rem !important;
  line-height: 1 !important;
  color: #fff !important;
}

/* 自研产品 */
.products-page .self-panel {
  display: grid;
  grid-template-columns: 5.77rem 9.53rem;
  justify-content: space-between;
  gap: 0;
  align-items: start;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
}

.products-page .self-panel-img {
  width: 5.77rem;
  max-width: 100%;
  height: auto;
  aspect-ratio: 577 / 764;
  flex-shrink: 0;
  background: transparent;
  overflow: hidden;
  border-radius: 0.08rem;
}

.products-page .self-panel-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0.08rem;
  background: transparent;
}

.products-page .self-panel-card {
  width: 9.53rem;
  max-width: 100%;
  height: auto;
  min-height: 7.64rem;
  box-sizing: border-box;
  padding: 0.32rem 0.3rem;
  background: #fff;
  border-radius: 0.08rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 4px 0 rgba(141, 155, 185, 0.15);
  display: flex;
  flex-direction: column;
}

.products-page .self-panel-card h3 {
  margin: 0 0 0.2rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 500;
  font-size: 0.3rem;
  font-style: normal;
  line-height: 0.32rem;
  color: #1e2538;
  text-align: left;
  text-transform: none;
}

.products-page .self-point {
  display: flex;
  gap: 0.16rem;
  align-items: center;
  width: 100%;
  height: 1.04rem;
  margin-bottom: 0.12rem;
  padding: 0 0.2rem;
  background: #f6f6f6;
  border-radius: 0.08rem;
  box-sizing: border-box;
}

.products-page .self-point-icon {
  width: 0.4rem;
  height: 0.4rem;
  margin-top: 0;
  border-radius: 0;
  background: transparent center / contain no-repeat;
  flex-shrink: 0;
}

.products-page .self-point-icon--safe {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3l7 3v5c0 4.5-2.9 7.9-7 9-4.1-1.1-7-4.5-7-9V6l7-3z' fill='%23dc2626'/%3E%3Cpath d='M9.5 12.2l1.8 1.8 3.7-3.7' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.products-page .self-point-icon--time {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='8' stroke='%23dc2626' stroke-width='2'/%3E%3Cpath d='M12 8v4.5l3 1.5' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.products-page .self-point-icon--trust {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7.5 13.5c-1.8 0-3-1.2-3-2.8V9.2c0-.7.6-1.2 1.2-1.2h2.2c.4-1.3 1.6-2.2 3.1-2.2s2.7.9 3.1 2.2h.4c1.8 0 3 1.2 3 2.8v1.2c0 .7-.6 1.2-1.2 1.2' stroke='%23dc2626' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M8 13.5v2.2c0 1.4 1.3 2.3 3 2.3h2c1.7 0 3-.9 3-2.3v-2.2' stroke='%23dc2626' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

.products-page .self-point strong {
  display: block;
  margin-bottom: 0.04rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  font-size: 0.2rem;
  font-style: normal;
  color: #dc2626;
  text-align: left;
  text-transform: none;
}

.products-page .self-point p {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  font-size: 0.16rem;
  font-style: normal;
  line-height: 0.28rem;
  color: #000;
  text-align: left;
  text-transform: none;
}

.products-page .self-desc {
  margin: 0.12rem 0 0.2rem;
  flex: 1;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  font-size: 0.16rem;
  font-style: normal;
  line-height: 0.32rem;
  color: #1e2538;
  text-align: left;
  text-transform: none;
}

.products-page .self-panel-action {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.products-page .self-panel-action .btn,
.products-page .self-panel-action .btn-primary {
  width: 0.88rem;
  min-width: 0.88rem;
  height: 0.33rem;
  padding: 0;
  box-sizing: border-box;
  background: #dc2626;
  border: none;
  border-radius: 0.08rem;
  font-size: 0.14rem;
  line-height: 0.33rem;
  color: #fff;
  text-align: center;
}

@media (max-width: 900px) {
  .products-page > .container,
  .products-page .container {
    width: calc(100% - 0.48rem);
    max-width: none;
    overflow: visible;
  }

  .products-page .tabs {
    flex-wrap: wrap;
  }

  .products-page .tab-btn {
    width: auto;
    min-width: 1.6rem;
    padding: 0 0.24rem;
    height: 0.56rem;
    font-size: 0.22rem;
  }

  .agent-layout {
    flex-direction: column;
    gap: 0.24rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* 分类：换行标签，避免横向裁切 */
  .agent-layout .sidebar {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    overflow: visible !important;
    padding: 0.16rem !important;
    gap: 0.12rem !important;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .agent-layout .sidebar a {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0.56rem !important;
    max-height: none !important;
    white-space: nowrap;
    padding: 0.12rem 0.2rem !important;
    font-size: 0.22rem !important;
    line-height: 1.3;
    border-radius: 0.04rem;
    background: #f5f7fa;
    box-sizing: border-box;
  }

  .agent-layout .sidebar a.is-active {
    color: #fff !important;
    background: #dc2626 !important;
  }

  .agent-layout .sidebar a::after {
    display: none !important;
  }

  .agent-layout .layout-side-main {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
    padding: 0.2rem !important;
    overflow: visible !important;
    display: block !important;
  }

  .products-page .product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 0.16rem !important;
    row-gap: 0.28rem !important;
    justify-content: stretch !important;
    align-content: start !important;
    height: auto !important;
    min-height: 0 !important;
    flex: none !important;
    overflow: visible !important;
  }

  .products-page .product-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
  }

  .products-page .product-card-img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    padding: 0.12rem !important;
  }

  .products-page .product-card-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
  }

  .products-page .product-card-title {
    width: 100% !important;
    max-width: 100% !important;
    height: 0.72rem !important;
    min-height: 0.72rem !important;
    max-height: 0.72rem !important;
    font-size: 0.2rem !important;
    line-height: 1.3;
    align-items: center;
    white-space: normal;
    overflow: hidden;
    display: flex;
    padding: 0.1rem 0.28rem 0.1rem 0 !important;
    position: relative;
    box-sizing: border-box;
  }

  .products-page .product-card-title span {
    padding-right: 0.2rem;
  }

  .products-page .product-card-title::after {
    position: absolute;
    right: 0.04rem;
    top: 50%;
    margin-top: -0.06rem;
    margin-left: 0;
  }

  .products-page .pagination {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center;
    gap: 0.1rem;
    margin: 0.32rem 0 0.16rem !important;
    padding-top: 0.16rem !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
  }

  .products-page .pagination a,
  .products-page .pagination span,
  .products-page .pagination li a,
  .products-page .pagination li span {
    width: 0.56rem !important;
    min-width: 0.56rem !important;
    height: 0.56rem !important;
    font-size: 0.2rem !important;
    white-space: nowrap;
  }

  .products-page .pagination .page-prev,
  .products-page .pagination .page-next,
  .products-page .pagination > a:first-child,
  .products-page .pagination > a:last-child,
  .products-page .pagination > span.disabled:first-child,
  .products-page .pagination > span.disabled:last-child,
  .products-page .pagination > li:first-child > a,
  .products-page .pagination > li:first-child > span.disabled,
  .products-page .pagination > li:last-child > a,
  .products-page .pagination > li:last-child > span.disabled {
    font-size: 0 !important;
    color: transparent !important;
    line-height: 0 !important;
  }

  .products-page .pagination .current,
  .products-page .pagination span.current {
    font-size: 0.2rem !important;
    line-height: 1 !important;
    color: #fff !important;
    background: #dc2626 !important;
    border-color: #dc2626 !important;
  }

  .products-page .self-panel {
    grid-template-columns: 1fr;
    gap: 0.24rem;
    width: 100%;
    max-width: 100%;
  }

  .products-page .self-panel-img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: auto;
  }

  .products-page .self-panel-img img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0.08rem;
  }

  .products-page .self-panel-card {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 560px) {
  .products-page .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
