/* ==========================================================================
   KodlaEmlak - Mobil Uygulama Deneyimi & Alt Menü (App Bottom Bar)
   ========================================================================== */

/* Masaüstünde gizle, sadece mobilde göster */
.mobile-bottom-nav {
  display: none;
}

.mobile-detail-bar {
  display: none;
}

.mobile-drawer-backdrop {
  display: none;
}

@media (max-width: 991px) {
  /* Üst Header Düzenlemeleri */
  .site-header .nav-wrapper {
    height: 64px;
  }

  .brand-logo {
    font-size: 1.25rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .hero-section {
    padding: 36px 0 50px;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .search-box {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  /* Sabit Mobil Alt Uygulama Menüsü (App Bottom Navigation) */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 66px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 4px);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    position: relative;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    padding: 4px 0;
  }

  .mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 3px;
    transition: transform 0.2s ease;
  }

  .mobile-nav-item:active {
    transform: scale(0.92);
  }

  .mobile-nav-item.active {
    color: var(--primary);
  }

  .mobile-nav-item.active i {
    transform: translateY(-2px);
  }

  .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 4px;
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
  }

  /* Rozet (Badge) Konumu */
  .mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    background: var(--accent-rose);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-surface);
  }

  /* İlan Detay Sayfasında Sabit Hızlı Aksiyon Barı */
  .mobile-detail-bar {
    display: flex;
    position: fixed;
    bottom: 66px; /* Alt barın hemen üstünde */
    left: 0;
    right: 0;
    padding: 10px 16px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border-color);
    z-index: 990;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  }

  .mobile-detail-bar .btn {
    flex: 1;
    height: 44px;
    font-size: 0.88rem;
    padding: 0 10px;
  }

  /* Mobil Çekmece (Offcanvas Drawer) */
  .mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mobile-drawer-backdrop.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 82%;
    max-width: 340px;
    background: var(--bg-surface);
    z-index: 1210;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
  }

  .mobile-drawer-backdrop.open .mobile-drawer {
    transform: translateX(0);
  }

  .drawer-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
  }

  .drawer-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
  }

  .drawer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .drawer-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
  }

  .drawer-nav-link:hover, .drawer-nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
  }

  .drawer-nav-link i {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
  }

  .drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
  }
}
