/* ==========================================================================
   NUSEYTAŞ — Dijital katalog (flipbook)
   ========================================================================== */
.fb-body { background: var(--nv-950); overflow: hidden; height: 100%; overscroll-behavior: none; }
.fb-body main { height: 100dvh; }
.fb {
    position: relative; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
    background: radial-gradient(ellipse 80% 70% at 50% 50%, #1d3550 0%, var(--nv) 45%, var(--nv-950) 100%);
    color: rgba(255, 255, 255, .8); overflow: hidden; isolation: isolate;
}

.fb-btn {
    display: inline-grid; grid-auto-flow: column; align-items: center; justify-content: center; gap: .4rem;
    min-width: 42px; height: 42px; padding: 0 .65rem; border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); color: #fff;
    font-family: var(--ff-head); font-weight: 600; font-size: .95rem; transition: .2s;
}
.fb-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.fb-btn.is-active, .fb-btn[aria-pressed="false"] { color: rgba(255, 255, 255, .5); }
.fb-btn.is-on { background: var(--cy); color: var(--nv); border-color: var(--cy); }
.fb-btn--accent { background: var(--cy); color: var(--nv); border-color: var(--cy); }
.fb-btn--accent:hover { background: #fff; color: var(--nv); }
.fb-btn i { font-size: 1.05rem; }

/* Üst bar */
.fb-top { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; background: rgba(10, 21, 32, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .07); z-index: 5; }
.fb-logo img { height: 28px; width: auto; display: block; }
.fb-top > * { flex-shrink: 0; }
.fb-title { flex: 1 1 auto; flex-shrink: 1; min-width: 0; padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .12); line-height: 1.2; }
.fb-title small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cy); font-weight: 600; }
.fb-title h1 { font-size: 1rem; color: #fff; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-tools { margin-left: auto; display: flex; gap: .45rem; }
@media (max-width: 767.98px) {
    .fb-logo { display: none; }
    .fb-title { border-left: 0; padding-left: 0; }
    .fb-top { gap: .6rem; padding: .55rem .7rem; }
    .fb-tools { gap: .35rem; }
    .fb-btn { min-width: 38px; height: 38px; border-radius: 6px; }
}

/* Sahne */
.fb-stage { position: relative; display: grid; place-items: center; padding: clamp(10px, 2.2vw, 28px) clamp(8px, 5vw, 80px); min-height: 0; }
.fb-fit { position: relative; width: 300px; max-width: 100%; transition: opacity .5s var(--ease), transform .7s var(--ease); opacity: 0; }
.fb-fit.is-cover { transform: translateX(-25%); }
.fb-fit.is-back { transform: translateX(25%); }
.fb-fit.is-ready { opacity: 1; }
.fb-book { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.fb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 48px; height: 48px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .06); color: #fff; font-size: 1.4rem; display: grid; place-items: center; transition: .2s; }
.fb-nav:hover:not(:disabled) { background: var(--cy); color: var(--nv); border-color: var(--cy); }
.fb-nav:disabled { opacity: .25; cursor: default; }
.fb-nav--prev { left: clamp(8px, 1.5vw, 22px); }
.fb-nav--next { right: clamp(8px, 1.5vw, 22px); }
@media (max-width: 575.98px) { .fb-nav { display: none; } }

/* Sayfalar */
.fb-page { background: #fff; overflow: hidden; }
.fb-page__in { position: relative; width: 100%; height: 100%; background: #fff; }
/* Farklı ölçüdeki sayfalar oranı bozulmadan sığdırılır */
.fb-page__img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; user-select: none; -webkit-user-drag: none; }
.fb-hl { position: absolute; z-index: 3; background: rgba(1, 233, 255, .28); outline: 2px solid rgba(0, 188, 208, .9); border-radius: 2px; pointer-events: none; mix-blend-mode: multiply; animation: hlPulse 1.6s ease-in-out 3; }
@keyframes hlPulse { 50% { background: rgba(1, 233, 255, .5); } }
.fb-page__ph { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: .8rem; color: #b6c2ce; font-family: var(--ff-head); font-weight: 600; background: linear-gradient(135deg, #fafcfd, #eef2f6); }
.fb-page__ph span { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #dfe6ec; border-top-color: var(--cy-600); animation: spin .9s linear infinite; }
.fb-page.--left .fb-page__in::after, .fb-page.--right .fb-page__in::after { content: ''; position: absolute; top: 0; bottom: 0; width: 7%; pointer-events: none; z-index: 2; }
.fb-page.--left .fb-page__in::after { right: 0; background: linear-gradient(270deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .04) 40%, transparent); }
.fb-page.--right .fb-page__in::after { left: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .05) 40%, transparent); }
.fb-page.--hard .fb-page__in::after { display: none; }
.stf__wrapper.--portrait .fb-page .fb-page__in::after { display: none; }

/* Yükleniyor */
.fb-loader { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 1rem; text-align: center; z-index: 6; transition: opacity .4s; }
.fb-loader img { animation: pulse 1.6s ease-in-out infinite; }
.fb-loader.is-done { opacity: 0; pointer-events: none; }
.fb-loader__bar { width: 220px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.fb-loader__bar span { display: block; height: 100%; width: 8%; background: var(--cy); border-radius: 4px; transition: width .3s; }
.fb-loader p { margin: 0; font-size: .9rem; color: rgba(255, 255, 255, .6); }
.fb-loader.is-error img { animation: none; opacity: .4; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .6; } }

.fb-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: .5rem; padding: .5rem .95rem; border-radius: 99px; background: rgba(10, 21, 32, .75); color: #fff; font-size: .82rem; z-index: 5; white-space: nowrap; animation: hintIn .5s var(--ease); pointer-events: none; }
.fb-hint i { color: var(--cy); animation: nudge 1.4s ease-in-out infinite; }
@keyframes hintIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes nudge { 50% { transform: translateX(-6px) rotate(-10deg); } }

/* Alt bar */
.fb-bottom { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); background: rgba(10, 21, 32, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 255, 255, .07); z-index: 5; }
.fb-range { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--cy) var(--p, 0%), rgba(255, 255, 255, .14) var(--p, 0%)); outline: 0; cursor: pointer; }
.fb-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--cy); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.fb-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--cy); }
.fb-range:focus-visible::-webkit-slider-thumb { outline: 2px solid #fff; outline-offset: 2px; }
.fb-jump { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.fb-jump input { width: 64px; height: 38px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.fb-jump input::-webkit-outer-spin-button, .fb-jump input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fb-jump input:focus { outline: 0; border-color: var(--cy); }
.fb-jump b { color: #fff; }
.fb-range { min-width: 0; }
@media (max-width: 575.98px) {
    .fb-bottom { gap: .4rem; padding-inline: .5rem; }
    .fb-jump input { width: 48px; }
    .fb-bottom .fb-btn { min-width: 36px; padding: 0 .4rem; }
    .fb-hint { white-space: normal; width: calc(100% - 32px); justify-content: center; text-align: center; }
}
@media (max-width: 379.98px) { .fb-bottom [data-fb="first"], .fb-bottom [data-fb="last"] { display: none; } }

/* Önizleme çekmecesi */
.fb-thumbs { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 86vw); background: rgba(10, 21, 32, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 20; transform: translateX(105%); transition: transform .4s var(--ease); display: flex; flex-direction: column; border-left: 1px solid rgba(255, 255, 255, .08); box-shadow: -30px 0 60px rgba(0, 0, 0, .35); }
.fb-thumbs.is-open { transform: none; }
.fb-thumbs__head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; font-family: var(--ff-head); }
.fb-thumbs__grid { flex: 1; overflow-y: auto; padding: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem .8rem; align-content: start; overscroll-behavior: contain; }
.fb-thumb { border: 0; background: none; padding: 0; text-align: center; color: rgba(255, 255, 255, .6); font-size: .78rem; }
.fb-thumb__img { display: block; position: relative; aspect-ratio: var(--ar, .707); background: rgba(255, 255, 255, .08); border-radius: 4px; overflow: hidden; margin-bottom: .35rem; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s, transform .2s; }
.fb-thumb__img img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.fb-thumb:hover .fb-thumb__img { transform: translateY(-2px); }
.fb-thumb.is-current { color: var(--cy); }
.fb-thumb.is-current .fb-thumb__img { outline-color: var(--cy); }

/* Katalog içi arama */
.fb-search { right: auto; left: 0; transform: translateX(-105%); border-left: 0; border-right: 1px solid rgba(255, 255, 255, .08); box-shadow: 30px 0 60px rgba(0, 0, 0, .35); }
.fb-search.is-open { transform: none; }
.fb-search__form { display: flex; gap: .5rem; padding: 1rem 1rem .6rem; }
.fb-search__form input { flex: 1; min-width: 0; height: 42px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #fff; padding: 0 .85rem; font-size: .95rem; }
.fb-search__form input:focus { outline: 0; border-color: var(--cy); }
.fb-search__status { padding: 0 1rem .6rem; font-size: .82rem; color: rgba(255, 255, 255, .55); }
.fb-search__status b { color: #fff; }
.fb-search__bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin-top: .45rem; overflow: hidden; }
.fb-search__bar span { display: block; height: 100%; background: var(--cy); width: 0; transition: width .2s; }
.fb-search__bar.is-busy span { width: 35%; animation: fbBusy 1s ease-in-out infinite alternate; }
@keyframes fbBusy { from { transform: translateX(-10%); } to { transform: translateX(200%); } }
.fb-search__list { flex: 1; overflow-y: auto; padding: .2rem .6rem 1rem; overscroll-behavior: contain; }
.fb-sres { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .7rem .7rem; border-radius: 6px; color: rgba(255, 255, 255, .75); font-size: .85rem; line-height: 1.45; }
.fb-sres:hover, .fb-sres.is-current { background: rgba(255, 255, 255, .07); color: #fff; }
.fb-sres b { display: block; font-family: var(--ff-head); color: var(--cy); font-size: .9rem; margin-bottom: .15rem; }
.fb-sres mark { background: rgba(1, 233, 255, .25); color: #fff; padding: 0 2px; border-radius: 2px; }

.fb-toast { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 7; display: flex; align-items: center; gap: .7rem; max-width: calc(100% - 24px); padding: .45rem .5rem .45rem 1rem; border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); font-size: .88rem; animation: hintIn .4s var(--ease); }
.fb-toast[hidden] { display: none; }
.fb-toast > i { color: var(--cy-text); }
.fb-toast__txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-toast__txt b { font-weight: 600; }
.fb-toast__nav { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.fb-toast__nav[hidden] { display: none; }
.fb-toast button { border: 0; background: #fff; color: var(--nv); width: 30px; height: 30px; display: grid; place-items: center; }
.fb-toast__nav button + button { border-left: 1px solid var(--line); }
.fb-toast button:hover { background: var(--surface); }
.fb-toast__close { border-radius: 4px; }

/* Yakınlaştırma */
.fb-zoom { position: absolute; inset: 0; z-index: 30; background: rgba(10, 21, 32, .97); display: flex; flex-direction: column; }
.fb-zoom[hidden] { display: none; }
.fb-zoom__bar { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .7rem; color: #fff; font-family: var(--ff-head); font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.fb-zoom__bar span { min-width: 56px; text-align: center; }
.fb-zoom__bar [data-zoom="close"] { position: absolute; right: .8rem; }
.fb-zoom__scroll { flex: 1; overflow: auto; cursor: grab; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.fb-zoom__scroll.is-drag { cursor: grabbing; }
.fb-zoom__pages { display: flex; justify-content: center; gap: 0; padding: 24px; width: max-content; min-width: 100%; margin: 0 auto; }
.fb-zoom__pages img { display: block; height: auto; max-width: none; background: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); user-select: none; -webkit-user-drag: none; }

.fb-noscript { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.fb-body .skip-link { display: none; }
