/* SEO / CLS: görsel yüklenmeden önce alan rezervi (layout shift önleme) */

/* Bootstrap kart görselleri: 4:3 oran */
.card .card-img-top,
.card-img-top {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background-color: #f3f4f6;
}

/* Ürün kartı / medya kutuları */
.product-card .card-img-top,
.product-media img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Geniş kartlar (blog/haber) */
.blog-card .card-img-top,
.news-card .card-img-top {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Galeri küçük görselleri: sabit oran */
.gallery-item img,
.portfolio-gallery img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Portföy detay: farklı ebatlı görselleri hizala (tek tip oran + kırp) */
.pf-thumbs .pf-thumb img { aspect-ratio: 1 / 1; object-fit: cover; }
.pf-dxf-img img { aspect-ratio: 16 / 10; object-fit: cover; }
.pf-dfw-grid img, .pf-dgy-grid img, .pf-dirz-grid img, .pf-dcty-grid img { aspect-ratio: 1 / 1; object-fit: cover; }

/* SiteGallery yedek ızgara + lightbox (versiyonlu) */
.sg-grid .sg-cell img { cursor: zoom-in; }
.sg-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; z-index: 2000; }
.sg-lightbox.open { display: flex; }
.sg-lightbox .sg-fig { margin: 0; text-align: center; max-width: 94vw; }
.sg-lightbox .sg-fig img { max-width: 94vw; max-height: 80vh; border-radius: 6px; }
.sg-lightbox .sg-cap { color: #eaeaea; margin-top: 12px; font-size: 15px; }
.sg-lightbox .sg-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #d0d0d0; font-size: 14px; letter-spacing: .5px; }
.sg-lightbox .sg-lb-close { position: absolute; top: 10px; right: 20px; color: #fff; font-size: 42px; line-height: 1; cursor: pointer; }
.sg-lightbox .sg-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.sg-lightbox .sg-nav:hover { background: rgba(255,255,255,.28); }
.sg-lightbox .sg-prev { left: 18px; }
.sg-lightbox .sg-next { right: 18px; }
/* lightbox versiyonları */
.sg-style-rounded .sg-nav { border-radius: 50%; background: rgba(255,255,255,.2); }
.sg-style-rounded .sg-nav:hover { background: rgba(255,255,255,.35); }
.sg-style-nav .sg-cap { display: none; }
.sg-style-basic .sg-nav, .sg-style-basic .sg-count, .sg-style-basic .sg-cap { display: none; }
.sg-style-thumbs .sg-nav { border-radius: 50%; background: rgba(255,255,255,.2); }
.sg-nonav .sg-nav, .sg-nonav .sg-count { display: none; }

/* Thumbnail şeridi + otomatik slayt + zoom */
.sg-lightbox .sg-img { cursor: zoom-in; }
.sg-lightbox .sg-play { position: absolute; top: 14px; left: 20px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 15px; cursor: pointer; display: none; }
.sg-style-autoplay .sg-play { display: block; }
.sg-lightbox.playing .sg-play { background: rgba(255,255,255,.55); color: #222; }
.sg-lightbox .sg-thumbs { position: absolute; left: 0; right: 0; bottom: 48px; display: none; gap: 8px; padding: 0 16px; overflow-x: auto; justify-content: center; }
.sg-style-thumbs .sg-thumbs, .sg-style-autoplay .sg-thumbs { display: flex; }
.sg-lightbox .sg-thumb { flex: 0 0 auto; width: 74px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: .55; transition: opacity .15s, border-color .15s; }
.sg-lightbox .sg-thumb.active { border-color: #fff; opacity: 1; }
.sg-lightbox .sg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-style-thumbs .sg-fig img, .sg-style-autoplay .sg-fig img { max-height: 60vh; }
.sg-lightbox .sg-fig.zoomed { position: absolute; inset: 0; overflow: auto; display: block; max-width: none; padding: 24px; }
.sg-lightbox .sg-fig.zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
