/* dosya: assets/css/index.css (SADECE index.html etkisi) */

/* index sayfasında ihtiyaç olan root değişkenleri */
:root{
  --sidebar-w: 300px;
  --border: #e6e9ee;
  --text: #1f2937;
  --muted: #6b7280;

  /* container / shell */
  --shell-w: 1060px;
  --shell-gap: 18px;
}

*{ box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin:0;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,Helvetica,sans-serif;
  color: var(--text);
  background: #ffffff;
}

/* =========================
   SHELL (container)
========================= */
.shell{
  width: min(var(--shell-w), calc(100% - (var(--shell-gap) * 2)));
  margin-inline: auto;
}
.shell--topbar{ height: 56px; display:flex; align-items:center; }
.shell--main{ padding-top: 10px; padding-bottom: 24px; }

/* =========================
   PAGE LAYOUT (desktop)
========================= */
.page{
  display:flex;
  width: 100%;
  min-height: calc(100vh - 56px);
  background:#fff;
}

/* SIDEBAR */
.sidebar{
  width: var(--sidebar-w);
  border-right: 1px solid var(--border);
  padding: 10px 10px 18px 10px;
  overflow: auto;
}
.sidebar__section{
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
}
.sidebar__quick{
  display:flex;
  align-items:center;
  gap: 8px;
  color: #111827;
  text-decoration:none;
  font-size: 13px;
  padding: 6px 6px;
  border-radius: 4px;
}
.sidebar__quick:hover{ background: #f7f8fb; }
.sidebar__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  display:inline-block;
}
.sidebar__headline{
  font-size: 13px;
  color:#111827;
  display:flex;
  align-items:center;
  flex-wrap: wrap;
  gap: 6px;
}

.sidebar__group{
  border-bottom: 1px solid var(--border);
}
.sidebar__groupBtn{
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 6px;
  display:flex;
  align-items:center;
  gap: 10px;
  text-align:left;
  cursor:pointer;
}
.sidebar__groupBtn:hover{ background: #f7f8fb; }
.sidebar__gIcon{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size: 13px;
  flex: 0 0 auto;
}
.i-yellow{ background: #ffe08a; color:#7c4a00; }
.i-red{ background: #ffd1d1; color:#8a1f1f; }
.i-cyan{ background: #c8f7ff; color:#0b6b79; }

.sidebar__gTitle{
  font-size: 13px;
  font-weight: 600;
  color:#111827;
  flex:1;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar__chev{
  color: #6b7280;
  transition: transform .15s ease;
}
.sidebar__group.is-open .sidebar__chev{ transform: rotate(180deg); }

.sidebar__groupBody{
  display:none;
  padding: 0 6px 10px 38px;
}
.sidebar__group.is-open .sidebar__groupBody{ display:block; }

.sidebar__link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 6px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #1f2937;
  text-decoration:none;
}
.sidebar__link:hover{ background: #f7f8fb; }
.sidebar__count{
  color: var(--muted);
  font-size: 12px;
}

/* CONTENT */
.content{
  flex:1;
  padding: 12px 16px 24px 16px;
  overflow:auto;
}
.content__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin: 4px 0 10px 0;
}
.content__title{
  font-size: 16px;
  font-weight: 700;
  margin:0;
}
.content__more{
  font-size: 12px;
  color: #2c74d6;
  text-decoration:none;
}
.content__more:hover{ text-decoration: underline; }

/* VITRIN GRID */
.vitrin{
  display:grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 12px;
  align-content: start;
}

/* CARD */
.vcard{
  display:block;
  width: 100%;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
}
.vcard:hover{
  border-color: #dde3ec;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.vcard__img{
  width: 100%;
  height: 92px;
  border: 1px solid #eef1f5;
  background: #f3f5f9;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.vcard__img img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.vcard__cap{
  font-size: 12px;
  color:#111827;
  padding: 6px 2px 0 2px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vcard--ad .vcard__img{
  border-color:#f1d400;
  background:#ffe600;
}

/* =========================
   MOBILE SHELL (app taklidi)
========================= */
/* desktop’ta mobile gizle */
.m-shell{ display:none; }

/* responsive vitrin kolonları */
@media (max-width: 1400px){
  .vitrin{ grid-template-columns: repeat(6, minmax(140px, 1fr)); }
}
@media (max-width: 1200px){
  .vitrin{ grid-template-columns: repeat(5, minmax(140px, 1fr)); }
}
@media (max-width: 992px){
  :root{ --sidebar-w: 280px; --shell-w: 980px; }
  .vitrin{ grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}

/* 768 altı: web layout yerine mobile app shell’e geç */
@media (max-width: 768px){
  /* web’i kapat */
  .topbar, .shell--main{ display:none; }

  /* mobile’i aç */
  .m-shell{
    display:block;
    min-height: 100vh;
    background:#fff;
  }
}

/* 520 altı gibi (web kaldıysa) */
@media (max-width: 520px){
  .topbar__advLink{ display:none; } /* header.css’te varsa sorun değil */
}

/* =========================
   MOBILE UI (index içeriği)
========================= */
.m-topbar{
  position: sticky;
  top:0;
  z-index: 40;
  height: 56px;
  background: #1f5f8d;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 12px;
}
.m-logo{
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #ffdc00;
  color:#111827;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 800;
}
.m-topbar__title{ font-weight: 700; letter-spacing:.2px; }
.m-icon{
  width: 34px;
  height: 34px;
  border:0;
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.m-content{ padding-bottom: 76px; }
.m-view{ display:none; padding: 12px; }
.m-view.is-active{ display:block; }

.m-bottomnav{
  position: fixed;
  left:0; right:0; bottom:0;
  height: 70px;
  background:#fff;
  border-top: 1px solid var(--border);
  display:flex;
  align-items:flex-start;
  justify-content:space-around;
  padding-top: 8px;
}
.m-tab{
  width: 20%;
  border:0;
  background: transparent;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 6px;
  color:#6b7280;
  font-size: 12px;
}
.m-tab i{ font-size: 18px; }
.m-tab.is-active{ color:#1f5f8d; }

.m-tab--plus{ transform: translateY(-18px); }
.m-plusBtn{
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background:#1f5f8d;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
}
.m-sectionTitle{ font-weight: 800; margin: 8px 0 12px; }
.m-placeholder{
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  padding: 18px;
  color:#6b7280;
  background:#fafafa;
}

/* mobil vitrin */
.m-vitrin{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.m-vcard{ text-decoration:none; color:inherit; }
.m-vcard__img{
  height: 120px;
  border: 1px solid #eef1f5;
  background:#f3f5f9;
  overflow:hidden;
}
.m-vcard__img img{ width:100%; height:100%; object-fit:cover; display:block; }
.m-vcard__cap{
  font-size: 12px;
  padding-top: 6px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.m-vcard--ad .m-vcard__img{ background:#ffe600; border-color:#f1d400; }

/* mobil arama */
.m-searchWrap{ padding: 8px 0 10px; }
.m-search{
  display:flex;
  align-items:center;
  gap: 10px;
  background:#f3f4f6;
  border-radius: 12px;
  padding: 10px 12px;
}
.m-search input{
  border:0;
  outline:0;
  background: transparent;
  width: 100%;
  font-size: 14px;
}
.m-mic{
  border:0;
  background: transparent;
  color:#6b7280;
}

.m-catList{ display:flex; flex-direction:column; }
.m-catItem{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 12px 6px;
  border-bottom: 1px solid #eef1f5;
  text-decoration:none;
  color:inherit;
}
.m-catIcon{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  color:#111827;
}
.c-yellow{ background:#ffd35a; }
.c-red{ background:#ffb4b4; }
.c-cyan{ background:#bdf3ff; }
.c-blue{ background:#cfe7ff; }
.c-lime{ background:#c9f7c9; }

.m-catText{ min-width: 0; flex:1; }
.m-catTitle{ font-weight: 800; display:block; }
.m-catSub{
  display:block;
  font-size: 12px;
  color:#6b7280;
  white-space: nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.m-safe{ color:#22c55e; font-weight:700; }
.m-badgeNew{
  display:inline-block;
  margin-left: 6px;
  background:#ef4444;
  color:#fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
}
.m-chev{ color:#9ca3af; }

.m-divider{ height: 10px; background:#f3f4f6; margin: 10px -12px; }
.m-blockTitle{
  font-size: 12px;
  letter-spacing:.8px;
  color:#9ca3af;
  margin: 10px 0 10px;
}

/* mobil ilan list */
.m-adList{ display:flex; flex-direction:column; gap: 12px; }
.m-adCard{
  display:flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid #eef1f5;
  background:#fff;
  text-decoration:none;
  color:inherit;
}
.m-adImg{
  width: 92px;
  height: 70px;
  background:#f3f5f9;
  border: 1px solid #eef1f5;
  overflow:hidden;
  flex: 0 0 auto;
}
.m-adImg img{ width:100%; height:100%; object-fit:cover; display:block; }
.m-adBody{ flex:1; min-width:0; }
.m-adTitle{
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.m-row{ font-size: 12px; color:#6b7280; margin-top: 4px; }
.m-pill{
  display:inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background:#e5e7eb;
  color:#374151;
}
.m-match{ color:#10b981; font-weight:800; }
.m-adPrice{
  font-weight: 900;
  color:#1f5f8d;
  white-space: nowrap;
  align-self:center;
}
