/* ============================================
   PRODUCTS PAGE – products.css
   ============================================ */

/* 容器 */
.pl-page {
  background: var(--white);
}

.pl-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px 80px;
}

/* 面包屑 */
.pl-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0 16px;
  font-size: 14px;
  font-weight: 500;
  color: #A8A29E;
}

.pl-breadcrumb a {
  color: #A8A29E;
  text-decoration: none;
}

.pl-breadcrumb a:hover {
  color: var(--black);
}

.pl-bc-sep {
  color: #A8A29E;
}

.pl-bc-current {
  color: var(--black);
}

/* 标题行 */
.pl-title-row {
  background: var(--gray-1);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pl-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 44px;
  color: var(--black);
  margin: 0;
}

.pl-title-desc {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: #44474C;
}

.pl-title-desc-wrap {
  display: block;
}

.pl-title-expand {
  display: none;
}

.input-wrap {
  position: relative;
  margin-top: 24px;
  width: 600px;
  max-width: 100%;
  overflow: hidden;
}

.pl-title-input {
  height: 64px;
  line-height: 64px;
  background-color: #fff;
  border: none;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 600;
  padding-left: 32px;
  padding-right: 160px;
  outline: none;
  color: var(--black);
  width: 100%;
  display: block;
}

.input-btn {
  display: flex;
  align-items: center;
  position: absolute;
  top: 0;
  /* background-color: red; */
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2
}

.input-btn .line {
  height: 40px;
  background-color: rgba(0, 0, 0, 0.2);
  width: 2px;
  margin: 0 24px;
}

.input-btn .close {
  width: 32px;
  cursor: pointer;
}

.input-btn .search {
  width: 24px;
  cursor: pointer;
}

.pl-image-title-desc {
  font-size: 18px;
  color: #44474C;
  width: 80%;
}

.pl-title-image-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pl-image-image {
  width: 9.8%;
  cursor: pointer;
}

.pl-image-desc-wrap {
  display: block;
}

.pl-image-desc-expand {
  display: none;
}

/* 图片预览遮罩 */
.pl-image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.light-box-wrap {
  position: absolute;
  display: flex;
  align-items: center;
  flex-direction: column;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.pl-image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.pl-image-lightbox-img {
  max-width: 90%;
  /* max-height: 90vh; */
  object-fit: contain;
  border-radius: 4px;
  width: 30vw;

}

.pl-image-lightbox-close {
  margin-top: 30px;
  width: 44px;
}

/* ============================================
   PC 筛选栏
   ============================================ */
.pl-filter-bar--pc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
}

.pl-filter-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.pl-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--black);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
}

.pl-filter-btn:hover {
  border-color: var(--black);
}

.pl-filter-btn.is-active {
  border-color: var(--black);
}

.pl-filter-btn.is-active svg path {
  stroke: var(--black);
}

.pl-filter-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.pl-filter-btn.is-open svg {
  transform: rotate(180deg);
}

.pl-filter-btn.is-open {
  border-color: var(--black);
  border-radius: 4px 4px 0 0;
}

/* 排序按钮 – 黑色 */
.pl-sort-btn {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
  flex: none;
  min-width: auto;
}

.pl-sort-btn:hover {
  opacity: 0.9;
  border-color: var(--black);
}

.pl-sort-btn svg path {
  stroke: #fff;
}

/* PC 下拉面板 */
.pl-dropdown {
  display: none;
  position: fixed;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 300;
  padding: 8px 0;
  border: 1px solid var(--black);
}

.pl-dropdown.is-open {
  display: block;
  border-radius: 0 0 4px 4px;
  border-top: none;
}

.pl-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pl-dropdown-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s;
}

.pl-dropdown-list li:hover {
  background: var(--gray-1);
}

.pl-dropdown-list li::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  flex-shrink: 0;
  background: var(--white);
  transition: background 0.15s, border-color 0.15s;
}

.pl-dropdown-list li.is-selected {
  color: var(--brand);
  font-weight: 500;
}

.pl-dropdown-list li.is-disabled {
  color: rgba(0, 0, 0, 0.3);
  cursor: not-allowed !important;
}

.pl-dropdown-list li.is-disabled::before {
  border-color: rgba(0, 0, 0, 0.3);
  /* background: #f5f5f5; */
}

.pl-dropdown-list li.is-selected::before {
  background: var(--brand);
  border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='10' viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

/* 排序下拉 – 单选无 checkbox */
.pl-dropdown[data-mode="single"] {
  background: var(--black);
  border-color: var(--black);
}

.pl-dropdown[data-mode="single"] .pl-dropdown-list li {
  color: var(--white);
}

.pl-dropdown[data-mode="single"] .pl-dropdown-list li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.pl-dropdown[data-mode="single"] .pl-dropdown-list li::before {
  display: none;
}

.pl-dropdown[data-mode="single"] .pl-dropdown-list li.is-selected {
  color: var(--brand);
  font-weight: 600;
}

/* 移动端工具栏：PC 隐藏 */
.pl-filter-bar--mobile {
  display: none;
}

/* ============================================
   已选筛选标签
   ============================================ */
.pl-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0 0 16px;
}

.pl-active-filters:empty {
  display: none;
}

.pl-active-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-1);
  border-radius: 4px;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--black);
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.pl-active-tag:hover {
  background: #e8e8e8;
}

.pl-active-tag svg {
  flex-shrink: 0;
}

/* ============================================
   产品网格
   ============================================ */
.pl-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.pl-grid .product-card {
  flex: none;
  width: auto;
  display: flex;
  flex-direction: column;
  /* gap: 20px; */
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.3s;
}

.pl-grid .product-card:hover {
  box-shadow: 0 4px 16px rgba(246, 0, 78, 0.2);
}

.pl-grid .product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #E5E7EB;
}

.pl-grid .product-img-wrap .product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.pl-grid .product-card:hover .product-img {
  transform: scale(1.2);
}

.pl-grid .product-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 12px 12px;
}

.pl-grid .product-name {
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: rgba(168, 162, 158, 1);
  margin-bottom: -4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-grid .product-des {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(26, 28, 28, 1);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 63px;
}

.pl-grid .product-price {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.pl-grid .price-current {
  font-size: 20px;
  font-weight: 600;
  line-height: 32px;
  display: flex;
}

.pl-grid .price-current .price-sup {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-top: 4px;
}

.pl-grid .price-original {
  font-size: 16px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.5);
  text-decoration: line-through;
  line-height: 32px;
}

.pl-grid .product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 3px;
  line-height: 1;
  color: #fff;
}

.pl-grid .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 15%;
  cursor: pointer;
  z-index: 2;
  background: none;
  border: none;
  padding: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.pl-grid .fav-btn img {
  width: 100%;
  height: auto;
  display: block;
}

.pl-grid .product-card:hover .fav-btn {
  opacity: 1;
}

/* ============================================
   分页
   ============================================ */
.pl-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 0 0;
}

.pl-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  /* border: 1px solid rgba(0,0,0,0.15); */
  background: var(--white);
  font-size: 14px;
  color: rgba(0, 0, 0, 0.46);
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, border-color 0.15s;
}

.pl-page-btn.not-allow-click {
  background-color: #A2A2A2 !important;
  color: #fff !important;
}

.pl-page-btn:hover {
  border-color: var(--black);
}

.pl-page-num--active {
  color: var(--black);
  position: relative;
}

.pl-page-num:hover {
  color: var(--black);
}

.pl-page-num--active::after {
  position: absolute;
  content: '';
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  height: 1px;
  width: 5px;
  background-color: var(--black);
}

.pl-page-prev,
.pl-page-next {
  border-color: rgba(0, 0, 0, 0.15);
  width: 42px;
  height: 42px;
  background-color: var(--black);
  color: #fff;
}

.pl-page-ellipsis {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.4);
  padding: 0 4px;
  line-height: 36px;
}

/* ============================================
   移动端排序面板
   ============================================ */
.pl-sort-panel {
  display: none;
  position: fixed;
  z-index: 450;
  background: var(--black);
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pl-sort-panel.is-open {
  display: block;
}

.pl-sort-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.pl-sort-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.15s;
}

.pl-sort-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pl-sort-item--active {
  color: #fff;
  font-weight: 600;
}

.pl-sort-check {
  flex-shrink: 0;
}

.pl-sort-item:not(.pl-sort-item--active) .pl-sort-check {
  display: none;
}

/* ============================================
   移动端筛选面板（从底部滑入）
   ============================================ */
.pl-filter-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70vh;
  background: var(--white);
  z-index: 500;
  /* border-radius: 0 0 12px 12px; */
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 0.35s ease, visibility 0.35s;
}

.pl-filter-panel.is-open {
  transform: translateY(0);
  visibility: visible;
}

.pl-filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 16px 0;
  padding: 16px;
  height: 48px;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  flex-shrink: 0;
}

.pl-filter-panel-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.8);
  margin: 0;
}

.pl-filter-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--black);
  display: flex;
  align-items: center;
}

.pl-filter-panel-body {
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
  margin-top: 20px;
}

.pl-filter-group {
  border-bottom: none;
}

.pl-filter-group-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  padding: 20px 24px;
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.pl-filter-arrow {
  flex-shrink: 0;
  transition: transform 0.3s;
  color: rgba(0, 0, 0, 0.4);
}

.pl-filter-group.is-expanded .pl-filter-arrow {
  transform: rotate(90deg);
}

.pl-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 24px 16px;
  max-height: 46px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.pl-filter-group.is-expanded .pl-filter-options {
  max-height: 500px;
}

.pl-filter-opt {
  background: var(--gray-1);
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--black);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pl-filter-opt:hover {
  background: #e8e8e8;
}

.pl-filter-opt.is-selected {
  background: var(--brand);
  color: var(--white);
}

.pl-filter-opt.is-disabled {
  color: rgba(0, 0, 0, 0.25);
  cursor: not-allowed !important;
  background: #f0f0f0;
}

.pl-filter-panel-footer {
  display: flex;
  justify-content: center;
  padding: 16px 24px 24px;
  flex-shrink: 0;
}

.pl-filter-reset {
  display: none;
}

.pl-filter-apply {
  width: 100%;
  max-width: 392px;
  height: 48px;
  background: var(--brand);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

/* 遮罩 */
.pl-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 499;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.pl-filter-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   移动端响应式 (≤768px)
   ============================================ */
@media (max-width: 768px) {
  .pl-container {
    padding: 0 0 60px;
    display: flex;
    flex-direction: column;
  }

  .pl-active-filters {
    order: 3;
  }

  .pl-filter-bar--mobile {
    order: 2;
  }

  .pl-grid {
    order: 4;
  }

  .pl-pagination {
    order: 5;
  }

  /* 面包屑 */
  .pl-breadcrumb {
    padding: 12px 16px 10px;
    font-size: 12px;
  }

  /* 标题行 */
  .pl-title-row {
    padding: 20px 24px;
    margin-bottom: 16px;
    border-radius: 8px;
    gap: 12px;
  }

  .pl-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: rgba(0, 0, 0, 0.8);
  }

  .pl-title-desc {
    font-size: 14px;
    color: #44474C;
    ;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .pl-title-desc-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    align-items: flex-end;
  }

  .pl-title-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.4);
    padding: 0;
    margin-top: 2px;
    transition: transform 0.3s;
  }

  .pl-title-desc-wrap.is-expanded .pl-title-desc {
    -webkit-line-clamp: unset;
    display: block;
  }

  .pl-title-desc-wrap.is-expanded .pl-title-expand {
    transform: rotate(90deg);
  }

  .pl-title-image-wrap {
    flex-direction: column-reverse;
  }

  .pl-image-image {
    width: 29%;
    margin-left: 30px;
    margin-bottom: 27px;
    margin-top: 10px;
  }

  .pl-image-lightbox-img {
    width: 77vw;
    max-width: none;
  }

  .pl-image-title-desc {
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
  }

  .pl-image-desc-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
  }

  .pl-image-desc-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.4);
    padding: 0;
    margin-top: 2px;
    transition: transform 0.3s;
  }

  .pl-image-desc-wrap.is-expanded .pl-image-title-desc {
    -webkit-line-clamp: unset;
    display: block;
  }

  .pl-image-desc-wrap.is-expanded .pl-image-desc-expand {
    transform: rotate(90deg);
  }

  .input-wrap {
    width: 100%;
    margin-top: 0;
  }

  .pl-title-input {
    height: 56px;
    line-height: 56px;
    font-size: 14px;
    border-radius: 24px;
    padding-left: 24px;
    padding-right: 120px;
  }

  .input-btn {
    right: 24px;
  }

  .input-btn .line {
    height: 24px;
    margin: 0 20px;
  }

  .input-btn .close {
    width: 24px;
  }

  .input-btn .search {
    width: 24px;
    cursor: pointer;
  }

  /* 隐藏 PC 筛选栏，显示移动端工具栏 */
  .pl-filter-bar--pc {
    display: none;
  }

  .pl-filter-bar--mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 0;
    margin-bottom: 16px;
    background: none;
    border: none;
    border-radius: 0;
  }

  .pl-mobile-filter-btn {
    display: flex;
    align-items: center;
    gap: 40px;
    width: calc(50% - 8px);
    height: 48px;
    padding: 0 16px;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    color: var(--black);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
  }

  .pl-mobile-sort-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(50% - 8px);
    height: 48px;
    padding: 0 16px;
    background: var(--black);
    border: none;
    border-radius: 4px;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
  }

  .pl-mobile-sort-btn svg path {
    stroke: #fff;
  }

  .pl-mobile-divider {
    display: none;
  }

  /* 已选标签 */
  .pl-active-filters {
    padding: 0 16px;
  }

  /* 产品网格：2列 */
  .pl-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px 16px 0;
    margin-bottom: 32px;
  }

  .pl-grid .product-card {
    gap: 12px;
  }

  .pl-grid .product-info {
    padding: 0 8px 8px;
    gap: 8px;
  }

  .pl-grid .product-name {
    font-size: 10px;
    margin-top: 4px;
    margin-bottom: 0;
  }

  .pl-grid .product-des {
    font-size: 12px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 45px;
  }

  .pl-grid .price-current {
    font-size: 16px;
    line-height: 24px;
  }

  .pl-grid .price-original {
    font-size: 14px;
    line-height: 24px;
  }

  .pl-grid .product-badge {
    font-size: 10px;
    height: 20px;
    line-height: 20px;
    padding: 0 6px;
  }

  .pl-grid .fav-btn {
    opacity: 1;
  }

  /* 分页 */
  .pl-pagination {
    display: none;
  }

  .pl-page-btn {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
}