.wisely-product-gallery {
  --wpg-border: #d8dde3;
  --wpg-border-strong: #de399b;
  --wpg-surface: #f8fafc;
  --wpg-surface-strong: #ffffff;
  --wpg-text: #111827;
  --wpg-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  color: var(--wpg-text);
  width: 100%;
}

.wisely-product-gallery *,
.wisely-product-gallery *::before,
.wisely-product-gallery *::after {
  box-sizing: border-box;
}

.wisely-product-gallery__layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.wisely-product-gallery__thumbs-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 92px;
  flex: 0 0 92px;
  position: relative;
}

.wisely-product-gallery__thumbs,
.wisely-product-gallery__main {
  width: 100%;
  overflow: hidden;
}

.wisely-product-gallery__thumbs {
  max-height: 520px;
}

.wisely-product-gallery__thumb-slide {
  width: 100%;
  height: auto;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wisely-product-gallery__thumb-slide.swiper-slide-thumb-active {
  opacity: 1;
  box-shadow: none;
  border: 0;
  outline: 0;
}

.wisely-product-gallery__thumb,
.wisely-product-gallery__media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--wpg-border);
  border-radius: 18px;
  background: var(--wpg-surface-strong);
}

.wisely-product-gallery__thumb {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
}

.wisely-product-gallery__thumb-slide.swiper-slide-thumb-active .wisely-product-gallery__thumb {
  border-color: var(--wpg-border-strong);
  box-shadow: 0 0 0 1px var(--wpg-border-strong);
}

.wisely-product-gallery__thumb img,
.wisely-product-gallery__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wisely-product-gallery__thumb-image,
.wisely-product-gallery__thumb img {
  border-radius: 12px;
}

.wisely-product-gallery__media .wisely-product-gallery__main-image {
  position: relative;
  inset: auto;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center;
  display: block;
  margin: auto;
}

.wisely-product-gallery__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wisely-product-gallery__play-badge {
  position: absolute;
  inset: auto auto 10px 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.78);
}

.wisely-product-gallery__play-badge::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-38%, -50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #fff;
}

.wisely-product-gallery__main-wrap {
  min-width: 0;
  flex: 1 1 auto;
  max-width: 740px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.wisely-product-gallery__main-slide {
  height: auto;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

.wisely-product-gallery__main {
  width: 100%;
  max-width: 100%;
}

.wisely-product-gallery__main .swiper-wrapper {
  align-items: flex-start;
}

.wisely-product-gallery__media {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  background: #fbfbfc;
  box-shadow: var(--wpg-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  flex: 0 0 100%;
}

.wisely-product-gallery__media--video {
  background: #000;
}

.wisely-product-gallery__media--video iframe,
.wisely-product-gallery__media--video video {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  display: block;
  border: 0;
}

.wisely-product-gallery__main-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--wpg-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--wpg-text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.wisely-product-gallery__main-nav:hover {
  border-color: var(--wpg-border-strong);
}

.wisely-product-gallery__main-nav:hover {
  transform: translateY(-50%);
}

.wisely-product-gallery__main-nav.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
}

.wisely-product-gallery__main-nav.swiper-button-disabled {
  transform: translateY(-50%);
}

.wisely-product-gallery__main-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.wisely-product-gallery__main-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  pointer-events: auto;
}

.wisely-product-gallery__main-nav--prev {
  left: 28px;
}

.wisely-product-gallery__main-nav--next {
  right: 28px;
}

.wisely-product-gallery__main-nav span {
  font-size: 24px;
  line-height: 1;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .wisely-product-gallery__layout {
    flex-direction: column-reverse;
    gap: 14px;
  }

  .wisely-product-gallery__main-nav {
    display: none !important;
  }

  .wisely-product-gallery__thumbs-wrap {
    width: 100%;
    flex: 1 1 auto;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
  }

  .wisely-product-gallery__thumbs {
    max-height: none;
  }

  .wisely-product-gallery__thumb-slide {
    width: 68px;
  }

  .wisely-product-gallery__thumb {
    border-radius: 14px;
  }

  .wisely-product-gallery__main-nav span {
    font-size: 22px;
  }

  .wisely-product-gallery__media {
    height: auto;
    min-height: 0;
    border-radius: 0;
    padding: 0;
  }
}
