/* Product list — matches landing-page / index visual language */

.page-product-list {
  padding-top: clamp(76px, 10vw, 96px);
}

.page-product-list .pl-main {
  padding-bottom: 48px;
}

/* ---------- Inner hero ---------- */
.pl-hero {
  position: relative;
  margin: 0;
  background-color: #01032c;
  color: #fff;
  overflow: hidden;
}

/* AJAX 整块替换：背景层 + 文案在同一容器内，便于 fetch 后 innerHTML 同步 */
#pl-hero-sync {
  position: relative;
  overflow: hidden;
  /* Image drives height; text overlays */
}

.pl-hero__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.pl-hero__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 110% 85% at 50% 30%, rgba(0, 12, 32, 0) 0%, rgba(0, 10, 28, 0.35) 100%),
    linear-gradient(180deg, rgba(2, 12, 34, 0.38) 0%, rgba(2, 14, 38, 0.58) 52%, rgba(1, 8, 28, 0.78) 100%);
  pointer-events: none;
}

.pl-hero__inner {
  position: relative;
  z-index: 1;
  position: absolute;
  inset: 0;
  padding: clamp(28px, 5vw, 48px) 0 clamp(32px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pl-hero__crumb {
  margin: 0 0 12px;
  font-size: var(--lp-fs-sm);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.pl-hero__crumb a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pl-hero__crumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.pl-hero__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pl-hero__lead {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.pl-hero__actions {
  margin-top: 20px;
}

/* ---------- Two column layout ---------- */
.pl-layout {
  display: grid;
  gap: var(--lp-gap);
  align-items: start;
}

@media (min-width: 1024px) {
  .pl-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: var(--lp-gap);
  }
}

.pl-sidebar {
  position: relative;
}

@media (min-width: 1024px) {
  .pl-sidebar {
    position: sticky;
    top: calc(clamp(76px, 10vw, 96px) + 16px);
  }
}

.pl-side-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  padding: 20px 18px;
  overflow: hidden;
}

.pl-side-card__title {
  /* Full-bleed header button inside card padding */
  margin: -20px -18px 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1f2937;
  text-transform: uppercase;
  padding: 0;
}

.pl-side-card__title .pl-all-products {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  background: rgb(231, 231, 231);
  border-radius: 12px 12px 0 0;
  padding: 12px 0px;
}

.pl-side-card__title .pl-all-products:hover {
  text-decoration: none;
}

.pl-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 10px;
  font-size: var(--lp-fs-md);
  font-weight: 500;
  color: #000000;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pl-cat span {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pl-cat:last-child {
  margin-bottom: 0;
}

.pl-cat:hover {
  color: #1e3a8a;
}

/* Current category — must read clearly against default pill */
.page-product-list .pl-side-card .pl-cat.is-active {
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%);
  color: #fff;
  font-weight: 700;
  border-color: #1e40af;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.page-product-list .pl-side-card .pl-cat.is-active .pl-cat__icon {
  opacity: 1;
  color: rgba(255, 255, 255, 0.92);
}

.page-product-list .pl-side-card .pl-cat.is-active:hover {
  background: linear-gradient(90deg, #1e40af 0%, #1d4ed8 100%);
  color: #fff;
}

.pl-cat__icon {
  flex-shrink: 0;
  font-size: var(--lp-fs-sm);
  opacity: 0.55;
  color: inherit;
}

/* ---------- List toolbar ---------- */
.pl-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--lp-gap);
  margin-bottom: 24px;
}

.pl-toolbar__title {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
  color: #1f2937;
  text-transform: uppercase;
}

.pl-toolbar__meta {
  margin: 0;
  font-size: var(--lp-fs-sm);
  color: #6b7280;
}

/* ---------- Mobile category select (replaces left sidebar) ---------- */
.pl-cat-select {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  padding: 12px 12px;
  position: relative;
  z-index: 300;
}

.pl-cat-select__label {
  font-size: var(--lp-fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #111827;
  white-space: nowrap;
}

.pl-dd {
  position: relative;
  flex: 1;
  min-width: 0;
}

.pl-dd__btn {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #111827;
  font-size: var(--lp-fs-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.06s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pl-dd__btn:active {
  transform: translateY(1px);
}

.pl-dd__btn:hover {
  border-color: rgba(148, 163, 184, 0.95);
}

.pl-dd__btn:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pl-dd__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-dd__chev {
  width: 10px;
  height: 10px;
  flex: none;
  transform: rotate(45deg);
  border-right: 2px solid rgba(17, 24, 39, 0.7);
  border-bottom: 2px solid rgba(17, 24, 39, 0.7);
  transition: transform 0.18s ease;
}

.pl-dd.is-open .pl-dd__chev {
  transform: rotate(225deg);
}

.pl-dd__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 999;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  max-height: min(320px, 52vh);
  overflow: auto;
  display: none;
}

.pl-dd.is-open .pl-dd__panel {
  display: block;
}

.pl-dd__opt {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 10px;
  border-radius: 10px;
  color: #0f172a;
  font-size: var(--lp-fs-md);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pl-dd__opt:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.pl-dd__opt.is-active,
.pl-dd__opt[aria-selected="true"] {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.12) 0%, rgba(37, 99, 235, 0.08) 100%);
  color: #1d4ed8;
  font-weight: 700;
}

.pl-dd__panel::-webkit-scrollbar {
  width: 10px;
}

.pl-dd__panel::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.65);
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.9);
}

.pl-dd__panel::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1023px) {
  .pl-sidebar {
    display: none;
  }

  .pl-cat-select {
    display: flex;
  }
}

/* ---------- Product grid (reuses landing-feature-card) ---------- */
.page-product-list .pl-grid {
  margin-bottom: 36px;
}

@media (min-width: 768px) {
  .page-product-list .pl-grid.landing-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .page-product-list .pl-grid.landing-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Pagination ---------- */
.pl-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--lp-gap);
  padding: 18px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
}

.pl-pagination__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: var(--lp-fs-md);
  font-weight: 500;
  color: #1f2937;
  text-decoration: none;
  background: #f3f4f6;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.pl-pagination__step:hover {
  background: #e5e7eb;
  color: #111827;
}

.pl-pagination__nums {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pl-pagination__nums .page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: var(--lp-fs-md);
  color: #374151;
  text-decoration: none;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pl-pagination__nums .page-num:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.pl-pagination__nums .page-num-current {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 600;
  pointer-events: none;
}

/* ---------- AJAX loading (仅右侧内容区) ---------- */
#pl-ajax-root.is-pl-fetching {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ------------------------------------------------------------
   1920+ scaling (match homepage linear scale)
------------------------------------------------------------ */
@media (min-width: 1921px) {
  .pl-hero__title {
    font-size: calc(1.6vw + 12px);
    line-height: 1.18;
  }

  .pl-hero__lead {
    font-size: calc(0.55vw + 9px);
    line-height: 1.8;
  }

  .pl-layout {
    gap: var(--lp-gap);
  }

  .pl-toolbar__title {
    font-size: calc(0.6vw + 14px);
  }

  .pl-side-card,
  .pl-pane-card {
    padding: calc(0.4vw + 12px) calc(0.4vw + 10px);
  }

  .pl-card__name,
  .pl-card__title {
    font-size: calc(0.6vw + 14px);
  }

  .pl-card__meta,
  .pl-card__desc,
  .pl-pagination__nums .page-num {
    font-size: calc(0.55vw + 9px);
  }

  .pl-pagination__nums .page-num {
    min-width: calc(0.4vw + 30px); /* 2000→38, 3000→42 */
    height: calc(0.4vw + 30px);
    padding: 0 calc(0.4vw + 8px);
  }
}
