/* notlar-katalog.css — /notlar "Ürünler ve fiyatlar" klasör görünümü + ders kapakları.
 *
 * KAPAK PALETLERİ TEMA RENGİ DEĞİLDİR: basılı bir kitap kapağı gibi her temada
 * aynı görünür. Renkli Notlar uygulamasındaki
 * lib/core/constants/note_cover_palettes.dart ile BİREBİR aynı tutulur
 * (a = degradenin açık ucu, b = koyu ucu + rozet yazısı, c = fosforlu vurgu).
 * Kapak üstündeki beyaz yazı, fotoğraf üstündeki beyaz yazı gibi çizimin
 * parçasıdır (CLAUDE.md "#fff yalnız fotoğraf üzerinde" istisnası). */

.dk[data-dk-subject="tarih"]       { --dk-a: #7A2433; --dk-b: #4A121E; --dk-c: #F2B84B; }
.dk[data-dk-subject="cografya"]    { --dk-a: #0E6B68; --dk-b: #073E3B; --dk-c: #7FE0C8; }
.dk[data-dk-subject="vatandaslik"] { --dk-a: #1F3A8A; --dk-b: #111F4F; --dk-c: #F5C451; }
.dk[data-dk-subject="turkce"]      { --dk-a: #4B3BA6; --dk-b: #2A1F6B; --dk-c: #FF9BB3; }
.dk[data-dk-subject="instagram"]   { --dk-a: #B0245F; --dk-b: #62123A; --dk-c: #FFC36B; }
.dk[data-dk-subject="matematik"]   { --dk-a: #1559B8; --dk-b: #0A3169; --dk-c: #8FD3FF; }
.dk[data-dk-subject="fizik"]       { --dk-a: #26343F; --dk-b: #11191F; --dk-c: #6FE3FF; }
.dk[data-dk-subject="kimya"]       { --dk-a: #1F7A3E; --dk-b: #0F4523; --dk-c: #C6F27A; }
.dk[data-dk-subject="biyoloji"]    { --dk-a: #557F14; --dk-b: #2C4506; --dk-c: #F4E36A; }
.dk[data-dk-subject="din"]         { --dk-a: #0F5A4A; --dk-b: #06322A; --dk-c: #E9C46A; }
.dk[data-dk-subject="felsefe"]     { --dk-a: #433D66; --dk-b: #221F38; --dk-c: #C8B6FF; }
.dk[data-dk-subject="edebiyat"]    { --dk-a: #7A1F87; --dk-b: #430E4C; --dk-c: #FFB86B; }
.dk[data-dk-subject="psikoloji"]   { --dk-a: #A3184F; --dk-b: #5E0A2C; --dk-c: #9FE8FF; }
.dk[data-dk-subject="egitim"]      { --dk-a: #C2570C; --dk-b: #6E2E04; --dk-c: #FFE08A; }
.dk[data-dk-subject="mevzuat"]     { --dk-a: #3D4F5C; --dk-b: #1F2A32; --dk-c: #FFD27A; }

/* ---------- Kapak (canvas çizim + HTML yazı) ---------- */
.dk {
  --dk-ink: #ffffff;
  --dk-ink-soft: rgba(255, 255, 255, 0.72);
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dk-a), var(--dk-b));
  container-type: inline-size;
  box-shadow: 0 1px 2px rgba(20, 10, 40, 0.18), 0 6px 16px -6px rgba(20, 10, 40, 0.35);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--dk-ink);
  flex-shrink: 0;
}
.dk-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dk-spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 6cqw;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.32), rgba(255, 255, 255, 0.10) 55%, rgba(0, 0, 0, 0));
}
.dk-badge {
  position: absolute; top: 6.5cqw; left: 10cqw;
  padding: 1.8cqw 3.5cqw;
  border-radius: 4px;
  background: var(--dk-c);
  color: var(--dk-b);
  font-size: max(8px, 6.5cqw);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
}
.dk-title {
  position: absolute; left: 10cqw; right: 6.5cqw; bottom: 21cqw;
  font-size: 15cqw;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: keep-all;
}
/* 10+ harf ("Vatandaşlık", "Instagram Soruları") kelime ortasından bölünmesin */
.dk-title--uzun { font-size: 11.5cqw; }
.dk-foot {
  position: absolute; left: 10cqw; right: 6.5cqw; bottom: 6.5cqw;
  display: flex; justify-content: space-between; gap: 4px;
  font-size: max(7px, 5.8cqw);
  letter-spacing: 0.04em;
  color: var(--dk-ink-soft);
  white-space: nowrap;
}
/* Küçük kapak (set yelpazesi): yalnız çizim, yazı okunmaz boyutta */
.dk--mini { border-radius: 4px; }
.dk--mini .dk-badge, .dk--mini .dk-title, .dk--mini .dk-foot { display: none; }

/* ---------- Klasör sekmeleri ---------- */
.nk { max-width: 920px; margin-inline: auto; }
.nk-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 2px;
  scrollbar-width: none;
}
.nk-tabs::-webkit-scrollbar { display: none; }
.nk-tab {
  position: relative;
  top: 1px;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 9px 16px 8px;
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  background: var(--color-surface);
  color: var(--color-text-soft);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.nk-tab:hover { color: var(--color-text); }
.nk-tab:focus-visible { outline: 2px solid var(--primary-500); outline-offset: -2px; }
.nk-tab[aria-selected="true"] { background: var(--color-surface-2); color: var(--color-text); z-index: 1; }
.nk-tab-sayi { font-size: 0.78rem; font-weight: 700; color: var(--color-text-muted); }
/* Sekmedeki minik kapak şeritleri: klasörün içinde ne olduğunun ipucu */
.nk-tab-kapak { display: inline-flex; }
.nk-tab-kapak .dk {
  width: 9px;
  border-radius: 2px;
  box-shadow: none;
  margin-left: -3px;
  border: 1px solid var(--color-surface);
}
.nk-tab-kapak .dk:first-child { margin-left: 0; }

.nk-panel {
  border: 1px solid var(--color-border);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  background: var(--color-surface-2);
  padding: 18px 16px 20px;
}
.nk-baslik {
  margin: 0 0 10px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.nk-blok + .nk-blok { margin-top: 22px; }

/* ---------- Set kartları ---------- */
.nk-setler { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.nk-set {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.nk-set--best { border-color: var(--primary-500); box-shadow: 0 0 0 1px var(--primary-500) inset; }
.nk-fan { position: relative; flex: none; width: 118px; height: 104px; }
.nk-fan-k { position: absolute; top: 10px; width: 54px; transform-origin: 50% 100%; }
.nk-set-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
/* Video: tek kapaklı yatay kart (dört düğme dar kartta alt alta taşıyordu) */
.nk-set--video .nk-video-kapak { flex: none; width: 92px; }
.nk-setler--tek { grid-template-columns: minmax(0, 560px); }
.nk-set-ad { margin: 0; font-size: 1rem; font-weight: 800; color: var(--color-text); }

/* ---------- Tek ders kartları ---------- */
.nk-grid { display: grid; gap: 18px 12px; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); }
.nk-kart { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.nk-kart .dk { margin-bottom: 4px; }
.nk-ad { margin: 0; font-size: 0.86rem; font-weight: 700; line-height: 1.3; color: var(--color-text); }
.nk-alt { margin: 0; font-size: 0.76rem; font-weight: 500; color: var(--color-text-muted); }
.nk-fiyat { margin: 2px 0 0; font-size: 1.08rem; font-weight: 800; color: var(--color-text); font-variant-numeric: tabular-nums; }
.nk-fiyat .was {
  margin-right: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: line-through;
}
.nk-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.nk-btns .ul-pill { min-height: 32px; }

/* ---------- Filtreli mağaza tablosu ---------- */
.nk .magaza-fiyat { max-width: none; margin-top: 4px; }

/* Dar ekranda tablo sığsın: yana kaydırma yerine sıkışık hücre */
@media (max-width: 560px) {
  .nk .magaza-fiyat table { min-width: 0; font-size: 0.72rem; }
  .nk .magaza-fiyat th, .nk .magaza-fiyat td { padding: 7px 5px; }
  .nk .magaza-fiyat thead th { white-space: normal; font-size: 0.7rem; }
  .nk .magaza-fiyat tbody th { font-size: 0.74rem; }
}
@media (max-width: 420px) {
  .nk-panel { padding: 14px 10px 16px; }
  .nk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nk-set:not(.nk-set--video) { flex-direction: column; align-items: stretch; }
  .nk-fan { align-self: center; }
  .nk-set--video .nk-video-kapak { width: 78px; }
  .nk-tab { padding-inline: 12px; font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nk-tab { transition: none; }
}
