/* İlan Listesi Sayfası Stilleri */
.ilanlar-container {
    width: 100%;
    margin: 30px auto;
    display: flex;
    gap: 30px;
    padding: 0 15px;
}

/* Sol Filtre Alanı */
.ilanlar-filter-sidebar {
    width: 280px;
    min-width: 280px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #444;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.filter-option label {
    cursor: pointer;
    font-size: 14px;
    color: #666;
    flex: 1;
    display: flex;
    justify-content: space-between;
}

.filter-option label span.count {
    color: #999;
    font-size: 13px;
}

.filter-option:hover label {
    color: #007bff;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.filter-button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.filter-apply {
    background: #007bff;
    color: white;
}

.filter-apply:hover {
    background: #0056b3;
}

.filter-clear {
    background: #f0f0f0;
    color: #666;
}

.filter-clear:hover {
    background: #e0e0e0;
}

/* Sağ İçerik Alanı */
.ilanlar-content {
    flex: 1;
}

.ilanlar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ilanlar-count {
    font-size: 16px;
    color: #666;
}

.ilanlar-count strong {
    color: #007bff;
    font-weight: 700;
}

.ilanlar-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ilanlar-sort label {
    font-size: 14px;
    color: #666;
}

.ilanlar-sort select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

/* İlan Grid */
.ilanlar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.ilan-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.ilan-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0);
    transition: all 0.3s;
    pointer-events: none;
}

.ilan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #007bff;
}

.ilan-card:hover::after {
    background: rgba(0, 123, 255, 0.03);
}

.ilan-card:active {
    transform: translateY(-3px);
}

.ilan-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.ilan-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ilan-card:hover .ilan-image img {
    transform: scale(1.1);
}

.ilan-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.badge-satilik {
    background: #28a745;
}

.badge-kiralik {
    background: #007bff;
}

.ilan-info {
    padding: 15px;
}

.ilan-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    transition: color 0.3s;
}

.ilan-card:hover .ilan-title {
    color: #007bff;
    text-decoration: underline;
}

.ilan-location {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ilan-location i {
    font-size: 12px;
}

.ilan-details {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

.ilan-detail-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ilan-detail-item i {
    color: #007bff;
    font-size: 14px;
}

.ilan-price {
    font-size: 20px;
    font-weight: 700;
    color: #28a745;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* Sayfalama */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.pagination a {
    display: block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.pagination a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .active a {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .disabled a {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Mobil Filtre Butonu */
.mobile-filter-button {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
}

.mobile-filter-button button {
    width: 100%;
    padding: 15px;
    background: #f4d27b;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.mobile-filter-button button:hover {
    background: #e8c665;
    transform: translateY(-2px);
}

/* Mobil Filtre Modal */
.mobile-filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.mobile-filter-modal.show {
    display: flex;
    align-items: flex-end;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mobile-filter-content {
    background: #fff;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    animation: slideUp 0.3s ease;
}

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

.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.mobile-filter-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.mobile-filter-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-filter-body {
    padding: 20px;
}

.mobile-filter-group {
    margin-bottom: 20px;
}

.mobile-filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.mobile-filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.mobile-filter-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.mobile-filter-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mobile-filter-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 1;
}

.mobile-filter-footer button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-filter-clear {
    background: #f0f0f0;
    color: #666;
}

.mobile-filter-clear:hover {
    background: #e0e0e0;
}

.mobile-filter-apply {
    background: #f4d27b;
    color: #000;
}

.mobile-filter-apply:hover {
    background: #e8c665;
}

/* Responsive */
@media (max-width: 1200px) {
    .ilanlar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .ilanlar-container {
        flex-direction: column;
    }

    /* Mobilde sidebar'ı gizle */
    .ilanlar-filter-sidebar {
        display: none !important;
    }

    /* Mobil filtre butonunu göster */
    .mobile-filter-button {
        display: block;
    }

    /* İçerik alanına bottom padding ekle (buton için yer bırak) */
    .ilanlar-content {
        padding-bottom: 80px;
    }

    .ilanlar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ilanlar-grid {
        grid-template-columns: 1fr;
    }

    .ilanlar-header {
        flex-direction: column;
        gap: 15px;
    }
}

/* İlan Detay Sayfası Stilleri */
.ilan-detay-container {
    width: 100%;
    max-width: 1333px;
    margin: 20px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.ilan-detay-container * {
    box-sizing: border-box;
}

.ilan-detay-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ilan-detay-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.ilan-detay-meta {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.ilan-detay-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.ilan-detay-meta-item i {
    color: #007bff;
    font-size: 16px;
}

.ilan-detay-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    width: 100%;
}

.ilan-detay-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0; /* Grid overflow fix */
}

.ilan-detay-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0; /* Grid overflow fix */
}

/* Galeri */
.ilan-gallery {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.gallery-main-image {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #f0f0f0;
}

.gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Thumbnail Carousel Wrapper */
.gallery-thumbnails-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 5px 0;
    cursor: grab;
    user-select: none;
    flex: 1;
    /* Scrollbar gizle */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.gallery-thumbnails::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.gallery-thumbnails.active-drag {
    cursor: grabbing;
}

.gallery-thumb {
    min-width: 120px;
    width: 120px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: #007bff;
    transform: translateY(-2px);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Mouse olaylarını engelle */
}

/* Navigation Buttons */
.thumb-nav-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
    z-index: 10;
}

.thumb-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.thumb-nav-btn i {
    font-size: 16px;
}

.thumb-nav-prev {
    margin-right: 5px;
}

.thumb-nav-next {
    margin-left: 5px;
}

/* Açıklama */
.ilan-description {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.ilan-description-text {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
}

/* Özellikler */
.ilan-properties {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.property-group {
    margin-bottom: 20px;
}

.property-group:last-child {
    margin-bottom: 0;
}

.property-group-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.property-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.property-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: #f4d27b;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.property-item i {
    color: white;
    background: transparent;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.property-item.inactive {
    background: #999;
    color: white;
}

.property-item.inactive i {
    background: transparent;
}

/* Sağ Sidebar */
.ilan-detay-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ilan-price-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.ilan-price-box .price-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.ilan-price-box .price-value {
    font-size: 32px;
    font-weight: 700;
    color: #f4d27b;
    margin-bottom: 15px;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none !important;
}

.contact-button:hover {
    text-decoration: none !important;
}

.contact-button.primary {
    background: #000000;
    color: white;
}

.contact-button.primary:hover {
    background: #333333;
    text-decoration: none !important;
}

.contact-button.success {
    background: #25D366;
    color: white;
}

.contact-button.success:hover {
    background: #1DA851;
    text-decoration: none !important;
}

.contact-button i {
    font-size: 18px;
}

/* Özellikler Tablosu */
.ilan-attributes {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.attributes-table {
    width: 100%;
}

.attribute-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #f0f0f0;
}

.attribute-row:last-child {
    border-bottom: none;
}

.attribute-label {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    background: #f8f9fa;
}

.attribute-value {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
}

/* Responsive Detay */
@media (max-width: 992px) {
    .ilan-detay-main {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    /* MOBİLDE SIRALAMA: Görseller -> İlan Bilgileri -> Açıklama -> Özellikler (EN SONDA) */
    .ilan-detay-left {
        order: 1;
        display: flex;
        flex-direction: column;
    }
    
    .ilan-gallery {
        order: 1;
    }
    
    .ilan-description {
        order: 2;
    }
    
    /* ÖZELLİKLER EN SONDA */
    .ilan-features-container {
        order: 4 !important;
    }
    
    .ilan-detay-right {
        order: 3;
    }
    
    /* MOBİLDE FIYAT KUTUSUNU GİZLE (sticky footer var zaten) */
    .ilan-price-box {
        display: none !important;
    }
    
    .gallery-main-image {
        height: 400px;
    }
    
    .gallery-thumb {
        min-width: 100px;
        width: 100px;
        height: 70px;
    }
    
    .thumb-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .thumb-nav-btn i {
        font-size: 14px;
    }
    
    .property-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ilan-detay-title {
        font-size: 22px;
    }
    
    .gallery-main-image {
        height: 300px;
    }
    
    .gallery-thumb {
        min-width: 80px;
        width: 80px;
        height: 60px;
    }
    
    .thumb-nav-btn {
        width: 30px;
        height: 30px;
    }
    
    .thumb-nav-btn i {
        font-size: 12px;
    }
    
    .ilan-price-box .price-value {
        font-size: 26px;
    }
    
    .property-list {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.no-results i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

.no-results p {
    font-size: 16px;
    color: #999;
}

/* Özellikler Listesi */
.property-features {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.property-features td {
    width: 25%;
    padding: 5px 10px;
    font-size: 14px;
    vertical-align: top;
}

.feature-item {
    display: flex;
    align-items: center;
}

/* Seçili özellikler (tik işareti ile) */
.feature-item.selected {
    color: #000;
}

.feature-item.selected i {
    color: #f4d27b;
    margin-right: 8px;
    font-size: 16px;
    flex-shrink: 0;
}

/* Seçili olmayan özellikler (gri renk, işaret yok) */
.feature-item.not-selected {
    color: #999;
}

.feature-item.not-selected span {
    color: #999;
}

/* Kategori başlıkları */
.features-category {
    margin-bottom: 25px;
}

.features-category .section-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

@media (max-width: 1200px) {
    .property-features td {
        width: 33.33%;
    }
}

@media (max-width: 768px) {
    .property-features td {
        width: 50% !important;
    }
    
    .property-features tr {
        display: flex;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .property-features td {
        width: 50% !important;
    }
}
