.retention-section {
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 16px;
    direction: rtl;
}

.retention-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.retention-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 900;
    color: #0f172a;
}

.retention-sub {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

.retention-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
}

.retention-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    transition: all 0.3s ease;
}

.retention-strip.is-collapsed {
    display: none;
}

.retention-toggle {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 800;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.retention-toggle:hover {
    background: #e2e8f0;
    color: #000;
}

.retention-toggle.is-collapsed {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}

.retention-card {
    flex: 0 0 260px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.25);
}

.retention-card a {
    text-decoration: none;
    color: inherit;
}

.retention-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.retention-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.retention-price {
    font-weight: 900;
    color: #0f172a;
}

.retention-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
}

.retention-reason {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    border-radius: 14px;
}

.retention-actions {
    margin-top: 6px;
    display: flex;
    gap: 8px;
}

.retention-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    font-weight: 900;
}

.retention-btn.primary {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

.retention-btn.compare.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.compare-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 18px;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    border-radius: 18px;
    padding: 12px 14px;
    display: none;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.6);
}

.compare-bar.is-visible {
    display: flex;
}

.compare-bar .compare-text {
    font-weight: 900;
}

.compare-bar .compare-actions {
    display: flex;
    gap: 10px;
}

.compare-bar a {
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 900;
    background: #2563eb;
    color: #fff;
}

.compare-bar button {
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.compare-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    direction: rtl;
}

.compare-header-section {
    margin-bottom: 24px;
}

.compare-actions-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin: 0 0 20px;
}

.compare-actions-top .retention-cta {
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.compare-actions-top .compare-clear {
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: 900;
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #991b1b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.compare-actions-top .compare-clear:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}

.compare-actions-top .compare-clear i {
    font-size: 0.9rem;
}

.compare-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.compare-property-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.compare-property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.2);
}

.compare-property-img {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.compare-property-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.compare-property-card:hover .compare-property-img img {
    transform: scale(1.05);
}

.compare-property-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compare-property-title {
    font-weight: 900;
    font-size: 1rem;
    color: #0f172a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.compare-property-price {
    font-weight: 900;
    font-size: 1.15rem;
    color: #059669;
}

.compare-property-price span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.compare-property-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2563eb;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: 10px;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.compare-property-link:hover {
    background: #dbeafe;
    transform: translateX(-4px);
}

.compare-property-link i {
    font-size: 0.75rem;
}

.compare-table-wrapper {
    overflow-x: auto;
    border-radius: 20px;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    min-width: 600px;
}

.compare-table thead tr {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.compare-table th,
.compare-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    text-align: right;
}

.compare-table thead th {
    color: #fff;
    font-weight: 900;
    font-size: 0.95rem;
    border-bottom: none;
}

.compare-criteria-header {
    min-width: 160px;
}

.compare-criteria-header i,
.compare-property-header i {
    margin-left: 8px;
}

.compare-table tbody th {
    background: #f8fafc;
    font-weight: 800;
    color: #334155;
    width: 180px;
}

.compare-table tbody td {
    background: #fff;
}

.compare-row-highlight td {
    background: #f0fdf4 !important;
}

.compare-row-highlight th {
    background: #dcfce7 !important;
}

.compare-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.compare-label i {
    width: 20px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.compare-value {
    font-weight: 700;
    color: #0f172a;
}

.compare-table tbody tr {
    transition: background 0.2s ease;
}

.compare-table tbody tr:hover td {
    background: #fafbfc;
}

.compare-table tbody tr:hover th {
    background: #f1f5f9;
}

.compare-table tbody tr:last-child td,
.compare-table tbody tr:last-child th {
    border-bottom: none;
}

.compare-empty {
    padding: 60px 24px;
    border: 2px dashed #e2e8f0;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.compare-empty-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 50%;
    margin-bottom: 8px;
}

.compare-empty-icon i {
    font-size: 2.5rem;
    color: #2563eb;
}

.compare-empty-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #0f172a;
}

.compare-empty-desc {
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
}

.compare-empty-btn {
    margin-top: 8px;
    padding: 12px 20px !important;
    background: linear-gradient(135deg, #0f172a, #1e293b) !important;
    color: #fff !important;
    border: none !important;
}

.compare-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(15, 23, 42, 0.4);
}

.compare-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
}

.compare-footer-note i {
    color: #2563eb;
}

.reco-fab {
    position: fixed;
    left: 18px;
    bottom: 22px;
    z-index: 9998;
    border: none;
    border-radius: 999px;
    padding: 12px 14px;
    font-weight: 900;
    background: linear-gradient(135deg, #0f172a, #2563eb);
    color: #fff;
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
    cursor: pointer;
}

.reco-fab:hover {
    filter: brightness(1.03);
}

.reco-fab:active {
    transform: translateY(1px);
}

.reco-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.reco-modal.is-open {
    display: block;
}

.reco-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.reco-panel {
    position: absolute;
    left: 14px;
    bottom: 86px;
    width: min(780px, calc(100vw - 28px));
    max-height: min(78vh, 820px);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
    overflow: hidden;
    direction: rtl;
}

.reco-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.reco-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
}

.reco-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #334155;
}

.reco-body {
    padding: 14px 16px 16px;
    overflow: auto;
    max-height: calc(min(78vh, 820px) - 60px);
}

.reco-note {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 700;
}

.btn-action.btn-compare {
    width: 45px;
    flex: none;
    background: #ffffff;
    color: #2563eb;
    border: 1px solid #dbeafe;
}

.btn-action.btn-compare:hover {
    background: #dbeafe;
    transform: scale(1.05);
}

.btn-action.btn-compare.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.finder-btn.compare.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}