/* ==========================================================
   PRODUCT GALLERY — CLEAN, FIXED ASPECT RATIO (4:5)
   ========================================================== */

.product-gallery-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 100%;
  position: relative;
}

/* ==========================================================
   MAIN GALLERY – FIXED ASPECT RATIO (4:5)
   ========================================================== */

.product-gallery-main {
  flex: 1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.product-gallery-main .swiper-slide {
  position: relative;
  width: 100%;
  padding-top: 125%; /* 4:5 ratio */
  border-radius: 12px;
  overflow: hidden;
}

/* IMAGE INSIDE SLIDE */
.product-gallery-main .swiper-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* ==========================================================
   VIDEO INSIDE SLIDE — FIXED RATIO, NO HEIGHT EXPANSION
   ========================================================== */

.video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;

  border-radius: 12px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  border-radius: 12px;
}

/* ==========================================================
   THUMBNAILS
   ========================================================== */

.product-gallery-thumbs {
  flex: 0 0 100px;
  max-height: 500px;
  overflow: hidden;
  position: relative;
}

.product-gallery-thumbs .swiper-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-gallery-thumbs .swiper-slide {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.25s;
  background: #fff;
}

.product-gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
  transform: scale(1.05);
}

.product-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* VIDEO THUMB */
.video-thumb img {
  object-fit: contain;
  background: #f3e2db;
}

.video-thumb .play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* ==========================================================
   THUMB NAVIGATION ARROWS
   ========================================================== */

.product-gallery-thumbs .swiper-button-prev,
.product-gallery-thumbs .swiper-button-next {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: 0.3s;
  cursor: pointer;
}

.product-gallery-thumbs:hover .swiper-button-prev,
.product-gallery-thumbs:hover .swiper-button-next {
  opacity: 1;
}

.product-gallery-thumbs .swiper-button-prev {
  top: 4px;
  transform: translate(-50%, 0) rotate(90deg);
}

.product-gallery-thumbs .swiper-button-next {
  bottom: 4px;
  transform: translate(-50%, 0) rotate(90deg);
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {
  .product-gallery-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  .product-gallery-thumbs {
    display: none !important;
  }

  .product-gallery-main .swiper-slide {
    padding-top: 120%; /* slightly taller for mobile */
  }

  .video-wrapper {
    /* background: #f3e2db; */
  }
}

/* ==========================================================
   VIDEO FIX — match 4:5 aspect ratio
   ========================================================== */

.product-gallery-main .swiper-slide {
  position: relative;
  width: 100%;
  padding-top: 125%; /* 4:5 aspect ratio */
  border-radius: 12px;
  overflow: hidden;
}

.video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;

  border-radius: 12px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* popuni 4:5 okvir */
  border: none;
}

.video-wrapper::before {
  padding-top: 125%; /* 4:5 odnos */
}
.video-wrapper video {
  object-fit: cover;
}
.video-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* ili cover */

  border-radius: 12px;
}

/* 16:9 odnos */
.video-wrapper::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 */
}

/* Swatch block */
/* SWATCH BLOCK */
.luen-attribute-block {
  margin: 15px 0;
}

.luen-attr-label {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.luen-attr-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.luen-swatch-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid #e2d4f6;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  transition: 0.2s;
}

.luen-swatch-btn.selected {
  background: #f3eaff;
  border-color: #8a5be1;
  font-weight: 600;
}

/* HIDE ORIGINAL SELECT */
.luen-attribute-block select {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
}

/* HIDE WOO DEFAULT VARIATION DATA */
.single_variation .price,
.single_variation .stock,
.woocommerce-variation-availability,
.woocommerce-variation-price {
  display: none !important;
}
