/* ===== Katalog / Defter okuyucu ===== */

.catalog-sec { padding: 80px 0 96px; }

.sec-head h2 .grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.book-stage { max-width: 1080px; margin: 0 auto; }

/* ---- Üst araç çubuğu ---- */
.book-top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 22px;
}
.book-tn { display: flex; align-items: center; gap: 12px; }
.book-acts { display: flex; align-items: center; gap: 10px; }

.bt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--navy); font: inherit; font-weight: 700; font-size: 14.5px;
  cursor: pointer; transition: .18s; user-select: none; white-space: nowrap;
}
.bt:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.bt:disabled { opacity: .42; cursor: default; }
.bt-nav { font-size: 16px; line-height: 1; padding: 0 12px; }
.bt-on { background: var(--alt); color: var(--accent); border-color: var(--accent); }

.book-progress {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px; color: var(--muted); font-weight: 600;
}
.book-progress b { color: var(--navy); font-size: 16px; }

.book-go {
  width: 60px; height: 40px; text-align: center; font: inherit; font-weight: 700; font-size: 15px;
  color: var(--navy); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px;
  -moz-appearance: textfield; appearance: textfield;
}
.book-go::-webkit-outer-spin-button,
.book-go::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.book-go:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 109, 240, .13);
}

/* ---- Kitap ---- */
.book-outer {
  position: relative; width: min(1080px, 100%); margin-inline: auto;
  padding: clamp(10px, 2vw, 20px);
  background: linear-gradient(140deg, #213a58, #0f2035 55%, #0c1a2c);
  border-radius: 24px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .08);
  isolation: isolate;
}
.book-outer::before {
  content: ""; position: absolute; inset: 7px; border-radius: 18px; pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 0 5px rgba(222, 229, 236, .55),
              0 14px 34px rgba(0, 0, 0, .35);
}
.book-outer:fullscreen {
  max-width: none; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
}
.book-outer:fullscreen::before { display: none; }

.book {
  position: relative; width: 100%; margin-inline: auto;
  aspect-ratio: 2450 / 1718;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr;
  border-radius: 14px;
  background: #fff; perspective: 2600px;
  box-shadow: inset 0 0 0 6px #fff, inset 0 0 26px rgba(20, 40, 60, .22);
  touch-action: pan-y;
}
.book-outer:fullscreen .book {
  width: min(1280px, calc(96vh * 2450 / 1718)); height: auto;
  max-width: 96vw;
}

/* Sayfa yaprakları */
.leaf { position: relative; height: 100%; transform-style: preserve-3d; z-index: 2; }
.leaf.turning { z-index: 12; will-change: transform; }
.leaf.turning { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf .face { border-radius: 0; }
.leaf[data-side="left"] .face { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.leaf[data-side="right"] .face { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.leaf[data-side="left"] { grid-column: 1; grid-row: 1; transform-origin: 100% 50%; }
.leaf[data-side="right"] { grid-column: 2; grid-row: 1; transform-origin: 0% 50%; }

.face {
  position: absolute; inset: 0; overflow: hidden;
  background: #fff; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.face.back { transform: rotateY(180deg); }
.face img {
  width: 100%; height: 100%; object-fit: fill;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}

/* Çevrilen sayfanın altında kalan sayfa katmanı */
.book-rev { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 1; background: #fff; overflow: hidden; transform: none; opacity: 1; }
.book-rev-left { left: 0; border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.book-rev-right { left: 50%; border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.book-rev img { width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; pointer-events: none; }

/* Cilt / orta gölge (kaldırıldı) */
.book::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 30px;
  transform: translateX(-50%); z-index: 9; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(10, 20, 35, .26) 28%,
    rgba(10, 20, 35, .34) 50%, rgba(10, 20, 35, .26) 72%, transparent);
  display: none; }

/* Alt zemin gölgesi */
.book-shadow {
  position: absolute; left: 4%; right: 4%; bottom: -20px; height: 38px; z-index: -1;
  background: radial-gradient(50% 100% at 50% 0%, rgba(10, 25, 45, .38), transparent 72%);
  border-radius: 50%; filter: blur(7px); pointer-events: none;
}

/* Tıklama bölgeleri */
.zone {
  position: absolute; top: 0; bottom: 0; width: 46%; z-index: 20;
  cursor: pointer; display: grid; place-items: center;
}
.zone-l { left: 0; justify-content: start; padding-left: 34px; }
.zone-r { right: 0; justify-content: end; padding-right: 34px; }
.zone span {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(15, 40, 64, .16); color: rgba(255, 255, 255, 0); font-size: 20px;
  transition: .2s; backdrop-filter: blur(2px); pointer-events: none;
}
.zone:hover span { background: rgba(15, 40, 64, .34); color: #fff; }
.zone:active span { transform: scale(.92); }

.book-hint { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--muted); }
.book-hint kbd {
  font: inherit; font-weight: 700; color: var(--navy); background: var(--alt);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px;
}

/* Flip sırasında cilt gölgesini gizle */
.book.flipping::after { opacity: 0; transition: opacity .12s; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .book {
    grid-template-columns: 1fr;
    aspect-ratio: 1225 / 1718;
  }
  .leaf[data-side="right"] { display: none; }
  .leaf[data-side="left"] { grid-column: 1; }
  .book-rev-right { display: none; }
  .book-rev-left { width: 100%; left: 0; border-radius: 10px; }
  .book::after { display: none; }
  .zone span { display: none; }
  .book-outer:fullscreen .book {
    width: min(100vw - 16px, calc((94dvh) * 1225 / 1718));
    height: auto;
    max-width: 100vw;
    margin: auto;
  }
  .book-top { justify-content: center; }
}

/* Tam ekran yardımcıları */
.book-outer:fullscreen .book-hint { display: none; }