/* ==========================================================================
   main.css - ilk ekran disindaki her sey. preload + onload ile yuklenir.
   ========================================================================== */

/* --- Ekran alti bloklari tembellestir --------------------------------- */
.esb-defer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* --- Breadcrumb ------------------------------------------------------- */
.esb-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted); margin-bottom: 14px;
}
.esb-crumbs a:hover { color: var(--accent); }
.esb-crumbs svg { opacity: .5; }
.esb-crumbs [aria-current] { color: var(--text); font-weight: 600; }

/* --- Filtre cubugu ---------------------------------------------------- */
.esb-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.esb-toolbar__sort { display: flex; gap: 4px; flex-wrap: wrap; }
.esb-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.esb-chip:hover { color: var(--text); }
.esb-chip.is-active {
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.esb-chip--clear { color: var(--accent); background: transparent; border-color: var(--line); }

.esb-toolbar__right { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }

.esb-filterbtn { display: none; }
@media (max-width: 1100px) { .esb-filterbtn { display: inline-flex; } }
/* Mobilde Filtrele toolbar'dan kaldirildi; sidebar zaten icerik altinda inline gorunuyor */
@media (max-width: 860px) { .esb-filterbtn { display: none; } }

/* --- Aktif filtre etiketleri ------------------------------------------ */
.esb-activefilters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.esb-activefilters a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.esb-activefilters a:hover { border-color: var(--accent); color: var(--accent); }

/* --- Sidebar icerigi -------------------------------------------------- */
.esb-side-box__body { padding: 8px 10px 11px; }

.esb-termlist { font-size: 13.5px; }
.esb-termlist li { border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.esb-termlist li:last-child { border-bottom: 0; }
.esb-termlist > li > a,
.esb-termlist__row > a,
.esb-termlist ul a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 4px; color: var(--muted); border-radius: 6px;
  transition: color .14s, padding .14s;
}
.esb-termlist a:hover { color: var(--accent); }
.esb-termlist > li > a:hover,
.esb-termlist__row > a:hover { padding-inline-start: 8px; }
.esb-termlist .is-current > a { color: var(--accent); font-weight: 700; }
.esb-termlist__count {
  flex: 0 0 auto; min-width: 22px; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--surface-2); border-radius: 999px; padding: 1px 6px;
}
.esb-termlist ul { margin: 0; border: 0; padding: 0; }
.esb-termlist ul > li > a { padding-inline-start: 20px; }
.esb-termlist ul > li > a:hover { padding-inline-start: 24px; }

.esb-termtoggle {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  color: var(--muted); flex: 0 0 auto;
}
.esb-termtoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.esb-termtoggle svg { transition: transform .18s; }
.esb-termlist__row { display: flex; align-items: center; }
.esb-termlist__row > a { flex: 1 1 auto; }
.esb-termlist li > ul[hidden] { display: none; }

.esb-side-more {
  display: block; text-align: center; padding: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--accent);
  border-top: 1px solid var(--line);
}

/* --- Sidebar filtre formu --------------------------------------------- */
.esb-filter { display: grid; gap: 12px; }
.esb-filter label { font-size: 12px; font-weight: 700; color: var(--muted); display: block; margin-bottom: 5px; }
.esb-filter select,
.esb-filter input[type="number"],
.esb-filter input[type="text"] {
  width: 100%; height: 34px; padding: 0 9px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 13px;
}
.esb-filter__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.esb-filter__checks { display: flex; flex-wrap: wrap; gap: 6px; }
.esb-filter__checks label {
  display: inline-flex; align-items: center; gap: 5px; margin: 0;
  padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer;
  color: var(--muted);
}
.esb-filter__checks input { accent-color: var(--accent); }
.esb-filter__checks input:checked + span { color: var(--accent); }

/* --- Sidebar mini liste ----------------------------------------------- */
.esb-mini { display: grid; gap: 9px; }
.esb-mini__item { display: flex; gap: 9px; align-items: center; }
.esb-mini__item img { flex: 0 0 54px; width: 54px; height: 72px; object-fit: cover; border-radius: 8px; }
.esb-mini__item > span { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.esb-mini__t { font-size: 13px; font-weight: 700; line-height: 1.3; }
.esb-mini__m { font-size: 11.5px; color: var(--muted); }
.esb-mini__p { font-size: 12px; font-weight: 700; color: var(--accent); }

/* --- Sayfalama -------------------------------------------------------- */
.esb-pager { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; margin-top: 28px; }
.esb-pager .page-numbers {
  min-width: 38px; height: 38px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.esb-pager .page-numbers:hover { color: var(--text); border-color: var(--accent); }
.esb-pager .current {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink); border-color: transparent;
}
.esb-pager .dots { background: none; border: 0; }

.esb-loadmore { display: flex; justify-content: center; margin-top: 26px; }

/* --- Metin bloklari (SEO icerigi) ------------------------------------- */
.esb-prose {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-top: 28px;
  font-size: 14.5px; color: color-mix(in srgb, var(--text) 86%, var(--muted));
}
.esb-prose > * + * { margin-top: 0.9em; }
.esb-prose h2, .esb-prose h3 { color: var(--text); margin-top: 1.5em; }
.esb-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.esb-prose ul { list-style: disc; padding-inline-start: 1.2em; }
.esb-prose ol { list-style: decimal; padding-inline-start: 1.2em; }
.esb-prose li + li { margin-top: .35em; }
.esb-prose table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.esb-prose th, .esb-prose td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: start; }

/* --- Ana sayfa SEO metni (acilir / kapanir) --------------------------- */
.esb-home-seo {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-top: 28px;
}
.esb-home-seo__title { font-size: 1.18rem; color: var(--text); margin-bottom: 12px; }
.esb-home-seo__body.esb-prose {
  background: none; border: 0; padding: 0; margin: 0;
  line-height: 1.75; position: relative;
}
/* Varsayilan (JS yok): tam metin gorunur, buton gizli — SEO ve erisim guvenli */
.esb-home-seo__toggle { display: none; }
/* JS var ve satir siniri tanimli: metni kirp */
.esb-js .esb-home-seo:not([data-esb-seo-nolimit]) .esb-home-seo__body {
  overflow: hidden;
  max-height: calc(var(--seo-lines-m, 10) * 1.75em);
}
@media (min-width: 861px) {
  .esb-js .esb-home-seo:not([data-esb-seo-nolimit]) .esb-home-seo__body {
    max-height: calc(var(--seo-lines-d, 6) * 1.75em);
  }
}
.esb-js .esb-home-seo:not([data-esb-seo-nolimit]) .esb-home-seo__body::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2.6em;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
}
.esb-home-seo.is-open .esb-home-seo__body { max-height: none !important; overflow: visible; }
.esb-home-seo.is-open .esb-home-seo__body::after { display: none; }
.esb-js .esb-home-seo:not([data-esb-seo-nolimit]) .esb-home-seo__toggle { display: inline-flex; }
.esb-home-seo__toggle[hidden] { display: none !important; }
.esb-home-seo__toggle {
  align-items: center; gap: 6px; margin-top: 14px; padding: 7px 14px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--accent);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.esb-home-seo__toggle:hover { border-color: var(--accent); background: var(--surface-2); }
.esb-home-seo__toggle svg { transition: transform .2s; }
.esb-home-seo.is-open .esb-home-seo__toggle svg { transform: rotate(180deg); }
.esb-home-seo__toggle-less { display: none; }
.esb-home-seo.is-open .esb-home-seo__toggle-more { display: none; }
.esb-home-seo.is-open .esb-home-seo__toggle-less { display: inline; }

/* --- Ic link agi ------------------------------------------------------ */
.esb-linkweb {
  margin-top: 26px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.esb-linkweb h2 { font-size: 15px; margin-bottom: 12px; }
.esb-linkweb__list { display: flex; flex-wrap: wrap; gap: 7px; }
.esb-linkweb__list a {
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  transition: color .14s, border-color .14s;
}
.esb-linkweb__list a:hover { color: var(--accent); border-color: var(--accent); }

/* --- SSS -------------------------------------------------------------- */
.esb-faq { margin-top: 26px; display: grid; gap: 8px; }
.esb-faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 15px;
}
.esb-faq summary { font-weight: 700; cursor: pointer; font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.esb-faq summary::-webkit-details-marker { display: none; }
.esb-faq summary::after { content: "+"; color: var(--accent); font-size: 18px; line-height: 1; }
.esb-faq details[open] summary::after { content: "−"; }
.esb-faq p { margin-top: 9px; font-size: 13.5px; color: var(--muted); }

/* --- Footer ----------------------------------------------------------- */
.esb-footer {
  background: var(--bg-soft); border-top: 1px solid var(--line);
  margin-top: 40px; padding-block: 36px 0;
}
.esb-footer__cols {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px;
}
@media (max-width: 900px) { .esb-footer__cols { grid-template-columns: 1fr 1fr; gap: 22px; } }
@media (max-width: 560px) { .esb-footer__cols { grid-template-columns: 1fr; } }

.esb-footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.esb-footer ul { display: grid; gap: 7px; font-size: 13.5px; }
.esb-footer a { color: var(--muted); }
.esb-footer a:hover { color: var(--accent); }
.esb-footer__about { font-size: 13.5px; color: var(--muted); max-width: 42ch; }
.esb-footer__about p + p { margin-top: .8em; }

.esb-footer__tags { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.esb-footer__tags h3 { margin-bottom: 10px; }

.esb-footer__bottom {
  margin-top: 26px; padding-block: 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted);
}
.esb-footer__bottom nav ul { display: flex; gap: 14px; flex-wrap: wrap; }
.esb-age {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; border: 2px solid var(--accent); color: var(--accent);
  font-size: 11px; font-weight: 800;
}

/* --- Mobil menu ------------------------------------------------------- */
.esb-drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 95;
  width: min(320px, 84vw); height: 100dvh; padding: 16px;
  background: var(--bg-soft); border-inline-end: 1px solid var(--line);
  transform: translateX(-101%); transition: transform .25s ease;
  overflow-y: auto; overscroll-behavior: contain;
}
.esb-drawer.is-open { transform: none; }
.esb-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.esb-drawer nav ul { display: grid; gap: 2px; }
.esb-drawer nav a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; }
.esb-drawer nav a:hover { background: var(--surface-2); }
.esb-drawer ul ul { margin-inline-start: 12px; }

.esb-overlay {
  position: fixed; inset: 0; z-index: 88;
  background: rgb(0 0 0 / .55); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.esb-overlay.is-open { opacity: 1; visibility: visible; }

body.esb-locked { overflow: hidden; }

/* --- Karsilastirma cubugu --------------------------------------------- */
.esb-compare {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 80;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 10px 16px; transform: translateY(101%); transition: transform .25s;
  box-shadow: 0 -16px 36px -26px #000;
}
.esb-compare.is-open { transform: none; }
.esb-compare__in { display: flex; align-items: center; gap: 12px; width: min(100% - 0px, var(--shell)); margin-inline: auto; }
.esb-compare__items { display: flex; gap: 8px; flex: 1 1 auto; overflow-x: auto; }
.esb-compare__item { position: relative; flex: 0 0 auto; }
.esb-compare__item img { width: 44px; height: 58px; object-fit: cover; border-radius: 7px; }
.esb-compare__item button {
  position: absolute; top: -5px; inset-inline-end: -5px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}

/* --- Modal ------------------------------------------------------------ */
.esb-modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 18px;
  background: rgb(0 0 0 / .78); backdrop-filter: blur(5px);
}
.esb-modal[hidden] { display: none; }
.esb-modal__box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  width: min(460px, 100%); text-align: center;
}
.esb-modal__box h2 { margin-bottom: 10px; }
.esb-modal__box p { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.esb-modal__act { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Yas kapisi */
.esb-agegate .esb-modal__box { max-width: 420px; }
.esb-agegate__logo {
  width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px;
  display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* --- Toast ------------------------------------------------------------ */
.esb-toasts {
  position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 130;
  display: grid; gap: 8px; pointer-events: none;
}
.esb-toast {
  background: var(--surface); border: 1px solid var(--line);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 10px 15px;
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
  animation: esb-in .22s ease both;
}
@keyframes esb-in { from { opacity: 0; transform: translateY(8px); } }

/* --- Hizli arama onerileri -------------------------------------------- */
.esb-suggest {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 70;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  max-height: 60vh; overflow-y: auto;
}
.esb-suggest[hidden] { display: none; }
.esb-suggest a { display: flex; gap: 9px; align-items: center; padding: 8px 11px; font-size: 13px; }
.esb-suggest a:hover, .esb-suggest a.is-active { background: var(--surface-2); }
.esb-suggest img { width: 30px; height: 40px; object-fit: cover; border-radius: 5px; }
.esb-suggest__group { padding: 7px 11px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }

/* --- Bos durum / 404 -------------------------------------------------- */
.esb-empty { text-align: center; padding: 56px 20px; }
.esb-empty__ico { color: var(--muted); opacity: .45; margin: 0 auto 14px; }
.esb-empty h2 { margin-bottom: 8px; }
.esb-empty p { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* --- Formlar ---------------------------------------------------------- */
.esb-form { display: grid; gap: 16px; }
.esb-form__row { display: grid; gap: 6px; }
.esb-form__row > label { font-size: 13px; font-weight: 700; }
.esb-form input[type="text"], .esb-form input[type="email"], .esb-form input[type="tel"],
.esb-form input[type="number"], .esb-form input[type="url"], .esb-form select, .esb-form textarea {
  width: 100%; padding: 10px 12px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px;
}
.esb-form textarea { min-height: 130px; resize: vertical; }
.esb-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.esb-form__hint { font-size: 12px; color: var(--muted); }
.esb-form__note {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  font-size: 13px;
}
.esb-form__error { color: var(--accent); font-size: 12.5px; }
.esb-drop {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 26px; text-align: center; color: var(--muted); font-size: 13.5px;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.esb-drop:hover, .esb-drop.is-over { border-color: var(--accent); color: var(--accent); }
.esb-drop__previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.esb-drop__previews img { width: 64px; height: 84px; object-fit: cover; border-radius: 7px; }

/* --- Yukleniyor durumu ------------------------------------------------ */
.esb-grid.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s; }
.esb-skel {
  border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); overflow: hidden;
}
.esb-skel__media { aspect-ratio: 3/4; background: linear-gradient(100deg, var(--surface-2) 30%, var(--line) 50%, var(--surface-2) 70%); background-size: 220% 100%; animation: esb-shimmer 1.3s infinite; }
@keyframes esb-shimmer { to { background-position: -120% 0; } }

/* --- Gecis animasyonlari ---------------------------------------------- */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
