/* 产品中心页面样式 */

/* title-main 样式已移至组件内部 */

/* 主要内容区域 */
.products-main {
  /* padding-top: 70px; */
  min-height: 100vh;
  background: #fff;
}

/* products-header 样式已移至组件内部 */

.products-categories-title {
  font-weight: bold;
  font-size: 0.36rem;
  color: #333333;
  text-align: left;
  font-style: normal;
  margin-top: 1rem;
}

.products-categories-subtitle {
  font-weight: 400;
  font-size: 0.16rem;
  color: #666666;
  line-height: 0.16rem;
  text-align: left;
  font-style: normal;
  margin-top: 0.14rem;
}

.products-list-top-box {
  background: #f6f6f6;
  padding: 0.3rem 0.4rem;
  margin-top: 0.3rem;
}

.search-list {
  display: flex;
  align-items: center;
  gap: 0.31rem;
  flex-wrap: wrap;
}

.search-list-item {
  background: #ffffff;
  border-radius: 0.06rem;
  flex: 1;
  font-weight: 500;
  font-size: 0.16rem;
  color: #333333;
  padding: 0.07rem 0.11rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-align: center;
}

.search-list-item:hover {
  background: #f0f0f0;
}

.search-list-item.active {
  background: #d12f2d;
  color: #ffffff;
}

.products-container {
  width: 84.3%;
  margin: 0 auto;
}

.search-card-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.31rem;
  justify-content: space-between;
}

.card-item {
  width: calc(25% - 0.12rem);
  background: #ffffff;
  border-radius: 0.04rem;
  padding: 0.2rem;
}

.card-item-title {
  font-weight: bold;
  font-size: 0.18rem;
  color: #333333;
  line-height: 0.18rem;
}

.card-item-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 400;
  font-size: 0.16rem;
  color: #666666;
  margin-top: 0.18rem;
}

/* 滑块样式 */
.slider {
  position: relative;
  width: 100%;
  border-radius: 0.03rem;
  margin-top: 0.18rem;
  cursor: pointer;
  border: 0.01rem solid #f6f6f6;
  background: #fff;
  height: 0.09rem;
}

.slider-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(270deg, #d12f2d 0%, rgba(209, 47, 45, 0.5) 100%);
  border-radius: 0.02rem;
  transition: width 0.1s ease;
}

.slider-thumb {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0.2rem;
  height: 0.2rem;
  background: #d12f2d;
  border-radius: 50%;
  cursor: grab;
  transition: transform 0.1s ease;
  box-shadow: 0 0.02rem 0.04rem rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-thumb::before {
  content: "";
  width: 0.08rem;
  height: 0.08rem;
  background: #ffffff;
  border-radius: 50%;
}

.slider-thumb:hover {
  transform: translateY(-50%) scale(1.1);
}

.slider-thumb:active {
  cursor: grabbing;
  transform: translateY(-50%) scale(1.2);
}

.slider-value {
  text-align: center;
  font-size: 0.09rem;
  color: #d12f2d;
  font-weight: bold;
  margin-top: 0.04rem;
}

/* 顶部标题区域 */
.products-hero {
  color: white;
  position: relative;
}

.products-hero-img {
  width: 100%;
  vertical-align: bottom;
}

.products-hero-content {
  display: flex;
  flex-direction: column;
  gap: 0.53rem;
  align-items: flex-start;
  justify-content: center;
  max-width: 10rem;
  width: 100%;
  position: absolute;
  top: 50%;
  right: 8%;
  transform: translateY(-50%);
  z-index: 2;
  width: 5.2rem;
}

.products-hero-content.left-position {
  left: 8%;
  right: auto;
}

.products-hero-content-title {
  font-weight: bold;
  font-size: 0.4rem;
  color: #ffffff;
}

.products-hero-content-text {
  font-size: 0.18rem;
  line-height: 0.4rem;
  text-align: justify;
  color: #ffffff;
}

/* 产品分类卡片 */
.products-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.category-item {
  background: white;
  border-radius: 0.16rem;
  overflow: hidden;
  box-shadow: 0 0.04rem 0.2rem rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.category-item:hover {
  transform: translateY(-0.1rem);
  box-shadow: 0 0.08rem 0.3rem rgba(210, 0, 41, 0.15);
}

.category-image {
  width: 100%;
  height: 2.8rem;
  overflow: hidden;
  background: #f8f8f8;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-item:hover .category-image img {
  transform: scale(1.1);
}

.category-item h3 {
  font-size: 0.24rem;
  font-weight: bold;
  padding: 0.24rem 0.24rem 0.12rem;
  color: #333;
  font-family: "Source_Han_Sans_SC", sans-serif;
}

.category-item p {
  font-size: 0.16rem;
  color: #666;
  padding: 0 0.24rem 0.24rem;
  line-height: 1.6;
  font-family: "Source_Han_Sans_SC", sans-serif;
}

/* 产品列表 */
.products-list {
  margin-top: 0.29rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /* justify-content: space-between; */
  padding-bottom: 0.6rem;
  gap: 0.24rem;
}

.product-item {
  width: calc(25% - 0.18rem);
  background: #f6f6f6;
  border-radius: 0.12rem;
  padding: 0.3rem 0.3rem 0.4rem 0.3rem;
  margin-bottom: 0.15rem;
  cursor: pointer;
}

.product-item:hover {
  background-color: #fff;
  box-shadow: 0 0.15rem 0.4rem 0 rgba(0, 0, 0, 0.1);
}

.product-item:hover .product-item-name-id {
  color: #d12f2d;
}

.product-item:hover .product-item-button {
  color: #fff;
  background-color: #d12f2d;
}

.product-item:hover .product-item-icon {
  opacity: 1;
}

.product-item-name-id {
  font-weight: bold;
  font-size: 0.22rem;
  color: #333333;
  line-height: 0.22rem;
}

.product-item-title {
  font-weight: 500;
  font-size: 0.16rem;
  color: #333333;
  line-height: 0.24rem;
  margin-top: 0.15rem;
  /* 超过2行显示省略号 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: wrap;
  min-height: 0.48rem;
}

.product-item-image-box {
  width: 100%;
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  position: relative;
  padding: 0.25rem 0;
}

.product-item-icon {
  position: absolute;
  width: 0.2rem;
  height: 0.2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-item-tl {
  left: 0;
  top: 0;
}
.product-item-tr {
  right: 0;
  top: 0;
}
.product-item-bl {
  left: 0;
  bottom: 0;
}
.product-item-br {
  right: 0;
  bottom: 0;
}

.product-item-image {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.product-item-info {
  display: flex;
  gap: 0.09rem;
  margin-top: 0.2rem;
}

.product-item-name {
  font-weight: 500;
  font-size: 0.14rem;
  color: #333333;
  min-width: 0.6rem;
  margin-right: 0.09rem;
}

.product-item-value {
  font-weight: 400;
  font-size: 0.14rem;
  color: #666666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: justify;
}

.product-item-value-purpose {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: wrap;
  min-height: 0.6rem;
}

.product-item-button {
  width: 1.18rem;
  height: 0.34rem;
  background: #ffffff;
  outline: none;
  border: none;
  font-weight: 500;
  font-size: 0.14rem;
  color: #333333;
  text-align: center;
  cursor: pointer;
  margin-top: 0.2rem;
  line-height: 0.34rem;
  transition: all 0.3s ease;
}

/* 添加产品卡片渐入动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(0.3rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-item {
  animation: fadeInUp 0.5s ease backwards;
}

.product-item:nth-child(1) {
  animation-delay: 0.05s;
}

.product-item:nth-child(2) {
  animation-delay: 0.1s;
}

.product-item:nth-child(3) {
  animation-delay: 0.15s;
}

.product-item:nth-child(4) {
  animation-delay: 0.2s;
}

.product-item:nth-child(5) {
  animation-delay: 0.25s;
}

.product-item:nth-child(6) {
  animation-delay: 0.3s;
}

.product-item:nth-child(7) {
  animation-delay: 0.35s;
}

.product-item:nth-child(8) {
  animation-delay: 0.4s;
}

/* 产品图片增强动画 */
.product-item-image {
  transition: transform 0.4s ease;
}

.product-item:hover .product-item-image {
  transform: scale(1.08);
}

/* 搜索卡片动画 */
.card-item {
  transition: all 0.3s ease;
}

.card-item:hover {
  transform: translateY(-0.03rem);
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.1);
}
.search-form {
  display: flex;
  justify-content: flex-start;
  align-items: start;
}
.search-form-input {
  flex: 1
}
/* 搜索按钮增强 */
.search-form-button {
  transition: all 0.3s ease;
}

.search-form-button:hover {
  transform: scale(1.05);
}

.search-form-button:active {
  transform: scale(0.98);
}

/* 分页器样式 */
.products-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  padding: 0.2rem 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  font-family: "Source Han Sans SC", sans-serif;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.36rem;
  height: 0.36rem;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 0.04rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.pagination-btn:hover:not(.disabled) {
  border-color: #d12f2d;
  background: #fef5f5;
}

.pagination-btn.disabled {
  cursor: not-allowed;
  opacity: 0.5;
  background: #f5f5f5;
}

.pagination-page {
  min-width: 0.36rem;
  height: 0.36rem;
  padding: 0 0.12rem;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 0.04rem;
  font-size: 0.16rem;
  color: #333333;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Source Han Sans SC", sans-serif;
}

.pagination-page:hover {
  border-color: #d12f2d;
  color: #d12f2d;
  background: #fef5f5;
}

.pagination-page.active {
  background: #d12f2d;
  border-color: #d12f2d;
  color: #ffffff;
  font-weight: 500;
}

.pagination-page.active:hover {
  background: #b82826;
  border-color: #b82826;
  color: #ffffff;
}

.pagination-ellipsis {
  padding: 0 0.08rem;
  color: #999999;
  font-size: 0.16rem;
  user-select: none;
}
