.ht-videocommerce {
  width: 100%;
  margin: 0 auto;
}

.ht-videocommerce__skeleton {
  width: 100%;
}

.ht-videocommerce__skeletonCard {
  width: 100%;
  aspect-ratio: var(--ht-vc-ratio, 3 / 4);
  margin: 0 auto;
  border-radius: 8px;
  background: linear-gradient(90deg, #f2f2f2 25%, #e7e7e7 37%, #f2f2f2 63%);
  background-size: 400% 100%;
  animation: ht-videocommerce-shimmer 1.2s ease-in-out infinite;
}

@keyframes ht-videocommerce-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.ht-videocommerce__empty {
  padding: 16px;
}

.ht-videocommerce__widget {
  --ht-vc-bg: #ffffff;
  --ht-vc-gap: 12px;
  --ht-vc-width: 1380px;
  --ht-vc-ratio: 3 / 4;
  --ht-vc-title-align: left;
  --ht-vc-content-align: left;
  background: var(--ht-vc-bg);
  padding: 16px 0;
}

.ht-videocommerce__inner--container {
  max-width: var(--ht-vc-width);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 576px) {
  .ht-videocommerce__inner--container {
    max-width: min(var(--ht-vc-width), 540px);
  }
}

@media (min-width: 768px) {
  .ht-videocommerce__inner--container {
    max-width: min(var(--ht-vc-width), 720px);
  }
}

@media (min-width: 992px) {
  .ht-videocommerce__inner--container {
    max-width: min(var(--ht-vc-width), 960px);
  }
}

@media (min-width: 1200px) {
  .ht-videocommerce__inner--container {
    max-width: min(var(--ht-vc-width), 1140px);
  }
}

@media (min-width: 1400px) {
  .ht-videocommerce__inner--container {
    max-width: min(var(--ht-vc-width), 1380px);
  }
}

@media (min-width: 1850px) {
  .ht-videocommerce__inner--container {
    max-width: min(var(--ht-vc-width), 1750px);
  }
}

.ht-videocommerce__sectionTitle {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 700;
  text-align: var(--ht-vc-title-align, left);
}

.ht-videocommerce__carousel {
  position: relative;
}

.ht-videocommerce__slider {
  overflow: hidden;
  padding: 2px;
}

.ht-videocommerce__slider:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  gap: var(--ht-vc-gap);
  overflow-x: auto;
}

.ht-videocommerce__slider:not(.swiper-initialized) .swiper-slide {
  flex: 0 0 auto;
  width: 260px;
}

.ht-videocommerce__nav {
  top: 50%;
  transform: translateY(-50%);
}

.ht-videocommerce__nav--prev {
  left: -18px;
}

.ht-videocommerce__nav--next {
  right: -18px;
}

@media (max-width: 767.98px) {
  .ht-videocommerce__nav {
    display: none;
  }
}

.ht-videocommerce__card {
  height: auto;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

.ht-videocommerce__card .product-miniature__content {
  padding: 8px 12px 12px;
  text-align: var(--ht-vc-content-align, left);
}

.ht-videocommerce__media {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ht-vc-ratio, 3 / 4);
  background: #000;
  overflow: hidden;
}

.ht-videocommerce__widget--natural .ht-videocommerce__media {
  aspect-ratio: auto;
}

.ht-videocommerce__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.ht-videocommerce__video--youtube {
  border: 0;
}

.ht-videocommerce__tapLayer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  cursor: pointer;
}

.ht-vc-autoplay-off .ht-videocommerce__card--youtube.ht-videocommerce__card--playing .ht-videocommerce__tapLayer {
  pointer-events: none;
}

.ht-videocommerce__playToggle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  z-index: 2;
}

.ht-videocommerce__playToggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.ht-vc-autoplay-off .ht-videocommerce__card--youtube .ht-videocommerce__playToggle {
  display: none;
}

.ht-videocommerce__card--playing .ht-videocommerce__playToggle {
  opacity: 0;
  transition: opacity 0.2s;
}

.ht-videocommerce__card--playing .ht-videocommerce__media:hover .ht-videocommerce__playToggle,
.ht-videocommerce__card--playing .ht-videocommerce__playToggle:focus-visible {
  opacity: 1;
}

.ht-videocommerce__card--playing .ht-videocommerce__playToggle::before {
  width: 18px;
  height: 22px;
  border-width: 0 6px;
  border-color: #fff;
  margin-left: 0;
}

.ht-videocommerce__title {
  margin: 8px 12px 0;
  font-size: 13px;
  font-weight: 600;
}

.ht-videocommerce__videoFallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
}

.ht-videocommerce__videoFallbackText {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.ht-videocommerce__gridList {
  display: grid;
  gap: var(--ht-vc-gap, 12px);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.ht-vc-grid-items-m-2 .ht-videocommerce__gridList {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 992px) {
  .ht-vc-grid-items-d-1 .ht-videocommerce__gridList {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .ht-vc-grid-items-d-2 .ht-videocommerce__gridList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ht-vc-grid-items-d-3 .ht-videocommerce__gridList {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ht-vc-grid-items-d-4 .ht-videocommerce__gridList {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Product-gallery video slides (main swiper + modal) */
.ht-vc-slide__media {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ht-vc-gallery-ratio, 1 / 1);
  overflow: hidden;
  border-radius: 4px;
}

.ht-vc-slide__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ht-vc-slide__tapLayer {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  cursor: pointer;
}

.ht-vc-slide--engaged .ht-vc-slide__tapLayer {
  pointer-events: none;
}

.ht-vc-slide__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--ht-vc-gallery-ratio, 1 / 1);
  object-fit: contain;
  background: #000;
  border-radius: 4px;
}

.ht-vc-slide--modal .ht-vc-slide__media,
.ht-vc-slide--modal .ht-vc-slide__video {
  height: calc(100vh - 1rem);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

@media (min-width: 576px) {
  .ht-vc-slide--modal .ht-vc-slide__media,
  .ht-vc-slide--modal .ht-vc-slide__video {
    height: calc(100vh - 3.5rem);
  }
}

/* Product-thumb video markers */
.ht-vc-thumb {
  position: relative;
}

.ht-vc-thumb__placeholder {
  display: block;
  width: 100%;
  padding-top: 100%;
  background: #eee;
}

.ht-vc-thumb__playIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  font-size: 14px;
  pointer-events: none;
}





/* Clickable "wideo" label: the theme sets pointer-events: none on .product-flags. */
.product-flag--ht-video.ht-vc-flagJump {
  pointer-events: auto;
  cursor: pointer;
}

/* Own full-screen control — the native YouTube one is disabled with fs=0 */
.ht-videocommerce__fullscreen,
.ht-vc-slide__fullscreen {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.ht-videocommerce__fullscreen svg,
.ht-vc-slide__fullscreen svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* In the gallery modal the top-right corner belongs to the modal close button. */
.ht-vc-slide--modal .ht-vc-slide__fullscreen {
  right: auto;
  left: 8px;
}

.ht-videocommerce__media:fullscreen,
.ht-vc-slide__media:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  aspect-ratio: auto;
  background: #000;
}

.ht-videocommerce__media:fullscreen .ht-videocommerce__video,
.ht-vc-slide__media:fullscreen .ht-vc-slide__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ht-videocommerce__media:fullscreen .ht-videocommerce__tapLayer,
.ht-vc-slide__media:fullscreen .ht-vc-slide__tapLayer {
  pointer-events: none;
}
