/* =========================================================
   E-KATALOG — sayfa çevirmeli kitap (js/ekatalog.js)
   Sahne: gece mavisi, altında Yolhan sarısı kesik çizgili yol.
   ========================================================= */
[hidden] { display: none !important; }

.ekat {
  --kat-kagit: #fff;
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  min-height: 100svh; display: flex; flex-direction: column;
  padding: calc(var(--ust-y) + 14px) 0 clamp(14px, 2vw, 24px) var(--serit);
  background:
    radial-gradient(70% 55% at 50% 42%, rgba(60, 100, 190, 0.38), transparent 70%),
    radial-gradient(120% 90% at 50% 100%, #0a1530 0%, transparent 60%),
    linear-gradient(180deg, #14284f 0%, var(--gece) 55%, #0b1630 100%);
}
/* sahne zemini: kesik çizgili yol */
.ekat::before {
  content: ""; position: absolute; left: -5%; right: -5%; bottom: clamp(36px, 7svh, 84px); height: 10px; z-index: -1;
  background: repeating-linear-gradient(90deg, rgba(242, 183, 5, 0.55) 0 56px, transparent 56px 92px);
  transform: rotate(-1.4deg); opacity: 0.55;
}
.ekat::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px);
}

/* ---------- Başlık ---------- */
.ekat__ust { display: grid; gap: 4px 48px; padding-bottom: clamp(10px, 1.6vw, 20px); }
.ekat__ustsatir { font: 700 0.8125rem/1 var(--f-metin); letter-spacing: 0.18em; text-transform: uppercase; color: var(--sari); }
.ekat__baslik { font: 900 clamp(2rem, 1.2rem + 2.6vw, 3.6rem)/0.92 var(--f-baslik); text-transform: uppercase; }
.ekat__baslik .satir { display: inline; }
.ekat__baslik .satir:not(:last-child)::after { content: " "; }
.ekat__aciklama { max-width: 60ch; color: var(--acik-2); font-size: 0.9375rem; line-height: 1.5; }
.ekat__tarih { display: inline-block; margin-left: 6px; padding: 2px 9px; border: 1px solid var(--cizgi-acik); border-radius: 99px; font-size: 0.75rem; color: var(--acik-3); white-space: nowrap; }
.ekat__tarih:empty { display: none; }
@media (min-width: 900px) { .ekat__ust { grid-template-columns: 1fr auto; align-items: end; } .ekat__ustsatir { grid-column: 1 / -1; } .ekat__aciklama { text-align: right; } }

/* ---------- Sahne ---------- */
.ekat__sahne {
  position: relative; flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(4px, 1.4vw, 20px);
  height: clamp(440px, calc(100svh - 290px), 1100px); padding: 0 var(--bosluk);
}
.ekat__alan {
  position: relative; height: 100%; min-width: 0; display: grid; place-items: center; touch-action: pan-y; cursor: grab; outline: none; user-select: none; -webkit-user-select: none;
}
.ekat__alan:active { cursor: grabbing; }
.ekat__alan:focus-visible { outline: 2px dashed rgba(242, 183, 5, 0.6); outline-offset: 6px; border-radius: 6px; }
.ekat__kayan { display: grid; place-items: center; perspective: 2800px; perspective-origin: 50% 40%; transition: transform .45s var(--egri); will-change: transform; }
.ekat__kayan.yakin { transition: none; cursor: move; }
.ekat__alan:has(.yakin) { cursor: move; }

.ekat__cilt { position: relative; transform-style: preserve-3d; transform: translateX(var(--ox, 0px)); transition: opacity .22s ease; }
.ekat__cilt.atliyor { opacity: 0; }
.ekat__cilt.girdi { animation: kitap-gir 1.1s var(--egri) both; }
@keyframes kitap-gir {
  from { opacity: 0; transform: translateX(var(--ox, 0px)) translateY(34px) rotateX(14deg) scale(0.94); }
  to { opacity: 1; transform: translateX(var(--ox, 0px)); }
}

/* yapraklar */
.ekat__yaprak { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; transform-origin: 0 50%; transform-style: preserve-3d; will-change: transform; }
.ekat__cilt[data-mod="tek"] .ekat__yaprak { left: 0; width: 100%; }
.ekat__yuz {
  position: absolute; inset: 0; overflow: hidden; background: var(--kat-kagit); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 0 3px 3px 0;
}
.ekat__yuz--arka { transform: rotateY(180deg); }
.ekat__cilt[data-mod="tek"] .ekat__yuz--arka { background: #eceae4; }
.ekat__resim { display: block; width: 100%; height: 100%; object-fit: fill; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.ekat__resim.yuklendi { opacity: 1; }
.ekat__bos { width: 100%; height: 100%; background: linear-gradient(135deg, #f3f1ec, #e6e3dc); }
/* yüklenirken kâğıt parıltısı */
.ekat__yuz:has(.ekat__resim:not(.yuklendi))::before {
  content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, #f1efe9 30%, #fff 50%, #f1efe9 70%) 0 0 / 220% 100%; animation: kagit-parilti 1.4s linear infinite;
}
@keyframes kagit-parilti { to { background-position: -220% 0; } }

/* ciltteki gölge ve parlaklık */
.ekat__golge { position: absolute; inset: 0; pointer-events: none; }
.ekat__golge::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.06) 3.5%, transparent 9%); }
.ekat__golge::after { content: ""; position: absolute; inset: 0; }
.ekat__yuz--on .ekat__golge::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.55) 100%); opacity: var(--g-on, 0); }
.ekat__yuz--arka .ekat__golge::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.0) 0%, rgba(0, 0, 0, 0.55) 100%); opacity: var(--g-arka, 0); }
.ekat__yaprak.donuyor .ekat__yuz { box-shadow: 0 0 calc(40px * var(--g-cep, 0)) rgba(0, 0, 0, calc(0.5 * var(--g-cep, 0))); }
.ekat__cilt[data-mod="tek"] .ekat__yaprak.donuyor .ekat__yuz { box-shadow: 0 0 40px rgba(0, 0, 0, 0.45); }

/* dönen yaprağın altındaki sayfaya düşen gölge */
.ekat__yer { position: absolute; top: 0; bottom: 0; width: 50%; pointer-events: none; z-index: 5000; }
.ekat__yer--sol { left: 0; background: linear-gradient(270deg, rgba(0, 0, 0, 0.5), transparent 70%); opacity: var(--dok-sol, 0); }
.ekat__yer--sag { right: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent 70%); opacity: var(--dok-sag, 0); }
.ekat__cilt[data-mod="tek"] .ekat__yer { display: none; }

/* sırt çizgisi ve yaprak yığını */
.ekat__omurga { position: absolute; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px; pointer-events: none; z-index: 5001; background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.18)); }
.ekat__cilt[data-mod="tek"] .ekat__omurga { display: none; }
.ekat__kenar {
  position: absolute; top: 3px; bottom: 3px; width: 0; transition: width .25s ease;
  background: repeating-linear-gradient(90deg, #d8d3c6 0 1px, #f5f2ea 1px 2px);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}
.ekat__kenar--sol { right: 100%; margin-right: -1px; border-radius: 3px 0 0 3px; }
.ekat__kenar--sag { left: 100%; margin-left: -1px; border-radius: 0 3px 3px 0; }
.ekat__cilt[data-mod="tek"] .ekat__kenar--sol { display: none; }
/* kitabın zemin gölgesi */
.ekat__zemin { position: absolute; top: calc(100% - 10px); height: 44px; left: 0; right: 0; background: radial-gradient(50% 50% at 50% 40%, rgba(0, 0, 0, 0.62), transparent 100%); filter: blur(8px); pointer-events: none; }

/* ---------- Yükleniyor / ipucu ---------- */
.ekat__yukleniyor { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--acik-2); font-weight: 600; text-align: center; padding: 24px; }
.ekat__yukleniyor.hata { color: #ffb4b4; }
.ekat__donen { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.18); border-top-color: var(--sari); animation: don 0.9s linear infinite; }
.ekat__yukleniyor.hata .ekat__donen { display: none; }
@keyframes don { to { transform: rotate(360deg); } }
.ekat__ipucu {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6000; padding: 9px 18px; border-radius: 99px; white-space: nowrap;
  background: rgba(8, 16, 36, 0.78); backdrop-filter: blur(8px); border: 1px solid var(--cizgi-acik); font-size: 0.8125rem; font-weight: 600; color: var(--acik-2);
  animation: belir-yukari .7s var(--egri) .6s both; transition: opacity .5s;
}
.ekat__ipucu.gizle { opacity: 0; }
@keyframes belir-yukari { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Oklar ---------- */
.ekat__ok {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--cizgi-acik); background: rgba(255, 255, 255, 0.07); color: #fff; cursor: pointer;
  backdrop-filter: blur(6px); transition: background-color .25s, color .25s, transform .25s var(--egri), opacity .25s;
}
.ekat__ok:hover:not(:disabled) { background: var(--sari); color: var(--gece); border-color: var(--sari); }
.ekat__ok--geri:hover:not(:disabled) { transform: translateX(-3px); }
.ekat__ok--ileri:hover:not(:disabled) { transform: translateX(3px); }
.ekat__ok:disabled { opacity: 0.22; cursor: default; }
.ekat__i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@media (max-width: 899px) {
  .ekat__sahne { grid-template-columns: minmax(0, 1fr); padding: 0 12px; }
  .ekat__ok { position: absolute; top: 50%; z-index: 7000; width: 40px; height: 40px; margin-top: -20px; background: rgba(8, 16, 36, 0.55); }
  .ekat__ok--geri { left: 2px; } .ekat__ok--ileri { right: 2px; }
}

/* ---------- Alt çubuk ---------- */
.ekat__cubuk {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; width: min(100% - 2 * var(--bosluk), 980px); margin: clamp(8px, 1.4vw, 16px) auto 0;
  padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--cizgi-acik); backdrop-filter: blur(14px);
}
.ekat__dugme {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: #fff; font: 700 0.875rem/1 var(--f-metin); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.ekat__dugme:hover, .ekat__dugme[aria-expanded="true"], .ekat__dugme[aria-pressed="true"] { background: rgba(255, 255, 255, 0.14); }
.ekat__dugme--ikon { width: 42px; padding: 0; }
.ekat__ilerleme { flex: 1 1 260px; display: flex; align-items: center; gap: 12px; min-width: 0; order: 0; }
.ekat__etiket { min-width: 4.4ch; font: 800 1.0625rem/1 var(--f-baslik); letter-spacing: 0.04em; text-align: right; font-variant-numeric: tabular-nums; }
.ekat__toplam { color: var(--acik-3); font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ekat__kaydirgac { --dolu: 0%; --renk: var(--sari); flex: 1; min-width: 0; height: 22px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.ekat__kaydirgac::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--renk, var(--sari)) var(--dolu), rgba(255, 255, 255, 0.2) var(--dolu)); }
.ekat__kaydirgac::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); }
.ekat__kaydirgac::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--renk, var(--sari)); }
.ekat__kaydirgac::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: #fff; border: 4px solid var(--renk, var(--sari)); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
.ekat__kaydirgac::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 4px solid var(--renk, var(--sari)); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }
@media (max-width: 760px) {
  .ekat__ilerleme { flex-basis: 100%; order: -1; }
  .ekat__dugme span { display: none; }
  .ekat__dugme[data-ac] { flex: 1; }
  .ekat__dugme[data-ac] span { display: inline; }
  .ekat__dugme--ikon { flex: none; }
}

/* ---------- Çekmece ---------- */
.ekat__cekmece {
  position: absolute; z-index: 40; top: var(--ust-y); right: 0; bottom: 0; width: min(420px, 100%); display: flex; flex-direction: column;
  background: rgba(9, 18, 40, 0.96); backdrop-filter: blur(18px); border-left: 1px solid var(--cizgi-acik); box-shadow: -24px 0 60px rgba(0, 0, 0, 0.4);
  transform: translateX(104%); transition: transform .32s var(--egri);
}
.ekat__cekmece.acik { transform: none; }
.ekat__cekmece-bas { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--cizgi-acik); }
.ekat__sekmeler { display: flex; gap: 4px; }
.ekat__sekmeler button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--acik-3); font: 700 0.9rem/1 var(--f-metin); cursor: pointer; }
.ekat__sekmeler button[aria-selected="true"] { background: rgba(255, 255, 255, 0.12); color: #fff; }
.ekat__panel { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px 20px; overscroll-behavior: contain; }
.ekat__bolumler, .ekat__sonuclar { list-style: none; margin: 0; padding: 0; }
.ekat__bolumler button, .ekat__sonuclar button {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 11px 10px; border: 0; border-radius: 10px; background: transparent; color: #fff;
  font: 600 0.9375rem/1.25 var(--f-metin); text-align: left; cursor: pointer; transition: background-color .2s;
}
.ekat__bolumler button:hover, .ekat__sonuclar button:hover, .ekat__bolumler button[aria-current="true"] { background: rgba(255, 255, 255, 0.1); }
.ekat__no { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--renk); font: 800 0.95rem/1 var(--f-baslik); letter-spacing: 0.03em; }
.ekat__bolum-sayfa, .ekat__sonuclar span { color: var(--acik-3); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.ekat__arama { width: 100%; min-height: 48px; margin: 6px 0 10px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--cizgi-acik); background: rgba(255, 255, 255, 0.07); color: #fff; font: 500 1rem var(--f-metin); }
.ekat__arama::placeholder { color: var(--acik-3); }
.ekat__arama:focus-visible { outline: 2px solid var(--sari); outline-offset: 1px; }
.ekat__sonuclar button { grid-template-columns: 1fr auto; row-gap: 2px; }
.ekat__sonuclar button b { grid-column: 1; font-weight: 700; }
.ekat__sonuclar button small { grid-column: 1; color: var(--acik-3); font-size: 0.8125rem; }
.ekat__sonuclar button span { grid-column: 2; grid-row: 1 / 3; }
.ekat__bos-sonuc { padding: 14px 10px; color: var(--acik-3); font-size: 0.875rem; }

/* ---------- Tam ekran ---------- */
.ekat:fullscreen, .ekat.tam-ekran { padding-top: 12px; padding-left: 0; }
.ekat:fullscreen .ekat__ust, .ekat.tam-ekran .ekat__ust { display: none; }
.ekat:fullscreen .ekat__sahne, .ekat.tam-ekran .ekat__sahne { height: auto; }
.ekat:fullscreen .ekat__cekmece, .ekat.tam-ekran .ekat__cekmece { top: 0; }
.ekat.tam-ekran { position: fixed; inset: 0; z-index: 120; }

/* WhatsApp yüzen düğmesi telefonda çubuğun üstüne biner; alt bantta zaten WhatsApp düğmesi var. */
@media (max-width: 899px) { body[data-sayfa="e-katalog"] .wa { display: none; } }

/* ---------- Alt bant ---------- */
.ekat-not { padding: clamp(40px, 6vw, 80px) 0; }
.ekat-not__ic { display: grid; gap: 28px 48px; align-items: center; }
.ekat-not p { margin-top: 12px; max-width: 52ch; color: var(--acik-2); }
@media (min-width: 900px) { .ekat-not__ic { grid-template-columns: 1fr auto; } }
.ekat__nojs { max-width: 60ch; margin: 24px auto; padding: 0 var(--bosluk); color: var(--acik-2); }
.ekat__nojs a { color: var(--sari); }

/* ---------- Az hareket ---------- */
.az-hareket .ekat *, .az-hareket .ekat::before { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .ekat__cilt.girdi { animation: none; } }
