/* yer.al — /kesfet keşif + il/kategori SEO listeleme sayfaları (TASK-135)
   brand.css token'larını kullanır; landing/magaza tasarım diliyle uyumlu, mobil-öncelikli. */

.kesfet-page {
  background: var(--bg);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  margin-top: calc(var(--nav-h) + 7px); /* fixed nav height + gap */
}

.kesfet-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

/* ===== Başlık + form ===== */
.kesfet-head { margin-bottom: 28px; }

.kesfet-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--t1);
  margin: 0 0 8px;
  text-wrap: balance;
}

.kesfet-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--t2);
  margin: 0 0 20px;
  max-width: 640px;
}

.kesfet-input {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--t1);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  outline: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select.kesfet-input {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999999' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.kesfet-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}


/* =====================================================================
   Mobil-eşdeğer keşif düzeni (referans: mobil HomeScreen)
   Telefon: arama + ikon satırı + alttan açılan Kategori/Bölge sayfaları.
   Masaüstü (≥900px): solda sabit filtre paneli, sağda sonuçlar.
   ===================================================================== */

ion-icon { display: inline-block; width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -0.125em; }

.kf-layout { display: block; }
.kf-main { min-width: 0; }

/* --- Arama --- */
.kf-search { display: flex; gap: 8px; align-items: center; }

.kf-search-box {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--t3);
  font-size: 20px;
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kf-search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); color: var(--brand); }

.kf-search-box input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--t1);
}

.kf-search-btn { flex: 0 0 auto; height: 52px; padding: 0 22px; font-size: 15px; border-radius: 16px; box-shadow: none; }

/* --- Hızlı erişim (ikon satırı) --- */
.kf-quick {
  display: flex;
  gap: 4px;
  margin: 18px -20px 0;
  padding: 0 20px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.kf-quick::-webkit-scrollbar { display: none; }

.kf-qa {
  flex: 0 0 auto;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.kf-qa-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--qa-c);
  background: var(--qa-bg);
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.kf-qa:hover .kf-qa-icon { transform: translateY(-1px); }

.kf-qa-label {
  max-width: 100%;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kf-qa.is-active .kf-qa-icon { background: var(--qa-c); color: #ffffff; }
.kf-qa.is-active .kf-qa-label { color: var(--qa-c); font-weight: 700; }

:root[data-yr-theme="dark"] .kf-qa-icon { background: color-mix(in srgb, var(--qa-c) 22%, transparent); }
:root[data-yr-theme="dark"] .kf-qa.is-active .kf-qa-icon { background: var(--qa-c); }

/* --- Aktif filtre çipleri --- */
.kf-active { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.kf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 7px 10px 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 10px;
}

.kf-chip-text { color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kf-chip-x { display: inline-flex; color: inherit; font-size: 17px; text-decoration: none; }
.kf-chip-x:hover { opacity: 0.75; }

/* --- Bölüm başlığı --- */
.kf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 14px;
}

.kf-section-head--other { margin-top: 36px; }

.kf-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--t1);
}

.kf-section-count { flex: 0 0 auto; font-size: 13px; color: var(--t2); }

.kf-other-note { margin: -6px 0 14px; font-size: 13px; line-height: 1.5; color: var(--t3); }

/* --- Kartlar (mobil liste satırı) --- */
.kf-list { display: grid; grid-template-columns: 1fr; gap: 12px; }

.kf-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kf-card:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }

.kf-card-thumb {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.kf-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kf-card-thumb--gradient { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%); }
.kf-card-thumb--muted { background: var(--alt); color: var(--t3); }

.kf-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.kf-card-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kf-card-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kf-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 7px; }

.kf-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--t1); }
.kf-rating ion-icon { color: #fbbf24; font-size: 13px; }
.kf-rating-count { font-weight: 400; font-size: 12px; color: var(--t2); }

.kf-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
}

.kf-pill--new { color: var(--brand); background: var(--brand-soft); }
.kf-pill--online { color: #ffffff; background: var(--brand); }

.kf-card-applink { font-size: 12px; font-weight: 600; color: var(--brand); }
.kf-card-go { flex: 0 0 auto; color: var(--t3); font-size: 18px; display: flex; }

/* --- Filtre panelleri (ortak) --- */
.kf-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kf-panel-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--t1); }
.kf-panel-close { display: none; color: var(--t2); font-size: 22px; text-decoration: none; }

.kf-label { display: block; margin: 10px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--t2); }
.kf-area-form select:disabled { opacity: 0.55; cursor: not-allowed; }
.kf-apply { display: block; width: 100%; margin-top: 16px; padding: 13px 20px; font-size: 15px; border-radius: 12px; box-shadow: none; }
.kf-clear { display: block; margin-top: 8px; padding: 8px 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--t2); text-decoration: none; }
.kf-clear:hover { color: var(--err); }

.kf-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 8px; }

.kf-cat { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; min-width: 0; }

.kf-cat-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--brand);
  background: var(--brand-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.kf-cat-name {
  max-width: 100%;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  color: var(--t2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kf-cat:hover .kf-cat-icon { background: var(--brand); color: #ffffff; }
.kf-cat.is-active .kf-cat-icon { background: var(--brand); color: #ffffff; }
.kf-cat.is-active .kf-cat-name { color: var(--brand); font-weight: 700; }

.kf-sheet-handle { display: none; }
.kf-backdrop { display: none; }

/* --- Telefon / tablet: alttan açılan sayfalar --- */
@media (max-width: 899px) {
  .kesfet-inner { padding-top: 28px; }
  .kesfet-title { font-size: 24px; }
  .kesfet-intro { font-size: 14px; margin-bottom: 16px; }

  .kf-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .kf-panel.is-open,
  .kf-panel:target {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.25s ease;
  }

  .kf-panel-card {
    background: var(--card);
    border-radius: 22px 22px 0 0;
    padding: 8px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  }

  .kf-sheet-handle { display: block; width: 40px; height: 4px; margin: 0 auto 10px; border-radius: 2px; background: var(--border-strong); }
  .kf-panel-close { display: inline-flex; }

  .kf-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
  }

  body.kf-sheet-open .kf-backdrop,
  .kf-side:has(.kf-panel:target) ~ .kf-backdrop { display: block; }
  body.kf-sheet-open { overflow: hidden; }
}

@media (min-width: 560px) and (max-width: 899px) {
  .kf-cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kf-panel-card { max-width: 640px; margin: 0 auto; }
}

/* --- Masaüstü: yan panel --- */
@media (min-width: 900px) {
  .kesfet-inner { max-width: 1180px; }

  .kf-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .kf-side {
    position: sticky;
    top: calc(92px + var(--ann-h, 0px)); /* + founder band (site.css) */
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }

  .kf-panel-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow);
  }

  .kf-panel-title { font-size: 15px; }
  .kf-panel-head { margin-bottom: 4px; }

  /* Masaüstünde kategori ızgarası yerine dikey liste — yan panelde daha okunur. */
  .kf-cat-grid { grid-template-columns: 1fr; gap: 2px; margin-top: 6px; }
  .kf-cat { flex-direction: row; gap: 10px; padding: 6px 8px; border-radius: 10px; }
  .kf-cat:hover { background: var(--alt); }
  .kf-cat-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
  .kf-cat:hover .kf-cat-icon { background: var(--brand-soft); color: var(--brand); }
  .kf-cat.is-active { background: var(--brand-soft); }
  .kf-cat.is-active .kf-cat-icon { background: var(--brand); color: #ffffff; }
  .kf-cat-name { font-size: 13.5px; text-align: left; }

  /* Kategori / Bölge sayfa-açıcıları masaüstünde gereksiz — panel zaten görünür. */
  .kf-qa--sheet { display: none; }
  .kf-quick { margin: 18px 0 0; padding: 0 0 4px; }

  .kf-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Boş sonuç / hata durumu ===== */
.kesfet-empty {
  text-align: center;
  padding: 56px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.kesfet-empty-icon { font-size: 40px; margin-bottom: 12px; }

.kesfet-empty h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--t1);
  margin: 0 0 10px;
}

.kesfet-empty p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--t2);
  max-width: 460px;
  margin: 0 auto 22px;
}

.kesfet-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ===== Sayfalama ===== */
.kesfet-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}

.kesfet-pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--t2);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.kesfet-pager-link:hover { border-color: var(--brand); color: var(--brand); }

.kesfet-pager-link.is-current {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.kesfet-pager-gap { color: var(--t3); padding: 0 2px; }

/* ===== "Uygulamada aç" bandı ===== */
.kesfet-appband {
  text-align: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  border-radius: 20px;
  padding: 30px 24px;
  color: #ffffff;
  margin-top: 40px;
}

.kesfet-appband-title { font-size: 19px; font-weight: 600; letter-spacing: -0.4px; }
.kesfet-appband-title .accent { opacity: 0.85; }
.kesfet-appband-sub { font-size: 14px; color: rgba(255, 255, 255, 0.85); margin: 8px 0 16px; }
.kesfet-appband-buttons { justify-content: center; }

/* ===== 404 — il/kategori bulunamadı ===== */
.kesfet-notfound {
  max-width: 560px;
  margin: 76px auto 0;
  padding: 96px 24px 120px;
  text-align: center;
  background: var(--bg);
  border-radius: 32px 32px 0 0;
  /* Inside main.main-fill (site.css) the sheet stretches to the footer; content stays centred. */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.kesfet-notfound-icon { font-size: 44px; margin-bottom: 16px; }

.kesfet-notfound h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--t1);
  margin: 0 0 12px;
}

.kesfet-notfound p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--t2);
  margin: 0 0 28px;
}
