@charset "utf-8";

/* ==========================================================================
   产品中心列表页与详情页
   ========================================================================== */

.pl-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.pl {
  padding-top: 84px;
}

/* ---------- 列表页 Banner 与固定标题 ---------- */
.pl-banner {
  position: relative;
  overflow: hidden;
  background: #eef3ef;
}

.pl-banner__image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.pl-banner__inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.pl-banner__title {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.pl-crumb {
  padding: 22px 2px 0;
  color: #8a929a;
  font-size: 13px;
}

.pl-crumb a {
  color: inherit;
  transition: color 0.25s ease;
}

.pl-crumb a:hover {
  color: #2e9c27;
}

/* ---------- 侧栏 + 产品列表 ---------- */
.pl-dynamic {
  transition: opacity 0.25s ease;
}

.pl-dynamic.is-switching {
  opacity: 0.45;
}

.pl-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin: 26px 0 70px;
}

.pl-aside {
  position: sticky;
  top: 104px;
  width: 248px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #e3e8ec;
  background: #fff;
}

.pl-aside__title {
  margin: 0;
  padding: 15px 20px;
  background: #2e9c27;
  color: #fff;
  font-size: 17px;
  letter-spacing: 0.08em;
}

.pl-aside__nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.pl-aside__link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  padding: 13px 16px;
  color: #4a5259;
  font-size: 14.5px;
  transition: color 0.25s ease, background-color 0.25s ease;
}

/* 左侧选中指示条：向内缩进并垂直居中，避免与标题左缘连成一片 */
.pl-aside__link::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 3px;
  height: 18px;
  transform: translateY(-50%);
  background: transparent;
  transition: background-color 0.25s ease;
}

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

.pl-aside__arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
  transition: transform 0.25s ease;
}

.pl-aside__link:hover,
.pl-aside__link:focus-visible {
  background: #2e9c27;
  color: #fff;
}

.pl-aside__link:hover::before,
.pl-aside__link:focus-visible::before {
  background: #237d1e;
}

.pl-aside__link:hover .pl-aside__arrow,
.pl-aside__link:focus-visible .pl-aside__arrow {
  transform: translateX(3px);
}

.pl-aside__link.is-active {
  background: #f3faf2;
  color: #2e9c27;
  font-weight: 600;
}

.pl-aside__link.is-active::before {
  background: #2e9c27;
}

.pl-main {
  flex: 1;
  min-width: 0;
}

.pl-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 18px;
}

.pl-card {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e3e8ec;
  background: #fff;
  color: inherit;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease, border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.pl-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 3px;
  background: #2e9c27;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s ease;
}

.pl-card:hover,
.pl-card:focus-visible {
  border-color: rgba(46, 156, 39, 0.55);
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(23, 61, 23, 0.14);
}

.pl-card:hover::before,
.pl-card:focus-visible::before {
  transform: scaleX(1);
}

.pl-media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  overflow: hidden;
  background: #f5f7f8;
}

.pl-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease-out;
}

.pl-card:hover .pl-media img,
.pl-card:focus-visible .pl-media img {
  transform: scale(1.06);
}

.pl-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 6px;
  padding: 16px 16px 18px;
  text-align: center;
}

.pl-name {
  color: #22282d;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  transition: color 0.25s ease;
}

.pl-card:hover .pl-name,
.pl-card:focus-visible .pl-name {
  color: #2e9c27;
}

.pl-empty {
  padding: 70px 0;
  border: 1px dashed #d9dfe4;
  color: #8a929a;
  font-size: 15px;
  text-align: center;
}

.pl-page {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pl-page .js-page-meta {
  display: none;
}

.pl-page a,
.pl-page span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #dde3e7;
  background: #fff;
  color: #55606a;
  font-size: 14px;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.pl-page a:hover,
.pl-page a:focus-visible {
  border-color: #2e9c27;
  color: #2e9c27;
}

.pl-page a.active,
.pl-page span.active,
.pl-page span.page-active {
  border-color: #2e9c27;
  background: #2e9c27;
  color: #fff;
}

.pl-page .page-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- 详情页图集 ---------- */
.pd {
  padding-top: 84px;
  padding-bottom: 80px;
}

.pd-banner {
  position: relative;
  overflow: hidden;
  background: #eef3ef;
}

.pd-banner__image {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.pd-banner__inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.pd-banner__title {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.pd-crumb {
  padding: 22px 2px 0;
  color: #8a929a;
  font-size: 13px;
}

.pd-crumb a {
  color: inherit;
  transition: color 0.25s ease;
}

.pd-crumb a:hover {
  color: #2e9c27;
}

.pd-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.pd-gallery {
  max-width: 520px;
  margin: 0 auto;
}

.pd-gallery__main {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #e3e8ec;
  background: #fff;
}

.pd-gallery__main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pd-product-nav {
  display: flex;
  align-items: stretch;
  gap: 12px;
  max-width: 880px;
  margin: 26px auto 0;
}

.pd-product-nav__link {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 46%;
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #e3e8ec;
  background: #fff;
  color: #4a5259;
  line-height: 1.25;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.pd-product-nav__link svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.pd-product-nav__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.pd-product-nav__label {
  color: #8a929a;
  font-size: 10px;
  transition: color 0.25s ease;
}

.pd-product-nav__title {
  overflow: hidden;
  color: #22282d;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.pd-product-nav__link.is-next {
  justify-content: flex-end;
  text-align: right;
  margin-left: auto;
}

.pd-product-nav__link:hover,
.pd-product-nav__link:focus-visible {
  border-color: #2e9c27;
  background: #f3faf2;
}

.pd-product-nav__link:hover .pd-product-nav__label,
.pd-product-nav__link:focus-visible .pd-product-nav__label {
  color: #2e9c27;
}

.pd-product-nav__link:hover .pd-product-nav__title,
.pd-product-nav__link:focus-visible .pd-product-nav__title {
  color: #2e9c27;
}

.pd-product-nav__link:active {
  box-shadow: 0 8px 20px rgba(46, 156, 39, 0.12);
}

.pd-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 0;
}

.pd-thumbs[hidden] {
  display: none;
}

.pd-thumbs li {
  width: 74px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #e0e5e9;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}

.pd-thumbs li:hover,
.pd-thumbs li.is-active {
  opacity: 1;
  border-color: #2e9c27;
}

.pd-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-detail {
  max-width: 880px;
  margin: 44px auto 0;
  padding-top: 32px;
  border-top: 1px solid #e8ecef;
}

.pd-detail__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: #22282d;
  font-size: 20px;
}

.pd-detail__title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: #2e9c27;
}

.pd-content {
  color: #4a5259;
  font-size: 15px;
  line-height: 2;
  overflow-wrap: break-word;
}

.pd-content p {
  margin: 0 0 14px;
}

.pd-content img {
  max-width: 100%;
  height: auto;
}

/* ---------- 入场动画 ---------- */
html.js .pl [data-reveal],
html.js .pd [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

html.js .pl [data-reveal].is-visible,
html.js .pd [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pl-list .pl-item:nth-child(2) {
  transition-delay: 60ms;
}

.pl-list .pl-item:nth-child(3) {
  transition-delay: 120ms;
}

.pl-list .pl-item:nth-child(4) {
  transition-delay: 180ms;
}

.pl-list .pl-item:nth-child(n + 5) {
  transition-delay: 240ms;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .pd {
    padding-top: 64px;
  }

  .pd-banner__image {
    height: 180px;
  }

  .pl-banner__image {
    height: 180px;
  }

  .pl-aside {
    width: 200px;
  }

  .pl-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }
}

@media (max-width: 900px) {
  .pl-layout {
    flex-direction: column;
  }

  .pl-aside {
    position: static;
    width: 100%;
  }

  .pl-aside__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pl-aside__link {
    min-height: 46px;
    padding: 12px 14px;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767.98px) {
  .pl {
    padding-top: 65px;
  }

  .pl-banner__image {
    height: 140px;
  }

  .pl-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .pl-body {
    padding: 14px 12px 16px;
  }

  .pl-name {
    font-size: 16px;
  }

  .pd {
    padding-top: 64px;
    padding-bottom: 56px;
  }

  .pd-banner__image {
    height: 140px;
  }

  .pd-crumb {
    padding-top: 18px;
  }

  .pd-product-nav {
    flex-direction: column;
    max-width: 100%;
    margin-top: 22px;
  }

  .pd-product-nav__link {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .pd-product-nav__link.is-next {
    justify-content: flex-start;
    text-align: left;
    margin-left: 0;
  }
}
