/* =========================================================
   MENESA DRESS - BİRLEŞTİRİLMİŞ GALERİ STİLLERİ
   Dosya: /public/assets/css/product-gallery.css
   ========================================================= */

/* =========================================================
   BÖLÜM 1: SWIPER GALERİ STİLLERİ
   ========================================================= */

.main-swiper {
  position: relative;
  width: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  aspect-ratio: 1 / 1;
  max-height: 700px;
}

.main-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
}

.main-swiper .swiper-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.main-swiper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.4s ease-in-out;
}

.main-swiper img:hover {
  transform: scale(1.02);
}

/* --- Modern Ok Butonları --- */
.main-swiper .swiper-button-next,
.main-swiper .swiper-button-prev {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #333;
  transition: all 0.25s ease-in-out;
  opacity: 1;
  transform: scale(1);
  z-index: 10;
}

.main-swiper .swiper-button-next::after,
.main-swiper .swiper-button-prev::after {
  font-size: 20px;
  font-weight: 700;
}

.main-swiper .swiper-button-next:hover,
.main-swiper .swiper-button-prev:hover {
  background: linear-gradient(135deg, rgba(235, 210, 168, 0.95), rgba(255, 255, 255, 0.9));
  color: #000;
  transform: scale(1.12);
  box-shadow: 0 6px 18px rgba(218, 181, 123, 0.726);
}

@media (max-width: 768px) {
  .main-swiper .swiper-button-next,
  .main-swiper .swiper-button-prev {
    width: 34px;
    height: 34px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .main-swiper .swiper-button-next::after,
  .main-swiper .swiper-button-prev::after {
    font-size: 16px;
  }
}

/* --- Pagination --- */
.swiper-pagination-bullet {
  background: rgba(0, 0, 0, 0.25);
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: var(--gold, #d6a04c);
}

/* --- Thumbnail Swiper --- */
.thumbs-swiper {
  margin-top: 14px;
  height: 100px; /* Bu yükseklik sabit kalsın */
  overflow: hidden;
  position: relative;
}

.thumbs-swiper .swiper-slide {
  opacity: 0.6;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  height: 100%;
  display: flex; /* İçeriği hizalamak için eklendi */
  align-items: center; /* Dikeyde ortalama */
  justify-content: center; /* Yatayda ortalama */
  padding: 5px; /* İç boşluk ekle (Opsiyonel: Resmi küçültür) */
}

.thumbs-swiper .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--gold, #d6a04c);
}

.thumbs-swiper img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 👈 KRİTİK DEĞİŞİKLİK: Kırpma yerine sığdır */
  background-color: #f8f9fa; /* Boşlukları doldurmak için hafif gri arka plan */
  cursor: pointer;
}

/* --- Responsive (Sadece Galeri) --- */
@media (max-width: 768px) {
  .main-swiper {
    aspect-ratio: 1 / 1;
    max-height: 500px;
  }

  .thumbs-swiper {
    height: 80px;
    margin-top: 10px;
  }

  .thumbs-swiper .swiper-slide {
    height: 100%;
    border-radius: 6px;
  }
}

/* --- Animasyonlar (Sadece Galeri) --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-swiper {
  animation: fadeIn 0.4s ease-in-out both;
}


/* =========================================================
   BÖLÜM 2: LIGHTGALLERY BUĞULU TEMA
   ========================================================= */

.lg-blur-theme .lg-backdrop {
  background: rgba(255, 255, 255, 0.16) !important;
  backdrop-filter: blur(18px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
}

.lg-blur-theme .lg-outer,
.lg-blur-theme .lg-inner {
  background: transparent !important;
}

.lg-blur-theme .lg-image {
  border-radius: 14px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  transition: transform .35s ease, opacity .35s ease !important;
}

.lg-blur-theme .lg-toolbar,
.lg-blur-theme .lg-next,
.lg-blur-theme .lg-prev {
  background: rgba(255, 255, 255, .45) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #111 !important;
  border-radius: 50%;
}

.lg-blur-theme .lg-sub-html {
  background: rgba(255, 255, 255, .35) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #111 !important;
  border-radius: 8px;
  padding: 8px 14px;
}

/* --- BLUR FİX (Bulanıklık Giderici) --- */
.lg-outer .lg-item.lg-current .lg-image {
  filter: none !important;
  opacity: 1 !important;
  transform: scale(1) !important;
  transition: none !important;
  image-rendering: auto !important;
}
.lg-image.lg-object {
  filter: none !important;
  -webkit-filter: none !important;
  image-rendering: auto !important;
}
.lg-fade .lg-item.lg-current {
  transition: opacity 0.3s ease !important;
}


/* =========================================================
   MENESA DRESS - LightGallery Tema (v4 Stabil)
   ========================================================= */

/* 🔸 Thumbnail bar (küçük resimlerin olduğu alt bar) */
.lg-blur-theme .lg-thumb-outer {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.1);
  height: 100px !important;
  padding-top: 10px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 🔸 Üst açıklama barı */
.lg-blur-theme .lg-sub-html {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #111 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-radius: 12px !important;
  bottom: 115px !important;
  padding: 6px 15px !important;
  text-align: center;
}

/* 🔸 Ana görsel alanı (merkezleme + orantı koruma) */
.lg-blur-theme .lg-item.lg-current {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px !important;
}

/* 🔸 Görselin kendisi */
.lg-blur-theme .lg-item.lg-current .lg-image {
  max-width: 88vw !important;
  max-height: 82vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  aspect-ratio: unset !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s ease, opacity 0.3s ease;
  opacity: 1 !important;
}

/* 🔸 Zoom sırasında sınırlamaları kaldır (LightGallery ekler) */
.lg-blur-theme .lg-item.lg-current .lg-zoomed.lg-image {
  max-width: none !important;
  max-height: none !important;
  width: auto !important;
  height: auto !important;
  object-fit: unset !important;
  aspect-ratio: unset !important;
}

/* 🔸 Estetik geçiş efekti (fade + scale) */
.lg-blur-theme .lg-item.lg-current .lg-image {
  animation: fadeZoomIn 0.5s ease;
}

@keyframes fadeZoomIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
