:root {
  --sv-radius: 20px;

  --sv-bg: #ffffff;

  --sv-dark: #111827;

  --sv-border: #e5e7eb;

  --sv-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);

  --sv-primary: #111827;

  --sv-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sv-container {
  position: relative;

  margin: 40px 0;
}

.sv-main-swiper {
  overflow: visible;
}

.sv-video {
  cursor: pointer;
}

.sv-thumb {
  position: relative;

  overflow: hidden;

  border-radius: 0px;

  aspect-ratio: 9/16;

  background: #ddd;
}

.sv-thumb img {
  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;

  transition: 0.4s;
}

.sv-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.sv-video:hover img {
  transform: scale(1.08);
}

.sv-overlay {
  position: absolute;

  inset: 0;

  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4));

  display: flex;

  justify-content: center;

  align-items: center;
}

.sv-play {
  width: 72px;

  height: 72px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.92);

  display: flex;

  align-items: center;

  justify-content: center;

  transition: 0.25s;
}

.sv-play i {
  font-size: 40px;

  color: #111;
}

.sv-video:hover .sv-play {
  transform: scale(1.08);
}

#sv-mini-player {
  position: fixed;

  right: 20px;

  bottom: 20px;

  width: 390px;

  background: #fff;

  border-radius: 18px;

  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);

  overflow: hidden;

  z-index: 999999;

  transform: translateX(450px);

  transition: var(--sv-transition);

  opacity: 0;

  visibility: hidden;
}

#sv-mini-player.active {
  transform: translateX(0);

  opacity: 1;

  visibility: visible;
}

#sv-player-video {
  display: block;

  width: 100%;

  background: #000;

  aspect-ratio: 9/16;
}

.sv-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55) !important;
  color: #fff;
  cursor: pointer;
  z-index: 100;
  padding: 0 !important;
}

.sv-close i {
  font-size: 20px;
}

.sv-products {
  padding: 12px;

  background: #fff;
}

.sv-product-card {
  border: 1px solid #eee;

  border-radius: 14px;

  overflow: hidden;

  background: rgba(255, 255, 255, 0.5);
}

.sv-product-card img {
  width: 100%;

  display: block;
}

.sv-product-card h4 {
  margin: 12px;

  font-size: 15px;

  line-height: 1.4;
}

.sv-product-card .price {
  display: block;

  margin: 0 12px 12px;

  font-weight: 700;
}

.sv-product-card .button {
  margin: 0 12px 12px;

  width: calc(100% - 24px);

  text-align: center;
}

.sv-products {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  padding: 0;
  background: none;
  pointer-events: none;
}

.sv-product-swiper {
  overflow: visible;
}

.sv-product-swiper .swiper-slide {
  width: 280px;
}

.sv-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.sv-product-card img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.sv-product-content {
  flex: 1;
  min-width: 0;
}

.sv-product-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sv-product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sv-product-price {
  font-size: 15px;
  font-weight: 700;
}

.sv-product-btn {
  background: #111827;
  color: #fff;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: 0.25s;
}

.sv-product-btn:hover {
  background: #000;
  color: #fff;
}

/* Prevent horizontal overflow */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

.sv-container,
.sv-main-swiper,
.swiper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.swiper-wrapper {
  box-sizing: border-box;
}

.sv-product-swiper .swiper-slide {
  width: calc(100vw - 48px);
  max-width: 280px;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 16px !important;
  color: #fff !important;
}

#sv-mini-player {
  height: 720px;
  display: flex;
  flex-direction: column;
}

.sv-player-swiper {
  flex: 1;
  width: 100%;
  min-height: 0;
}

.sv-player-swiper .swiper-wrapper {
  height: 100%;
}

.sv-player-slide {
  height: 100% !important;
  display: flex;
  flex-direction: column;
}

.sv-player-video {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  background: #000;
}

.sv-player-slide .sv-products {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  transition: all 0.4s ease;
}

.sv-player-slide:hover .sv-products {
  bottom: 68px;
}

.sv-container .swiper-button-next,
.sv-container .swiper-button-prev {
  background: #171717 !important;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

@media (max-width: 768px) {
  .sv-container .swiper-button-next:after,
  .sv-container .swiper-button-prev:after {
    font-size: 12px !important;
  }

  .sv-container .swiper-button-next,
  .sv-container .swiper-button-prev {
    width: 32px;
    height: 32px;
  }

  #sv-mini-player {
    left: 0;

    right: 0;

    bottom: 0;

    width: 100%;

    border-radius: 0;

    transform: translateY(100%);
    height: 100vh;
  }

  #sv-mini-player.active {
    transform: translateY(0);
  }

  .sv-play {
    width: 42px;
    height: 42px;
  }

  .sv-play i {
    font-size: 20px;
    color: #111;
  }

  .sv-container {
    margin: 0;
  }
}
