/* ============================================
   VARIABLES - رنگ‌های اصلی سایت خود را تنظیم کنید
   ============================================ */
:root {
    --primary: #0066b3;
    --primary-dark: #004d8c;
    --primary-light: #e6f0fa;
    --secondary: #1a1a2e;
    --gray-light: #f5f7fa;
    --gray-border: #e2e8f0;
    --white: #ffffff;
    --price-color: #d32f2f;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 8px;
    --font: 'Morabba', 'Yekan-Bakh', Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: var(--gray-light);
    direction: rtl;
}

.centeral-page {
    max-width: 100%;
    padding: 0;
    margin: 0;
    height: 100vh;
}

.zillow-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ==========================================
   HEADER
   ========================================== */
.zillow-header {
    background: var(--white);
    padding: 10px 20px;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    background: var(--gray-light);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    padding: 0 12px;
    transition: all 0.2s;
}

    .search-box:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(0,102,179,0.15);
        background: var(--white);
    }

    .search-box i {
        color: #94a3b8;
        font-size: 20px;
    }

    .search-box input {
        border: none;
        background: transparent;
        padding: 9px 8px;
        font-size: 14px;
        width: 100%;
        outline: none;
        font-family: var(--font);
    }

.search-submit {
    background: var(--primary);
    border: none;
    padding: 8px 20px;
    color: white;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

    .search-submit:hover {
        background: var(--primary-dark);
        transform: scale(1.02);
    }

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-save-search {
    background: transparent;
    border: 1px solid var(--gray-border);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary);
}

    .btn-save-search:hover {
        background: var(--primary-light);
        border-color: var(--primary);
        color: var(--primary);
    }

/* ==========================================
   FILTER BAR
   ========================================== */
.zillow-filter-bar {
    background: var(--white);
    padding: 8px 20px;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-bar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--gray-border);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: var(--font);
    display: flex;
    align-items: center;
    gap: 4px;
}

    .filter-btn:hover {
        background: var(--gray-light);
    }

    .filter-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(0,102,179,0.25);
    }

    .filter-btn.filter-toggle {
        margin-right: auto;
        border: 1px solid var(--gray-border);
        background: var(--white);
    }

        .filter-btn.filter-toggle:hover {
            background: var(--gray-light);
        }

/* ==========================================
   MAIN LAYOUT
   ========================================== */
.zillow-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* ==========================================
   SIDEBAR FILTERS - حرفه‌ای
   ========================================== */
.zillow-filters {
    width: 320px;
    flex-shrink: 0;
    background: var(--white);
    padding: 20px 16px;
    border-left: 1px solid var(--gray-border);
    overflow-y: auto;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    box-shadow: 2px 0 20px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
    display: none; /* پیش‌فرض مخفی */
}

    .zillow-filters.show {
        display: block;
        animation: fadeSlideIn 0.3s ease;
    }

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* دسکتاپ: همیشه باز (در صورت تمایل) */
@media (min-width: 1025px) {
    .zillow-filters {
        display: block !important;
    }

        .zillow-filters:not(.show) {
            display: block !important;
        }

    .filter-btn.filter-toggle {
        display: none;
    }
}

/* موبایل: کشویی از راست */
@media (max-width: 1024px) {
    .zillow-filters {
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 380px;
        height: 100vh;
        border-radius: 0;
        border-left: none;
        box-shadow: -4px 0 40px rgba(0,0,0,0.15);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: block !important;
        z-index: 999;
        padding-top: 70px;
        padding-bottom: 30px;
    }

        .zillow-filters.show {
            transform: translateX(0);
        }

        .zillow-filters:not(.show) {
            transform: translateX(100%);
            display: block !important;
        }

    .close-filters {
        display: block !important;
        position: fixed;
        top: 14px;
        right: 16px;
        font-size: 32px;
        background: none;
        border: none;
        color: #555;
        cursor: pointer;
        z-index: 1000;
        padding: 4px 12px;
    }

        .close-filters:hover {
            color: #000;
        }
}

/* المان‌های داخلی سایدبار */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

    .filters-header h5 {
        font-weight: 700;
        font-size: 18px;
        color: var(--secondary);
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

        .filters-header h5 i {
            color: var(--primary);
            font-size: 22px;
        }

.close-filters {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #94a3b8;
    padding: 0 8px;
}

    .close-filters:hover {
        color: var(--secondary);
    }

.filter-section {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--gray-border);
    padding-bottom: 16px;
}

    .filter-section:last-of-type {
        border-bottom: none;
        margin-bottom: 0;
    }

.filter-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    user-select: none;
    transition: all 0.2s;
    border-radius: var(--radius);
}

    .filter-title:hover {
        background: var(--gray-light);
        color: var(--primary);
    }

    .filter-title i.mdi-chevron-down {
        transition: transform 0.3s ease;
        font-size: 20px;
        color: #94a3b8;
    }

    .filter-title.active i.mdi-chevron-down {
        transform: rotate(180deg);
    }

.collapse {
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    max-height: 0;
    padding: 0 4px;
}

    .collapse.show {
        max-height: 800px;
        padding: 8px 4px 0;
    }

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.filter-option {
    background: var(--gray-light);
    border: 1px solid transparent;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font);
}

    .filter-option:hover {
        background: var(--primary-light);
        border-color: var(--primary);
    }

    .filter-option.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 2px 8px rgba(0,102,179,0.25);
    }

    .filter-option i {
        font-size: 16px;
    }

.filter-group {
    margin-top: 12px;
}

    .filter-group label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: #475569;
        margin-bottom: 4px;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--gray-border);
        border-radius: var(--radius);
        font-size: 14px;
        background: var(--white);
        transition: all 0.2s;
        font-family: var(--font);
    }

        .filter-group select:focus,
        .filter-group input:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(0,102,179,0.12);
        }

        .filter-group select:disabled,
        .filter-group input:disabled {
            background: #f9f9f9;
            color: #94a3b8;
        }

.filter-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

    .filter-inputs.vertical {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-inputs input {
        flex: 1;
        padding: 8px 12px;
        border: 1px solid var(--gray-border);
        border-radius: var(--radius);
        font-size: 14px;
        min-width: 0;
        width: 100%;
        font-family: var(--font);
    }

    .filter-inputs span {
        color: #94a3b8;
        font-weight: 500;
    }

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px solid var(--gray-light);
}

.btn-apply,
.btn-clear {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font);
}

.btn-apply {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0,102,179,0.25);
}

    .btn-apply:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(0,102,179,0.35);
    }

.btn-clear {
    background: var(--gray-light);
    color: #475569;
}

    .btn-clear:hover {
        background: #e2e8f0;
    }

/* ==========================================
   CONTENT (نقشه + لیست)
   ========================================== */
.zillow-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.zillow-map {
    flex: 1;
    height: 100%;
    min-height: 400px;
    position: relative;
    background: #eaeaea;
}

.map-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

#propertyMap {
    width: 100%;
    height: 100%;
}

.map-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.map-btn {
    width: 38px;
    height: 38px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

    .map-btn:hover {
        background: var(--primary-light);
        border-color: var(--primary);
    }

.map-results-count {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.92);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    color: var(--secondary);
}

    .map-results-count span {
        font-weight: 700;
        color: var(--primary);
    }

/* ==========================================
   LIST
   ========================================== */
.zillow-list {
    width: 50%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--gray-border);
    overflow-y: auto;
    padding: 16px 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-border);
}

.list-count strong {
    font-size: 18px;
    color: var(--secondary);
}

.list-count span {
    font-size: 14px;
    color: #64748b;
    margin-right: 4px;
}

.sort-select {
    padding: 6px 12px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 13px;
    background: var(--white);
    color: var(--secondary);
    cursor: pointer;
    font-family: var(--font);
}

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

.properties-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    overflow-y: auto;
}

/* ==========================================
   PROPERTY CARDS (Zolo style)
   ========================================== */
.property-card-large {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--gray-border);
    padding-bottom: 14px;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: var(--radius);
    padding: 8px;
}

    .property-card-large:hover {
        background: var(--gray-light);
    }

.card-image-wrap {
    width: 130px;
    min-height: 100px;
    flex-shrink: 0;
    background: #eaeaea;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badges-top {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.card-badge {
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    background: var(--primary);
}

    .card-badge.sale {
        background: var(--primary);
    }

    .card-badge.rent {
        background: #7c3aed;
    }

    .card-badge.commercial {
        background: #f59e0b;
    }

    .card-badge.presale {
        background: #16a34a;
    }

    .card-badge.new-badge {
        background: #16a34a;
    }

    .card-badge.featured-badge {
        background: #f59e0b;
        display: flex;
        align-items: center;
        gap: 2px;
    }

.card-price-cut-badge {
    display: none;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--price-color);
}

.card-details {
    font-size: 14px;
    color: #475569;
    margin: 4px 0;
}

.card-address {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-agent {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination-wrapper {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-border);
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: #64748b;
}

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

    .pagination li a {
        padding: 4px 12px;
        border: 1px solid var(--gray-border);
        border-radius: var(--radius);
        text-decoration: none;
        color: var(--secondary);
        font-size: 13px;
        transition: all 0.2s;
        cursor: pointer;
    }

        .pagination li a:hover {
            background: var(--gray-light);
        }

    .pagination li.active a {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

    .pagination li.disabled a {
        opacity: 0.4;
        pointer-events: none;
    }

/* ==========================================
   MODAL (Zolo style)
   ========================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

    .modal-overlay.active {
        display: flex;
    }

.modal-box {
    background: var(--white);
    max-width: 500px;
    width: 92%;
    max-height: 85vh;
    padding: 24px 20px 20px;
    overflow-y: auto;
    position: relative;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalPop 0.25s ease;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 8px;
    left: 14px;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    color: #94a3b8;
    transition: color 0.2s;
}

    .modal-close:hover {
        color: var(--secondary);
    }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .zillow-content {
        flex-direction: column;
    }

    .zillow-map {
        height: 45vh;
        min-height: 280px;
    }

    .zillow-list {
        width: 100%;
        height: 55vh;
        border-right: none;
        border-top: 1px solid var(--gray-border);
    }

    .modal-box {
        max-width: 95%;
        margin: 10px;
    }

    .card-image-wrap {
        width: 100px;
        min-height: 80px;
    }
}

@media (max-width: 640px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: unset;
    }

    .search-submit {
        padding: 8px 14px;
    }

    .filter-btn {
        padding: 4px 12px;
        font-size: 12px;
    }

    .list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .sort-select {
        width: 100%;
    }

    .property-card-large {
        flex-direction: column;
        padding: 4px;
    }

    .card-image-wrap {
        width: 100%;
        height: 150px;
    }
}


/* ============================================
   کارت‌های لیست - نسخه حرفه‌ای (بزرگ‌تر و با عنوان)
   ============================================ */
.property-card-large {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--gray-border);
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: var(--radius);
    background: var(--white);
    margin-bottom: 6px;
}

    .property-card-large:hover {
        background: var(--gray-light);
        box-shadow: var(--shadow);
        transform: translateY(-2px);
    }

/* wrapper تصویر - بزرگ‌تر */
.card-image-wrap {
    width: 240px; /* افزایش عرض */
    min-height: 170px; /* افزایش ارتفاع حداقل */
    flex-shrink: 0;
    background: #eaeaea;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

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

.property-card-large:hover .card-image {
    transform: scale(1.02);
}

/* نشان‌های روی تصویر */
.card-badges-top {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-badge {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

    .card-badge.sale {
        background: var(--primary);
    }

    .card-badge.rent {
        background: #7c3aed;
    }

    .card-badge.commercial {
        background: #f59e0b;
    }

    .card-badge.presale {
        background: #16a34a;
    }

    .card-badge.new-badge {
        background: #16a34a;
    }

    .card-badge.featured-badge {
        background: #f59e0b;
        display: flex;
        align-items: center;
        gap: 4px;
    }

/* محتوای کارت */
.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 0;
}

/* عنوان آگهی - جدید */
.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: right;
}

.card-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--price-color);
    margin-bottom: 4px;
}

.card-details {
    font-size: 14px;
    color: #475569;
    margin: 4px 0 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}

    .card-details .separator {
        color: #cbd5e1;
        font-weight: 300;
    }

.card-address {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-agent {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

/* تنظیمات ریسپانسیو برای موبایل */
@media (max-width: 1024px) {
    .card-image-wrap {
        width: 160px;
        min-height: 120px;
    }
}

@media (max-width: 640px) {
    .property-card-large {
        flex-direction: column;
        padding: 8px;
    }

    .card-image-wrap {
        width: 100%;
        height: 180px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-price {
        font-size: 20px;
    }
}
/* ============================================
   صفحه‌بندی (Pagination)
   ============================================ */
.pagination-wrapper {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-border);
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* اطلاعات نتایج */
.pagination-info {
    font-size: 14px;
    color: #475569;
    background: #f8fafc;
    padding: 6px 18px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e9edf4;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    direction: rtl;
}

    .pagination-info i {
        color: var(--primary, #0066b3);
        font-size: 18px;
    }

    .pagination-info strong {
        color: var(--primary, #0066b3);
        font-weight: 700;
        font-size: 16px;
        padding: 0 2px;
    }

    .pagination-info .total-count {
        background: var(--primary, #0066b3);
        color: #fff;
        padding: 1px 12px;
        border-radius: 30px;
        font-size: 13px;
        font-weight: 600;
        margin-right: 4px;
    }

/* ============================================
   بخش اعداد صفحه (Pagination Links)
   ============================================ */
.pagination {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

    .pagination .page-item {
        display: inline-block;
    }

    .pagination .page-link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        border: 1px solid var(--gray-border);
        border-radius: 8px;
        text-decoration: none;
        color: var(--secondary, #1a1a2e);
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s ease;
        background: var(--white);
        cursor: pointer;
        font-family: var(--font);
    }

        .pagination .page-link:hover {
            background: var(--gray-light);
            border-color: var(--primary, #0066b3);
            color: var(--primary, #0066b3);
        }

    .pagination .page-item.active .page-link {
        background: var(--primary, #0066b3);
        color: #fff;
        border-color: var(--primary, #0066b3);
        box-shadow: 0 2px 8px rgba(0,102,179,0.25);
    }

    .pagination .page-item.disabled .page-link {
        opacity: 0.4;
        pointer-events: none;
        background: #f1f3f5;
    }

    /* دکمه‌های قبلی/بعدی */
    .pagination .page-link.prev,
    .pagination .page-link.next {
        font-size: 18px;
        padding: 0 12px;
        border-radius: 8px;
    }

        .pagination .page-link.prev:hover,
        .pagination .page-link.next:hover {
            background: var(--primary-light, #e6f0fa);
            border-color: var(--primary, #0066b3);
            color: var(--primary, #0066b3);
        }

/* ============================================
   انتخاب تعداد نتایج در هر صفحه
   ============================================ */
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: rtl;
}

    .pagination-controls label {
        font-size: 13px;
        color: #475569;
        font-weight: 500;
        margin: 0;
    }

    .pagination-controls .page-size-select {
        height: 36px;
        padding: 0 12px;
        border: 1px solid var(--gray-border);
        border-radius: 8px;
        background: var(--white);
        font-size: 14px;
        font-family: var(--font);
        color: var(--secondary);
        cursor: pointer;
        outline: none;
        transition: all 0.2s ease;
        background-position: left 12px center;
        padding-right: 12px;
        padding-left: 32px;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23475569' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: left 12px center;
    }

        .pagination-controls .page-size-select:hover {
            border-color: var(--primary, #0066b3);
        }

        .pagination-controls .page-size-select:focus {
            border-color: var(--primary, #0066b3);
            box-shadow: 0 0 0 3px rgba(0,102,179,0.12);
        }

        .pagination-controls .page-size-select option {
            font-family: var(--font);
        }

/* ============================================
   تنظیمات ریسپانسیو برای موبایل
   ============================================ */
@media (max-width: 640px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .pagination {
        justify-content: center;
    }

    .pagination-controls {
        justify-content: center;
    }

    .pagination-info {
        justify-content: center;
        font-size: 13px;
    }

    .pagination .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 8px;
    }
}

/* ============================================
   استایل‌های مودال و لیست خوشه
   ============================================ */

/* استایل کلی آیتم‌های لیست در مودال */
.property-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 12px 10px;
    margin: 0 -10px;
}

    .property-item:hover {
        background: var(--gray-light, #f5f7fa);
        transform: translateX(-4px);
    }

    .property-item:last-child {
        border-bottom: none;
    }

    /* تصویر آیتم */
    .property-item .item-image {
        width: 80px;
        height: 60px;
        flex-shrink: 0;
        background: #f5f5f5;
        border-radius: 6px;
        overflow: hidden;
    }

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

    .property-item:hover .item-image img {
        transform: scale(1.05);
    }

    /* محتوای آیتم */
    .property-item .item-content {
        flex: 1;
        direction: rtl;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
    }

    .property-item .item-title {
        font-weight: 600;
        color: var(--secondary, #1a1a2e);
        font-size: 14px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .property-item .item-price {
        font-weight: 700;
        color: var(--price-color, #d32f2f);
        font-size: 16px;
    }

    /* ویژگی‌های آیتم در مودال */
    .property-item .card-features {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin: 2px 0;
    }

    .property-item .card-feature {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        font-size: 12px;
        color: #475569;
        background: #f1f5f9;
        padding: 2px 8px;
        border-radius: 30px;
    }

        .property-item .card-feature i {
            font-size: 13px;
            color: var(--primary, #0066b3);
        }

    .property-item .item-address {
        font-size: 12px;
        color: #6b7280;
        display: flex;
        align-items: center;
        gap: 4px;
    }

        .property-item .item-address i {
            font-size: 13px;
            color: #9ca3af;
        }

    .property-item .item-agent {
        font-size: 11px;
        color: #9ca3af;
    }

/* ============================================
   هدر مودال
   ============================================ */
.modal-header-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

    .modal-header-custom .modal-icon {
        font-size: 24px;
    }

    .modal-header-custom .modal-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--secondary, #1a1a2e);
    }

    .modal-header-custom .modal-count {
        background: var(--primary, #0066b3);
        color: #fff;
        padding: 1px 12px;
        border-radius: 30px;
        font-size: 13px;
        font-weight: 600;
        margin-right: auto;
    }

/* اسکرول‌بار سفارشی برای مودال */
.modal-scroll {
    max-height: 420px;
    overflow-y: auto;
    padding-left: 4px;
    padding-right: 2px;
}

    .modal-scroll::-webkit-scrollbar {
        width: 5px;
    }

    .modal-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .modal-scroll::-webkit-scrollbar-thumb {
        background: var(--primary, #0066b3);
        border-radius: 10px;
    }

        .modal-scroll::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark, #004d8c);
        }

/* ============================================
   حالت خالی (No Results) در مودال
   ============================================ */
.modal-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

    .modal-empty i {
        font-size: 48px;
        color: #d1d5db;
        margin-bottom: 12px;
    }

    .modal-empty h4 {
        font-size: 16px;
        color: #374151;
        margin-bottom: 4px;
    }

    .modal-empty p {
        font-size: 13px;
        color: #9ca3af;
    }

/* ============================================
   ریسپانسیو مودال برای موبایل
   ============================================ */
@media (max-width: 640px) {
    .property-item {
        padding: 10px 6px;
        gap: 10px;
    }

        .property-item .item-image {
            width: 60px;
            height: 50px;
        }

        .property-item .item-title {
            font-size: 13px;
        }

        .property-item .item-price {
            font-size: 14px;
        }

        .property-item .card-feature {
            font-size: 10px;
            padding: 1px 6px;
        }

    .modal-header-custom .modal-title {
        font-size: 16px;
    }

    .modal-header-custom .modal-count {
        font-size: 12px;
        padding: 0 10px;
    }

    .modal-scroll {
        max-height: 350px;
    }
}



/* ============================================
   مودال جزئیات ملک (Property Detail Modal)
   ============================================ */

/* کانتینر اصلی مودال */
.property-detail-modal {
    direction: rtl;
    font-family: var(--font, 'IRANSans', Tahoma, sans-serif);
    background: var(--white, #fff);
    border-radius: var(--radius, 8px);
    overflow: hidden;
}

/* بخش تصویر */
.detail-image {
    position: relative;
    border-radius: var(--radius, 8px);
    overflow: hidden;
    margin-bottom: 16px;
    height: 220px;
    background: #f0f0f0;
}

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

    .detail-image:hover img {
        transform: scale(1.02);
    }

/* برچسب‌های روی تصویر */
.detail-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

    .detail-badge.new-badge {
        background: #16a34a;
    }

    .detail-badge.featured-badge {
        background: #f59e0b;
        top: 48px;
        display: flex;
        align-items: center;
        gap: 4px;
    }

/* محتوای مودال */
.detail-content {
    padding: 4px 0 8px;
}

.detail-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary, #1a1a2e);
    margin-bottom: 4px;
    line-height: 1.4;
}

.detail-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--price-color, #d32f2f);
    margin-bottom: 8px;
}

/* ویژگی‌ها در مودال جزئیات */
.detail-content .card-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0 10px;
}

.detail-content .card-feature {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #475569;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 30px;
}

    .detail-content .card-feature i {
        font-size: 15px;
        color: var(--primary, #0066b3);
    }

.detail-address {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 4px;
}

    .detail-address i {
        font-size: 16px;
        color: #9ca3af;
    }

.detail-agent {
    font-size: 13px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

    .detail-agent i {
        font-size: 16px;
        color: #9ca3af;
    }

/* دکمه مشاهده کامل */
.detail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: var(--primary, #0066b3);
    color: #fff;
    border: none;
    border-radius: var(--radius, 8px);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font, 'IRANSans', Tahoma, sans-serif);
}

    .detail-btn:hover {
        background: var(--primary-dark, #004d8c);
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0,102,179,0.3);
    }

    .detail-btn i {
        font-size: 18px;
        transition: transform 0.25s ease;
    }

    .detail-btn:hover i {
        transform: translateX(-4px);
    }

/* ============================================
   ریسپانسیو مودال جزئیات
   ============================================ */
@media (max-width: 640px) {
    .detail-image {
        height: 170px;
    }

    .detail-title {
        font-size: 17px;
    }

    .detail-price {
        font-size: 20px;
    }

    .detail-content .card-feature {
        font-size: 12px;
        padding: 2px 10px;
    }

    .detail-address {
        font-size: 13px;
    }

    .detail-btn {
        font-size: 14px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .detail-image {
        height: 140px;
    }

    .detail-title {
        font-size: 16px;
    }

    .detail-price {
        font-size: 18px;
    }

    .detail-content .card-feature {
        font-size: 11px;
        padding: 2px 8px;
    }
}