/* ==========================================================================
   ESTORA REAL ESTATE - OPTIMAL MASTER CORE STYLESHEET
   ========================================================================== */

:root {
    --primary-navy: #061c3f;
    --secondary-navy: #0B2240;
    --accent-blue: #0084ff;
    --accent-blue-hover: #0070db;
    --accent-orange: #ff9e0d;
    --accent-orange-hover: #e58d05;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --border-select: #cbd5e1;
    --alert-red: #ef4444;
    --alert-bg: #fef2f2;
    --font-sans: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    --container-max: 1240px;
    --transition-speed: 0.2s;

    /* Footer */
    --footer-orange: #FF9800;
    --footer-blue-bg: #0038A8;
    --footer-blue-dark: #00135C;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

button, input, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.top-bar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    font-size: 13px;
    position: relative;
    z-index: 100;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-links a {
    color: var(--accent-blue);
    font-size: 13.5px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0f2fe;
    border-radius: 6px;
    transition: transform var(--transition-speed), background-color var(--transition-speed);
}

.social-links a:hover {
    transform: scale(1.1);
    background-color: #f0f9ff;
}

.test-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #fde68a;
    background-color: #fffbeb;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

.test-mode-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #f59e0b;
    flex-shrink: 0;
    animation: testModePulse 1.8s ease-in-out infinite;
}

.test-mode-text-short {
    display: none;
}

.desktop-center-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

@keyframes testModePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
    50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0); }
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.top-bar-right-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--primary-navy);
    font-weight: 600;
    font-size: 13px;
}

.top-bar-right-item i {
    color: var(--accent-blue);
}

.top-bar-right-item select {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary-navy);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.main-header {
    background-color: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-add-ad {
    background-color: var(--accent-orange);
    color: #ffffff;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13.5px;
    box-shadow: 0 4px 10px rgba(255, 158, 13, 0.25);
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.btn-add-ad:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-1px);
}

.btn-login {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-navy);
    font-weight: 700;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13.5px;
}

.btn-login i {
    color: var(--accent-orange);
    font-size: 18px;
}

/* ==========================================================================
   SUB NAVBAR (DARK NAVY #061c3f)
   ========================================================================== */
.sub-navbar {
    background-color: var(--primary-navy);
    color: #ffffff;
    font-size: 14px;
}

.sub-navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
}

.nav-menu {
    display: flex;
    align-items: center;
    height: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    font-weight: 600;
    color: #e2e8f0;
    transition: background-color var(--transition-speed);
}

.nav-item.active {
    background-color: var(--accent-blue);
    color: #ffffff;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-contacts {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.nav-contact-item i {
    color: var(--accent-blue);
}

.nav-contact-item a {
    color: #ffffff;
    font-weight: 600;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    background: linear-gradient(rgba(6, 28, 63, 0.35), rgba(6, 28, 63, 0.35)), url('/images/hero-villa.png') no-repeat center center/cover;
    padding: 45px 0 65px 0;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.hero-left-card {
    background: transparent;
    padding: 10px 0 20px 0;
    max-width: 580px;
    margin-bottom: 22px;
}

.hero-badge {
    background-color: var(--accent-blue);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 14px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-buttons {
    display: flex;
    gap: 14px;
}

.btn-hero-dark {
    background-color: var(--primary-navy);
    color: #ffffff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 13.5px;
    text-align: center;
    flex: 1;
    transition: background-color var(--transition-speed);
}

.btn-hero-dark:hover {
    background-color: var(--secondary-navy);
}

.btn-hero-blue {
    background-color: var(--accent-blue);
    color: #ffffff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 13.5px;
    text-align: center;
    flex: 1;
    transition: background-color var(--transition-speed);
}

.btn-hero-blue:hover {
    background-color: var(--accent-blue-hover);
}

/* ==========================================================================
   GORIZONTAL IDEAL FILTER FORM (COMPACT 1-ROW DESIGN)
   ========================================================================== */
.filter-container {
    width: 100%;
    margin-top: 10px;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: -1px;
    position: relative;
    z-index: 3;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1px;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    color: #ffffff;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 13px;
    background: rgba(6, 28, 63, 0.75);
    transition: all var(--transition-speed);
    white-space: nowrap;
    border: none;
    outline: none;
    user-select: none;
}

.filter-tab.active {
    background-color: #ffffff;
    color: var(--primary-navy);
    border-bottom: 3px solid var(--accent-orange);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.filter-tab:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.filter-box {
    background-color: #ffffff;
    border-radius: 0 10px 10px 10px;
    padding: 12px 16px 14px 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.filter-main-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.filter-fields-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    flex-grow: 1;
    min-width: 0;
}

.filter-actions-group {
    display: flex;
    gap: 6px;
    align-items: flex-end;
    flex-shrink: 0;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.filter-field label {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 2px;
}

.filter-select-wrapper {
    position: relative;
    border: 1.5px solid var(--border-select);
    border-radius: 6px;
    background-color: #ffffff;
    height: 36px;
    display: flex;
    align-items: center;
    width: 100%;
    transition: all var(--transition-speed);
}

.filter-select-wrapper:hover {
    border-color: var(--accent-blue);
}

.filter-select-wrapper:focus-within {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2.5px rgba(0, 132, 255, 0.14);
}

.filter-select-wrapper select {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 12.5px;
    color: var(--primary-navy);
    appearance: none;
    cursor: pointer;
    outline: none;
    padding: 0 20px 0 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.filter-select-wrapper select option {
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-navy);
    background-color: #ffffff;
}

.filter-select-wrapper input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 12.5px;
    color: var(--primary-navy);
    outline: none;
    padding: 0 10px;
}

.filter-select-wrapper i.fa-chevron-down {
    position: absolute;
    right: 7px;
    color: var(--accent-blue);
    pointer-events: none;
    font-size: 9.5px;
}

.btn-filter-settings {
    background-color: var(--accent-orange);
    color: #ffffff;
    font-weight: 800;
    padding: 0 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    height: 36px;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background-color var(--transition-speed);
    text-decoration: none;
    border: none;
}

.btn-filter-settings:hover {
    background-color: var(--accent-orange-hover);
}

.btn-filter-settings.active {
    background-color: #ef4444;
}

.btn-filter-settings.active:hover {
    background-color: #dc2626;
}

.btn-filter-search {
    background-color: var(--primary-navy);
    color: #ffffff;
    font-weight: 800;
    padding: 0 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    height: 36px;
    font-size: 11.5px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background-color var(--transition-speed);
    border: none;
}

.btn-filter-search:hover {
    background-color: var(--secondary-navy);
}

/* Bottom Actions Row */
.filter-bottom-actions-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.filter-bottom-secondary-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-action-id-search {
    height: 36px;
    padding: 0 14px;
    background: #ffffff;
    border: 1.5px solid #061c3f;
    border-radius: 6px;
    color: #061c3f;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-speed);
}

.btn-action-id-search:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

.btn-action-map-view {
    height: 36px;
    padding: 0 14px;
    background: #ffffff;
    border: 1.5px solid #f43f5e;
    border-radius: 6px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-speed);
}

.btn-action-map-view i {
    color: #f43f5e;
}

.btn-action-map-view:hover {
    background: #fff1f2;
    transform: translateY(-1px);
}

.btn-action-primary-search {
    height: 36px;
    padding: 0 18px;
    background: var(--accent-blue);
    color: #ffffff;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(0, 132, 255, 0.25);
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all var(--transition-speed);
}

.btn-action-primary-search:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 132, 255, 0.35);
}

/* ==========================================================================
   HORIZONTAL PRODUCT ROW CARDS (FOR /maniDashboard SEARCH RESULTS)
   ========================================================================== */
.product-row-card {
    display: grid;
    grid-template-columns: 280px 1fr 200px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

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

.product-row-thumb {
    position: relative;
    width: 280px;
    height: 190px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.product-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.product-row-card:hover .product-row-thumb img {
    transform: scale(1.04);
}

.product-row-info {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.product-row-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-orange);
}

.product-row-id {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
}

.product-row-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-row-title a:hover {
    color: var(--accent-blue);
}

.product-row-location {
    font-size: 12.5px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.product-row-specs {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-navy);
    padding: 8px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 10px;
}

.product-row-specs span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-row-specs i {
    color: var(--accent-blue);
}

.product-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-row-actions {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    border-left: 1px solid #f1f5f9;
    background: #fafbfc;
}

.btn-contact-agent {
    background: var(--primary-navy);
    color: #ffffff;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background var(--transition-speed);
}

.btn-contact-agent:hover {
    background: var(--secondary-navy);
}

/* ==========================================================================
   4-COLUMN LISTINGS GRID (FOR WELCOME PAGE)
   ========================================================================== */
.listings-section {
    padding: 50px 0;
    background-color: #ffffff;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-navy);
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.listing-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.listing-img-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #e2e8f0;
}

.listing-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.listing-card:hover .listing-img-wrapper img {
    transform: scale(1.05);
}

.badge-top {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent-orange);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.btn-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-speed);
}

.btn-favorite:hover, .btn-favorite.active {
    background-color: #ffffff;
    color: var(--alert-red);
}

.listing-details {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.listing-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.listing-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-orange);
}

.listing-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 4px;
}

.listing-location {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.listing-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-navy);
}

.listing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
}

.listing-tag {
    font-size: 11px;
    background-color: var(--bg-light);
    color: var(--primary-navy);
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

/* ==========================================================================
   TICKER BANNER
   ========================================================================== */
.ticker-banner {
    background-color: var(--primary-navy);
    color: #ffffff;
    padding: 12px 0;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: flex;
    align-items: center;
    gap: 30px;
    animation: ticker-slide 30s linear infinite;
    font-size: 14px;
}

.ticker-separator {
    color: var(--accent-orange);
}

@keyframes ticker-slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   MARKET ANALYTICS & DISTRICT PRICING SECTION
   ========================================================================== */
.market-analytics-section {
    padding: 70px 0 60px 0;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
}

.market-analytics-layout {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 50px;
    align-items: center;
}

.market-analytics-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--primary-navy);
    line-height: 1.25;
    margin-bottom: 12px;
}

.market-analytics-subtitle {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 30px;
}

.market-features-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.market-feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon-box {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    border: 1.5px solid transparent;
}

.feature-icon-box.icon-blue {
    border-color: #3b82f6;
    color: #2563eb;
    background-color: #eff6ff;
}

.feature-icon-box.icon-green {
    border-color: #10b981;
    color: #059669;
    background-color: #ecfdf5;
}

.feature-icon-box.icon-orange {
    border-color: #f59e0b;
    color: #d97706;
    background-color: #fffbeb;
}

.feature-icon-box.icon-purple {
    border-color: #8b5cf6;
    color: #7c3aed;
    background-color: #f5f3ff;
}

.feature-text .feature-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 3px;
}

.feature-text .feature-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.market-analytics-action {
    margin-top: 10px;
}

.btn-market-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0084ff;
    color: #ffffff;
    font-weight: 700;
    font-size: 13.5px;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 132, 255, 0.35);
    transition: all 0.25s ease;
}

.btn-market-action:hover {
    background-color: #0070d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 132, 255, 0.45);
    color: #ffffff;
}

/* Right Interactive Showcase Box with Modern Leaflet Map */
.market-map-showcase {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    height: 520px;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.market-map-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#marketAnalyticsLeafletMap {
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    z-index: 1;
}

.market-map-top-bar {
    position: relative;
    z-index: 10;
    padding: 18px 20px;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.market-region-selector-wrapper {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 30px;
    padding: 2px 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.market-region-selector-wrapper select {
    border: none;
    background: transparent;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-navy);
    padding: 8px 4px;
    cursor: pointer;
    outline: none;
}

.market-region-selector-wrapper i {
    font-size: 11px;
    color: var(--accent-blue);
}

/* Custom Interactive Leaflet District Price Markers */
.district-price-pin {
    background: transparent;
    border: none;
}

.district-price-tag {
    background: rgba(255, 255, 255, 0.96);
    border: 1.5px solid #2563eb;
    border-radius: 20px;
    padding: 4px 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.22);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
}

.district-price-tag:hover,
.district-price-tag.active {
    background: #0f172a;
    border-color: #38bdf8;
    color: #ffffff;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
    z-index: 999;
}

.district-price-tag .d-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    transition: background 0.2s;
}

.district-price-tag:hover .d-dot,
.district-price-tag.active .d-dot {
    background: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

.district-price-tag .d-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-navy);
}

.district-price-tag:hover .d-name,
.district-price-tag.active .d-name {
    color: #ffffff;
}

.district-price-tag .d-price {
    font-size: 11.5px;
    font-weight: 800;
    color: #2563eb;
    background: #eff6ff;
    padding: 1px 6px;
    border-radius: 10px;
}

.district-price-tag:hover .d-price,
.district-price-tag.active .d-price {
    background: #1e293b;
    color: #38bdf8;
}

/* Leaflet Popup Custom Styling */
.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.4 !important;
}

.district-popup-box {
    padding: 14px 16px;
    min-width: 200px;
}

.popup-district-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-navy);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    margin-bottom: 4px;
    color: #64748b;
}

.popup-stat-row strong {
    color: #0f172a;
    font-weight: 700;
}

.popup-btn-link {
    display: block;
    margin-top: 10px;
    background: #2563eb;
    color: #ffffff !important;
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.popup-btn-link:hover {
    background: #1d4ed8;
}

/* Bottom Floating Glassmorphism Widgets */
.market-map-bottom-widgets {
    position: relative;
    z-index: 10;
    padding: 16px;
    pointer-events: none;
}

.market-widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 12px;
    pointer-events: auto;
}

.market-stat-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.market-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.stat-card-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-navy);
}

.stat-info-icon {
    font-size: 11px;
    color: #94a3b8;
    cursor: pointer;
}

.stat-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.stat-badge.badge-green {
    background-color: #dcfce7;
    color: #16a34a;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.stat-main-price {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.stat-period {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-chart-container {
    height: 42px;
    width: 100%;
    margin-top: 2px;
}

.stat-trend-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.stat-badge.badge-red {
    background-color: #fee2e2;
    color: #dc2626;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.stat-badge.badge-muted {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

.market-stat-card [hidden] {
    display: none !important;
}

.ranking-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ranking-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 0 2px;
    line-height: 1.4;
}

.ranking-empty i {
    color: #94a3b8;
    font-size: 14px;
}

.districts-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.ranking-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    justify-content: space-between;
    padding: 2px 0;
    cursor: pointer;
    transition: opacity 0.15s;
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    text-align: left;
}

.ranking-item:hover {
    opacity: 0.8;
}

.ranking-num {
    color: #94a3b8;
    font-weight: 700;
    width: 18px;
    font-size: 11px;
}

.ranking-name {
    color: #334155;
    font-weight: 600;
    flex: 1;
    margin-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-price {
    color: var(--primary-navy);
    font-weight: 800;
    font-size: 12px;
}

/* ==========================================================================
   SERVICES & ADVANTAGES
   ========================================================================== */
.services-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.services-coming-soon-badge {
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 11.5px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.services-soon-indicator {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px dashed #cbd5e1;
}

.service-card {
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform var(--transition-speed), border-color var(--transition-speed), opacity var(--transition-speed);
}

.service-card.service-card-soon {
    opacity: 0.6;
    filter: grayscale(20%);
    cursor: default;
    background: #ffffff;
}

.service-card.service-card-soon:hover {
    opacity: 0.85;
    filter: grayscale(0%);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.service-card-badge-soon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9.5px;
    font-weight: 700;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}

.service-arrow-soon {
    color: #94a3b8 !important;
    margin-top: auto;
    font-size: 13px;
}

.service-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 20px;
    margin-bottom: 15px;
}

.service-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 4px;
}

.service-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.advantages-section {
    padding: 60px 0;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.advantage-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 22px;
}

.advantage-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background-color: rgba(255, 158, 13, 0.15);
    color: var(--accent-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 15px;
}

.advantage-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 6px;
}

.advantage-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   MODAL & MAP STYLES
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 28, 63, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-content-card {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-navy);
}

.btn-modal-close {
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
}

.btn-modal-close:hover {
    color: #ef4444;
}

.modal-map-wrap {
    height: 600px;
    width: 100%;
}

/* ==========================================================================
   RESPONSIVE (MOBILE & TABLET EXCELLENCE)
   ========================================================================== */
@media (max-width: 1200px) {
    .filter-fields-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
    .filter-main-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .filter-actions-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 8px;
    }
}

@media (max-width: 1024px) {
    .product-row-card {
        grid-template-columns: 240px 1fr auto;
    }
    .product-row-thumb {
        width: 240px;
    }
    .listings-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
    .product-row-card {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }
    .product-row-thumb {
        width: 100%;
        height: 210px;
    }
    .product-row-actions {
        border-left: none;
        border-top: 1px solid #f1f5f9;
        flex-direction: row;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: #fafbfc;
        padding: 14px 16px;
    }
    .product-row-actions > div:last-child {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .top-bar-right, .nav-contacts { display: none; }
    /* Top bar: social icons left, compact test badge right — one tidy row */
    .top-bar { padding: 6px 0; }
    .top-bar .container { gap: 10px; }
    .social-links { gap: 6px; }
    .desktop-center-badge { position: static; transform: none; }
    .test-mode-badge { padding: 3px 10px; font-size: 11px; gap: 6px; }
    .test-mode-text-full { display: none; }
    .test-mode-text-short { display: inline; }
    .hero-title { font-size: 24px; line-height: 1.3; }
    .hero-left-card { padding: 0 0 16px 0; }
    
    /* Sub-Navbar Horizontal Scroll */
    .sub-navbar-content {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .sub-navbar-content::-webkit-scrollbar {
        display: none;
    }
    .nav-menu {
        flex-wrap: nowrap;
        width: 100%;
    }
    .nav-item {
        padding: 0 14px;
        white-space: nowrap;
    }

    /* Filter Responsive Layout */
    .filter-box {
        border-radius: 10px;
        padding: 12px 14px;
        gap: 10px;
    }
    .filter-tabs {
        padding: 0 2px 2px 2px;
    }
    .filter-tab {
        padding: 8px 14px;
        font-size: 12.5px;
        border-radius: 6px 6px 0 0;
    }
    .filter-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .filter-actions-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 8px;
    }
    
    /* Bottom Actions Mobile Grid */
    .filter-bottom-actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-top: 8px;
    }
    .filter-bottom-secondary-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 8px;
    }
    .btn-action-id-search, 
    .btn-action-map-view {
        width: 100%;
        height: 38px;
        font-size: 12px;
        padding: 0 8px;
    }
    .btn-action-primary-search {
        width: 100%;
        height: 40px;
        font-size: 13px;
    }
    
    /* Listings Control Bar on mobile */
    .listings-control-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px;
        gap: 10px;
    }
    .results-count-text {
        text-align: left;
        font-size: 13.5px;
    }
    .sort-selector-wrap {
        width: 100%;
        justify-content: space-between;
    }
    .sort-selector-wrap select {
        flex-grow: 1;
        height: 36px;
        font-size: 12.5px;
    }

    /* Section headers: stack title + action instead of squeezing them in one row */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 18px;
    }
    .section-title { font-size: 22px; line-height: 1.25; }
    .section-subtitle { font-size: 13px; line-height: 1.5; }

    /* "Eng yaxshi takliflar": swipeable horizontal carousel */
    .listings-section { padding: 32px 0; }
    .listings-section .listings-grid {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 20px;
        margin: 0 -20px;
        padding: 4px 20px 14px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .listings-section .listings-grid::-webkit-scrollbar { display: none; }
    .listings-section .listings-grid > * {
        flex: 0 0 78%;
        max-width: 320px;
        scroll-snap-align: start;
    }
    .listings-section .listings-grid > :only-child {
        flex-basis: 100%;
        max-width: none;
    }
    .listings-section .listing-card:hover { transform: none; }
    .listings-section .listing-img-wrapper { height: 170px; }
    .listing-price { font-size: 17px; }

    /* Market analytics: map on top, widgets below it (not covering the map) */
    .market-analytics-section { padding: 40px 0; }
    .market-analytics-layout { grid-template-columns: 1fr; gap: 28px; }
    .market-analytics-subtitle { margin-bottom: 22px; }
    .market-features-list { gap: 16px; margin-bottom: 24px; }
    .market-map-showcase {
        height: auto;
        min-height: 0;
        border-radius: 18px;
    }
    .market-map-container {
        position: relative;
        height: 280px;
    }
    .market-map-top-bar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 12px;
    }
    .market-map-bottom-widgets { padding: 12px; }
    .market-stat-card:hover { transform: none; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .advantages-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .market-analytics-title { font-size: 24px; }
    .market-widgets-grid { grid-template-columns: 1fr; gap: 10px; }
    .market-map-container { height: 240px; }
    .market-region-selector-wrapper { max-width: 100%; }
    .market-region-selector-wrapper select { font-size: 13px; min-width: 0; }
    .btn-market-action { width: 100%; justify-content: center; }
    .filter-fields-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }
    .filter-box {
        padding: 12px 10px;
    }
    .filter-select-wrapper {
        height: 38px;
    }
    .filter-select-wrapper select,
    .filter-select-wrapper input {
        font-size: 13px;
    }
    .btn-filter-settings,
    .btn-filter-search {
        height: 38px;
        font-size: 12px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .btn-hero-dark, .btn-hero-blue {
        width: 100%;
    }
    
    /* Header actions: icon-only "+" button, labelled login button */
    .header-actions {
        gap: 8px;
    }
    .btn-add-ad span {
        display: none;
    }
    .btn-add-ad {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        font-size: 15px;
    }
    .btn-login {
        height: 38px;
        padding: 0 12px;
        gap: 6px;
        font-size: 13px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background-color: #ffffff;
    }
    .btn-login i {
        font-size: 17px;
    }
    .social-links a {
        width: 26px;
        height: 26px;
        font-size: 12.5px;
    }
    .brand-logo-img {
        height: 32px;
    }

}
