/* =====================
   RESET & BASE
===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green:       #1D9E75;
    --green-dark:  #0F6E56;
    --green-light: #E1F5EE;
    --blue-light:  #E6F1FB;
    --blue:        #185FA5;
    --text:        #1a1a1a;
    --text-muted:  #666;
    --text-hint:   #999;
    --border:      #e5e5e5;
    --bg:          #f7f7f5;
    --white:       #ffffff;
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --shadow:      0 2px 12px rgba(0,0,0,0.07);
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }

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

img { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* =====================
   HEADER
===================== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo { font-size: 20px; font-weight: 600; color: var(--text); }
.logo span { color: var(--green); }

.nav { display: flex; align-items: center; gap: 24px; }
.nav-link { font-size: 14px; color: var(--text-muted); transition: color .2s; }
.nav-link:hover { color: var(--text); }

.btn-outline {
    font-size: 13px;
    padding: 7px 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background .2s;
}
.btn-outline:hover { background: var(--bg); }

.menu-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

.nav-mobile { display: none; background: var(--white); border-top: 1px solid var(--border); padding: 12px 1.5rem; flex-direction: column; gap: 14px; }
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 15px; color: var(--text-muted); }

/* =====================
   HERO
===================== */
.hero {
    background: var(--green-dark);
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
}
.hero h1 { font-size: 32px; font-weight: 600; color: #fff; margin-bottom: 8px; letter-spacing: -0.5px; }
.hero p  { font-size: 16px; color: rgba(255,255,255,.72); margin-bottom: 1.5rem; }

.tabs-hero { display: flex; justify-content: center; margin-bottom: 1rem; }
.tab-btn {
    padding: 9px 28px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,.18);
    color: rgba(255,255,255,.8);
    transition: all .2s;
}
.tab-btn:first-child { border-radius: 8px 0 0 8px; }
.tab-btn:last-child  { border-radius: 0 8px 8px 0; }
.tab-btn.active      { background: #fff; color: var(--green-dark); }

.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 6px 6px 6px 16px;
    max-width: 600px;
    margin: 0 auto;
    gap: 8px;
    box-shadow: var(--shadow);
}
.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: var(--text);
    font-family: inherit;
}
.search-bar input::placeholder { color: var(--text-hint); }
.btn-search {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
    white-space: nowrap;
}
.btn-search:hover { background: var(--green-dark); }

/* =====================
   FILTER BAR
===================== */
.filters-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 1.5rem;
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    flex-wrap: wrap;
}
.filter-label { font-size: 13px; color: var(--text-muted); white-space: nowrap; margin-right: 4px; }
.chip {
    font-size: 13px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all .2s;
    text-decoration: none;
}
.chip:hover  { background: var(--bg); border-color: #ccc; }
.chip.active { background: var(--green-light); color: var(--green-dark); border-color: #5DCAA5; }

/* =====================
   MAIN LAYOUT
===================== */
.main-layout {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    align-items: flex-start;
}

/* =====================
   SIDEBAR
===================== */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}
.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
}
.range-row { display: flex; gap: 8px; }
.range-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--white);
    color: var(--text);
    outline: none;
    font-family: inherit;
    min-width: 0;
}
.range-input:focus { border-color: var(--green); }

.check-list { display: flex; flex-direction: column; gap: 9px; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check-item input { accent-color: var(--green); width: 15px; height: 15px; cursor: pointer; }

.btn-green {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
    text-align: center;
    text-decoration: none;
}
.btn-green:hover { background: var(--green-dark); }

/* =====================
   LISTINGS
===================== */
.listings { flex: 1; min-width: 0; }
.listings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.listings-count { font-size: 14px; color: var(--text-muted); }
.sort-select {
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* =====================
   PROPERTY CARD
===================== */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card-img-wrap { position: relative; }
.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
.card-img-placeholder {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.badge-aluguel { background: var(--green-light); color: var(--green-dark); }
.badge-venda   { background: var(--blue-light);  color: var(--blue); }
.badge-destaque { background: #FAEEDA; color: #854F0B; }

.card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.card-titulo { font-size: 14px; font-weight: 500; line-height: 1.4; }
.card-preco  { font-size: 18px; font-weight: 600; }
.card-preco span { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.card-cond   { font-size: 12px; color: var(--text-muted); }
.card-end    { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.card-feats  { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.feat        { font-size: 12px; color: var(--text-muted); }

/* =====================
   PAGINATION
===================== */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 2rem 0 1rem; }
.page-btn {
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: all .2s;
    text-decoration: none;
}
.page-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.page-btn:hover:not(.active) { background: var(--bg); }

/* =====================
   DETAIL PAGE
===================== */
.detail-wrap { padding: 2rem 0; }

.detail-foto {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}
.detail-foto-placeholder {
    width: 100%;
    height: 420px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    background: #f0f0f0;
    margin-bottom: 2rem;
}

.detail-cols { display: flex; gap: 2rem; align-items: flex-start; }
.detail-main { flex: 1; min-width: 0; }
.detail-aside { width: 300px; flex-shrink: 0; }

.detail-titulo { font-size: 26px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.3px; }
.detail-end    { font-size: 15px; color: var(--text-muted); margin-bottom: 1rem; }
.detail-preco  { font-size: 28px; font-weight: 600; color: var(--green-dark); margin-bottom: 4px; }
.detail-preco span { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.detail-cond   { font-size: 14px; color: var(--text-muted); margin-bottom: 1.5rem; }

.detail-nums {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.num-item { text-align: center; }
.num-val { font-size: 20px; font-weight: 600; }
.num-label { font-size: 12px; color: var(--text-muted); }

.detail-desc { font-size: 15px; line-height: 1.8; color: var(--text-muted); margin-bottom: 1.5rem; }

.comod-title { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.comod-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2rem; }
.comod-chip {
    font-size: 13px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg);
    color: var(--text);
}

/* MAP */
.map-title { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
#mapa {
    width: 100%;
    height: 320px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

/* CONTACT CARD */
.contact-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
}
.contact-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 1rem; }
.contact-preco-aside { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.contact-preco-aside span { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.contact-cond-aside { font-size: 13px; color: var(--text-muted); margin-bottom: 1rem; }
.input-field {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    outline: none;
    margin-bottom: 10px;
    transition: border-color .2s;
}
.input-field:focus { border-color: var(--green); }
textarea.input-field { resize: vertical; min-height: 80px; }
.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
    transition: background .2s;
    text-decoration: none;
}
.whatsapp-btn:hover { background: #1ebe5c; }

/* BREADCRUMB */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--green); }
.breadcrumb a:hover { text-decoration: underline; }

/* =====================
   FOOTER
===================== */
.footer { background: var(--white); border-top: 1px solid var(--border); padding: 3rem 1.5rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 8px; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; margin-top: 2rem; font-size: 12px; color: var(--text-muted); text-align: center; }

/* =====================
   EMPTY STATE
===================== */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.empty-state p { font-size: 16px; margin-top: 8px; }

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
    .nav { display: none; }
    .menu-toggle { display: block; }

    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }

    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; position: static; }

    .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

    .detail-cols { flex-direction: column; }
    .detail-aside { width: 100%; }
    .detail-foto, .detail-foto-placeholder { height: 240px; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
}
