.related-products-wrapper .advideoclass,
#related-products-container .advideoclass {
  display: block;
  width: 100%;
  margin-bottom: 0;
  box-sizing: border-box;
  clear: both;
  position: relative;
  z-index: 2;
}

.related-products-wrapper .advideoclass img,
.related-products-wrapper .advideoclass video,
#related-products-container .advideoclass img,
#related-products-container .advideoclass video {
  width: 100% !important;

  object-fit: cover;
  border-radius: 16px;
  background: #f7f7f7;
  display: block;
}

.video_cover,
.video_ad {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  max-height: 300px;
}
.arrowright {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ad0000cc;
  color: #fff;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  z-index: 2;
  transition: background 0.2s;
  cursor: pointer;
}
.arrowright:hover {
  background: #ff3333cc;
}
.vsi-timer {
  position: absolute;
  bottom: 10px;
  right: 16px;
  background: #222b;
  padding: 1px 8px;
  color: #fff;
  font-size: 11px;
  border-radius: 7px;
  opacity: 0.9;
  z-index: 3;
}
/* ====== Video Shop Popup – revamped & responsive ====== */
#vsi-popup {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: none; /* toggled via JS */
  align-items: center;
  justify-content: center;
  z-index: 1000000;
  overflow: auto; /* allow page-level scroll if needed */
  padding: 1rem;
}

.vsi-popup-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 920px;
  width: 100%;
  max-height: 96vh;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow-y: auto; /* internal scroll */
  animation: popIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes popIn {
  from {
    transform: scale(0.94);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- Close Button ---------- */
.vsi-popup-close {
  position: absolute;
  top: 25px;
  right: 25px;
  font-size: 34px;
  color: #c00;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: color 0.25s;
  background: white;
  border-radius: 50px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
}
.vsi-popup-close:hover {
  color: #a00;
}

/* ---------- Layout Flex ---------- */
.vsi-popup-flex {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  padding: 15px;
}
.vsi-popup-video,
.vsi-popup-info {
  flex: 1 1 320px;
  min-width: 260px;
}

/* ---------- Video Wrapper : 1:1 Square ---------- */
.vsi-video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect */
  border-radius: 12px;
  background: #000;
  overflow: hidden;
}
.vsi-video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

/* ---------- Tabs ---------- */
.vsi-popup-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.vsi-popup-tabs button {
  flex: 1;
  padding: 10px;
  background: #eee;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.25s;
}
.vsi-popup-tabs button:hover {
  background: #ddd;
}

/* ---------- Info Section ---------- */
.vsi-popup-info h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: bold;
}
#vsi-popup-price {
  font-size: 14px;
  color: #090;
  margin-bottom: 8px;
}
#vsi-popup-views {
  font-size: 14px;
  color: #888;
  margin-bottom: 12px;
}
.vsi-link {
  display: inline-block;
  margin-bottom: 12px;
  background: #ad0000;
  color: white;
  padding: 5px 20px;
  font-size: 12px;
}
.vsi-link:hover {
  color: #fff;
}
.vsi-add-to-cart-btn {
  background: #ad0000;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
}

/* ---------- Related videos ---------- */
.vsi-popup-more {
  margin-top: 24px;
}
.vsi-popup-more-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.vsi-related-item {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.vsi-related-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vsi-related-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: rgba(173, 0, 0, 0.93);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 3px 8px rgba(10, 70, 180, 0.11);
  pointer-events: none;
  z-index: 3;
  /* border: 3px solid #fff; */
  transition: background 0.18s, box-shadow 0.2s;
  padding-left: 2px;
  padding-top: 6px;
  font-size: 18px;
}
.vsi-related-item:hover .vsi-related-play {
  background: #a70000;
  box-shadow: 0 4px 16px #ad000045;
}

.vsi-show-all-btn {
  display: block;
  margin: 16px auto 0;
  background: #eee;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

/* ---------- Responsiveness ---------- */
@media (max-width: 768px) {
  .vsi-popup-flex {
    padding: 10px;
  }
  .vsi-popup-tabs button {
    font-size: 14px;
    padding: 8px;
  }
}

.vsi-product-videos {
  background-color: #f8f8f8;
  margin-top: 0px !important;
  max-width: 1100px;
  /* border-radius: 24px; */
  /* box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05); */
  padding: 20px;
  margin-bottom: 30px;
  margin: 0 auto;
  border: 1px solid #ccc;
}
.vsi-section-title {
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 18px;
  color: #222;
  letter-spacing: -0.5px;
  text-align: right;
}
.vsi-gallery-item {
  display: flex;
  justify-content: center;
  align-items: center;
}
.vsi-cover {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(80, 80, 80, 0.08);
  background: #f9f9f9;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.vsi-cover:hover {
  box-shadow: 0 8px 28px rgba(10, 70, 180, 0.12);
}
.vsi-cover-img {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.22s cubic-bezier(0.21, 0.88, 0.62, 1.04);
}
.vsi-cover:hover .vsi-cover-img {
  transform: scale(1.06);
}
.vsi-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ad0000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 36px;
  z-index: 2;
  box-shadow: 0 3px 8px rgba(10, 70, 180, 0.16);
  transition: background 0.18s;
}
.vsi-cover:hover .vsi-play-btn {
  background: rgba(220, 0, 62, 0.95);
}
.vsi-no-cover {
  display: block;
  width: 180px;
  height: 180px;
  text-align: center;
  color: #888;
  line-height: 180px;
  background: #eee;
  border-radius: 14px;
  font-size: 0.93rem;
}

.swiper.vsi-swiper {
  margin-bottom: 0;
}
.vsi-swiper .swiper-pagination-bullet {
  background: #ccc;
  opacity: 1;
}
.vsi-swiper .swiper-pagination-bullet-active {
  background: #ad0000;
}
.vsi-swiper .swiper-button-next,
.vsi-swiper .swiper-button-prev {
  background: #fff;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  color: #314079;
  box-shadow: 0 2px 8px rgba(80, 80, 80, 0.13);
  /* top: 35%; */
  transition: background 0.15s;
}
.vsi-swiper .swiper-button-next:hover,
.vsi-swiper .swiper-button-prev:hover {
  background: #ad0000;
  color: #fff;
}
@media (max-width: 600px) {
  .vsi-cover-img,
  .vsi-no-cover {
    width: 100%;
    height: 140px;
    line-height: 140px;
  }
  .vsi-play-btn {
    width: 44px;
    height: 44px;
    font-size: 25px;
  }
  .vsi-section-title {
    font-size: 12px;
  }
}

.custom-infinite-spinner .lds-dual-ring {
  display: inline-block;
  width: 64px;
  height: 64px;
}
.custom-infinite-spinner .lds-dual-ring:after {
  content: " ";
  display: block;
  width: 46px;
  height: 46px;
  margin: 1px;
  border-radius: 50%;
  border: 5px solid #333;
  border-color: #333 transparent #333 transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}
@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.vsi-popup-loader {
  width: 72px;
  height: 72px;
  margin: 36px auto 18px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vsi-popup-loader .lds-dual-ring {
  display: inline-block;
  width: 72px;
  height: 72px;
}
.vsi-popup-loader .lds-dual-ring:after {
  content: " ";
  display: block;
  width: 60px;
  height: 60px;
  margin: 6px;
  border-radius: 50%;
  border: 7px solid #ad0000;
  border-color: #ad0000 transparent #ad0000 transparent;
  animation: lds-dual-ring 1s linear infinite;
}
@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#vsi-all-videos-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px 18px;
  align-items: stretch;
}
#vsi-all-videos-list .vsi-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 26px;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 10px #bbbbbb45;
  transition: background 0.2s;
  margin: 0px;
  padding-top: 5px;
}
#vsi-all-videos-list .vsi-play-btn:hover {
  background: #222;
}
@media (max-width: 600px) {
  #vsi-popup {
    align-items: start;
    padding: 3rem 1rem;
  }
  #vsi-all-videos-list {
    grid-template-columns: 1fr 1fr;
  }
  .vsi-gallery-item {
    min-width: 150px;
  }
}

.link-all-video {
  display: flex;
  justify-content: end;
  gap: 10px;
}

.vsi-link-all {
  display: inline-block;
  margin: 12px 0;
  background: #333;
  color: white;
  padding: 5px 15px;
  font-size: 10px;
}

.vsi-link-all:hover {
  color: white;
}

.vsi-link-instagram {
  display: inline-block;
  margin: 12px 0;
  background: #00632b;
  color: white;
  padding: 5px 15px;
  font-size: 10px;
}

.vsi-link-instagram:hover {
  color: white;
}

.vsi-popup-more-title {
  font-size: 10px;
}
