/* =================================================================
   فراملک - استایل‌های اختصاصی فرانت‌اند (Mobile-First & RTL)
   ================================================================= */
@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanb/IRY-Thin.woff2') format('woff2'),
    url('../fonts/yekanb/IRY-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'YekanBakhc';
    src: url('../fonts/yekanb/IRY-Light.woff2') format('woff2'),
    url('../fonts/yekanb/IRY-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: Vazir;
    src: url('../fonts/vazir/Vazir-Regular-FD.eot');
    src: url('../fonts/vazir/Vazir-Regular-FD.eot?#iefix') format('embedded-opentype'),
    url('../fonts/vazir/Vazir-Regular-FD.woff') format('woff'),
    url('../fonts/vazir/Vazir-Regular-FD.ttf') format('truetype');
    font-weight: normal;
}
@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanb/IRY.woff2') format('woff2'),
    url('../fonts/yekanb/IRY.woff') format('woff');
    /* Regular */
    font-style: normal;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanb/IRY-Medium.woff2') format('woff2'),
    url('../fonts/yekanb/IRY-Medium.woff') format('woff');

    font-style: normal;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanb/IRY-Bold.woff2') format('woff2'),
    url('../fonts/yekanb/IRY-Bold.woff') format('woff');

    font-style: normal;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanb/IRY-ExtraBold.woff2') format('woff2'),
    url('../fonts/yekanb/IRY-ExtraBold.woff') format('woff');

    font-style: normal;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanb/IRY-Black.woff2') format('woff2'),
    url('../fonts/yekanb/IRY-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekanb/IRY-ExtraBlack.woff2') format('woff2'),
    url('../fonts/yekanb/IRY-ExtraBlack.woff') format('woff');
    font-weight: 950;
    font-style: normal;
}
:root {
    --primary-color: #1e3a8a;
    --primary-hover: #16295f;
    --primary-soft: #eef2ff;
    --border-color: #e2e8f0;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-body: #f8fafc;
    --radius-base: 14px;
    --radius-sm: 10px;
}

body {
    font-family: Vazir, sans-serif, Tahoma !important;
    background-color: var(--bg-body);
    color: var(--text-dark);
    padding-bottom: 70px; /* فضای لازم برای نویگیشن بار پایین در موبایل */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* هدر موبایل */
.mobile-header {
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* اسلایدر افقی دسته‌بندی نوع ملک */
.type-slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.type-slider::-webkit-scrollbar {
    display: none;
}

.type-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 80px;
    padding: 10px 8px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-base);
    color: var(--text-muted);
    text-decoration: none;
    font-size: .75rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all .2s ease;
}

.type-chip i {
    font-size: 1.4rem;
    color: var(--primary-color);
    transition: color .2s ease;
}

.type-chip:hover {
    border-color: #cbd5e1;
    background: #fafafa;
    color: var(--primary-color);
}

.type-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.type-chip.active i {
    color: #fff;
}

/* پنل جستجو */
.search-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-base);
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

.search-input,
.search-panel .input-group-text {
    height: 44px;
    border-radius: var(--radius-sm) !important;
    border-color: var(--border-color);
    font-size: .85rem;
    background-color: #fdfdfd;
}

.search-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
    background-color: #fff;
}

.btn-search-main {
    height: 44px;
    width: 100%;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--primary-color);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    transition: background .2s;
}

.btn-search-main:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* کارت‌های املاک */
.property-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-base);
    overflow: hidden;
    transition: all .25s ease;
}

.property-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* تصویر ملک و قرارگیری در سمت چپ */
.property-thumb-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 125px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
}

.property-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.property-card:hover .property-thumb {
    transform: scale(1.04);
}

.badge-type-badge {
    position: absolute;
    top: 6px;
    left: 6px; /* در سمت چپ عکس */
    background: rgba(30, 58, 138, 0.9);
    color: #fff;
    font-size: .62rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.btn-like {
    position: absolute;
    bottom: 6px;
    right: 6px; /* در سمت راست عکس */
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    font-size: .9rem;
    transition: all .2s;
}

.btn-like:hover {
    background: #fff;
    color: #e11d48;
}

/* مشاور */
.advisor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
}

/* نویگیشن پایین موبایل (Bottom Navigation) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1030;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.nav-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: .7rem;
    font-weight: 500;
    gap: 2px;
    transition: color .2s;
}

.nav-tab-item i {
    font-size: 1.35rem;
}

.nav-tab-item.active,
.nav-tab-item:hover {
    color: var(--primary-color);
}

/* کارت ملک دقیقاً مثل تصویر نمونه */
.property-item-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #f0f2f5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    padding: 12px;
    display: flex;
    flex-direction: row-reverse; /* عکس در چپ، مشاور در راست */
    align-items: center;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.property-item-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

/* ۱. بخش تصویر در سمت چپ */
.property-img-box {
    position: relative;
    width: 155px;
    min-width: 155px;
    height: 115px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .property-img-box {
        width: 125px;
        min-width: 125px;
        height: 100px;
    }
}

.property-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-badge-sale {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #0d47a1;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 8px;
}

.img-icon-heart {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #fff;
    font-size: 1.25rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    background: transparent;
    border: none;
    padding: 0;
    line-height: 1;
}

.img-icon-gallery {
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: #fff;
    font-size: 1.15rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* ۲. بخش محتوا و اطلاعات در وسط */
.property-info-box {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    text-align: right;
}

.property-item-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.property-item-location {
    font-size: 0.78rem;
    color: #8b95a5;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-features-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.property-feature-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.property-feature-item i {
    font-size: 0.95rem;
    color: #8b95a5;
}

.property-item-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0b3b8c;
    letter-spacing: -0.3px;
}

.property-item-price small {
    font-size: 0.75rem;
    font-weight: 500;
    color: #0b3b8c;
    margin-left: 2px;
}

/* ۳. بخش آواتار مشاور در سمت راست */
.property-agent-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    flex-shrink: 0;
}

.property-agent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 4px;
    border: 1.5px solid #edf2f7;
}

.property-agent-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}

.property-agent-role {
    font-size: 0.65rem;
    color: #94a3b8;
    white-space: nowrap;
    text-align: center;
}
