/* ======================================================
   TIERRA PXM - COASTAL LUXURY DESIGN SYSTEM (LIGHT MODE)
   Puerto Escondido, Oaxaca - Real Estate Catalog
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette Tokens - Light Theme */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.92);
    --border-color: #e2e8f0;
    --border-accent: #0d9488;

    --accent-emerald: #0d9488;
    --accent-emerald-dark: #0f766e;
    --accent-gold: #d97706;
    --accent-cyan: #0284c7;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --whatsapp-green: #25d366;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-soft: 0 4px 20px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* Reset & Global Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Compact Header & Navbar */
.coastal-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    text-transform: uppercase;
    color: var(--text-main);
}

.brand-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
}

/* Navigation Links */
.nav-links-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .nav-links-menu {
        display: none;
    }
}

.nav-item-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.2s ease;
    padding: 0.3rem 0;
    position: relative;
}

.nav-item-link:hover, .nav-item-link.active {
    color: var(--accent-emerald-dark);
}

.nav-item-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-emerald-dark);
    border-radius: 2px;
}

.nav-contact-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--whatsapp-green);
    color: #ffffff;
    font-weight: 700;
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.25);
}

.nav-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

/* Hero Header Compact Section */
.hero-compact-section {
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-compact-title {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 1rem;
}

.hero-compact-title h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.hero-compact-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Compact Horizontal Search Bar (Single Row, No Space Waste) */
.compact-filter-bar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.4rem 0.6rem 0.4rem 1.2rem;
    max-width: 1050px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    box-shadow: var(--shadow-soft);
}

.filter-compact-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 140px;
    border-right: 1px solid var(--border-color);
    padding-right: 0.6rem;
}

.filter-compact-item:last-of-type {
    border-right: none;
}

.filter-compact-item label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    font-weight: 700;
}

.filter-compact-control {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    font-family: var(--font-body);
    padding: 0.1rem 0;
}

.btn-search-compact {
    background: var(--accent-emerald);
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-search-compact:hover {
    background: var(--accent-emerald-dark);
    transform: translateY(-1px);
}

/* Main Layout Container (NO inner scrolling!) */
.main-catalog-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .main-catalog-layout {
        grid-template-columns: 1fr;
    }
}

.catalog-grid-pane {
    overflow: visible;
}

.results-header-clean {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-header-clean h2 {
    font-size: 1.2rem;
    font-weight: 700;
}

/* 4 Items Grid Layout */
.property-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

@media (max-width: 640px) {
    .property-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* Property Card (Light Mode Theme) */
.property-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-emerald);
}

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

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

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

.card-badge-transaccion {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
}

.card-badge-destacado {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-gold);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 50px;
}

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-zone {
    color: var(--accent-gold);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-main);
}

.card-specs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    margin-bottom: 0.8rem;
}

.badge-escritura {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
}

.badge-comunal {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.card-price {
    display: flex;
    flex-direction: column;
}

.price-main {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-emerald-dark);
    font-family: var(--font-heading);
}

.price-sub-usd {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-detail {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-detail:hover {
    background: var(--accent-emerald);
    color: #ffffff;
    border-color: var(--accent-emerald);
}

/* Clean Map Pane Sticky (Clean Light Map) */
.map-pane-sticky {
    position: sticky;
    top: 75px;
    height: 580px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

#leaflet-map {
    width: 100%;
    height: 100%;
}

/* Floating WhatsApp Widget */
.btn-whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--whatsapp-green);
    color: #ffffff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.7rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    z-index: 2000;
    transition: transform 0.25s ease;
}

.btn-whatsapp-float:hover {
    transform: scale(1.08);
}

/* Single Property Detail Page Styling */
.detail-hero-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    height: 380px;
}

@media (max-width: 768px) {
    .detail-hero-gallery {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.main-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.side-gallery-grid {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 0.75rem;
}

.side-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.detail-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
}

@media (max-width: 1024px) {
    .detail-layout-grid {
        grid-template-columns: 1fr;
    }
}

.detail-card-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.specs-grid-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin: 1.2rem 0;
}

.spec-table-item label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.spec-table-item p {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-emerald-dark);
}

/* Sticky Contact Form Side Box */
.sticky-contact-box {
    position: sticky;
    top: 85px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.btn-whatsapp-large {
    width: 100%;
    background: var(--whatsapp-green);
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 0.8rem;
    border-radius: 50px;
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: background 0.25s ease;
}

.btn-whatsapp-large:hover {
    background: #1eb956;
}

.form-input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.8rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.form-input:focus {
    border-color: var(--accent-emerald);
    outline: none;
    background: #ffffff;
}

/* Custom Light Map Pin Marker */
.custom-light-map-marker {
    background: #ffffff;
    border: 2px solid var(--accent-emerald-dark);
    color: var(--accent-emerald-dark);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}
