/* Reset و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* هدر و ناوبری */
.header {
    background: white;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 14px;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #007bff;
}

.breadcrumb .separator {
    color: #999;
    margin: 0 5px;
}

/* لایه‌بندی اصلی */
.main-container {
    padding: 0 0 30px 0;
}

.listing-container {
    display: flex;
    flex-direction: row-reverse;
    gap: 30px;
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

/* گالری عکس‌ها - سمت چپ */
.gallery-sidebar {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.main-image {
    width: 100%;
    height: 250px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #eee;
}

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

.image-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    border: 2px solid transparent;
    opacity: 0.7;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: #007bff;
}

/* محتوای اصلی - سمت راست */
.content-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* هدر آگهی */
.listing-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.listing-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 15px;
}

.listing-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.header-action {
    flex-shrink: 0;
}

.type-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.type-badge.sale {
    background: #28a745;
    color: white;
}

.type-badge.purchase {
    background: #007bff;
    color: white;
}

.location-badge,
.project-badge {
    padding: 4px 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

/* تیتر آگهی - فونت قشنگ‌تر */
.listing-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.4;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.meta-item {
    font-size: 13px;
    color: #666;
}

.hidden-phone {
    font-family: monospace;
    direction: ltr;
}

/* بخش‌های اطلاعات */
.financial-section,
.features-section,
.description-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #eee;
}

/* تیتر اطلاعات مالی - بدون شکلک */
.financial-section h3 {
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

/* تیتر امکانات - بدون شکلک */
.features-section h3 {
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

/* تیتر توضیحات - بدون شکلک */
.description-section h3 {
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

.financial-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.financial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.financial-item.highlight {
    background: white;
    margin: 0 -10px;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #007bff;
}

.financial-label {
    color: #666;
    font-weight: 500;
}

.financial-value {
    color: #333;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

/* امکانات */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-size: 13px;
}

.feature-icon {
    color: #28a745;
    font-weight: bold;
}

/* توضیحات */
.description-content {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

/* دکمه اقدام */
.action-section {
    text-align: center;
    padding: 15px 0;
}

.cta-button {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.3s;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

.cta-button:hover {
    background: #c82333;
}

.cta-button.header-btn {
    padding: 8px 20px;
    font-size: 13px;
    white-space: nowrap;
}

.login-prompt {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.login-prompt a {
    color: #007bff;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* بخش پیشنهادات */
.offers-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.section-header h2 {
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

.offers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.offer-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #dee2e6;
    position: relative;
}

.offer-item.top-offer {
    background: #fff3cd;
    border-color: #ffc107;
}

.top-offer-badge {
    position: absolute;
    top: -8px;
    left: 15px;
    background: #ffc107;
    color: #856404;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.offer-amount {
    color: #333;
    font-weight: 600;
    font-size: 15px;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

.offer-meta {
    font-size: 12px;
    color: #666;
}

.offer-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #555;
}

.no-offers {
    text-align: center;
    padding: 25px 15px;
    color: #666;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .listing-container {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .listing-header-top {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-action {
        align-self: flex-start;
    }
    
    .gallery-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .main-image {
        height: 200px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .listing-title {
        font-size: 18px;
    }
    
    .cta-button.header-btn {
        width: 100%;
        text-align: center;
    }
}