﻿:root {
    --navy: #071b2d;
    --navy-light: #0d2b42;
    --green: #0d5c4a;
    --green-light: #13745e;
    --green-soft: #e8f1ee;
    --white: #ffffff;
    --background: #f4f7f6;
    --text: #182630;
    --muted: #73818a;
    --border: #e1e9e6;
}

.properties-page {
    direction: rtl;
    min-height: 100vh;
    background: var(--background);
    padding: 45px 6%;
    font-family: "Vazirmatn", sans-serif;
    color: var(--text);
}

.properties-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 30px;
}

.header-label {
    display: inline-block;
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.properties-header h1 {
    margin: 0;
    color: var(--navy);
    font-size: 32px;
    font-weight: 800;
}

.properties-header p {
    margin: 10px 0 0;
    color: var(--muted);
}

.property-count {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 15px 22px;
    min-width: 130px;
    text-align: center;
}

    .property-count strong {
        display: block;
        color: var(--green);
        font-size: 24px;
    }

    .property-count span {
        color: var(--muted);
        font-size: 13px;
    }

.filters-form {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 0 8px 30px rgba(7, 27, 45, 0.05);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .filter-item label {
        font-size: 13px;
        font-weight: 700;
        color: var(--text);
    }

    .filter-item input,
    .filter-item select {
        width: 100%;
        box-sizing: border-box;
        height: 48px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: #fbfcfc;
        color: var(--text);
        padding: 0 14px;
        font-family: inherit;
        font-size: 14px;
        outline: none;
        transition: 0.2s;
    }

        .filter-item input:focus,
        .filter-item select:focus {
            border-color: var(--green);
            background: var(--white);
            box-shadow: 0 0 0 3px var(--green-soft);
        }

.search-item {
    grid-column: span 2;
}

.price-filters {
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding-top: 5px;
}

    .price-filters.visible {
        display: grid;
    }

#rentPriceFilters.visible {
    grid-template-columns: repeat(4, 1fr);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.search-button,
.reset-button {
    height: 46px;
    border-radius: 11px;
    padding: 0 28px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-button {
    border: none;
    background: var(--navy);
    color: var(--white);
}

    .search-button:hover {
        background: var(--navy-light);
    }

.reset-button {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--muted);
}

    .reset-button:hover {
        color: var(--green);
        border-color: var(--green);
    }

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.property-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(7, 27, 45, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .property-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 15px 35px rgba(7, 27, 45, 0.09);
    }

.property-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--green-soft);
}

    .property-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform 0.3s;
    }

.property-card:hover .property-image img {
    transform: scale(1.04);
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
}

.listing-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--green);
    color: var(--white);
    border-radius: 8px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
}

.property-content {
    padding: 20px;
}

.property-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

    .property-title-row h2 {
        margin: 0;
        font-size: 19px;
        color: var(--navy);
        font-weight: 800;
    }

.city {
    color: var(--green);
    background: var(--green-soft);
    border-radius: 7px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
}

.property-area {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

    .property-area span:first-child {
        color: var(--green);
    }

.property-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
    margin: 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-prices {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    margin-bottom: 13px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}

    .price-row span {
        color: var(--muted);
        font-size: 12px;
    }

    .price-row strong {
        color: var(--green);
        font-size: 14px;
    }

    .price-row small {
        font-size: 10px;
        font-weight: 500;
    }

.property-agent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 12px;
}

    .property-agent span {
        color: var(--muted);
    }

    .property-agent strong {
        color: var(--navy);
    }

.details-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 43px;
    border-radius: 10px;
    background: var(--navy);
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s;
}

    .details-button:hover {
        background: var(--green);
    }

.empty-properties {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    text-align: center;
    padding: 70px 20px;
}

.empty-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-soft);
    color: var(--green);
    font-size: 28px;
}

.empty-properties h2 {
    color: var(--navy);
    margin: 0 0 10px;
}

.empty-properties p {
    color: var(--muted);
    margin-bottom: 25px;
}

.empty-properties a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 22px;
    border-radius: 10px;
    background: var(--green);
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 35px;
}

    .pagination a,
    .pagination span {
        min-width: 40px;
        height: 40px;
        padding: 0 10px;
        box-sizing: border-box;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        font-size: 13px;
        font-weight: 700;
    }

    .pagination a {
        background: var(--white);
        border: 1px solid var(--border);
        color: var(--text);
    }

        .pagination a:hover {
            border-color: var(--green);
            color: var(--green);
        }

    .pagination span.active {
        background: var(--green);
        color: var(--white);
    }

@media (max-width: 1100px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-item {
        grid-c olumn: span 2;
    }

    #rentPriceFilters.visible {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .properties-page {
        padding: 30px 18px;
    }

    .properties-header {
        align-items: flex-start;
        flex-direction: column;
    }

        .properties-header h1 {
            font-size: 25px;
        }

    .property-count {
        width: 100%;
        box-sizing: border-box;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .search-item {
        grid-column: auto;
    }

    .price-filters,
    #rentPriceFilters.visible {
        grid-template-columns: 1fr;
    }

    .properties-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .search-button,
    .reset-button {
        width: 100%;
    }
}
