/* product-video.css — thumbnail คลิกเพื่อเล่นวิดีโอสินค้า */
.pv-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 322px;
  margin: 10px 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  line-height: 0;
}

.pv-wrap .pv-thumb {
  display: block;
  width: 100%;
  height: auto;
}

.pv-wrap .pv-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  transition: background .2s, transform .2s;
  cursor: pointer;
}

.pv-wrap .pv-play svg {
  margin-left: 3px; /* ให้สามเหลี่ยมดูอยู่กึ่งกลางวง */
}

.pv-wrap:hover .pv-play,
.pv-wrap .pv-play:focus-visible {
  background: rgba(220, 0, 0, .85);
  transform: translate(-50%, -50%) scale(1.1);
  outline: none;
}

.pv-wrap video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

/* ป้าย "วิดีโอ" มุมรูป (ถ้าใส่ class pv-badge ที่ wrapper) */
.pv-wrap.pv-badge::after {
  content: "วิดีโอ";
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  pointer-events: none;
}

/* ขนาดเล็ก — ใช้ใน listing ด้วยการเติม class pv-small */
.pv-wrap.pv-small .pv-play {
  width: 36px;
  height: 36px;
}
.pv-wrap.pv-small .pv-play svg {
  width: 18px;
  height: 18px;
}
