/* ໜ້າລາຍລະອຽດສິນຄ້າ (product-detail.html). ໃຊ້ຮ່ວມກັບ catalog.css (.cg-*) */
.pd { padding-top:12px; }
.pd-card { background:#fff; border:1px solid rgba(16,24,40,.06); border-radius:16px; box-shadow:0 2px 14px rgba(16,24,40,.06); padding:18px; }

/* ເສັ້ນທາງ */
.pd-crumb { display:flex; align-items:center; gap:6px; font-size:13px; color:var(--muted); margin-bottom:12px; white-space:nowrap; overflow:hidden; }
.pd-crumb a { color:var(--g-dark); }
.pd-crumb em { font-style:normal; overflow:hidden; text-overflow:ellipsis; color:var(--muted); }

.pd-grid { display:grid; grid-template-columns:minmax(0,5fr) minmax(0,6fr); gap:22px; align-items:start; }

/* ຮູບ */
.pd-gallery { position:sticky; top:calc(var(--jp-sticky-top, 0px) + 12px); }
.pd-main { display:block; position:relative; aspect-ratio:1/1; border-radius:12px; overflow:hidden; background:var(--bg); }
.pd-main img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.pd-main .cg-off { left:12px; top:12px; font-size:14px; padding:4px 12px; }
.pd-zoom { position:absolute; right:12px; bottom:12px; width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,.92); color:var(--g-dark);
           display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(0,0,0,.12); }
.pd-thumbs { display:flex; gap:8px; overflow-x:auto; margin-top:12px; padding-bottom:2px; scrollbar-width:thin; }
.pd-thumbs button { flex:0 0 68px; height:68px; border:2px solid var(--line); border-radius:10px; padding:0; overflow:hidden; background:var(--bg); cursor:pointer; }
.pd-thumbs button.active { border-color:var(--g); }
.pd-thumbs img { width:100%; height:100%; object-fit:cover; }

.pd-share { display:flex; align-items:center; gap:8px; margin-top:14px; padding-top:14px; border-top:1px dashed var(--line); }
.pd-share > span { font-size:14px; color:var(--muted); margin-right:auto; }
.pd-share a, .pd-share button { width:40px; height:40px; border-radius:50%; border:0; display:inline-flex; align-items:center; justify-content:center;
                                color:#fff; font-size:18px; cursor:pointer; transition:transform .15s, opacity .15s; }
.pd-share a:hover, .pd-share button:hover { transform:translateY(-2px); color:#fff; opacity:.92; }
.pd-share .fb { background:#1877f2; }
.pd-share .wa { background:#25d366; }
.pd-share .line { background:#06c755; padding:0; overflow:hidden; }
.pd-share .line img { width:100%; height:100%; object-fit:cover; }
.pd-share .copy { background:var(--g-soft); color:var(--g-dark); }
.pd-share .copy:hover { color:var(--g-dark); }

/* ຂໍ້ມູນ */
.pd-info h1 { font-size:24px; line-height:1.4; margin:0 0 8px; color:var(--ink); }
.pd-sub { display:flex; flex-wrap:wrap; align-items:center; gap:6px 14px; font-size:13px; color:var(--muted); }
.pd-code { background:var(--bg); border-radius:999px; padding:2px 10px; }
.pd-code strong { color:var(--ink); }
.pd-price { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; margin:16px 0 8px; padding:14px 16px; border-radius:12px; background:var(--g-soft); }
.pd-price strong { font-size:30px; line-height:1.1; color:var(--g-dark); }
.pd-price s { font-size:15px; color:var(--muted); }
.pd-off { background:var(--sale); color:#fff; font-size:12px; font-weight:700; border-radius:999px; padding:2px 10px; }
.pd-stock { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; border-radius:999px; padding:4px 12px; }
.pd-stock.ok { background:#e3f4ea; color:#0a6b37; }
.pd-stock.ask { background:#fdeee7; color:#a34a24; }
.pd-stock em { font-style:normal; font-weight:400; }
.pd-short { margin-top:14px; font-size:15px; line-height:1.65; color:#3b3b38; overflow-wrap:anywhere; }
.pd-short p:last-child { margin-bottom:0; }
/* ລາຍລະອຽດມາຈາກ editor ຝ່າຍ admin ມີ font ຝັງໃນ style ຂອງແຕ່ລະຂໍ້ຄວາມ (Times, Arial...) => ບັງຄັບເປັນ Phetsarath OT ທັງໝົດ */
.pd-short, .pd-short *, .pd-desc-body, .pd-desc-body * { font-family:'Phetsarath OT', sans-serif !important; }

/* style.css ຕັ້ງ h1-h6 ເປັນ "Cairo" => ຕ້ອງລະບຸ font ລາວເອງ */
.pd-h { font-family:'Phetsarath OT', sans-serif; font-size:17px; font-weight:700; margin:18px 0 10px; color:var(--ink); }
.pd-units { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.pd-units li { display:flex; justify-content:space-between; align-items:center; gap:10px; border:1px solid var(--line); border-radius:12px; padding:10px 14px; }
.pd-units b { font-weight:700; }
.pd-units small { display:block; font-size:12px; color:var(--muted); }
.pd-u-total { font-weight:700; color:var(--g-dark); white-space:nowrap; text-align:right; }
.pd-save { display:inline-block; background:var(--sale); color:#fff; border-radius:999px; font-size:11px; padding:0 7px; margin-left:6px; vertical-align:middle; }

/* ປຸ່ມ */
.pd-actions { display:flex; gap:10px; margin-top:18px; }
.pd-btn { flex:1 1 0; display:inline-flex; align-items:center; justify-content:center; gap:8px; height:50px; padding:0 16px; border-radius:12px;
          font-size:16px; font-weight:600; text-decoration:none; white-space:nowrap; transition:background .15s, color .15s; }
.pd-btn:hover, .pd-btn:focus { text-decoration:none; }
.pd-cart { background:var(--g); color:#fff; }
.pd-cart:hover, .pd-cart:focus { background:var(--g-dark); color:#fff; }
.pd-buy { background:#fff; color:var(--g-dark); border:2px solid var(--g); }
.pd-buy:hover, .pd-buy:focus { background:var(--g-soft); color:var(--g-dark); }
.pd-heart { flex:0 0 50px; height:50px; border-radius:12px; border:1px solid var(--line); background:#fff; color:#c9c9c4;
            display:inline-flex !important; align-items:center; justify-content:center; font-size:20px !important; text-decoration:none; }
.pd-heart:hover, .pd-heart.text-danger { color:var(--sale) !important; border-color:#f2c6c6; text-decoration:none; }

.pd-meta { list-style:none; padding:0; margin:18px 0 0; }
.pd-meta li { display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-top:1px dashed var(--line); font-size:14px; color:#52514e; }
.pd-meta i { width:20px; text-align:center; color:var(--g); margin-top:3px; }
.pd-meta b { color:var(--ink); margin-right:6px; }

/* ລາຍລະອຽດ */
.pd-desc { margin-top:22px; }
.pd-desc .pd-h { margin-top:0; padding-bottom:10px; border-bottom:2px solid var(--g-soft); }
.pd-desc-body { font-size:15px; line-height:1.7; overflow-wrap:anywhere; }
.pd-desc-body img { max-width:100%; height:auto; border-radius:8px; }
.pd-desc-body table { max-width:100%; display:block; overflow-x:auto; }

.pd-related-head { margin-top:30px; }
.pd-related-head a { font-size:14px; color:var(--g-dark); }

/* ແຖບລຸ່ມຈໍ (ມືຖື) */
.pd-bar { display:none; }

@media (max-width: 991.98px) {
  .pd-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
  .pd-gallery { position:static; }
  .pd-info h1 { font-size:20px; }
  .pd-price strong { font-size:26px; }
  .pd-bar { display:flex; align-items:center; gap:12px; position:fixed; left:0; right:0; bottom:0; z-index:1040; background:#fff;
            border-top:1px solid var(--line, #ebebeb); box-shadow:0 -4px 16px rgba(0,0,0,.08); padding:10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .pd-bar-price { flex:0 0 auto; line-height:1.2; }
  .pd-bar-price small { display:block; font-size:12px; color:#7a7a74; }
  .pd-bar-price strong { font-size:19px; color:#1c5f4e; }
  .pd-bar .pd-btn { --g:#009043; --g-dark:#1c5f4e; background:var(--g); color:#fff; height:48px; }
  body { padding-bottom:76px; }
  /* ຍົກປຸ່ມແຊັດຂຶ້ນເທິງແຖບລຸ່ມ (ເມື່ອກ່ອນທັບກັນ) */
  .btn-chat-container { bottom:84px !important; }
}
@media (max-width: 767.98px) {
  .pd { padding-top:6px; }
  .pd-card { padding:12px; border-radius:14px; }
  .pd-crumb { margin-bottom:8px; }
  .pd-btn { font-size:15px; padding:0 10px; }
  .pd-share > span { display:none; }
  .pd-share { justify-content:center; gap:12px; }
  .pd-related-head { margin-top:22px; }
}
