* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, sans-serif;
  background: #f0f2f5;
  color: #222;
}

a{
  text-decoration: none;
  color: #fff;;
}

/* HEADER */
header {
  background: #1a1a2e;
  color: #fff;
  padding: 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

header .sidebar-toggle {
  flex: 0 0 auto;
}

header img {
  height: 60px;
  object-fit: contain;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .5px;
  white-space: nowrap;
  margin: 0;
  flex: 1;
  text-align: center;
  padding-left: 10px;
}

.sync-info {
  font-size: .72rem;
  color: #888;
}

.search-form {
  display: flex;
  gap: 6px;
  flex: 1;
  max-width: 480px;
  justify-content: flex-end;
}

.search-form input {
  width: 100%;
  max-width: 200px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: .9rem;
  outline: none;
}

.search-form button {
  padding: 8px 16px;
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.search-form button:hover {
  background: #c1121f;
}

/* LAYOUT */
.layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 54px);
}

/* SIDEBAR */
.sidebar {
  width: 230px;
  min-width: 230px;
  background: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 12px 0;
  overflow-y: auto;
  position: sticky;
  top: 80px;
  height: calc(100vh - 54px);
}

.sidebar-baslik {
  padding: 10px 16px;
  font-size: .7rem;
  font-weight: 800;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
}

.kat-ana {
  width: 100%;
}

.kat-ana-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  transition: background .15s;
}

.kat-ana-btn:hover {
  background: #f5f5f5;
  color: #1a1a2e;
}

.kat-ana-btn.aktif {
  background: #e8eaf6;
  color: #1a1a2e;
}

.kat-ana-btn .ok {
  font-size: .7rem;
  color: #bbb;
  transition: transform .2s;
  flex-shrink: 0;
}

.kat-ana-btn.acik .ok {
  transform: rotate(90deg);
}

.kat-alt-liste {
  display: none;
  background: #fafafa;
  border-left: 3px solid #e8eaf6;
  margin-left: 16px;
}

.kat-alt-liste.acik {
  display: block;
}

.kat-alt-link {
  display: block;
  padding: 7px 12px;
  font-size: .82rem;
  color: #555;
  text-decoration: none;
  transition: background .12s, color .12s;
}

.kat-alt-link:hover {
  background: #e8eaf6;
  color: #1a1a2e;
}

.kat-alt-link.aktif {
  background: #1a1a2e;
  color: #fff;
  font-weight: 600;
}

.tmumu-link {
  display: block;
  padding: 7px 16px;
  font-size: .82rem;
  color: #e63946;
  text-decoration: none;
  font-weight: 600;
}

.tmumu-link:hover {
  background: #fff5f5;
}

/* İÇERİK */
.icerik {
  flex: 1;
  padding: 16px;
  min-width: 0;
}

.meta-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.meta-sayi {
  font-size: .85rem;
  color: #666;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .82rem;
}

.breadcrumb a {
  color: #e63946;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #bbb;
}

.temizle-btn {
  margin-left: auto;
  padding: 5px 12px;
  background: #eee;
  border-radius: 6px;
  text-decoration: none;
  font-size: .8rem;
  color: #555;
}

.temizle-btn:hover {
  background: #ddd;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 14px;
}

.kart {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
}

.kart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.kart-resim {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f9f9f9;
  padding: 8px;
}

.kart-resim-yok {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #ccc;
  font-size: 2.5rem;
}

.kart-body {
  padding: 11px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.kart-ad {
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
  color: #1a1a2e;
}

.kart-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
}

.kart-kod {
  font-size: .72rem;
  color: #bbb;
}

.kart-marka {
  font-size: .72rem;
  color: #888;
  background: #f0f0f0;
  padding: 1px 6px;
  border-radius: 8px;
}

.kart-fiyat {
  font-size: 1.15rem;
  font-weight: 800;
  color: #e63946;
  margin-top: 4px;
}

.kart-stok {
  font-size: .72rem;
  padding: 2px 7px;
  border-radius: 10px;
  width: fit-content;
}

.stok-var {
  background: #e8f5e9;
  color: #2e7d32;
}

.stok-az {
  background: #fff3e0;
  color: #e65100}

.kart-btn {
  margin-top: 8px;
  padding: 8px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.kart-btn:hover {
  background: #e63946;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 24px 0;
}

.pagination a, .pagination span {
  padding: 7px 13px;
  border-radius: 6px;
  text-decoration: none;
  font-size: .88rem;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
}

.pagination .aktif {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
}

.bos {
  text-align: center;
  padding: 60px;
  color: #999;
  font-size: 1rem;
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.acik {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  max-width: 400px;
  width: 92%;
  position: relative;
}

.modal h2 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: #1a1a2e;
  line-height: 1.4;
}

.modal .fiyat-buyuk {
  font-size: 1.9rem;
  font-weight: 800;
  color: #e63946;
  margin: 8px 0 18px;
}

.modal input, .modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 7px;
  margin-bottom: 10px;
  font-size: .92rem;
  font-family: inherit;
}

.modal textarea {
  height: 72px;
  resize: none;
}

.modal .btn-gonder {
  width: 100%;
  padding: 12px;
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}

.modal .btn-gonder:hover {
  background: #c1121f;
}

.modal .kapat {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #ccc;
  line-height: 1;
}

.modal .kapat:hover {
  color: #333;
}

.basarili {
  display: none;
  text-align: center;
  padding: 16px 0;
  color: #2e7d32;
  font-size: .95rem;
  line-height: 1.6;
}

/* MOBİL VE RESPONSIVE AYARLAR */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
}

@media(max-width: 768px) {
  header {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
  }

  header .sidebar-toggle,
  header img {
    flex: 0 0 auto;
  }

  header h1 {
    font-size: 1.2rem;
    flex: 1;
    padding-left: 5px;
  }

  header img {
    height: 45px;
  }

  header .search-form {
    flex: 0 0 100%;
    order: 4;
    justify-content: space-between;
    margin-top: 5px;
    max-width: none;
  }

  header .search-form input {
    max-width: none;
    flex: 1;
  }

  .sidebar-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: left .25s;
    padding-top: 60px;
    box-shadow: 2px 0 16px rgba(0, 0, 0, .15);
  }

  .sidebar.mobil-acik {
    left: 0;
  }

  .layout {
    display: block;
  }

  .icerik {
    padding: 12px;
  }
}


/* Sadece mobil cihazlarda çalışması için Media Query kullanıyoruz */
@media screen and (max-width: 768px) {
  body{padding-bottom: 30px;}
  #ara { background: #2b6cb0; color: #ffffff; }    /* Güven veren kurumsal mavi */
  #map { background: #e53e3e; color: #ffffff; }    /* Dikkat çeken ama göz yormayan kırmızı */
  #ws { background: #38a169; color: #ffffff; }     /* Modern, tatlı bir Whatsapp yeşili */
  #yukari { background: #2d3748; color: #ffffff; } /* Şık bir füme / koyu gri */
  i{font-size: 15px;}
  .mobil-alt-menu {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1); /* Üst kısma hafif bir gölge */
      display: flex;
      align-items: center;
      justify-content: space-between;
      z-index: 9999; /* Sayfadaki diğer elementlerin üstünde kalması için */      
  }

  /* İçindeki 4 elemanın (a ve span) eşit sütunlara bölünmesi */
  .mobil-alt-menu a{
      flex: 1; /* Her eleman eşit genişlik alır */
      padding: 5px;
      text-align: center; /* Metinleri ortalar */
      font-size: 14px;
      color: #333333; /* Yazı rengi */
      text-decoration: none;
      cursor: pointer;
      border-right: 1px solid #eeeeee; /* Elemanlar arasına ince çizgi */
  }

  /* Son elemanın sağındaki çizgiyi kaldırıyoruz */
  .mobil-alt-menu *:last-child {
      border-right: none;
  }
}

/* Masaüstü ekranlarda bu menünün gizlenmesini istiyorsan: */
@media screen and (min-width: 769px) {
  .mobil-alt-menu {
      display: none !important;
  }
}