/**
 * Mobil stiller (max-width: 768px)
 * Bu dosya header'da media="(max-width: 768px)" ile yüklendiği için
 * sadece mobil görünümde uygulanır.
 */

/* Logo */
.site-logo img {
    height: 70px;
}

/* Reklam alanları */
.ad-placeholder-left {
    min-height: 180px;
}
.ad-placeholder-billboard .ad-placeholder-inner {
    min-height: 64px;
    padding: 8px 16px;
}
.ad-placeholder-billboard .ad-placeholder-text {
    font-size: 15px;
}

/* Kategori listesi (mobil) */
.mobile-category-list {
    display: block;
    background: white;
    margin: 12px 0 16px;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
}
.mobile-cat-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-cat-menu li {
    border-bottom: 1px solid #f0f0f0;
}
.mobile-cat-menu li:last-child {
    border-bottom: none;
}
.mobile-cat-menu a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: background-color 0.2s;
}
.mobile-cat-menu a:active {
    background-color: #f9f9f9;
}
.mobile-cat-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 16px;
    background-color: #f5f5f5;
    color: #555;
}
.mobile-cat-menu li:nth-child(1) .mobile-cat-icon { background-color: #FFF3E0; color: #EF6C00; }
.mobile-cat-menu li:nth-child(2) .mobile-cat-icon { background-color: #FFEBEE; color: #C62828; }
.mobile-cat-menu li:nth-child(3) .mobile-cat-icon { background-color: #E3F2FD; color: #1565C0; }
.mobile-cat-menu li:nth-child(4) .mobile-cat-icon { background-color: #E8F5E9; color: #2E7D32; }
.mobile-cat-menu li:nth-child(5) .mobile-cat-icon { background-color: #F3E5F5; color: #6A1B9A; }
.mobile-cat-menu li:nth-child(6) .mobile-cat-icon { background-color: #FFF8E1; color: #F9A825; }
.mobile-cat-menu li:nth-child(7) .mobile-cat-icon { background-color: #E0F7FA; color: #00838F; }
.mobile-cat-menu li:nth-child(8) .mobile-cat-icon { background-color: #FBE9E7; color: #D84315; }
.mobile-cat-menu li:nth-child(9) .mobile-cat-icon { background-color: #ECEFF1; color: #455A64; }
.mobile-cat-name {
    flex: 1;
    font-weight: 500;
    color: #222;
}
.mobile-cat-arrow {
    color: #ccc;
    font-size: 12px;
}

/* Sayfa düzeni */
body {
    padding-bottom: 76px;
    overflow-x: hidden;
}
.bottom-nav {
    display: flex;
}
.top-bar-content {
    height: 60px;
    padding: 0 10px;
}
.top-bar-logo {
    flex: 1;
    display: flex;
    justify-content: center;
}
.top-bar-logo-text {
    font-size: 20px;
}
.mobile-search-toggle {
    display: block;
    color: white;
}
.top-bar-search {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px 15px;
    background: #3d6b1f;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.top-bar-search.mobile-show {
    display: block;
}
.mobile-menu-toggle {
    display: block;
}
.top-bar-actions .top-bar-btn-add,
.top-bar-actions .top-bar-divider,
.top-bar-actions .top-bar-user-menu .user-name {
    display: none;
}
.top-bar-actions {
    flex: 1;
    justify-content: flex-end;
    gap: 8px;
}
.content-layout {
    flex-direction: column;
    padding: 12px 14px;
    max-width: 100%;
}
.main-content {
    width: 100%;
    max-width: 100%;
}
.page-title-bar {
    padding: 10px 14px;
    margin-bottom: 8px;
}
.page-container {
    padding: 0 0 16px;
    margin-bottom: 0;
    border-radius: 0;
}
.sidebar {
    display: none;
}
/* İlan detay sayfasında (fiyat kutusu vb. içerir) sidebar mobilde gizlenmesin */
.page-listing-detail .sidebar {
    display: block !important;
    margin-top: 15px;
}
/* Ancak sidebar içindeki mevcut fiyat kutusu sadece masaüstüne kalsın, mobilde gizlensin */
.page-listing-detail .sidebar .price-box {
    display: none !important;
}
/* Başlığın hemen altına eklenen fiyat alanı ise sadece mobilde görünsün */
.page-listing-detail .mobile-listing-price {
    display: block !important;
}
.sidebar.mobile-show {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-page);
    z-index: 3000;
    padding: 0;
    border: none;
    overflow-y: auto;
}
.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--accent-green);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    min-height: 50px;
    box-sizing: border-box;
}
.mobile-sidebar-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.close-sidebar-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}
.sidebar-section {
    border-left: none;
    border-right: none;
}

/* İlan listesi kartları */
.listing-item {
    flex-direction: row;
    align-items: stretch;
    padding: 10px 12px;
    gap: 12px;
    background: white;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    min-height: 100px;
}
.listing-item:last-child {
    border-bottom: none;
}
.listing-image-container {
    width: 100px;
    min-width: 100px;
    height: 100px;
    flex-shrink: 0;
}
.listing-details {
    flex: 1;
    min-width: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.listing-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.listing-description {
    display: none;
}
.listing-meta {
    display: none;
}
.listing-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    gap: 8px;
}
.listing-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}
.listing-location {
    font-size: 12px;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.listing-location .fa-clock,
.listing-location span {
    display: none;
}
.listings-container {
    padding: 0;
    border: none;
    background: transparent;
}

/* Öne çıkan ilanlar slider */
.featured-slider-section {
    padding: 0;
    margin: 4px -14px 8px;
    width: calc(100% + 28px);
    max-width: none;
    box-sizing: border-box;
}
.featured-slider-section .featured-slider-container {
    padding: 0 12px;
    max-width: 100%;
}
.featured-slider-section .slider-header {
    margin-bottom: 10px;
}
.featured-slider-section .slider-title {
    font-size: 18px;
    margin-bottom: 2px;
}
.slider-slide {
    flex-direction: column;
    height: auto;
    padding: 0;
    min-width: 100%;
    box-sizing: border-box;
}
.slide-image {
    width: 100%;
    flex: none;
    min-width: 0;
    height: 120px;
    border-radius: 8px 8px 0 0;
}
.slide-content {
    padding: 8px 12px 8px;
}
.slide-description {
    display: none;
}
.slide-category {
    margin-bottom: 4px;
}
.slide-title {
    font-size: 15px;
    margin-bottom: 4px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.slide-meta {
    font-size: 11px;
    margin-bottom: 6px;
    gap: 6px;
    flex-wrap: wrap;
}
.slide-footer {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.slide-price {
    font-size: 18px;
}
.slide-button {
    padding: 8px 14px;
    font-size: 13px;
}
.slider-arrow {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    font-size: 12px;
    top: 50px;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.85);
    opacity: 0.95;
}
.slider-arrow:active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.95);
}
.slider-arrow-left {
    left: 12px;
}
.slider-arrow-right {
    right: 12px;
}

/* Form / giriş */
.user-avatar {
    width: 35px;
    height: 35px;
}
.form-container {
    padding: 20px;
    border: none;
    box-shadow: none;
    margin: 0 !important;
    max-width: 100%;
}
.login-box {
    padding: 20px !important;
    box-shadow: none !important;
    border: none !important;
}
.login-page {
    padding: 10px 0 !important;
    background: white !important;
}

/* Çok küçük ekranlar */
@media (max-width: 480px) {
    .top-bar-actions .top-bar-link,
    .top-bar-actions .top-bar-btn-primary {
        padding: 5px 8px;
        font-size: 10px;
    }
    .top-bar-icon-link {
        font-size: 16px;
        padding: 5px;
    }
}
/* Mobile Filter Bar (Arama/Kategori Sayfaları İçin) */
.mobile-filter-bar {
    display: flex;
    background: #fdfdfd;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 60px; /* Header yüksekliğine göre ayarlanmalı */
    z-index: 100;
}

.filter-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 5px;
    background: none;
    border: none;
    border-right: 1px solid #ddd;
    color: #444;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-item:last-child {
    border-right: none;
}

.filter-item i {
    display: none; /* Screenshot'ta ikon yok, gizleyelim */
}

.filter-item:active {
    background: #f0f0f0;
}

.filter-item span {
    font-weight: 400;
}

/* Masaüstünde gizle (zaten media query içinde ama garanti olsun) */
/* Mobil Sidebar Modal */
.sidebar.mobile-show {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    display: block !important;
    overflow-y: auto;
    padding: 20px;
    animation: slideUp 0.3s ease;
}

.sidebar.mobile-show .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.sidebar.mobile-show .close-sidebar {
    font-size: 24px;
    color: #666;
    background: none;
    border: none;
    padding: 5px;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Görünüm Değiştirme (List View) */
.listings-container.list-view {
    display: block !important;
}

.listings-container.list-view .listing-item {
    display: flex !important;
    flex-direction: row !important;
    height: 120px;
    margin-bottom: 12px;
}

.listings-container.list-view .listing-image-container {
    width: 120px !important;
    height: 120px !important;
    flex-shrink: 0;
}

.listings-container.list-view .listing-details {
    padding: 10px 15px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.listings-container.list-view .listing-description {
    display: none;
}

/* Sort Modal handled by style.css for better consistency */

