/* TeklifNedir tasarım sistemi.
   Sıra: 1) tokenlar  2) Bootstrap tema geçersiz kılmaları  3) bileşenler (ui-*)
   Yeni stil yazarken önce buradaki tokenları kullan; view içinde inline <style> ve style="" ekleme. */

/* ---------- 1) Tokenlar ---------- */
:root {
  /* Marka: logodaki kobalt mavisi */
  --brand-50:  #eef3ff;
  --brand-100: #dbe5ff;
  --brand-500: #3366ee;
  --brand-600: #2352d8;
  --brand-700: #1b41ae;

  /* Nötrler (soğuk gri) */
  --ink:     #0f1623;
  --ink-2:   #3b4455;
  --muted:   #667085;
  --line:    #e6e9ef;
  --bg:      #f7f8fa;
  --surface: #ffffff;

  --success: #12805c;
  --danger:  #d92d20;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .09);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1240px;
}

/* ---------- 2) Bootstrap tema geçersiz kılmaları ---------- */
:root {
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 0.9375rem;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--radius-sm);
  --bs-border-radius-lg: var(--radius);
  --bs-link-color: var(--brand-600);
  --bs-link-hover-color: var(--brand-700);
  --bs-link-color-rgb: 35, 82, 216;
  --bs-primary: var(--brand-600);
  --bs-primary-rgb: 35, 82, 216;
  --bs-success: #12805c;
  --bs-success-rgb: 18, 128, 92;
}

html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.015em; font-weight: 650; }

.btn { border-radius: var(--radius-sm); font-weight: 600; }
.btn-primary {
  --bs-btn-bg: var(--brand-600);
  --bs-btn-border-color: var(--brand-600);
  --bs-btn-hover-bg: var(--brand-700);
  --bs-btn-hover-border-color: var(--brand-700);
  --bs-btn-active-bg: var(--brand-700);
  --bs-btn-active-border-color: var(--brand-700);
  --bs-btn-disabled-bg: var(--brand-500);
  --bs-btn-disabled-border-color: var(--brand-500);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand-600);
  --bs-btn-border-color: var(--brand-600);
  --bs-btn-hover-bg: var(--brand-600);
  --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-700);
  --bs-btn-active-border-color: var(--brand-700);
}
.form-control, .form-select { border-radius: var(--radius-sm); border-color: #d5dae3; }
.form-control:focus, .form-select:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(51, 102, 238, .18);
}
.card { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.dropdown-menu { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: .4rem; }
.dropdown-item { border-radius: 6px; font-size: .9rem; padding: .45rem .7rem; }

/* Eski view'ların kullandığı konteyner */
.tn-wrap { max-width: var(--container); width: 100%; margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }

/* ---------- 3) Bileşenler ---------- */
.ui-container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* Header */
.ui-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.ui-header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.ui-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.ui-brand img { width: 32px; height: 32px; border-radius: 9px; display: block; }
.ui-brand-name { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.ui-brand-name b { color: var(--brand-600); font-weight: 700; }

.ui-search {
  flex: 1 1 auto; max-width: 520px; position: relative; margin: 0 auto 0 8px;
}
.ui-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; pointer-events: none; }
.ui-search input {
  width: 100%; height: 40px; border: 1px solid transparent; background: #eff1f5; color: var(--ink);
  border-radius: 999px; padding: 0 16px 0 38px; font-size: .9rem; transition: background .15s, border-color .15s, box-shadow .15s;
}
.ui-search input::placeholder { color: var(--muted); }
.ui-search input:hover { background: #e8ebf1; }
.ui-search input:focus { outline: none; background: #fff; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(51, 102, 238, .15); }

.ui-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ui-link { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 8px 12px; border-radius: var(--radius-sm); }
.ui-link:hover { background: #f0f2f6; color: var(--ink); }

.ui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.ui-btn-primary { background: var(--brand-600); color: #fff; }
.ui-btn-primary:hover { background: var(--brand-700); color: #fff; }
.ui-btn-ghost { background: #fff; color: var(--ink); border-color: #d5dae3; }
.ui-btn-ghost:hover { border-color: var(--ink-2); color: var(--ink); }
.ui-btn-lg { height: 48px; padding: 0 24px; font-size: .95rem; }

/* Bildirim zili / ikon butonları (partials/notifications_bell.php eski adları kullanır) */
.ui-header .tn-navicon {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 999px; color: var(--ink-2); text-decoration: none; transition: background .15s, color .15s;
}
.ui-header .tn-navicon:hover { background: #f0f2f6; color: var(--ink); }
.ui-header .tn-navbadge {
  position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; border: 2px solid #fff; font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.ui-userbtn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 6px; border: 0; background: transparent;
  border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .9rem;
}
.ui-userbtn:hover { background: #f0f2f6; }
.ui-userbtn .ui-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }

@media (max-width: 767.98px) {
  .ui-header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .ui-search { order: 3; max-width: none; width: 100%; margin: 0; }
  .ui-actions { margin-left: auto; }
  .ui-brand-name { font-size: 1rem; }
}

/* Hızlı kategori çipleri */
.ui-chips { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 18px 0 2px; }
.ui-chips::-webkit-scrollbar { display: none; }
.ui-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; background: #fff; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .9rem; text-decoration: none; transition: border-color .15s, color .15s; }
.ui-chip i { color: var(--brand-600); font-size: .85rem; }
.ui-chip:hover { border-color: var(--brand-500); color: var(--brand-700); }

/* İlanlar / Hizmetler grupları */
.ui-group { padding-top: 26px; scroll-margin-top: 80px; }
.ui-group + .ui-group { margin-top: 18px; border-top: 1px solid var(--line); }
.ui-group-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ui-group-head h2 { font-size: 1.6rem; letter-spacing: -0.03em; margin: 0; }
.ui-group-head span { color: var(--muted); font-size: .92rem; }
.ui-chip.is-strong { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }

/* Bölümler */
.ui-section { padding: 22px 0 0; }
.ui-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ui-section-head h2 { font-size: 1.15rem; margin: 0; }
.ui-section-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.ui-more { color: var(--brand-600); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.ui-more:hover { text-decoration: underline; }

/* İlan kartı */
.ui-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1099.98px) { .ui-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px)  { .ui-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.ui-card { display: block; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .18s, border-color .18s; }
.ui-card:hover { box-shadow: var(--shadow-md); border-color: #d3d9e4; color: var(--ink); }
.ui-card-img { position: relative; aspect-ratio: 4 / 3; background: #eceff4; overflow: hidden; }
.ui-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-card-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #a3acbc; font-size: 1.6rem; }
.ui-badge { position: absolute; top: 10px; left: 10px; background: #fff; color: var(--brand-700); font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.ui-card-body { padding: 12px 14px 14px; }
.ui-price { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.ui-price.is-muted { font-size: .95rem; font-weight: 600; color: var(--muted); }
.ui-title { margin: 4px 0 8px; font-size: .9rem; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.ui-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; }
.ui-meta i { font-size: .72rem; }

/* Yatay satırlar (Netflix düzeni) */
.ui-row { position: relative; }
.ui-row-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: 2px; padding: 8px 2px 18px; margin: 0 -2px; scrollbar-width: none; }
.ui-row-track::-webkit-scrollbar { display: none; }
.ui-row .ui-card { flex: 0 0 clamp(150px, 15.5vw, 205px); scroll-snap-align: start; transition: box-shadow .18s, border-color .18s, transform .18s; }
.ui-row .ui-card:hover { transform: scale(1.04); z-index: 2; box-shadow: var(--shadow-md); }
.ui-row .ui-card-body { padding: 9px 11px 11px; }
.ui-row .ui-price { font-size: 1rem; }
.ui-row .ui-title { font-size: .84rem; margin: 2px 0 6px; min-height: 0; -webkit-line-clamp: 1; }
.ui-row-btn {
  position: absolute; top: calc(50% - 28px); z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .15s;
}
.ui-row:hover .ui-row-btn, .ui-row-btn:focus-visible { opacity: 1; }
.ui-row-btn.prev { left: -14px; }
.ui-row-btn.next { right: -14px; }
@media (hover: none) { .ui-row-btn { display: none; } }
.ui-meta .ui-views { margin-left: auto; }

/* Boş durum */
.ui-empty { background: #fff; border: 1px dashed #cfd5e0; border-radius: var(--radius); padding: 36px 20px; text-align: center; color: var(--muted); }
.ui-empty b { display: block; color: var(--ink); margin-bottom: 4px; }

/* Çağrı bandı */
.ui-cta { margin: 44px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 16px; padding: 26px 28px; }
.ui-cta h3 { margin: 0; font-size: 1.15rem; }
.ui-cta p { margin: 4px 0 0; color: var(--ink-2); }

/* Footer */
.ui-footer { margin-top: auto; background: #fff; border-top: 1px solid var(--line); }
.ui-footer-main { padding: 40px 0 28px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.ui-footer h6 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin: 0 0 12px; }
.ui-footer a { color: var(--ink-2); text-decoration: none; }
.ui-footer a:hover { color: var(--brand-600); }
.ui-footer-links a { display: block; padding: 4px 0; font-size: .9rem; }
.ui-footer-desc { color: var(--muted); font-size: .9rem; max-width: 34ch; margin-top: 10px; }
.ui-social { display: flex; gap: 8px; flex-wrap: wrap; }
.ui-social a { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; }
.ui-social a:hover { border-color: var(--brand-500); }
.ui-footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .85rem; }
@media (max-width: 767.98px) { .ui-footer-main { grid-template-columns: 1fr 1fr; } .ui-footer-main > :first-child { grid-column: 1 / -1; } }

/* Yapay zeka: ilan inceleme paneli */
.ui-ai-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ui-ai-ico { color: var(--brand-600); margin-right: 4px; }
.ui-ai-result { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.ui-ai-result[hidden] { display: none; }
.ui-ai-loading { color: var(--muted); }
.ui-ai-error { color: var(--danger); }
.ui-ai-summary { font-size: 1rem; margin: 0 0 14px; color: var(--ink); }
.ui-ai-price { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; background: #f3f4f7; border: 1px solid var(--line); }
.ui-ai-price.v-below_market { background: #ecf8f2; border-color: #bfe6d3; }
.ui-ai-price.v-unusually_low { background: #fff1f0; border-color: #f5c2bd; }
.ui-ai-price.v-above_market { background: #fff4ec; border-color: #f6d3b8; }
.ui-ai-price.v-fair { background: var(--brand-50); border-color: var(--brand-100); }
.ui-ai-verdict { font-weight: 650; }
.ui-ai-pcomment { margin-top: 4px; color: var(--ink-2); font-size: .92rem; }
.ui-ai-pfacts { margin-top: 6px; color: var(--muted); font-size: .8rem; }
.ui-ai-sec { margin-bottom: 14px; }
.ui-ai-sec-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; margin-bottom: 6px; }
.ui-ai-list { margin: 0; padding-left: 1.1rem; }
.ui-ai-list li { margin-bottom: 4px; color: var(--ink-2); }
.ui-ai-sec.warn .ui-ai-list li::marker { color: #d97706; }
.ui-ai-sec.ok .ui-ai-list li::marker { color: var(--success); }
.ui-ai-note { margin-top: 12px; }

/* ---------- İlan detayı (.ui-detail) ---------- */
.ui-detail { padding-top: 6px; }
.ui-d-title { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.95rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; margin: 0 0 12px; }
.ui-d-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ui-d-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; color: var(--ink-2); }
.ui-d-meta i { color: var(--muted); font-size: .74rem; }
.ui-d-price-inline { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; }
.ui-d-price-inline .is-muted { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* Eylem satırı (favori, yazdır, paylaş) */
.ui-detail #listingActionsRow { margin-bottom: 16px !important; gap: 8px 18px !important; }
.ui-detail #listingActionsRow .btn-link.text-muted { color: var(--ink-2) !important; font-size: .88rem; font-weight: 600; }
.ui-detail #listingActionsRow .btn-link.text-muted:hover { color: var(--brand-600) !important; }
.tn-share-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line); text-decoration: none; transition: color .15s, border-color .15s, background .15s; }
.tn-share-btn:hover { color: var(--brand-600); border-color: var(--brand-500); background: var(--brand-50); }

/* Galeri */
.ui-gallery { position: relative; border-radius: 16px; overflow: hidden; background: #e9ecf2; aspect-ratio: 16 / 10; margin-bottom: 12px; }
.ui-gallery .carousel-inner, .ui-gallery .carousel-item { height: 100%; }
.ui-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-gallery .carousel-control-prev, .ui-gallery .carousel-control-next { width: 64px; opacity: 1; }
.ui-gallery .carousel-control-prev-icon, .ui-gallery .carousel-control-next-icon { width: 40px; height: 40px; border-radius: 50%; background-color: rgba(15, 22, 35, .55); background-size: 45%; transition: background-color .15s; }
.ui-gallery .carousel-control-prev:hover .carousel-control-prev-icon, .ui-gallery .carousel-control-next:hover .carousel-control-next-icon { background-color: rgba(15, 22, 35, .8); }
.ui-gallery-count { position: absolute; right: 12px; bottom: 12px; background: rgba(15, 22, 35, .66); color: #fff; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.ui-thumbs { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 18px; padding: 2px 2px 6px; scrollbar-width: thin; }
.ui-thumbs button { flex: 0 0 88px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #e9ecf2; opacity: .72; cursor: pointer; transition: opacity .15s, border-color .15s; }
.ui-thumbs button:hover { opacity: 1; }
.ui-thumbs button.is-active { border-color: var(--brand-600); opacity: 1; }
.ui-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-gallery-empty { aspect-ratio: 16 / 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #fff; border: 1px dashed #cfd5e0; border-radius: 16px; color: #a3acbc; margin-bottom: 18px; font-size: .9rem; }
.ui-gallery-empty i { font-size: 2rem; }
@media (max-width: 767.98px) { .ui-gallery { aspect-ratio: 4 / 3; border-radius: 12px; } .ui-gallery .carousel-control-prev, .ui-gallery .carousel-control-next { width: 48px; } .ui-thumbs button { flex-basis: 72px; height: 54px; } }

/* Kartlar ve bölüm başlıkları */
.ui-detail .card { border-radius: var(--radius); }
.ui-detail .card-body { padding: 18px 20px; }
.ui-detail .card h5 { font-size: 1.05rem; font-weight: 650; margin-bottom: 12px; }
.ui-detail .card div[style*="pre-wrap"] { line-height: 1.7; color: var(--ink-2); }
.ui-soft { background: var(--brand-50); border-color: var(--brand-100); box-shadow: none; }
.ui-detail .badge { border-radius: 999px; font-weight: 600; }
.ui-detail .badge.bg-success { background-image: none; }

/* Özellikler */
.ui-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.ui-spec { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ui-spec dt { font-size: .78rem; color: var(--muted); font-weight: 600; margin: 0; }
.ui-spec dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
@media (max-width: 575.98px) { .ui-specs { grid-template-columns: 1fr; } }

/* Sağ sütun */
.ui-d-side { position: sticky; top: 84px; }
.ui-price-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.ui-price-value { font-size: 2.05rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-top: 4px; }
.ui-price-value.is-muted { font-size: 1.1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }

.ui-seller .btn { border-radius: var(--radius-sm); font-weight: 600; font-size: .85rem; padding: .45rem .85rem; }
.ui-seller .d-flex.flex-wrap.mt-3 { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
.ui-seller .d-flex.flex-wrap.mt-3 > * { min-width: 0; }
.ui-seller .btn-primary { grid-column: 1 / -1; width: 100%; padding: .6rem 1rem; font-size: .9rem; }
.ui-seller .btn-primary + .btn-outline-primary { grid-column: 1 / -1; }   /* misafir: tek satır */
.ui-seller form .btn, .ui-seller a.btn-outline-primary { width: 100%; text-align: center; white-space: nowrap; padding-left: .5rem; padding-right: .5rem; font-size: .82rem; }
.ui-seller a.btn-outline-primary { order: 2; }
.ui-seller form[action="/u/engelle"] { grid-column: 1 / -1; order: 3; }  /* engelle: sakin, en altta */
.ui-seller form[action="/u/engelle"] .btn { font-size: .8rem; }
.ui-seller .btn-outline-primary, .ui-seller .btn-outline-success, .ui-seller .btn-outline-secondary { background: #fff; color: var(--ink-2); border-color: #d5dae3; }
.ui-seller .btn-outline-primary:hover, .ui-seller .btn-outline-success:hover, .ui-seller .btn-outline-secondary:hover { background: #fff; color: var(--brand-700); border-color: var(--brand-500); }
.ui-seller .btn-success { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.ui-seller .btn-outline-danger { border-color: transparent; background: transparent; color: var(--muted); }
.ui-seller .btn-outline-danger:hover { color: var(--danger); background: #fff1f0; border-color: transparent; }

/* Teklif kutusu: eski yeşil çerçeveli buton marka birincil düğmesi */
.ui-d-side #teklif .btn-outline-success { background: var(--brand-600); border-color: var(--brand-600); color: #fff; font-weight: 600; padding: .6rem 1rem; }
.ui-d-side #teklif .btn-outline-success:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.ui-d-side #teklif .btn-outline-success:disabled { opacity: .55; }

/* Mobil alt eylem çubuğu */
.tn-bottombar { position: fixed; left: 0; right: 0; bottom: env(safe-area-inset-bottom); z-index: 1040; padding: 10px 0; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
@media (max-width: 991.98px) { .ui-detail { padding-bottom: 76px; } }

/* Bildirim (toast) */
.tn-toast { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 99999; background: #111827; color: #fff; padding: 12px 14px; border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .25); display: flex; gap: 10px; align-items: center; max-width: min(360px, calc(100vw - 32px)); opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: opacity .18s ease, transform .18s ease; font-size: 14px; border-left: 6px solid rgba(255, 255, 255, .18); }
.tn-toast.show { opacity: 1; transform: translateY(0); }
.tn-toast.success { border-left-color: #22c55e; }
.tn-toast.warn { border-left-color: #f59e0b; }
.tn-toast.error { border-left-color: #9ca3af; }
.tn-toast .ico { width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); font-weight: 800; flex: 0 0 26px; }
.tn-toast .msg { line-height: 1.2; }
.tn-toast .x { margin-left: auto; cursor: pointer; opacity: .85; pointer-events: auto; padding: 2px 8px; border-radius: 10px; }
.tn-toast .x:hover { opacity: 1; background: rgba(255, 255, 255, .10); }

/* ---------- Arama ve kategori sayfaları ---------- */
.ui-s-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.ui-s-title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem); font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.ui-s-count { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.ui-s-count b { color: var(--ink); }
.ui-s-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ui-sort { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; color: var(--muted); }
.ui-sort select { height: 40px; border: 1px solid #d5dae3; border-radius: var(--radius-sm); appearance: none; -webkit-appearance: none; padding: 0 34px 0 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23667085' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") no-repeat right 12px center; font-size: .88rem; color: var(--ink); font-weight: 600; cursor: pointer; }
.ui-sort select:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(51, 102, 238, .15); }

/* Aktif filtre çipleri */
.ui-fchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.ui-fchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); font-size: .82rem; font-weight: 600; text-decoration: none; }
.ui-fchip span { opacity: .7; font-weight: 700; }
.ui-fchip:hover { background: var(--brand-100); color: var(--brand-700); }
.ui-fclear { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.ui-fclear:hover { color: var(--danger); }

/* Yerleşim: filtre paneli + sonuçlar */
.ui-s-layout { display: flex; gap: 24px; align-items: flex-start; }
.ui-s-main { flex: 1; min-width: 0; }
.ui-filters { width: 272px; flex: 0 0 272px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.ui-filters-head { display: none; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ui-filters-head h2 { font-size: 1.1rem; margin: 0; }
.ui-filters-x { border: 0; background: #f0f2f6; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2); }
.ui-filter-sec { padding: 14px 0; border-top: 1px solid var(--line); }
.ui-filter-sec:first-of-type { border-top: 0; padding-top: 0; }
.ui-filter-sec h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; margin: 0 0 10px; }
.ui-filters .form-control, .ui-filters .form-select { font-size: .9rem; }
.ui-minmax { display: flex; align-items: center; gap: 8px; }
.ui-minmax span { color: var(--muted); }
.ui-check { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-2); margin: 0 0 8px; cursor: pointer; }
.ui-check input { width: 17px; height: 17px; accent-color: var(--brand-600); }
.ui-filter-actions { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }

/* Kategori ağacı */
.ui-cat-p { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 0; border: 0; background: transparent; font-weight: 650; font-size: .92rem; color: var(--ink); text-align: left; cursor: pointer; }
.ui-cat-p .ch { font-size: .7rem; color: var(--muted); transition: transform .15s; }
.ui-cat-p[aria-expanded="true"] .ch { transform: rotate(180deg); }
.ui-cat-kids { padding: 0 0 8px 10px; border-left: 2px solid var(--line); margin-left: 2px; }
.ui-cat-kids a { display: block; padding: 5px 8px; font-size: .88rem; color: var(--ink-2); text-decoration: none; border-radius: 6px; }
.ui-cat-kids a:hover { background: #f0f2f6; color: var(--ink); }
.ui-cat-kids a.on { background: var(--brand-50); color: var(--brand-700); font-weight: 650; }

/* Sonuç kartları (liste düzeni) */
.ui-rlist { display: flex; flex-direction: column; gap: 14px; }
.ui-rcard { display: flex; gap: 18px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: box-shadow .18s, border-color .18s; }
.ui-rcard:hover { box-shadow: var(--shadow-md); border-color: #d3d9e4; color: var(--ink); }
.ui-rcard-img { flex: 0 0 240px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #eceff4; display: flex; align-items: center; justify-content: center; color: #a3acbc; font-size: 1.8rem; }
.ui-rcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ui-rcard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 2px 4px 2px 0; }
.ui-rcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ui-rcard-title { font-size: 1.05rem; font-weight: 650; line-height: 1.35; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ui-rcard-price { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.ui-rcard-price.is-muted { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ui-rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.ui-rchips span { padding: 3px 10px; background: #f0f2f6; border-radius: 999px; font-size: .78rem; color: var(--ink-2); font-weight: 600; }
.ui-rcard-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: .84rem; color: var(--muted); }
.ui-rcard-foot span { display: inline-flex; align-items: center; gap: 6px; }
.ui-rcard-foot i { font-size: .74rem; }
.ui-owner { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 600; color: var(--ink-2); }
.ui-owner img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
@media (max-width: 767.98px) {
  .ui-rcard { gap: 12px; padding: 10px; }
  .ui-rcard-img { flex-basis: 118px; align-self: flex-start; }
  .ui-rcard-top { flex-direction: column; gap: 4px; }
  .ui-rcard-title { font-size: .95rem; }
  .ui-rcard-price { font-size: 1.05rem; }
  .ui-owner { margin-left: 0; }
}

/* Sayfalama */
.ui-pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin: 26px 0 6px; }
.ui-pager a, .ui-pager .gap { min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--ink-2); }
.ui-pager a { background: #fff; border: 1px solid var(--line); }
.ui-pager a:hover { border-color: var(--brand-500); color: var(--brand-700); }
.ui-pager a.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.ui-pager .gap { color: var(--muted); }

.ui-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* Mobil: filtre paneli soldan açılan çekmece */
.ui-filters-overlay { display: none; }
@media (max-width: 991.98px) {
  .ui-filters { position: fixed; top: 0; left: 0; bottom: 0; width: min(360px, 92vw); max-height: none; z-index: 1060; border-radius: 0 16px 16px 0; transform: translateX(-104%); transition: transform .22s ease; box-shadow: var(--shadow-md); }
  .ui-filters-head { display: flex; }
  .ui-filters-overlay { display: block; position: fixed; inset: 0; background: rgba(15, 22, 35, .5); z-index: 1055; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.filters-open { overflow: hidden; }
  body.filters-open .ui-filters { transform: none; }
  body.filters-open .ui-filters-overlay { opacity: 1; pointer-events: auto; }
  .ui-s-layout { display: block; }
}

/* Kategori sayfası */
.ui-c-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 16px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.ui-c-bar .form-control, .ui-c-bar .form-select { height: 40px; font-size: .9rem; }
.ui-c-bar .grow { flex: 1 1 220px; }
.ui-c-bar .mid { flex: 0 1 160px; }
.ui-c-bar .sm { flex: 0 1 120px; }
.ui-subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.ui-subcats a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: .88rem; font-weight: 600; text-decoration: none; }
.ui-subcats a:hover { border-color: var(--brand-500); color: var(--brand-700); }
.ui-subcats a small { color: var(--muted); font-weight: 500; margin-left: 4px; }

.ui-rcard-snippet { font-size: .88rem; color: var(--ink-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 767.98px) { .ui-rcard-snippet { display: none; } }

/* İlan verme: yapay zeka taslağı */
.ui-ai-draft-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.ui-ai-filled { background-color: var(--brand-50) !important; border-color: var(--brand-100) !important; }
