/* ================================================
   listing.css — satilik, kiralik, ilce sayfaları
   ================================================ */

/* ACTION BAR */
.sb-action-bar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
}
.sb-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 8px;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    cursor: pointer;
    border-right: 1px solid #e8e8e8;
    background: none;
    border-top: none;
    border-bottom: none;
    border-left: none;
    transition: background .12s, color .12s;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
}
.sb-tab:last-child { border-right: none; }
.sb-tab:hover { background: #f7f7f7; color: #18ba60; text-decoration: none; }
.sb-tab.has-filter { color: #18ba60; font-weight: 700; }
.sb-dot { display: inline-block; width: 6px; height: 6px; background: #18ba60; border-radius: 50%; flex-shrink: 0; }

/* ACTIVE CHIPS */
.active-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0 4px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 4px;
}
.active-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f8f0;
    border: 1px solid #b2e8cb;
    color: #1a7a45;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px 3px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: all .15s;
}
.active-chip:hover { background: #fde8e8; border-color: #f5b8b8; color: #c0392b; text-decoration: none; }
.active-chip-x { opacity: .55; margin-left: 2px; font-size: 13px; line-height: 1; }

/* FILTER DRAWER */
.fd-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 500;
}
.fd-overlay.open { display: block; }

.fd-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 360px;
    max-width: 92vw;
    background: #fff;
    z-index: 501;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.15);
}
.fd-drawer.open { transform: translateX(0); }

.fd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #efefef;
    flex-shrink: 0;
}
.fd-head-title { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.fd-close { background: none; border: none; font-size: 22px; color: #888; cursor: pointer; line-height: 1; padding: 0 4px; }
.fd-close:hover { color: #333; }

.fd-body { flex: 1; overflow: visible; padding: 20px; }
.fd-field { margin-bottom: 20px; }
.fd-label { display: block; font-size: 11px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 8px; }

.fd-select,
.fd-input {
    width: 100%;
    height: 44px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 36px 0 14px;
    font-size: 14px;
    color: #333;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23bbb'/%3E%3C/svg%3E") no-repeat right 14px center;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.fd-input { background-image: none; padding-right: 14px; }
.fd-select:focus,
.fd-input:focus { border-color: #18ba60; box-shadow: 0 0 0 3px rgba(24,186,96,.12); }

.fd-price-row { display: flex; gap: 10px; align-items: center; }
.fd-price-row .fd-input { flex: 1; }
.fd-price-sep { color: #ccc; font-size: 18px; flex-shrink: 0; }

.fd-foot { padding: 16px 20px; border-top: 1px solid #efefef; display: flex; gap: 10px; flex-shrink: 0; }
.fd-btn-apply {
    flex: 1;
    height: 48px;
    background: #18ba60;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.fd-btn-apply:hover { background: #15a855; }
.fd-btn-clear {
    height: 48px;
    padding: 0 20px;
    background: #f4f4f4;
    color: #666;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: all .15s;
}
.fd-btn-clear:hover { background: #fee; border-color: #f99; color: #c33; text-decoration: none; }

/* SORT DROPDOWN */
.sort-dropdown-wrap { position: relative; }
.sort-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 220px;
    overflow: hidden;
    z-index: 300;
}
.sort-dropdown.open { display: block; }
.sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: background .12s;
}
.sort-option:last-child { border-bottom: none; }
.sort-option:hover { background: #f7f7f7; color: #18ba60; text-decoration: none; }
.sort-option.active { color: #18ba60; font-weight: 700; }
.sort-option.active::after { content: '✓'; font-size: 14px; }

/* RESULT BAR */
.result-bar { display: flex; align-items: center; padding: 12px 0 10px; margin-bottom: 6px; }
.result-bar .count { font-size: 13px; color: #888; }
.result-bar .count strong { color: #222; font-size: 14px; }

/* LIST CARD */
.lc {
    display: flex;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
    transition: box-shadow .15s, transform .15s;
}
.lc:hover { box-shadow: 0 4px 14px rgba(0,0,0,.11); transform: translateY(-1px); text-decoration: none; color: inherit; }

.lc-img {
    flex: 0 0 168px;
    width: 168px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}
.lc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.lc:hover .lc-img img { transform: scale(1.04); }

.lc-img-tag {
    position: absolute;
    bottom: 6px; left: 6px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.lc-body {
    flex: 1;
    min-width: 0;
    padding: 2px 0 2px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.lc-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
}
.lc-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lc-spec { font-size: 12px; color: #666; background: #f4f4f4; border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
.lc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-location { font-size: 12px; color: #999; display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lc-location i { color: #18ba60; font-size: 11px; flex-shrink: 0; }
.lc-price { font-size: 16px; font-weight: 800; color: #18ba60; white-space: nowrap; flex-shrink: 0; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 70px 20px; }
.empty-state i { font-size: 48px; color: #e0e0e0; display: block; margin-bottom: 14px; }
.empty-state h4 { color: #555; font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: #999; font-size: 14px; margin-bottom: 20px; }
.btn-green { display: inline-block; padding: 10px 24px; background: #18ba60; color: #fff; border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; }
.btn-green:hover { background: #15a855; color: #fff; text-decoration: none; }

/* PAGINATION */
.paging { display: flex; gap: 4px; justify-content: center; margin: 24px 0 40px; flex-wrap: wrap; }
.paging a,
.paging span { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; color: #444; text-decoration: none; transition: all .15s; padding: 0 10px; }
.paging a:hover { border-color: #18ba60; color: #18ba60; text-decoration: none; }
.paging span.active { background: #18ba60; border-color: #18ba60; color: #fff; font-weight: 700; }
.paging span.dots { border: none; color: #bbb; }

/* MOBILE */
@media (max-width: 767px) {
    .lc-img { flex: 0 0 120px; width: 120px; height: 88px; }
    .lc-title { font-size: 13px; }
    .lc-specs { display: none; }
    .lc-price { font-size: 14px; }
    .lc-location { font-size: 11px; }
    .fd-drawer { width: 100%; max-width: 100%; top: auto; height: auto; border-radius: 18px 18px 0 0; transform: translateY(100%); left: 0; right: 0; bottom: 0; }
    .fd-drawer.open { transform: translateY(0); }
}
