/* Juhao list & detail page styles */
.page-hero {
  min-height: 220px;
  background: linear-gradient(90deg, #d5ede2 0%, #cbeadb 100%);
  display: flex;
  align-items: center;
}
.page-hero h1 {
  margin: 0 0 10px;
  color: #0e5038;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
}
.page-hero .breadcrumb-nav {
  margin: 0;
  color: #40594d;
  font-size: 14px;
}
.page-hero .breadcrumb-nav a { color: #2a7656; }
.page-hero .breadcrumb-nav a:hover { text-decoration: underline; }

.page-banner {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
}

.img-zoom-frame {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.img-zoom-frame .page-banner,
.img-zoom-frame > img {
  width: 100%;
  margin: 0;
}

.page-tabs {
  background: #e8f5ed;
  padding: 14px 0;
}
.page-tabs .tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.page-tabs .tab-item {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: #fff;
  color: #2a7656;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #b9d5b8;
  transition: all .2s ease;
}
.page-tabs .tab-item:hover,
.page-tabs .tab-item.active {
  background: var(--green-950);
  color: #fff;
  border-color: var(--green-950);
}

.page-content { padding: clamp(36px, 4vw, 60px) 0; }

.news-grid .news-card,
.product-grid .product-card {
  height: 100%;
  border: 1px solid #a9c7ae;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 20px rgba(30,83,55,.06);
  transition: transform .2s ease;
}
.news-grid .news-card:hover,
.product-grid .product-card:hover { transform: translateY(-4px); }
.news-grid .news-card img,
.product-grid .product-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.news-grid .news-card-body,
.product-grid .product-card-body { padding: 18px 20px 22px; }
.product-grid .product-card {
  display: flex;
  flex-direction: column;
}
.product-grid .product-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.news-grid .news-card-body h3,
.product-grid .product-card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}
.product-grid .product-card-body h3 {
  min-height: calc(1.3em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.news-grid .news-card-body h3 a,
.product-grid .product-card-body h3 a { color: inherit; }
.news-grid .news-card-body h3 a:hover,
.product-grid .product-card-body h3 a:hover { color: var(--green-700); }

.product-grid .product-card-body > p {
  margin: 0;
  color: #40594d;
  font-size: 14px;
  line-height: 1.55;
  min-height: calc(1.55em * 2);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-grid .product-card-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}
.product-grid .product-card-actions .site-btn {
  flex: 1 1 0;
  width: 50%;
  min-width: 0;
}
.product-grid .product-card-actions .site-btn.is-disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.page-meta { color: #6b8578; font-size: 13px; margin-bottom: 8px; }

.detail-wrap {
  background: #fff;
  border: 1px solid #d1eadf;
  border-radius: 14px;
  padding: clamp(24px, 3vw, 40px);
  box-shadow: 0 8px 24px rgba(30,83,55,.05);
}
.detail-wrap h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.5vw, 36px);
  color: #0e5038;
  line-height: 1.2;
}
.detail-meta {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e9f6ef;
  color: #6b8578;
  font-size: 14px;
}
.detail-body {
  color: #234a3c;
  font-size: 16px;
  line-height: 1.75;
}
.detail-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.detail-nav {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9f6ef;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.detail-nav-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid #d1eadf;
  border-radius: 12px;
  background: #f8fcf9;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.detail-nav-prev {
  align-items: flex-start;
  text-align: left;
}

.detail-nav-next {
  align-items: flex-end;
  text-align: right;
}

.detail-nav-item:hover {
  border-color: var(--green-700);
  background: var(--mint-100);
  box-shadow: 0 8px 20px rgba(30, 83, 55, 0.08);
  transform: translateY(-1px);
  color: var(--green-800);
}

.detail-nav-disabled {
  cursor: not-allowed;
  opacity: 0.65;
  background: #f4f7f4;
}

.detail-nav-disabled:hover {
  border-color: #d1eadf;
  background: #f4f7f4;
  box-shadow: none;
  transform: none;
  color: var(--ink);
}

.detail-nav-label {
  display: block;
  margin-bottom: 6px;
  color: #6b8578;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.detail-nav-title {
  display: block;
  color: var(--green-800);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.detail-nav-disabled .detail-nav-label,
.detail-nav-disabled .detail-nav-title {
  color: #8aa396;
}

.product-gallery .img-zoom-frame {
  margin-bottom: 20px;
}
.product-gallery .img-zoom-frame:last-child {
  margin-bottom: 0;
}
.product-gallery img {
  width: 100%;
  border-radius: 12px;
}
.product-info-block {
  margin-top: 24px;
  padding: 20px;
  background: #eef7ef;
  border-radius: 12px;
}
.product-info-block h4 {
  margin: 0 0 10px;
  color: #0e5038;
  font-size: 18px;
}

.page-pagination {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e9f6ef;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-pagination .pagination,
.page-pagination .pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-pagination .pagination li,
.page-pagination .pager li {
  margin: 0;
  list-style: none;
}

.page-pagination .pagination li a,
.page-pagination .pagination li span,
.page-pagination .pager li a,
.page-pagination .pager li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #b9d5b8;
  border-radius: 999px;
  background: #fff;
  color: #2a7656;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.page-pagination .pagination li a:hover {
  background: var(--mint-100);
  border-color: var(--green-700);
  color: var(--green-950);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 83, 55, 0.08);
}

.page-pagination .pagination li.active span {
  background: var(--green-950);
  border-color: var(--green-950);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 61, 41, 0.18);
}

.page-pagination .pagination li.disabled span,
.page-pagination .pager li.disabled span {
  background: #f4f7f4;
  border-color: #d1eadf;
  color: #8aa396;
  cursor: not-allowed;
  opacity: 0.85;
}

.page-pagination .pagination li:first-child a,
.page-pagination .pagination li:first-child span,
.page-pagination .pagination li:last-child a,
.page-pagination .pagination li:last-child span,
.page-pagination .pager li:first-child a,
.page-pagination .pager li:first-child span,
.page-pagination .pager li:last-child a,
.page-pagination .pager li:last-child span {
  min-width: 44px;
  font-size: 16px;
  font-weight: 700;
}

.page-pagination .layui-laypage {
  margin: 0;
}

.page-pagination .layui-laypage a,
.page-pagination .layui-laypage span {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  margin: 0 4px !important;
  padding: 0 14px !important;
  border: 1px solid #b9d5b8 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #2a7656 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

.page-pagination .layui-laypage .layui-laypage-curr em {
  background: var(--green-950) !important;
  color: #fff !important;
  border-radius: 999px;
}

@media (max-width: 767.98px) {
  .page-hero { min-height: 160px; }
  .detail-wrap { padding: 20px 16px; }
  .detail-nav {
    flex-direction: column;
    gap: 12px;
  }
  .detail-nav-next {
    align-items: flex-start;
    text-align: left;
  }
  .page-pagination .pagination li a,
  .page-pagination .pagination li span,
  .page-pagination .pager li a,
  .page-pagination .pager li span {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }
}
