/* Sitenin fotoğraf / video penceresi — site-lightbox.js.
   Koyu zemin, ortada ekrana sığan görsel, altta ad + sayaç ve ince çerçeveli yuvarlak düğmeler.
   Görsel sahneye her zaman sığar (dikey/yatay, döndürünce de) ve kendi boyutundan büyütülmez. */
html.slb-lock,
html.slb-lock body { overflow: hidden; }
/* Pencere açıkken çerez bandı koyu zeminin arkasından açık bir dikdörtgen olarak seçilmesin; kapanınca geri gelir. */
html.slb-lock #cc-banner { visibility: hidden; }

/* Çerez bandının (99999) ve tercih penceresinin (100000) üstünde: açıkken onlar alttaki düğmeleri örtmesin. */
.slb {
    --slb-fade: 1;
    position: fixed; inset: 0; z-index: 100100;
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
    background: rgba(20, 17, 14, calc(.94 * var(--slb-fade)));
    color: #fff;
    opacity: 0; transition: opacity .22s ease;
    -webkit-tap-highlight-color: transparent;
}
.slb[hidden] { display: none; }
.slb.is-open { opacity: 1; }

.slb-top {
    display: flex; justify-content: flex-end;
    padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 8px 16px;
}
.slb-stage {
    position: relative; min-height: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    touch-action: none; user-select: none; -webkit-user-select: none;
}
.slb-media { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.slb-img {
    display: block; width: auto; height: auto;
    max-width: calc(100% - 48px); max-height: calc(100% - 8px);
    object-fit: contain; transform-origin: center center;
    opacity: 0; transition: opacity .2s ease;
    cursor: zoom-in; -webkit-user-drag: none; user-select: none;
}
.slb-img.is-ready { opacity: 1; }
.slb.is-zoomed .slb-img { cursor: zoom-out; }
.slb-video { display: block; max-width: calc(100% - 48px); max-height: calc(100% - 8px); background: #000; }
.slb-frame { display: block; border: 0; background: #000; }

.slb-bar {
    display: flex; align-items: center; justify-content: center; gap: 28px;
    padding: 14px calc(16px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}
.slb.has-thumbs .slb-bar { padding-bottom: 12px; }
.slb-cap {
    min-width: 0; max-width: 640px; text-align: center;
    font-family: 'Barlow Condensed', sans-serif; font-size: 14px; letter-spacing: 3px;
    text-transform: uppercase; line-height: 1.5;
}
.slb-title:not(:empty) + .slb-count:not(:empty)::before { content: "·"; margin: 0 .6em; }

.slb-btn {
    flex: none; box-sizing: border-box; width: 48px; height: 48px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%;
    background: transparent; color: #fff; cursor: pointer;
    transition: border-color .2s, background-color .2s;
}
.slb-btn[hidden] { display: none; }
.slb-btn svg { width: 18px; height: 18px; display: block; }
.slb-btn:hover { border-color: #fff; background-color: rgba(255, 255, 255, .06); }
.slb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.slb-thumbs { overflow-x: auto; padding: 0 24px calc(20px + env(safe-area-inset-bottom)); scrollbar-width: thin; }
.slb-thumbs-in { display: flex; gap: 8px; width: max-content; margin: 0 auto; }
.slb-thumb {
    flex: none; width: 72px; height: 50px; padding: 0; overflow: hidden;
    border: 2px solid transparent; background: #000; opacity: .5; cursor: pointer;
    transition: opacity .2s, border-color .2s;
}
.slb-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slb-thumb:hover { opacity: .85; }
.slb-thumb.is-active { opacity: 1; border-color: #c4a274; }
.slb-thumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; opacity: 1; }

.slb-spin {
    position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
    border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%;
    animation: slb-spin .8s linear infinite;
}
@keyframes slb-spin { to { transform: rotate(360deg); } }
.slb-error {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    margin: 0; padding: 0 24px; max-width: 100%; text-align: center; font-size: 15px; color: #ded7cd;
}
.slb-sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media screen and (max-width: 767px) {
    .slb-bar { gap: 14px; padding-top: 10px; }
    .slb-btn { width: 44px; height: 44px; }
    .slb-cap { font-size: 12px; letter-spacing: 2px; }
    .slb-img, .slb-video { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .slb, .slb-img, .slb-btn, .slb-thumb { transition: none; }
    .slb-spin { animation-duration: 2s; }
}
