/* ویدیوی محصول داخل گالری (فقط صفحه‌ی محصولاتی که ویدیو دارند لود می‌شود) */

/* اسلاید ویدیو: هم‌اندازه‌ی اسلایدهای تصویر (مربع) */
.upseo-pv {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--c-neutral-000, #fff);
}
.upseo-pv__cover {
  position: absolute;
  inset: 0;
}

/* دکمه‌ی بزرگ پلی روی کاور */
.upseo-pv__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.62);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}
.upseo-pv__play:hover,
.upseo-pv__play:focus-visible {
  background: var(--c-primary, #c19277);
  transform: scale(1.08);
}
.upseo-pv__play svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
  transform: translateX(3px);
}

/* خود پلیر (بعد از کلیک ساخته می‌شود) */
.upseo-pv video,
.upseo-pv iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
}

/* در حال پخش: کاور و دکمه کنار می‌روند */
.upseo-pv.is-playing .upseo-pv__cover,
.upseo-pv.is-playing .upseo-pv__play {
  display: none;
}

/* لودینگ (فقط برای iframe: آپارات/یوتیوب/ویمئو) */
.upseo-pv.is-loading .upseo-pv__play {
  visibility: hidden;
}
.upseo-pv.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--c-primary, #c19277);
  border-radius: 50%;
  animation: upseo-pv-spin 0.8s linear infinite;
}
@keyframes upseo-pv-spin {
  to {
    transform: rotate(360deg);
  }
}

/* نشانگر پلی روی بندانگشتی ویدیو */
.upseo-pv-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.62);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.upseo-pv-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transform: translateX(1px);
}
