/* 产品详情页专用样式 */
.product-detail {
  padding: 60px 0;
  background: #fff;
}
.detail-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 60px;
}
.gallery-col {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
}
.detail-gallery {
  flex: 1;
  min-width: 0;
  background: var(--green-pale);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 1/1;
}
.detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  flex-shrink: 0;
  width: 72px;
}
.gallery-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.6;
  background: #f0f0f0;
  position: relative;
  flex-shrink: 0;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb:hover {
  opacity: 0.9;
}
.gallery-thumb.active {
  border-color: var(--green);
  opacity: 1;
  position: relative;
}
.gallery-thumb.active::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--green);
  pointer-events: none;
  z-index: 99;
}
.gallery-thumb-video {
  position: relative;
}
.video-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 18px;
  border-radius: 4px;
  transition: background 0.2s;
  pointer-events: none;
}
.gallery-thumb-video:hover .video-play-icon {
  background: rgba(0,0,0,0.55);
}
.gallery-video {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 2;
}
.gallery-video iframe,
.gallery-video video {
  width: 100%;
  height: 100%;
  border: none;
}
.detail-gallery {
  position: relative;
}
.gallery-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  z-index: 3;
  cursor: pointer;
  transition: background 0.25s;
  border-radius: var(--radius);
}
.gallery-play-overlay:hover {
  background: rgba(0,0,0,0.35);
}
.gallery-play-overlay i {
  font-size: 48px;
  color: #fff;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(74,158,92,0.85);
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.gallery-play-overlay:hover i {
  transform: scale(1.08);
  background: var(--green);
}
  font-family: var(--font-display);
  font-size: 32px;
  margin-bottom: 16px;
  color: var(--text);
}
.detail-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 20px;
}
.detail-meta {
  font-size: 13px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 24px;
}
.detail-meta span {
  display: inline-block;
  margin-right: 16px;
}
.detail-desc {
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 28px;
}
.pd-qr-trigger{position:relative;display:inline-flex;cursor:pointer;font-size:16px;color:var(--text-muted);}
.pd-qr-popup{width: 155px;position:absolute;top:100%;left:50%;transform:translateX(-50%);margin-top:10px;padding:8px;background:#fff;border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,0.12);z-index:99;display:none;white-space:nowrap;}
.pd-qr-img{width:140px;height:140px;display:block;}
.pd-faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.pd-faq-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.pd-faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: background 0.2s;
  gap: 12px;
}
.pd-faq-q:hover { background: var(--green-pale); }
.pd-faq-q .pd-faq-arrow {
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--text-muted);
}
.pd-faq-item.active .pd-faq-q .pd-faq-arrow { transform: rotate(180deg); }
.pd-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}
.pd-faq-item.active .pd-faq-a { max-height: 500px; }
.pd-faq-a-inner { padding: 0 18px 16px; }
.pd-faq-a-inner p{padding-top:12px;}
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}
.qty-btn:hover {
  border-color: var(--green);
  color: var(--green);
}
.qty-input {
  width: 60px;
  text-align: center;
  font-size: 16px;
  border: 1px solid var(--border);
  padding: 8px 0;
  border-radius: 4px;
}
.detail-actions {
  display: flex;
  padding: 0 0 14px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-add-cart {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 14px 32px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-add-cart:hover {
  background: var(--green-dark);
}

/* 产品详情页标签覆写 — 在规格参数与按钮之间，不需要边框分隔 */
.detail-info .article-tags {
  border-top: none;
  margin: 0 0 20px;
  padding-top: 0;
}

/* ========= TAB 样式 ========= */
.detail-tabs {
  margin: 48px 0 40px;
  border-top: 1px solid var(--border);
}
.tab-headers {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.tab-btn {
  background: none;
  border: none;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  font-family: var(--font-body);
}
.tab-btn.active {
  color: var(--green);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--green);
}
.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-pane.active-pane {
  display: block;
}
/* 产品详情内容样式 */
.product-full-desc p {
  margin-bottom: 18px;
  line-height: 1.75;
  color: var(--text-light);
}
.product-full-desc h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 12px 0 12px;
  color: var(--text);
}
.feature-list {
  list-style: disc;
  padding-left: 20px;
  margin: 16px 0;
}
.feature-list li {
  margin-bottom: 8px;
  color: var(--text-light);
}
/* 规格表格 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}
.spec-table tr {
  border-bottom: 1px solid var(--border);
}
.spec-table th, .spec-table td {
  padding: 14px 8px;
  text-align: left;
  font-size: 14px;
}
.spec-table th {
  width: 160px;
  font-weight: 700;
  color: var(--text);
  background: var(--green-pale);
}
.spec-table td {
  color: var(--text-light);
}

.detail-related {
  margin-top: 40px;
}
.detail-related h3 {
  font-size: 24px;
  font-family: var(--font-display);
  margin-bottom: 24px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.related-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}
.related-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.related-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 10px;
}
.related-item p {
  font-size: 13px;
  font-weight: 500;
}
@media (max-width: 768px) {
  .product-detail { padding: 32px 0; }
  .detail-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
  }
    .gallery-col { flex-direction: column; }
  .gallery-thumbs { flex-direction: row; /*justify-content: center;*/ }
  .gallery-thumb { width: 56px; height: 56px; }
  .gallery-thumb.active::after {
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    border-top: none;
    border-bottom: 8px solid var(--green);
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
  }
  .detail-info h1 { font-size: 22px; margin-bottom: 10px; }
  .detail-price { font-size: 20px; margin-bottom: 14px; }
  .detail-desc { font-size: 14px; text-align: left;}
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-tabs { margin: 24px 0;text-align: left;}
  .tab-headers { gap: 12px; flex-wrap: wrap; }
  .tab-btn { font-size: 13px; padding: 8px 0; }
  .spec-table { font-size: 13px; }
  .spec-table th { width: 90px; }
  .spec-table th, .spec-table td { padding: 8px 6px; font-size: 13px; }
  .detail-related h3 { font-size: 18px; }
  .banner-title { font-size: 28px; }
  .page-banner { height: 130px; }
  .product-full-desc p { font-size: 14px; line-height: 1.7; }
  .product-full-desc .markdown-body h1 { font-size: 22px; }
  .product-full-desc .markdown-body h2 { font-size: 19px; }
  .product-full-desc .markdown-body h3 { font-size: 16px; }
  .product-full-desc .markdown-body table { font-size: 13px; }
  .product-full-desc .markdown-body table th,
  .product-full-desc .markdown-body table td { padding: 7px 10px; }
  .product-full-desc .markdown-body pre { font-size: 12.5px; padding: 12px 14px; }
  .product-full-desc .markdown-body blockquote { padding: 10px 14px; }
  .detail-actions { gap: 10px; }
  .btn-add-cart { padding: 12px 24px; font-size: 13px; width: 100%; text-align: center; }
  .feature-list { padding-left: 16px; }
  .feature-list li { font-size: 14px; }
  .detail-gallery img { /*max-height: 320px;*/ object-fit: cover; }
}

@media (max-width: 480px) {
  .product-detail { padding: 20px 0; }
  .detail-info h1 { font-size: 18px; }
  .detail-price { font-size: 18px; }
  .related-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .related-item { padding: 8px; }
  .related-item p { font-size: 12px; }
  .quantity-selector { flex-wrap: wrap; gap: 12px; }
  .detail-actions { flex-direction: column; }
  .detail-actions > * { width: 100%; text-align: center; font-size: 16px;}
  .btn-add-cart { width: 100%; padding: 12px; font-size: 13px; }
  .tab-headers { gap: 6px; }
  .tab-btn { font-size: 12px; padding: 6px 0; }
  .spec-table th { width: 80px; }
  .spec-table th, .spec-table td { padding: 6px 4px; font-size: 12px; }
  .detail-related h3 { font-size: 16px; }
  .banner-title { font-size: 22px; }
  .page-banner { height: 110px; }
  /*.detail-gallery img { max-height: 240px; }*/
  .product-full-desc .markdown-body { font-size: 14px; }
  .product-full-desc .markdown-body h1 { font-size: 19px; }
  .product-full-desc .markdown-body h2 { font-size: 17px; }
  .product-full-desc .markdown-body h3 { font-size: 15px; }
  .product-full-desc .markdown-body p { font-size: 14px; line-height: 1.65; }
  .product-full-desc .markdown-body table { font-size: 12px; }
  .product-full-desc .markdown-body table th,
  .product-full-desc .markdown-body table td { padding: 5px 6px; }
  .product-full-desc .markdown-body blockquote { padding: 8px 12px; }
  .product-full-desc .markdown-body pre { font-size: 11.5px; padding: 10px 12px; }
  .product-full-desc .markdown-body img { margin: 0.8em auto; }
  .product-full-desc .markdown-body ul,
  .product-full-desc .markdown-body ol { padding-left: 18px; }
}

/* =====================
   产品优势
   ===================== */
.product-advantages {
  margin: 50px 0 10px;
}

.product-advantages h1 {
  font-size: 24px;
  margin-bottom: 24px;
  font-family: var(--font-display);
  color: var(--text);
}

.cpys ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cpys ul li {
  margin: 0;
  list-style: none;
}

.cpys ul li a {
  text-decoration: none;
  display: block;
  height: 100%;
}

/* 卡片：图片上 + 文字下 */
.cpysbox {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cpysbox:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* 图片区域：铺满上部分 */
.cpys-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-pale) 0%, #c8e6c9 50%, #a5d6a7 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 图片加载前的占位图标 */
.cpys-img-wrap::before {
  content: '';
  width: 48px;
  height: 48px;
  opacity: 0.3;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  color: var(--green);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cpys-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  position: relative;
  z-index: 1;
}

.cpysbox:hover .cpys-img-wrap img {
  transform: scale(1.08);
}

/* 文字区域 */
.cpys-body {
  text-align: center;
  padding: 20px 18px;
  justify-content: center;
  background: var(--green-pale);
}

.cpystext {
  margin-bottom: 6px;
}

.cpystext h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
  margin: 0 0 2px 0;
}

.cpystext p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.cpys-doc {
  flex: 1;
  display: flex;
  padding: 0 18px 18px;
}

.cpys-doc h4 {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  background: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.7;
  margin: 0;
  text-align: left;
  flex: 1;
}

/* =====================
   产品优势 - 自适应
   ===================== */

/* 平板：2列 */
@media (max-width: 900px) {
  .cpys ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .cpys-body {
    padding: 18px 16px;
    height: 100px;
  }
  .cpys-doc {
    padding: 0 16px 18px;
  }
  .cpystext h3 {
    font-size: 24px;
  }
}

/* 手机：1列，保持图上文字下结构 */
@media (max-width: 540px) {
  .product-advantages {
    margin: 30px 0 0;
  }
  .cpys ul {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cpys-img-wrap {
    aspect-ratio: 16 / 8;
  }
  .cpys-body {
    padding: 16px 14px;
    height: 90px;
  }
  .cpys-doc {
    padding: 0 14px 18px;
  }
  .cpys-doc h4 {
    font-size: 12.5px;
  }
  .cpystext h3 {
    font-size: 22px;
  }
}

/* =====================
   PAGE BANNER
   ===================== */
.page-banner {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.banner-bg {
  position: absolute;
  inset: 0;
}
.banner-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}
.banner-title {
  position: relative;
  z-index: 2;
  color: #fff;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

/* =====================
   PRODUCTS PAGE LAYOUT
   ===================== */
.products-page {
  padding: 52px 0 64px;
  background: #fff;
}
.products-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 30px;
  align-items: start;
}

/* =====================
   INQUIRY BANNER (product detail)
   ===================== */
.inquiry-banner {
  background: var(--green-pale);
  border: 1px solid var(--border);
  padding: 36px 28px;
  margin: 36px 0;
  border-radius: var(--radius);
  text-align: center;
}
.inquiry-banner h3 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text);
  margin-bottom: 10px;
}
.inquiry-banner p {
  font-size: 15px;
  color: var(--text-light);
  max-width: 720px;
  margin: 0 auto 24px;
  line-height: 1.7;
}
.inquiry-banner-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  /*flex-wrap: wrap;*/
}
.inquiry-banner-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}
.inquiry-banner-actions a.wa-btn {
  background: var(--green);
}
.inquiry-banner-actions a.email-btn {
  background: var(--green);
}
.inquiry-banner-actions a.wa-btn:hover {
  background: var(--green-dark);
  transform: scale(1.08);
}
.inquiry-banner-actions a.email-btn:hover {
  background: var(--green-dark);
  transform: scale(1.08);
}

/*
* Bottom Inquiry Section
*/
.pd-inquiry { padding: 0; width: 100%; }
.pd-inquiry .container { max-width: 100%; padding: 0; margin: 0; }
.pd-inquiry-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}
.pd-inquiry-img {
  height: 100%;
  min-height: 420px;
  overflow: hidden;
}
.pd-inquiry-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-inquiry-form {
  padding: 56px 156px 56px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #4a9e5c;
}
.pd-inquiry-form h3 {
  font-family: var(--font-display);
  font-size: 26px;
  color: #fff;
  margin-bottom: 8px;
}
.pd-inquiry-form .pd-form-sub {
  font-size: 15px;
  color: #fff;
  margin-bottom: 28px;
}
.pd-inquiry-form .pd-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pd-inquiry-form .pd-field {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.pd-inquiry-form .pd-field:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74,158,92,0.12);
}
.pd-inquiry-form .pd-field::placeholder { color: #aaa; }
.pd-inquiry-form .pd-field-full { grid-column: span 2; }
.pd-inquiry-form textarea.pd-field { resize: vertical; min-height: 100px; }
.pd-inquiry-form .pd-submit {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  background: #fff;
  color: var(--green);
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.2s;
}
.pd-inquiry-form .pd-submit:hover {
  background: var(--green-light);
  transform: translateY(-1px);
}
@media (max-width: 768px) {
  .pd-inquiry-wrap { grid-template-columns: 1fr; }
  .pd-inquiry-img { display: none; }
  .pd-inquiry-form { padding: 32px 20px; }
  .pd-inquiry-form h3 { font-size: 20px; }
  .pd-inquiry-form .pd-fields { gap: 10px; }
  .pd-inquiry-form .pd-field { padding: 10px 12px; font-size: 13px; }
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Search Box */
.search-box {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74,158,92,0.1);
}
.search-box form {
  display: flex;
  align-items: center;
  width: 100%;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 11px 14px;
  font-size: 13.5px;
  font-family: var(--font-body);
  color: var(--text);
  background: transparent;
}
.search-box input::placeholder {
  color: #bbb;
  font-size: 13px;
}
.search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
  border-radius: 0;
}
.search-btn:hover {
  color: var(--green);
  background: var(--green-pale);
}
.search-btn svg {
  width: 18px;
  height: 18px;
}

/* Sidebar Section */
.sidebar-section {}
.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-light);
}

/* Category List */
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-link {
  display: block;
  font-size: 13.5px;
  color: var(--text-light);
  padding: 6px 4px;
  border-radius: 3px;
  transition: color 0.2s, padding-left 0.2s;
  cursor: pointer;
}
.cat-link:hover,
.cat-link.active {
  color: var(--green);
  padding-left: 10px;
}

/* Best Products List */
.best-list { display: flex; flex-direction: column; gap: 12px; }
.best-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}
.best-item:hover { background: var(--green-pale); }
.best-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.best-item span {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  font-weight: 500;
}

/* =====================
   PRODUCT MAIN
   ===================== */
.product-main {}

.pg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

/* Product Card */
.pg-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.25s;
  background: #fff;
}
.pg-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.pg-img {
  position: relative;
  /*aspect-ratio: 1;*/
  overflow: hidden;
}
.pg-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}
.pg-card:hover .pg-img img { transform: scale(1.07); }

/* Quick View Overlay */
.pg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.pg-card:hover .pg-overlay { opacity: 1; }
.quick-view {
  background: #fff;
  color: var(--green-dark);
  border: none;
  padding: 9px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: var(--font-body);
}
.quick-view:hover { background: var(--green); color: #fff; }

.pg-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  padding: 11px 10px 13px;
  line-height: 1.4;
}

/* Hidden card */
.pg-card.hidden { display: none; }

/* No Results */
.no-results {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* =====================
   PAGINATION
   ===================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.page-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
}
.page-btn:hover { border-color: var(--green); color: var(--green); }
.page-btn.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.next-btn { font-size: 18px; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
  .products-page { padding: 36px 0 48px; }
  .products-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .search-box { grid-column: 1 / -1; }
  .pg-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .products-page { padding: 28px 0 36px; }
  .products-layout { gap: 24px; }
  .pg-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
  .pg-card { border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
  .pg-img { aspect-ratio: 5/4; }
  .pg-name { font-size: 12px; padding: 8px 6px 10px; }
  .sidebar { grid-template-columns: 1fr; gap: 16px; }
  .sidebar-section { padding: 0; text-align: left;}
  .banner-title { font-size: 28px; }
  .search-box input { font-size: 13px; padding: 10px 12px; }
  .cat-link { font-size: 13px; }
  .best-item img { width: 44px; height: 44px; }
  .best-item span { font-size: 12px; }
}
@media (max-width: 400px) {
  .products-page { padding: 20px 0 28px; }
  .products-layout { gap: 16px; }
  .pg-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
  .pg-img { aspect-ratio: 1; }
  .pg-name { font-size: 11px; padding: 6px 4px 8px; }
  .sidebar-title { font-size: 14px; }
  .cat-link { font-size: 12px; padding: 5px 4px; }
}

/* =====================
   BUY NOW MODAL
   ===================== */
.buy-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.buy-modal-overlay.open {
  display: flex;
}
.buy-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  padding: 40px 36px 36px;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  animation: buyFadeIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes buyFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.buy-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  padding: 0;
}
.buy-modal-close:hover {
  color: #333;
}
.buy-modal-icon {
  text-align: center;
  font-size: 36px;
  color: var(--green);
  margin-bottom: 8px;
}
.buy-modal h3 {
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  margin-bottom: 6px;
}
.buy-modal-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.buy-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.buy-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.buy-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.buy-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(74,158,92,0.12);
}
.buy-input::placeholder {
  color: #aaa;
}
.buy-textarea {
  resize: vertical;
  min-height: 90px;
}
.but-button{display: grid;grid-template-columns: 1fr 5fr;}
.buy-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.2s;
}
.buy-submit:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}
.buy-reset {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 90%;
  padding: 14px;
  background: #a9adaa;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.2s;
}
.buy-reset:hover {
  background: #eb7070;
  transform: translateY(-1px);
}
@media (max-width: 480px) {
  .buy-modal { padding: 28px 20px; }
  .buy-modal h3 { font-size: 18px; }
  .buy-submit { font-size: 14px; padding: 12px; }
  .page-banner{height: 160px;}
}

/* =====================
   DESCRIPTION TOC SIDEBAR
   ===================== */
.pd-desc-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.product-full-desc {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
}
.product-full-desc .markdown-body {
  max-width: 100%;
}
.product-full-desc .markdown-body table,
.product-full-desc .markdown-body pre {
  overflow-x: auto;
  display: block;
  max-width: 100%;
}

.pd-toc {
  width: min(220px, 26%);
  flex-shrink: 0;
  position: sticky;
  top: 90px;
}
.pd-toc-inner {
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
}
.pd-toc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green);
}
.pd-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pd-toc-list a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 4px;
  line-height: 1.4;
  transition: background 0.2s, color 0.2s;
}
.pd-toc-list a:hover {
  background: #fff;
  color: var(--green);
}
.pd-toc-list a.active {
  background: var(--green);
  color: #fff;
}
.pd-toc-list a.active .toc-num { color: #fff; }
.pd-toc-list .toc-num {
  font-weight: 600;
  color: var(--green);
  margin-right: 5px;
  font-size: 0.85em;
}
.pd-toc-list .toc-h2 { padding-left: 22px; }
.pd-toc-list .toc-h3 { padding-left: 38px; font-size: 12.5px; }

.pd-toc-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-toc-btn {
  display: block;
  text-align: center;
  padding: 9px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.pd-toc-btn:hover {
  transform: translateY(-1px);
}
.pd-toc-btn-wa {
  background: var(--green);
  color: #fff;
}
.pd-toc-btn-wa:hover {
  background: var(--green-dark);
}
.pd-toc-btn-outline {
  border: 2px solid var(--green);
  color: var(--green);
  background: transparent;
}
.pd-toc-btn-outline:hover {
  background: var(--green);
  color: #fff;
}
/* ── Medium screens: slightly tighter TOC & gap ── */
@media (max-width: 1200px) {
  .pd-desc-layout { gap: 24px; }
  .pd-toc { width: min(190px, 24%); }
  .pd-toc-inner { padding: 12px 12px; }
  .pd-toc-title { font-size: 13.5px; margin-bottom: 10px; }
  .pd-toc-list a { padding: 5px 8px; font-size: 12px; }
  .pd-toc-btn { padding: 7px 0; font-size: 12px; }
}

/* =====================
   MOBILE TOC TRIGGER
   ===================== */
.pd-toc-trigger {
  display: none;
}
@media (max-width: 900px) {
  .pd-toc-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    position: fixed;
    left: 12px;
    bottom: 80px;
    z-index: 99;
    padding: 10px 10px;
    border: none;
    border-radius: 20px;
    background: var(--green);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    box-shadow: 0 3px 14px rgba(74,158,92,0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .pd-toc-trigger:active {
    transform: scale(0.94);
  }
  .pd-toc-trigger.active {
    box-shadow: 0 3px 20px rgba(74,158,92,0.55);
  }
  .pd-toc-trigger i {
    font-size: 15px;
  }

  .pd-desc-layout { flex-direction: column; gap: 20px; }
  .pd-toc {
    display: none;
    position: fixed;
    left: 12px;
    width: 195px;
    z-index: 1000;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.2);
    padding: 14px 16px;
    max-height: 55vh;
    overflow-y: auto;
  }
  .pd-toc.pd-toc-open {
    display: block;
  }
  .pd-toc-inner {
    padding: 0;
    border: none;
    background: transparent;
  }
  .pd-toc-title { font-size: 13px; margin-bottom: 8px; padding-bottom: 6px; }
  .pd-toc-list { flex-direction: column; gap: 1px; }
  .pd-toc-list a {
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    font-size: 11.5px;
    background: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pd-toc-list a.active { background: var(--green); color: #fff; }
  .pd-toc-list .toc-h2,
  .pd-toc-list .toc-h3 { padding-left: 0; }
  .pd-toc-actions { flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 6px; }
  .pd-toc-btn { flex: none; padding: 5px 0; font-size: 11px; }
  .pd-toc-btn-wa { border-radius: 4px; }
  .pd-toc-btn-outline { border-width: 1px; border-radius: 4px; padding: 4px 0; }
}

/* =====================
   STAR RATING
   ===================== */
.pd-star-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.pd-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 14px;
  color: #e8a317;
  line-height: 1;
}
.pd-star-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.pd-star-count {
  font-size: 12.5px;
  color: var(--text-muted);
}
@media (max-width: 480px) {
  .pd-star-rating { flex-wrap: wrap; gap: 4px; }
  .pd-star-value { font-size: 12px; }
  .pd-star-count { font-size: 11px; }
}

/* =====================
   DETAIL META
   ===================== */
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  line-height: 1;
}
.meta-item i {
  font-size: 16px;
  color: var(--green);
  width: 18px;
  text-align: center;
}
.meta-item strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
@media (max-width: 640px) {
  .detail-meta { flex-wrap: nowrap; gap: 6px; margin-bottom: 14px; }
  .meta-item { flex: 1; justify-content: center; padding: 6px 6px; font-size: 12px; min-width: 0; }
  .meta-item i { font-size: 12px; width: 14px; }
  .meta-item strong { font-size: 13px; }
}
@media (max-width: 400px) {
  .detail-meta { flex-wrap: nowrap; gap: 4px; }
  .meta-item { padding: 4px 4px; font-size: 11px; gap: 3px; }
  .meta-item i { font-size: 11px; width: 12px; }
  .meta-item strong { font-size: 11px; }
}

/* =====================
   POLICY LINKS
   ===================== */
.pd-policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
}
.pd-policy-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-light);
  background: #f7f7f7;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.pd-policy-link i {
  font-size: 13px;
  color: var(--green);
  transition: color 0.2s;
}
.pd-policy-link:hover {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}
.pd-policy-link:hover i {
  color: #fff;
}
