/* ============ 产品详情页 ============ */
.product-hero{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center;}
.product-visual{
  height:420px;border-radius:var(--radius);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 3px 14px rgba(0,0,0,.05);
}
.product-visual .glow{
  width:220px;height:220px;border-radius:36px;color:#fff;
  box-shadow:0 26px 60px rgba(0,0,0,.24);
  display:flex;align-items:center;justify-content:center;text-align:center;
  font-size:26px;font-weight:800;letter-spacing:2px;line-height:1.6;
  transform:rotate(-4deg);transition:transform .35s;
}
.product-visual:hover .glow{transform:rotate(0) scale(1.04);}
.product-info .p-cat{
  display:inline-block;font-size:12.5px;color:var(--brand);
  border:1px solid var(--brand);border-radius:16px;padding:4px 16px;margin-bottom:18px;
}
.product-info h1{font-size:32px;line-height:1.4;margin-bottom:14px;}
.product-info .p-desc{font-size:15px;color:var(--ink-2);line-height:1.9;margin-bottom:22px;}
.product-info .p-price{font-size:34px;color:var(--brand);font-weight:800;margin-bottom:16px;}
.product-info .p-price small{font-size:13px;color:var(--ink-3);font-weight:400;margin-left:10px;}

/* ---- 购买链接 / 有售文案 ---- */
.p-buy{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:26px;}
.buy-btn{
  display:inline-block;padding:10px 22px;border-radius:24px;
  border:1.5px solid var(--brand);color:var(--brand);font-size:14px;font-weight:600;
  transition:all .25s;background:#fff;
}
.buy-btn:hover{background:var(--brand);color:#fff;}
.p-sale{font-size:13px;color:var(--ink-3);margin-bottom:26px;}

/* ---- 图集轮播 ---- */
.p-gallery{width:100%;}
.pg-stage{
  position:relative;width:100%;height:420px;border-radius:var(--radius);overflow:hidden;
  box-shadow:0 3px 14px rgba(0,0,0,.05);
}
.pg-slide{
  position:absolute;inset:0;background-size:cover;background-position:center;
  opacity:0;transform:scale(1.03);transition:opacity .5s ease,transform .5s ease;
}
.pg-slide.active{opacity:1;transform:scale(1);}
.pg-arrow{
  position:absolute;top:50%;transform:translateY(-50%);z-index:3;
  width:40px;height:40px;border-radius:50%;border:none;cursor:pointer;
  background:rgba(255,255,255,.85);color:#333;font-size:22px;line-height:1;
  box-shadow:0 2px 10px rgba(0,0,0,.15);transition:background .2s;
}
.pg-arrow:hover{background:#fff;}
.pg-prev{left:14px;}
.pg-next{right:14px;}
.pg-dots{position:absolute;bottom:14px;left:0;right:0;z-index:3;display:flex;justify-content:center;gap:8px;}
.pg-dot{width:9px;height:9px;border-radius:50%;background:rgba(255,255,255,.55);cursor:pointer;transition:all .25s;}
.pg-dot.on{background:#fff;width:24px;border-radius:5px;}
.pg-thumbs{display:flex;gap:10px;margin-top:12px;justify-content:center;}
.pg-thumb{
  width:64px;height:64px;border-radius:10px;background-size:cover;background-position:center;
  cursor:pointer;opacity:.65;border:2px solid transparent;transition:all .25s;
}
.pg-thumb:hover{opacity:1;}
.pg-thumb.on{opacity:1;border-color:var(--brand);}

.p-meta{margin-bottom:30px;}
.p-meta li{
  display:flex;font-size:14px;padding:10px 0;border-bottom:1px dashed #e6e9ec;
}
.p-meta li span:first-child{color:var(--ink-3);width:90px;flex-shrink:0;}
.p-actions{display:flex;gap:14px;flex-wrap:wrap;}

/* ---- 参数 ---- */
.spec-table{max-width:900px;margin:0 auto;width:100%;border-collapse:collapse;}
.spec-table tr{border-bottom:1px solid #eceef1;}
.spec-table th{
  text-align:left;font-weight:400;color:var(--ink-3);font-size:14px;
  padding:16px 20px 16px 0;width:180px;vertical-align:top;
}
.spec-table td{font-size:14.5px;color:var(--ink);padding:16px 0;line-height:1.8;}

/* ---- 详情描述 ---- */
.product-article{max-width:900px;margin:0 auto;}
.product-article p{font-size:16px;line-height:2.15;color:#333;text-align:justify;margin-bottom:26px;}
.product-article h2{font-size:21px;margin:40px 0 20px;padding-left:14px;border-left:4px solid var(--brand);}
.product-article img{display:block;border-radius:0;margin:0 auto;max-width:100%;height:auto;}
.product-article figure,.product-article .wp-block-image{margin:0;}
.product-article p:has(> img){margin-bottom:0;}
.product-article p:empty{display:none;}

/* ---- 相关产品 ---- */
.related .prod-grid{max-width:1180px;margin:0 auto;}

@media (max-width:960px){
  .product-hero{grid-template-columns:1fr;gap:30px;}
  .product-visual{height:300px;}
  .pg-stage{height:300px;}
  .product-visual .glow{width:160px;height:160px;font-size:20px;}
  .product-info h1{font-size:24px;}
}

/* ---- 兜底：详情正文图片上下拼接无空隙（覆盖后续任何样式） ---- */
.product-article figure,
.product-article .wp-block-image,
.product-article p,
.product-article img{
  margin-top:0 !important;
  margin-bottom:0 !important;
}
.product-article img{display:block;border-radius:0;}
.product-article figure img,
.product-article .wp-block-image img{display:block;vertical-align:top;width:100%;height:auto;}
.product-article > p{margin-bottom:22px !important;}
.product-article p:has(img){margin-bottom:0 !important;}
.product-article > h2{margin:36px 0 18px !important;}
.product-article p:empty{display:none;}

/* ---- 图片相邻时的 <br> 不占行（批量上传多图拼接） ---- */
.product-article img + br{display:none !important;}
.product-article br:has(+ img){display:none !important;}
.product-article figure + figure,
.product-article figure + p,
.product-article p + figure{margin-top:0 !important;}
.product-article figure:last-child{margin-bottom:0 !important;}
/* 图库（Gallery）区块：去掉图片间距与裁切留白，多图上下满宽拼接 */
.product-article .wp-block-gallery{gap:0 !important;margin:0 !important;}
.product-article .wp-block-gallery .wp-block-image{margin:0 !important;width:100% !important;}
.product-article .wp-block-gallery.is-cropped img{width:100%;height:auto;object-fit:contain;}
