/* =========================
   Slide Manager (SM) - Base
   - Header üstüne çıkmaz (z-index:0 + isolation)
   - Thumb'lar masaüstü + mobilde TAM KARE
   - Thumb görseli kareye BOŞLUK BIRAKMADAN oturur (object-fit:cover)
   - Thumb satırı sağ/sol SIFIR (desktop+mobile)
   - Thumb Swiper: freeMode + drag uyumlu
   ========================= */

.sm-wrap{
  width:100%;
  position:relative;
  z-index:0;           /* header (1008) altında kalsın */
  isolation:isolate;   /* kendi stacking context */
  margin-top:20px;
}

/* ---------- Main slider ---------- */
.sm-main{
  position:relative;
  z-index:1;
  border-radius:14px;
  overflow:hidden;
  aspect-ratio: var(--sm-main-ratio, 1600 / 700);
  background:#fff;
}

.sm-preload{
  position:absolute;
  inset:0;
  z-index:6;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
  opacity:0;
  transition:opacity .2s ease;
}

.sm-preload.is-visible{
  opacity:1;
}

.sm-preload__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:72px;
  min-height:72px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(15, 23, 42, .72);
  color:#fff;
  backdrop-filter: blur(8px);
  box-shadow:0 16px 40px rgba(15, 23, 42, .18);
  font-size:22px;
  font-weight:800;
  line-height:1;
}

/* Swiper/slide normalize (tema css'leriyle çakışmayı azaltır) */
.sm-main .swiper,
.sm-main .swiper-wrapper,
.sm-main .swiper-slide,
.sm-slide-link,
.sm-slide-nolink{
  height:100%;
}

.sm-main .swiper-slide{
  display:block;
}

.sm-slide-link,
.sm-slide-nolink{
  display:block;
  position:relative;
}

.sm-img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

/* ---------- Caption ---------- */
.sm-caption{
  position:absolute;
  left:18px; right:18px; bottom:18px;

  display:flex;
  flex-direction:column;
  gap:8px;

  padding:14px;
  border-radius:14px;

  background:rgba(0,0,0,.35);
  color:#fff;
  backdrop-filter: blur(6px);

  max-width:700px;
  z-index:3;
}

.sm-title{
  font-size:22px;
  font-weight:700;
  line-height:1.2;
}

.sm-desc{
  font-size:14px;
  line-height:1.35;
  opacity:.95;
}

.sm-btn{
  display:inline-flex;
  align-self:flex-start;

  padding:10px 12px;
  border-radius:12px;

  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.25);
  font-weight:600;
}

/* ---------- Nav arrows ---------- */
.sm-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);

  width:44px; height:44px;
  border-radius:999px;

  background:rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  cursor:pointer;

  z-index:4;
}

.sm-prev{ left:10px; }
.sm-next{ right:10px; }

/* --- HATALI: bunu SİL (thumb ile alakasız yerdeydi) ---
.sm-prev:before,
.sm-next:before{
  ...
  touch-action: pan-x;
}
*/

/* ---------- Thumbs strip ---------- */
.sm-thumbs{
  margin-top:10px;
  position:relative;
  z-index:2;
  user-select:none;
}

/* ========== THUMBS: Swiper (sonsuz loop) ========== */
.sm-thumbs-swiper{
  width:100%;
  padding:0;
  overflow:hidden;
  cursor:grab;
  user-select:none;
  box-sizing:border-box;

  position:relative;         /* (kritik) bazı temalarda gerekli */
  touch-action: pan-y;       /* (kritik) yatay swipe'ı Swiper alsın, dikey scroll aksın */
}

.sm-thumbs-swiper:active{ cursor:grabbing; }
@media (min-width:992px){
  .sm-thumbs-swiper.sm-dragging{ cursor:grabbing; }
}

/* Swiper wrapper hizalama */
.sm-thumbs-swiper .swiper-wrapper{
  align-items:stretch;
  touch-action: pan-y;       /* (kritik) bazı cihazlarda wrapper da ister */
}

/* Slide genişlikleri */
.sm-thumb-slide{
  width:63px;
  flex:0 0 auto;
  pointer-events:auto;
  cursor: pointer;
}
@media (max-width:768px){
  .sm-thumb-slide{ width:63px; }
}

/* Thumb buton */
.sm-thumb{
  width:100%;
  aspect-ratio:1 / 1;
  padding:0;
  margin:0;
  box-sizing:border-box;

  border:3px solid transparent;
  background:#fff;
  border-radius:12px;
  overflow:hidden;

  opacity:.75;
  transform:translateZ(0);
  transition:opacity .15s, transform .15s, border-color .15s;

  user-select:none;

  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;

  touch-action: pan-y;       /* (kritik) buton üstünde swipe çalışsın */
}

.sm-thumb img{
  width:100%;
  height:100% !important;
  object-fit:cover;
  display:block;

  pointer-events:none;       /* img swipe/tap’i bölmesin */
  -webkit-user-drag:none;
  user-drag:none;
}

.sm-thumb:hover{ border-color:#fed700; opacity:1; }
.sm-thumb:focus-visible{ outline:none; border-color:#fed700; opacity:1; }
.sm-thumb.is-active{ opacity:1; transform:scale(1.02); border-color:#fed700; }


/* BUTON tıklanabilir kalsın (img zaten none) */
.sm-thumb{ pointer-events:auto; cursor:pointer; }

/* ---------- Sağ alt sayaç (1/15) ---------- */
.sm-count{
  position:absolute;
  right:14px;
  bottom:14px;
  z-index:5;

  padding:6px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.35);
  backdrop-filter: blur(6px);
  color:#fff;

  font-weight:700;
  font-size:13px;
  line-height:1;

  user-select:none;
  pointer-events:none;
}

/* ---------- Responsive caption ---------- */
@media (max-width:768px){
  .sm-caption{ left:12px; right:12px; bottom:12px; }
  .sm-title{ font-size:18px; }
  .sm-desc{ font-size:13px; }
  .sm-preload__badge{
    min-width:58px;
    min-height:58px;
    font-size:18px;
  }
}

/* Mobilde thumb gizle seçeneği */

@media (max-width:768px){
  .sm-thumbs{ display:none; }
  .sm-hide-thumbs-mobile .sm-thumbs{ display:none; }
}
