/* ============================================
   MOBİL FİLTRE SİDEBAR
   ============================================ */

/* Overlay */
.filters_overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filters_overlay.active {
  display: block;
  opacity: 1;
}

/* Mobil filtre butonu (sadece mobilde görünür) */
.mobile_filter_btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.mobile_filter_btn:hover {
  background: var(--primary-blue-dark, #1565C0);
}

.mobile_filter_btn svg {
  width: 20px;
  height: 20px;
}

/* Kapatma butonu (sadece mobilde görünür) */
.filters_close {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--gray-600);
  transition: color 0.2s;
}

.filters_close:hover {
  color: var(--gray-900);
}

.filters_close svg {
  width: 24px;
  height: 24px;
}

/* Mobil sıralama bloğu (sadece mobilde görünür) */
.mobile_sort_block {
  display: none;
}

.mobile_sort_group {
  margin-top: 12px;
}

.mobile_sort_group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.mobile_sort_group select:focus {
  outline: none;
  border-color: var(--primary-blue);
}

/* ============================================
   MOBİL RESPONSIVE (max-width: 768px)
   ============================================ */

@media (max-width: 768px) {
  /* Layout değişimi */
  .listing_layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Filtre panelini sidebar'a çevir */
  .filters_panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    border-radius: 0;
    border: none;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
  }

  .filters_panel.active {
    right: 0;
  }

  /* Header düzenleme */
  .filters_header {
    margin-bottom: 16px;
  }

  /* Kapatma butonunu göster */
  .filters_close {
    display: block;
  }

  /* Mobil filtre butonunu göster */
  .mobile_filter_btn {
    display: flex;
  }

  /* Mobil sıralama bloğunu göster */
  .mobile_sort_block {
    display: block;
  }

  /* Desktop sıralama alanını gizle (results_topbar'daki) */
  .sort_group {
    display: none;
  }

  /* Results topbar düzenleme */
  .results_topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .results_count {
    flex: 1;
    min-width: 150px;
  }
}

/* Çok küçük ekranlar */
@media (max-width: 480px) {
  .filters_panel {
    width: 90%;
  }

  .mobile_filter_btn span {
    display: none; /* Sadece ikon göster */
  }

  .results_topbar {
    gap: 8px;
  }

  .results_count {
    font-size: 14px;
  }
}
