/*
 * Trang sản phẩm (templates/product.bwt), mockup PA1.
 * Mobile trước: các khối nền trắng xếp dọc, thanh mua dính đáy.
 * Desktop từ 64em: khối trên 2 cột (ảnh | thông tin), khối dưới 2 cột (nội dung | cột phụ).
 */

.pd { max-width: var(--page-max); margin: 0 auto; }
.pd .icon { width: 20px; height: 20px; flex: none; }

/* ---------- Đường dẫn ---------- */


/* ---------- Ảnh ---------- */

.pd-gallery { background: var(--color-surface); padding-bottom: var(--space-3); }
.pd-stage { position: relative; }
.pd-slides {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.pd-slides::-webkit-scrollbar { display: none; }
.pd-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; overflow: hidden; }
.pd-slide img { width: 100%; height: 100%; object-fit: contain; }
.pd-noimg {
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-2);
  background: var(--color-surface-sunken);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.pd .pd-noimg .icon { width: 40px; height: 40px; }

.pd-flags {
  position: absolute;
  top: var(--space-3); left: var(--space-3);
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1);
  pointer-events: none;
}
.pd-updated {
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .88);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}
.pd-flag {
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-discount-bg);
  color: var(--color-on-discount);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.pd-flag.is-flash { background: var(--color-action-hover); }
.pd .pd-flag .icon { width: 14px; height: 14px; }
.pd-count {
  position: absolute;
  right: var(--space-3); bottom: var(--space-3);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-overlay);
  color: var(--color-on-action);
  font-size: var(--text-xs);
}

.pd-thumbs { display: flex; gap: var(--space-2); padding: var(--space-2) var(--space-4) 0; overflow-x: auto; scrollbar-width: none; }
.pd-thumb {
  flex: none;
  width: 56px; height: 56px;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumb[aria-current="true"] { border-color: var(--color-action); box-shadow: inset 0 0 0 1px var(--color-action); }
.pd-slide { cursor: zoom-in; }

/* Nút ảnh trước/sau: hiện trên desktop (mobile kéo ngang) */
.pd-nav {
  position: absolute; top: 50%; z-index: 1;
  width: 40px; height: 40px; margin-top: -20px;
  display: none; place-items: center;
  border: 1px solid var(--color-border); border-radius: var(--radius-full);
  background: rgba(255, 255, 255, .92); color: var(--color-text);
  box-shadow: 0 1px 3px rgb(0 0 0 / .12);
  cursor: pointer; opacity: 0; transition: opacity var(--duration-base) var(--ease-out);
}
.pd-nav.is-prev { left: var(--space-3); }
.pd-nav.is-next { right: var(--space-3); }
.pd .pd-nav .icon { width: 20px; height: 20px; }
.pd-nav:hover { color: var(--color-action); border-color: var(--color-action); }
.pd-stage:hover .pd-nav, .pd-nav:focus-visible { opacity: 1; }

/* Xem ảnh toàn màn hình */
html.pd-lb-open { overflow: hidden; }
.pd-lb {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #111; color: #fff;
}
.pd-lb::backdrop { background: rgb(0 0 0 / .8); }
.pd-lb-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  height: 56px; padding: 0 var(--space-2) 0 var(--space-4);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--text-sm);
}
.pd-lb-btn, .pd-lb-nav {
  border: 0; background: rgb(255 255 255 / .12); color: #fff; cursor: pointer;
  display: grid; place-items: center; border-radius: var(--radius-full);
  font: inherit; line-height: 1;
}
.pd-lb-btn { width: var(--tap-min); height: var(--tap-min); font-size: 28px; }
.pd-lb-btn:hover, .pd-lb-nav:hover { background: rgb(255 255 255 / .24); }
.pd-lb-track {
  list-style: none; margin: 0; padding: 0;
  height: 100%; display: flex;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain;
}
.pd-lb-track::-webkit-scrollbar { display: none; }
.pd-lb-track li { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 56px var(--space-2) var(--space-4); }
.pd-lb-track img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: var(--radius-sm); }
.pd-lb-nav {
  position: absolute; top: 50%; z-index: 2;
  width: 48px; height: 48px; margin-top: -24px; font-size: 32px;
}
.pd-lb-nav.is-prev { left: var(--space-3); }
.pd-lb-nav.is-next { right: var(--space-3); }
@media (max-width: 47.99em) { .pd-lb-nav { display: none; } }

/* ---------- Thông tin ---------- */

.pd-info {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}
.pd-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.pd-meta > * + *:not([hidden]):not(.pd-cmp)::before { content: "·"; margin-right: var(--space-2); }
.pd-cmp { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-2); }
.pd-cmp[hidden] { display: none; }
.pd-cmp-btn { min-height: 32px; padding: 0 var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); font: inherit; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.pd-cmp-btn .icon { width: 16px; height: 16px; }
.pd-cmp-btn[aria-pressed="true"] { border-color: var(--color-action); color: var(--color-action); background: var(--color-action-bg); }
.pd-cmp a { color: var(--color-link); }
.pd-title { margin: 0; font-size: var(--text-lg); line-height: var(--leading-tight); font-weight: var(--weight-strong); }
.pd-rating { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.pd-stars { color: var(--color-warning); margin-right: 6px; letter-spacing: 1px; }

.pd-note {
  display: flex;
  gap: 10px;
  padding: 10px var(--space-3);
  border: 1px solid var(--color-warning);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--color-warning-bg);
  font-size: var(--text-sm);
}
.pd-note .icon { color: var(--color-warning); margin-top: 1px; }
.pd-note p { margin: 0; }
.pd-note strong:first-child { color: var(--color-warning); }

/* Giá */
.pd-pricebox.has-flash { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.pd-pricebox.has-flash .pd-price { padding: var(--space-3) 14px; }
.pd-flash {
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  background: var(--color-action-hover);
  color: var(--color-on-action);
  font-size: var(--text-sm);
}
.pd .pd-flash .icon { width: 16px; height: 16px; }
.pd-flash-time { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.pd-flash-time[hidden] { display: none; }
.pd-timer { display: flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.pd-timer b {
  min-width: 24px;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-action-hover);
  text-align: center;
}
.pd-flash.is-upcoming { background: var(--color-secondary-bg); color: var(--color-secondary-hover); }
.pd-flash.is-ended { background: var(--color-surface-sunken); color: var(--color-text-muted); }
.pd-flash.is-upcoming .pd-timer b { background: var(--color-surface); color: var(--color-secondary-hover); }

.pd-price { display: flex; flex-direction: column; gap: var(--space-1); }
.pd-price p { margin: 0; }
.pd-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
.pd-price-now { font-size: var(--text-2xl); font-weight: var(--weight-strong); color: var(--color-price); line-height: var(--leading-tight); }
.pd-price-was { font-size: var(--text-sm); color: var(--color-price-compare); }
.pd-off {
  align-self: center;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--color-discount-bg);
  color: var(--color-on-discount);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
}
.pd-save { font-size: var(--text-xs); color: var(--color-text-muted); }
.pd-price-contact, .pd-price-off { font-size: var(--text-xl); font-weight: var(--weight-strong); }
.pd-price-contact { color: var(--color-secondary); }
.pd-price-off { color: var(--color-text-muted); }

.pd-stock { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); color: var(--color-success); }
.pd-stock::before { content: "●"; margin-right: 6px; }
.pd-status {
  padding: 10px var(--space-3);
  border-left: 4px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface-sunken);
  font-size: var(--text-sm);
}
.pd-status p { margin: 2px 0 0; }
.pd-status.is-incoming, .pd-status.is-preorder { border-color: var(--color-warning); background: var(--color-warning-bg); }
.pd-status.is-incoming strong, .pd-status.is-preorder strong { color: var(--color-warning); }
.pd-status.is-contact { border-color: var(--color-secondary); background: var(--color-secondary-bg); }

/* Biến thể */
.pd-opt { margin: 0; padding: 0; border: 0; min-width: 0; }
.pd-opt + .pd-opt { margin-top: var(--space-3); }
.pd-opt legend { padding: 0; margin-bottom: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.pd-opt legend span { font-weight: var(--weight-regular); color: var(--color-text-muted); }
.pd-opt-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pd-chip { position: relative; }
.pd-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pd-chip span {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
}
.pd-chip input:checked + span { border-color: var(--color-action); background: var(--color-action-bg); color: var(--color-action-hover); box-shadow: inset 0 0 0 1px var(--color-action); font-weight: var(--weight-strong); }
.pd-chip input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* Thông số nổi bật */
.pd-hl-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.pd-hl { padding: var(--space-2) 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface-alt); }
.pd-hl dt { font-size: var(--text-xs); color: var(--color-text-muted); }
.pd-hl dd { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: var(--leading-tight); }
/* Biểu tượng thông số (snippet spec-icon): nhỏ, đứng trước tên thông số */
.pd-hl dt { display: flex; align-items: center; gap: 4px; }
.pd-hl dt svg { flex: none; width: 14px; height: 14px; color: var(--gray-500); }
.pd-more { display: inline-block; margin-top: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.pd-more::after { content: " ›"; }

/* Ưu đãi, thanh toán */
.pd-box-title { margin: 0 0 var(--space-2); font-size: var(--text-base); font-weight: var(--weight-strong); line-height: var(--leading-tight); }
/* Khung ưu đãi (snippet product-gift): chương trình khuyến mãi + ưu đãi riêng (metafield Uu_dai) */
.pgift { border: 1px solid var(--color-action-border); border-radius: var(--radius-sm); background: var(--color-action-bg); overflow: hidden; }
.pgift-head { margin: 0; padding: var(--space-2) var(--space-3); display: flex; align-items: center; gap: 6px; background: var(--color-action); color: var(--color-on-action); font-size: var(--text-sm); font-weight: var(--weight-strong); }
.pgift-head .icon { width: 16px; height: 16px; flex: none; }
.pgift-val { margin-left: auto; padding: 1px 8px; border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-action-hover); font-size: var(--text-xs); white-space: nowrap; }
.pgift-prog { padding: var(--space-3); }
.pgift-prog + .pgift-prog { border-top: 1px dashed var(--color-action-border); }
.pgift-name { margin: 0 0 var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-strong); line-height: var(--leading-tight); }
.pgift.is-single .pgift-name { display: none; }
.pgift-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pgift-items li { display: flex; align-items: center; gap: 6px; padding: 6px var(--space-2); border: 1px solid var(--color-action-border); border-radius: var(--radius-sm); background: var(--color-surface); font-size: var(--text-sm); line-height: var(--leading-tight); min-width: 0; overflow-wrap: anywhere; }
.pgift-items .icon { width: 16px; height: 16px; flex: none; color: var(--color-action); }
.pgift-line { margin: var(--space-2) 0 0; font-size: var(--text-sm); }
.pgift-items + .pgift-line { margin-top: var(--space-2); }
.pgift-name + .pgift-line { margin-top: 0; }
.pgift-code { padding: 0 6px; border: 1px dashed var(--color-action); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-action-hover); font-weight: var(--weight-strong); letter-spacing: .04em; }
.pgift-foot { margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1); font-size: var(--text-xs); color: var(--color-text-muted); }
.pgift-foot a { color: var(--color-link); font-weight: var(--weight-strong); text-decoration: none; }
.pgift-foot a:hover { text-decoration: underline; }
.pgift-lines { list-style: none; margin: 0; padding: 0; font-size: var(--text-sm); }
.pgift-lines li { padding-left: 14px; position: relative; }
.pgift-lines li::before { content: "•"; position: absolute; left: 2px; color: var(--color-action); }
.pgift-lines li + li { margin-top: var(--space-1); }

.pd-pay { padding: var(--space-3); border-radius: var(--radius-sm); background: var(--color-secondary-bg); font-size: var(--text-sm); }
.pd-pay .pd-box-title { font-size: var(--text-sm); color: var(--color-secondary-hover); }
.pd-pay li + li { margin-top: 6px; }
.pd-pay-logos { margin: var(--space-2) 0 0; display: flex; gap: 6px; }
.pd-pay-logos img { width: auto; height: 32px; padding: 2px 6px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); }

/* ---------- Nút mua: thanh dính đáy trên mobile ---------- */

.tpl-product { padding-bottom: 72px; }
.pd-actions {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-sticky);
  padding: 10px var(--space-3) calc(10px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}
.pd-bar-price { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; color: var(--color-price); font-weight: var(--weight-strong); line-height: 1.2; }
.pd-bar-price small { font-size: var(--text-xs); font-weight: var(--weight-regular); color: var(--color-text-muted); }
.pd-form { display: flex; align-items: center; gap: var(--space-2); }
.pd-actions:not(:has(.pd-bar-price)) .pd-form { flex: 1; }
.pd-actions:not(:has(.pd-bar-price)) .pd-form > * { flex: 1; }
.pd-form .btn { padding: 0 14px; }
.pd-form:has(.pd-soldout:not([hidden])) { flex-wrap: wrap; }
.pd-soldout { flex: 1 0 100% !important; margin: 0; font-size: var(--text-sm); color: var(--color-danger); }
.pd-soldout[hidden] { display: none; }
.pd-form button:disabled { opacity: .45; cursor: not-allowed; }
.pd-buy { order: 3; }
.pd-add { order: 1; }
.pd-alt { order: 2; }
.pd-buy small { display: none; }
.pd-add { width: 48px; padding: 0 !important; }
.pd-add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pd-alt-long { display: none; }
.pd-form .btn.is-busy { opacity: .6; pointer-events: none; }

/* Thông báo đã thêm vào giỏ */
.pd-toast {
  position: fixed;
  top: 72px; left: var(--space-3); right: var(--space-3);
  z-index: var(--z-toast);
  padding: 10px var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-success);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-menu);
  font-size: var(--text-sm);
  animation: pd-toast-in var(--duration-base) var(--ease-out);
}
.pd-toast .icon { color: var(--color-success); }
.pd-toast a { margin-left: auto; font-weight: var(--weight-strong); white-space: nowrap; }
.pd-toast.is-error { border-left-color: var(--color-danger); }
.pd-toast.is-error .icon { color: var(--color-danger); }
@keyframes pd-toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Khối dưới ---------- */

.pd-bottom { margin-top: var(--space-2); display: flex; flex-direction: column; gap: var(--space-2); }
.pd-policy, .pd-content, .pd-b2b { background: var(--color-surface); }
.pd-policy { padding: var(--space-4); }
.pd-policy li { display: flex; gap: 10px; align-items: flex-start; color: var(--color-text); }
.pd-policy li + li { margin-top: 10px; }
.pd-policy .icon { color: var(--color-action); }

.pd-content { padding: 0 var(--space-4); }
.pd-acc + .pd-acc { border-top: 1px solid var(--color-border); }
.pd-acc > summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  list-style: none;
  cursor: pointer;
}
.pd-acc > summary::-webkit-details-marker { display: none; }
.pd-acc > summary h2 { margin: 0; font-size: var(--text-base); font-weight: var(--weight-strong); }
.pd-acc > summary .icon { color: var(--color-text-muted); transition: transform var(--duration-base) var(--ease-out); }
.pd-acc[open] > summary .icon { transform: rotate(180deg); }
.pd-acc[open] { padding-bottom: var(--space-4); }
.pd-desc, .pd-specs { font-size: var(--text-sm); color: var(--color-text); }
.pd-desc.is-clamped { max-height: 560px; overflow: hidden; position: relative; }
.pd-desc.is-clamped::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 96px;
  background: linear-gradient(transparent, var(--color-surface));
}
.pd-desc-more {
  margin-top: var(--space-2);
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-link);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-strong);
  cursor: pointer;
}
.pd-specs > h6:first-child { display: none; }
.pd-specs table { table-layout: fixed; }
.pd-specs td:first-child:not([colspan]) { width: 38%; color: var(--color-text-muted); }
.pd-empty { margin: 0; padding: var(--space-4) 0; font-size: var(--text-sm); color: var(--color-text-muted); }

.pd-b2b { padding: 14px var(--space-4); display: flex; align-items: center; gap: var(--space-3); }
.pd-b2b > div { flex: 1; }
.pd-b2b p { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.pd-b2b .pd-box-title { margin-bottom: 2px; font-size: var(--text-sm); }

.pd-related { padding: var(--space-4) 0; }
.pd-related .pd-box-title, .pd-related > .pd-more { margin-left: var(--space-4); margin-right: var(--space-4); }
.pd-rel-list {
  list-style: none;
  margin: 0;
  padding: 0 var(--space-4);
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.pd-rel-list > li { flex: 0 0 160px; scroll-snap-align: start; }

/* ---------- Desktop ---------- */

@media (min-width: 64em) {
  .pd { padding: 0 var(--page-gutter) var(--space-7); }
  .tpl-product { padding-bottom: 0; }

  .pd-top {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-5);
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
  }
  .pd-gallery { padding: 0; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-3); align-self: start; position: sticky; top: 88px; }
  .pd-gallery:not(:has(.pd-thumbs)) { grid-template-columns: minmax(0, 1fr); }
  .pd-stage { grid-column: -2; grid-row: 1; border-radius: var(--radius-sm); overflow: hidden; }
  /* Cột ảnh nhỏ cao bằng ảnh lớn, nhiều ảnh thì cuộn (height 0 + min-height 100% để không kéo dài hàng lưới) */
  .pd-thumbs { grid-column: 1; grid-row: 1; flex-direction: column; padding: 0 0 0 1px; height: 0; min-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  .pd-nav { display: grid; }
  .pd-thumb { width: 72px; height: 72px; }

  .pd-info { padding: 0; border: 0; gap: 14px; }
  .pd-title { font-size: var(--text-xl); }
  .pd-pricebox:not(.has-flash) { padding: var(--space-3) 14px; border-radius: var(--radius-sm); background: var(--color-surface-alt); }
  .pd-hl-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .tpl-product .pd-actions {
    position: static;
    padding: 0;
    display: block;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .pd-bar-price { display: none; }
  .pd-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-form .btn { order: 0; width: auto; padding: 0 var(--space-4) !important; }
  .pd-buy { grid-column: 1 / -1; min-height: 56px; flex-direction: column; gap: 0; }
  .pd-buy small { display: block; font-size: var(--text-xs); font-weight: var(--weight-regular); }
  .pd-buy + .btn:last-child { grid-column: 1 / -1; }
  .pd-add span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .pd-alt-long { display: none; }

  .pd-toast { top: auto; bottom: var(--space-5); left: auto; right: var(--space-5); width: 360px; }

  .pd-bottom {
    margin-top: 20px;
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    /* Cột 2 (chính sách, doanh nghiệp, video, cùng tầm giá) xếp sát nhau: phần cao dư của cột 1 dồn vào hàng 1fr cuối */
    grid-template-rows: repeat(4, min-content) 1fr;
    gap: var(--space-4) var(--space-5);
    align-items: start;
  }
  .pd-content { grid-column: 1; grid-row: 1 / -1; padding: var(--space-2) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
  .pd-policy, .pd-b2b, .pd-related { grid-column: 2; min-width: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
  .pd-policy { padding: var(--space-4); }
  .pd-b2b { padding: var(--space-4); flex-direction: column; align-items: stretch; }
  .pd-b2b .pd-box-title { font-size: var(--text-base); }
  .pd-desc, .pd-specs { font-size: var(--text-base); max-width: 760px; }

  .pd-related { padding: var(--space-4); }
  .pd-related .pd-box-title, .pd-related > .pd-more { margin-left: 0; margin-right: 0; }
  .pd-rel-list { padding: 0; flex-direction: column; gap: var(--space-3); overflow: visible; }
  .pd-rel-list > li { flex: none; }
  .pcard--rel { padding: 0 0 0 82px; min-height: 72px; border: 0; gap: var(--space-1); }
  .pcard--rel .pcard-img { position: absolute; left: 0; top: 0; width: 72px; border: 1px solid var(--color-border); }
  .pcard--rel .pcard-flag, .pcard--rel .pcard-gift, .pcard--rel .pcard-spec { display: none; }
}