/* =====================================================================
   LSW - Site Theme CSS
   ===================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #1e293b;
    --accent: #f59e0b;
    --success: #16a34a;
    --danger: #dc2626;
    --gray-100: #f8fafc;
    --gray-200: #f1f5f9;
    --gray-500: #64748b;
    --gray-700: #334155;
    --text: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.05);
    --radius: 12px;
    --transition: all .25s ease;
}

* { box-sizing: border-box; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text); background: #fff; margin: 0; line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ===================== HEADER ===================== */
.site-header { background: #fff; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000; }
.top-bar { background: var(--secondary); color: #cbd5e1; padding: .5rem 0; font-size: .85rem; }
.top-bar-info span { margin-right: 1.5rem; }
.top-bar-info i { color: var(--accent); }
.top-bar-social a { color: #cbd5e1; margin-left: .75rem; font-size: 1rem; }
.top-bar-social a:hover { color: #fff; }
.main-nav { padding: .75rem 0; }
.navbar-brand { font-weight: 800; font-size: 1.5rem; color: var(--primary); display: flex; align-items: center; gap: .5rem; }
.navbar-brand i { font-size: 1.75rem; }
.navbar-brand:hover { color: var(--primary-dark); }
.navbar-nav .nav-link { color: var(--text); font-weight: 500; padding: .5rem 1rem !important; border-radius: 8px; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--primary); background: #eff6ff; }
.nav-actions .btn { border-radius: 8px; }

/* ===================== HERO / BANNER ===================== */
.hero-slider { position: relative; }
.hero-slide {
    min-height: 500px; display: flex; align-items: center; justify-content: center;
    background-size: cover; background-position: center; position: relative;
    color: #fff; padding: 4rem 0;
}
.hero-slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(15,23,42,.8), rgba(15,23,42,.4)); }
.hero-slide .container { position: relative; z-index: 2; text-align: center; }
.hero-slide h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.hero-slide p { font-size: 1.25rem; margin-bottom: 2rem; opacity: .95; }

/* Busca rápida sobreposta ao hero */
.quick-search {
    background: #fff; border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--shadow-lg); margin-top: -3rem; position: relative; z-index: 10;
}
.quick-search-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--gray-200); }
.quick-search-tab {
    padding: .75rem 1.25rem; background: none; border: 0; font-weight: 600;
    color: var(--gray-500); border-bottom: 2px solid transparent; cursor: pointer;
}
.quick-search-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===================== PROPERTY CARD ===================== */
.property-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: var(--transition); height: 100%; display: flex; flex-direction: column;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.property-card-image { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--gray-200); }
.property-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.property-card:hover .property-card-image img { transform: scale(1.08); }
.property-card-badges { position: absolute; top: .75rem; left: .75rem; display: flex; gap: .25rem; flex-wrap: wrap; }
.badge-purpose { background: var(--primary); color: #fff; font-size: .7rem; padding: .35em .75em; border-radius: 6px; font-weight: 600; }
.badge-featured { background: var(--accent); }
.badge-launch { background: #06b6d4; }
.property-card-favorite {
    position: absolute; top: .75rem; right: .75rem; background: rgba(255,255,255,.9);
    width: 36px; height: 36px; border-radius: 50%; border: 0; color: var(--gray-700); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: var(--transition);
}
.property-card-favorite:hover { background: #fff; color: var(--danger); }
.property-card-favorite.active { color: var(--danger); }
.property-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.property-card-location { font-size: .8rem; color: var(--gray-500); margin-bottom: .25rem; }
.property-card-location i { color: var(--primary); }
.property-card-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: .75rem; line-height: 1.3; }
.property-card-title a { color: inherit; }
.property-card-title a:hover { color: var(--primary); }
.property-card-features { display: flex; gap: 1rem; margin: .5rem 0 1rem; font-size: .85rem; color: var(--gray-700); flex-wrap: wrap; }
.property-card-features span { display: flex; align-items: center; gap: .25rem; }
.property-card-features i { color: var(--primary); }
.property-card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.property-card-price { font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.property-card-price small { font-size: .75rem; color: var(--gray-500); font-weight: 400; }

/* ===================== SECTIONS ===================== */
.section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: .5rem; }
.section-subtitle { color: var(--gray-500); font-size: 1.1rem; }
.section-light { background: var(--gray-100); }

/* ===================== BUTTONS ===================== */
.btn { border-radius: 8px; font-weight: 600; padding: .625rem 1.5rem; transition: var(--transition); }
.btn-lg { padding: .875rem 2rem; font-size: 1.05rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #d97706; border-color: #d97706; color: #fff; }

/* ===================== FILTERS ===================== */
.filter-panel { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 2rem; }
.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.form-label { font-size: .8rem; font-weight: 600; color: var(--gray-700); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .02em; }
.form-control, .form-select { border-radius: 8px; border-color: var(--gray-200); padding: .5rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(37,99,235,.15); }

/* ===================== PROPERTY DETAIL ===================== */
.property-gallery { margin-bottom: 2rem; }
.gallery-main { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--gray-200); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .5rem; overflow-x: auto; }
.gallery-thumb { width: 100px; height: 75px; border-radius: 6px; overflow: hidden; cursor: pointer; flex-shrink: 0; border: 2px solid transparent; }
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.property-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin: 2rem 0; }
.property-info-item { text-align: center; background: var(--gray-100); padding: 1rem; border-radius: 8px; }
.property-info-item i { font-size: 1.5rem; color: var(--primary); }
.property-info-item strong { display: block; font-size: 1.25rem; }
.property-info-item span { font-size: .8rem; color: var(--gray-500); }

.property-features-list { columns: 2; gap: 1rem; list-style: none; padding: 0; }
.property-features-list li { padding: .375rem 0; break-inside: avoid; }
.property-features-list i { color: var(--success); margin-right: .5rem; }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--secondary); color: #cbd5e1; padding: 4rem 0 1.5rem; margin-top: 4rem; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.footer-title img { max-height: 40px; }
.footer-desc { font-size: .9rem; margin-bottom: 1rem; line-height: 1.7; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #cbd5e1; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.5rem; text-align: center; font-size: .85rem; }
.social-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff;
    margin-right: .5rem; transition: var(--transition);
}
.social-btn:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* ===================== WHATSAPP FLOAT ===================== */
.whatsapp-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    width: 60px; height: 60px; border-radius: 50%; background: #25d366; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37,211,102,.4); animation: pulse 2s infinite;
}
.whatsapp-float:hover { background: #1da851; color: #fff; transform: scale(1.1); }
@keyframes pulse { 0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,.4); } 50% { box-shadow: 0 4px 30px rgba(37,211,102,.7); } }

/* ===================== TESTIMONIALS ===================== */
.testimonial-card { background: #fff; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); height: 100%; }
.testimonial-stars { color: var(--accent); margin-bottom: 1rem; }
.testimonial-text { font-size: 1.05rem; color: var(--gray-700); font-style: italic; margin-bottom: 1.5rem; }
.testimonial-author { display: flex; align-items: center; gap: .75rem; }
.testimonial-author img, .testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.testimonial-author strong { display: block; }
.testimonial-author small { color: var(--gray-500); }

/* ===================== PAGINATION ===================== */
.pagination .page-link { border-radius: 8px; margin: 0 .15rem; color: var(--primary); border-color: var(--gray-200); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.pagination .page-item.disabled .page-link { color: var(--gray-500); }

/* ===================== EMPTY STATE ===================== */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--gray-500); }
.empty-state i { font-size: 4rem; opacity: .3; display: block; margin-bottom: 1rem; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .hero-slide { min-height: 400px; padding: 3rem 0; }
    .hero-slide h1 { font-size: 2rem; }
    .hero-slide p { font-size: 1rem; }
    .section { padding: 2.5rem 0; }
    .section-title { font-size: 1.5rem; }
    .property-features-list { columns: 1; }
    .whatsapp-float { width: 50px; height: 50px; font-size: 1.5rem; bottom: 16px; right: 16px; }
}

/* Gallery nav and lightbox */
.gallery-main {
    position: relative;
}
.gallery-nav,
.gallery-lightbox-nav,
.gallery-lightbox-close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.95);
    color: var(--text);
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    z-index: 2;
}
.gallery-nav-prev { left: 12px; }
.gallery-nav-next { right: 12px; }
.gallery-thumbs { display:flex; gap: .5rem; margin-top: .5rem; overflow-x:auto; }
.gallery-thumb { width:100px; height:75px; border-radius:6px; overflow:hidden; cursor:pointer; flex-shrink:0; border:2px solid transparent; }
.gallery-thumb.active { border-color: var(--primary); box-shadow: 0 6px 18px rgba(37,99,235,0.12); }
.gallery-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.88); display: none; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.gallery-lightbox.active { display:flex; }
.gallery-lightbox img { max-width:100%; max-height:100%; object-fit:contain; border-radius:12px; box-shadow: 0 24px 70px rgba(0,0,0,0.45); }
.gallery-lightbox-close { top:18px; right:18px; left:auto; transform:none; }

@media (max-width: 576px) {
    .gallery-main { aspect-ratio: 4/3; }
    .gallery-nav, .gallery-lightbox-nav { width:40px; height:40px; }
    .gallery-thumb { width:70px; height:56px; }
}

/* =====================================================================
   Popups promocionais (compartilhado por todos os temas)
   ===================================================================== */
.imobi-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity .3s ease;
    padding: 1rem;
}
.imobi-popup-overlay.show {
    background: rgba(0, 0, 0, .6);
    opacity: 1;
    backdrop-filter: blur(2px);
}
.imobi-popup-overlay.imobi-popup-pos-top_right    { align-items: flex-start;  justify-content: flex-end; }
.imobi-popup-overlay.imobi-popup-pos-bottom_right { align-items: flex-end;    justify-content: flex-end; }
.imobi-popup-overlay.imobi-popup-pos-top_left     { align-items: flex-start;  justify-content: flex-start; }
.imobi-popup-overlay.imobi-popup-pos-bottom_left  { align-items: flex-end;    justify-content: flex-start; }
.imobi-popup-overlay.imobi-popup-pos-fullscreen   { padding: 0; }

.imobi-popup-box {
    position: relative;
    max-width: 520px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
    transform: translateY(20px) scale(.96);
    transition: transform .3s ease;
    /* Defaults com contraste (sobrescritos pelo estilo inline quando definido) */
    background-color: #ffffff;
    color: #1a1a2e;
}
.imobi-popup-overlay.show .imobi-popup-box { transform: translateY(0) scale(1); }
.imobi-popup-overlay.imobi-popup-pos-fullscreen .imobi-popup-box {
    max-width: 100%;
    height: 100%;
    border-radius: 0;
}

.imobi-popup-box,
.imobi-popup-box * { box-sizing: border-box; }

.imobi-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    border: 0;
    font-size: 1.75rem;
    line-height: 1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    transition: background .2s;
}
.imobi-popup-close:hover { background: rgba(0, 0, 0, .6); }

.imobi-popup-img { width: 100%; max-height: 240px; overflow: hidden; }
.imobi-popup-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.imobi-popup-title {
    margin: 0;
    padding: 1.5rem 1.5rem .25rem;
    font-size: 1.6rem;
    font-weight: 700;
}
.imobi-popup-subtitle {
    margin: 0;
    padding: 0 1.5rem;
    font-size: 1.05rem;
    opacity: .85;
}
.imobi-popup-content {
    padding: .75rem 1.5rem 0;
    font-size: .95rem;
    line-height: 1.6;
}
.imobi-popup-content p { margin: 0 0 .5rem; }
.imobi-popup-content p:last-child { margin-bottom: 0; }

.imobi-popup-btn {
    display: inline-block;
    margin: 1.25rem 1.5rem 1.75rem;
    padding: .8rem 2rem;
    background: var(--lux-gold, #c9a227);
    color: #1a1a2e !important;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: filter .2s, transform .15s;
}
.imobi-popup-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

@media (max-width: 575.98px) {
    .imobi-popup-box { max-width: 100%; }
    .imobi-popup-title { font-size: 1.3rem; }
}
