.sg-frontend-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

/* Kare/dikey kırpma */
.sg-frontend-gallery .sg-item {
    position: relative;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
    cursor: pointer;
    aspect-ratio: 3 / 4;
}

.sg-frontend-gallery .sg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease, opacity .35s ease;
}

.sg-frontend-gallery .sg-item:hover img {
    transform: scale(1.04);
    opacity: .92;
}

/* Tablet & mobil: 2 sütun */
@media (max-width: 1024px) {
    .sg-frontend-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .sg-frontend-gallery {
        gap: 14px;
    }
}

/* Gizli elemanlar (infinite scroll için) */
.sg-frontend-gallery .sg-item.sg-hidden {
    display: none;
}

/* LIGHTBOX */
.sg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.sg-lightbox.is-active {
    display: flex;
}

.sg-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.86);
}

/* İç alan */
.sg-lightbox-inner {
    position: relative;
    z-index: 2;
    max-width: min(90vw, 1100px);
    max-height: 90vh;
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Görsel alanı */
.sg-lightbox-image-wrap {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-lightbox-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform .35s ease;
    cursor: zoom-in;
}

/* Zoom açıkken */
.sg-lightbox-image-wrap img.sg-zoomed {
    transform: scale(1.25);
    cursor: zoom-out;
}

/* Kontroller */
.sg-lightbox-close,
.sg-lightbox-prev,
.sg-lightbox-next {
    position: absolute;
    border: none;
    background: rgba(15,23,42,.9);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    padding: 0;
}

.sg-lightbox-close {
    top: 18px;
    right: 24px;
}

.sg-lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.sg-lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.sg-lightbox-close:hover,
.sg-lightbox-prev:hover,
.sg-lightbox-next:hover {
    background: rgba(15,23,42,1);
}

/* Küçük ekranlarda */
@media (max-width: 640px) {
    .sg-lightbox-inner {
        padding: 10px;
    }
    .sg-lightbox-close,
    .sg-lightbox-prev,
    .sg-lightbox-next {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Sayfa scroll kilidi için */
body.sg-no-scroll {
    overflow: hidden;
}

.sg-infinite-sentinel {
    width: 100%;
    height: 40px;
}
