/* ================================================
   IMOVEL WEB — Site Público CSS
   ================================================ */

:root {
  --primary:    #1a3c5e;
  --primary-lt: #2255880d;
  --accent:     #c8933a;
  --accent-lt:  #c8933a1a;
  --dark:       #0f2035;
  --text:       #2d3748;
  --muted:      #718096;
  --border:     #e2e8f0;
  --bg:         #f7f8fc;
  --white:      #ffffff;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 48px rgba(0,0,0,.14);
  --trans:      all .25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }
img { max-width: 100%; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---- HEADER ---- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0;
  transition: var(--trans);
}
.site-header.scrolled,
.site-header:not(.transparent) {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  padding: 10px 0;
}
.header-inner { display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.logo-icon { width: 40px; height: 40px; background: var(--accent); border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: .9rem; flex-shrink: 0; }
.site-header:not(.scrolled) .logo { color: #fff; }
.site-header:not(.scrolled) .logo-icon { background: rgba(255,255,255,.2); }

.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { padding: 8px 14px; border-radius: 8px; font-size: .88rem; font-weight: 500; color: var(--muted); transition: var(--trans); }
.main-nav a:hover, .main-nav a.active { background: var(--primary-lt); color: var(--primary); }
.site-header:not(.scrolled) .main-nav a { color: rgba(255,255,255,.8); }
.site-header:not(.scrolled) .main-nav a:hover { background: rgba(255,255,255,.15); color: #fff; }

.btn-admin { padding: 9px 18px; background: var(--accent); color: #fff; border-radius: 8px; font-size: .85rem; font-weight: 600; transition: var(--trans); white-space: nowrap; }
.btn-admin:hover { background: var(--primary); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--primary); }
.site-header:not(.scrolled) .nav-toggle { color: #fff; }

/* ---- HERO ---- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 80px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity 1s; opacity: 0; }
.hero-slide.active { opacity: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(10,25,47,.8) 0%, rgba(10,25,47,.5) 100%); }
.hero-content { position: relative; z-index: 2; padding: 60px 0 40px; }
.hero-eyebrow { font-size: .85rem; text-transform: uppercase; letter-spacing: 3px; color: var(--accent); font-weight: 600; margin-bottom: 16px; }
.hero-title { font-family: 'Playfair Display', serif; font-size: clamp(2.2rem, 5vw, 4rem); color: #fff; line-height: 1.15; margin-bottom: 16px; }
.hero-subtitle { font-size: 1.1rem; color: rgba(255,255,255,.75); margin-bottom: 40px; }

/* Search bar */
.search-bar { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); max-width: 860px; }
.search-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.stab { padding: 14px 24px; border: none; background: none; cursor: pointer; font-size: .9rem; font-weight: 500; color: var(--muted); transition: var(--trans); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.stab.active { color: var(--primary); border-bottom-color: var(--accent); background: var(--primary-lt); }
.search-fields { display: flex; align-items: stretch; flex-wrap: wrap; }
.sf-group { display: flex; align-items: center; gap: 10px; padding: 12px 18px; flex: 1; min-width: 180px; border-right: 1px solid var(--border); }
.sf-group i { color: var(--accent); font-size: .9rem; flex-shrink: 0; }
.sf-group input, .sf-group select { border: none; outline: none; font-size: .9rem; width: 100%; font-family: inherit; color: var(--text); background: none; }
.btn-search { padding: 16px 28px; background: var(--accent); color: #fff; border: none; font-size: .95rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; white-space: nowrap; transition: var(--trans); }
.btn-search:hover { background: var(--primary); }

/* Hero stats */
.hero-stats { position: relative; z-index: 2; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); border-top: 1px solid rgba(255,255,255,.15); }
.hero-stats { display: flex; }
.hstat { flex: 1; text-align: center; padding: 20px; color: #fff; border-right: 1px solid rgba(255,255,255,.1); }
.hstat:last-child { border-right: none; }
.hstat strong { display: block; font-size: 1.6rem; font-family: 'Playfair Display', serif; }
.hstat span { font-size: .8rem; opacity: .8; }

/* ---- SECTIONS ---- */
.section-categorias, .section-imoveis, .section-corretores, .section-diferenciais { padding: 80px 0; }
.bg-light { background: var(--bg); }
.bg-dark { background: var(--dark); }
.page-hero { background: var(--primary); color: #fff; padding: 120px 0 40px; text-align: center; }
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.4rem; margin-bottom: 8px; }
.page-hero p { opacity: .8; }

.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; }
.section-header h2 { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--primary); }
.section-header.light h2 { color: #fff; }
.section-header p { color: var(--muted); margin-top: 6px; }
.ver-todos { font-size: .88rem; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 6px; transition: var(--trans); white-space: nowrap; }
.ver-todos:hover { gap: 10px; }

/* ---- CATEGORIAS ---- */
.categorias-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.cat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 16px; text-align: center; transition: var(--trans); }
.cat-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.cat-icon { width: 52px; height: 52px; background: var(--accent-lt); border-radius: 12px; display: grid; place-items: center; margin: 0 auto 12px; color: var(--accent); font-size: 1.2rem; transition: var(--trans); }
.cat-card:hover .cat-icon { background: var(--accent); color: #fff; }
.cat-nome { display: block; font-weight: 600; font-size: .88rem; color: var(--text); margin-bottom: 4px; }
.cat-count { font-size: .78rem; color: var(--muted); }

/* ---- IMOVEL CARD ---- */
.imoveis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.imovel-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--trans); }
.imovel-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-thumb { display: block; position: relative; overflow: hidden; aspect-ratio: 4/3; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.imovel-card:hover .card-thumb img { transform: scale(1.05); }
.badge-tipo { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.badge-venda { background: var(--primary); color: #fff; }
.badge-aluguel { background: #0a9e6e; color: #fff; }
.badge-temp { background: #6c5ce7; color: #fff; }
.badge-destaque { position: absolute; top: 12px; right: 12px; background: var(--accent); color: #fff; padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700; }
.card-body { padding: 20px; }
.card-preco { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.card-preco small { font-size: .7rem; color: var(--muted); font-family: 'DM Sans', sans-serif; }
.card-titulo { font-size: .95rem; font-weight: 600; margin-bottom: 8px; line-height: 1.3; }
.card-titulo a:hover { color: var(--accent); }
.card-local { font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.card-local i { color: var(--accent); }
.card-features { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.card-features span { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.card-features i { color: var(--primary); }
.card-corretor { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.card-corretor img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.card-corretor span { font-size: .78rem; color: var(--muted); }

/* ---- CORRETORES ---- */
.corretores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.corretor-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 24px; text-align: center; transition: var(--trans); }
.corretor-card:hover { background: rgba(255,255,255,.12); transform: translateY(-4px); }
.corretor-foto { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; margin: 0 auto 14px; border: 3px solid var(--accent); }
.corretor-foto img { width: 100%; height: 100%; object-fit: cover; }
.corretor-info h3 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.creci { display: block; font-size: .78rem; color: rgba(255,255,255,.5); margin-bottom: 4px; }
.especialidade { display: block; font-size: .8rem; color: var(--accent); margin-bottom: 14px; }
.corretor-actions { display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-wpp { width: 36px; height: 36px; background: #25d366; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.btn-perfil { padding: 8px 16px; background: var(--accent); color: #fff; border-radius: 8px; font-size: .82rem; font-weight: 600; }

/* ---- DIFERENCIAIS ---- */
.diferenciais-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px; }
.diferencial-item { text-align: center; }
.di-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--accent-lt); display: grid; place-items: center; margin: 0 auto 16px; color: var(--accent); font-size: 1.4rem; }
.diferencial-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.diferencial-item p { font-size: .88rem; color: var(--muted); }

/* ---- LISTING ---- */
.listing-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding-top: 40px; padding-bottom: 60px; align-items: start; }
.filtros-sidebar { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; position: sticky; top: 90px; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.sidebar-header h3 { font-size: 1rem; font-weight: 700; }
.close-sidebar { display: none; background: none; border: none; font-size: 1.2rem; cursor: pointer; }
.filtro-group { margin-bottom: 20px; }
.filtro-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.filtro-group select, .filtro-group input[type=text], .filtro-group input[type=number] { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: .88rem; color: var(--text); font-family: inherit; outline: none; transition: border-color .2s; }
.filtro-group select:focus, .filtro-group input:focus { border-color: var(--accent); }
.radio-group { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-opt { padding: 6px 12px; border: 1px solid var(--border); border-radius: 20px; font-size: .82rem; cursor: pointer; transition: var(--trans); }
.radio-opt.active, .radio-opt:has(input:checked) { background: var(--primary); color: #fff; border-color: var(--primary); }
.radio-opt input { display: none; }
.number-btns { display: flex; gap: 6px; }
.nbtn { padding: 6px 12px; border: 1px solid var(--border); background: #fff; border-radius: 8px; font-size: .82rem; cursor: pointer; transition: var(--trans); }
.nbtn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.range-inputs { display: flex; align-items: center; gap: 8px; }
.range-inputs input { flex: 1; }
.range-inputs span { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.btn-filtrar { width: 100%; padding: 12px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-size: .9rem; font-weight: 700; cursor: pointer; margin-bottom: 8px; }
.btn-limpar { display: block; text-align: center; color: var(--muted); font-size: .82rem; }

.listing-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-filtros-mobile { display: none; padding: 9px 16px; background: var(--primary); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-size: .85rem; font-weight: 600; gap: 6px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tag { padding: 4px 10px; background: var(--primary-lt); border-radius: 20px; font-size: .78rem; color: var(--primary); }
.filter-tag a { color: var(--accent); margin-left: 4px; font-weight: 700; }
.results-count { font-size: .85rem; color: var(--muted); }
.sort-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .85rem; color: var(--text); }
.view-toggle { display: flex; gap: 4px; }
.vtbtn { width: 34px; height: 34px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; transition: var(--trans); color: var(--muted); }
.vtbtn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* List view */
.imoveis-grid.list-view { grid-template-columns: 1fr; }
.imoveis-grid.list-view .imovel-card { display: flex; }
.imoveis-grid.list-view .card-thumb { width: 240px; flex-shrink: 0; aspect-ratio: unset; }

.empty-state { text-align: center; padding: 80px 20px; }
.empty-state i { font-size: 3rem; color: var(--border); margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 24px; }
.btn-primary { display: inline-block; padding: 12px 24px; background: var(--accent); color: #fff; border-radius: 10px; font-weight: 600; }

/* ---- PAGINAÇÃO ---- */
.paginacao { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pag-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; font-size: .88rem; transition: var(--trans); }
.pag-btn.active, .pag-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- FOOTER ---- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.7); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 60px 0 40px; }
.footer-col .logo { color: #fff; margin-bottom: 16px; }
.footer-col p, .footer-col a { display: block; font-size: .85rem; margin-bottom: 8px; color: rgba(255,255,255,.6); transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-col h4 { color: #fff; font-size: .88rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.footer-col p i { color: var(--accent); margin-right: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; padding: 20px; }
.footer-bottom p, .footer-bottom a { font-size: .82rem; color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: var(--accent); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .listing-layout { grid-template-columns: 1fr; }
  .filtros-sidebar { display: none; position: fixed; top: 0; left: 0; bottom: 0; width: 300px; z-index: 2000; overflow-y: auto; border-radius: 0; }
  .filtros-sidebar.open { display: block; }
  .close-sidebar { display: block; }
  .btn-filtros-mobile { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--primary); padding: 80px 30px 30px; z-index: 1500; }
  .nav-toggle { display: block; }
  .search-fields { flex-direction: column; }
  .sf-group { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .hstat { border-right: 1px solid rgba(255,255,255,.1) !important; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .imoveis-grid.list-view .imovel-card { flex-direction: column; }
  .imoveis-grid.list-view .card-thumb { width: 100%; }
}
