/* ===== TEMA DO SITE PÚBLICO — variáveis próprias do contexto de vitrine.
   Cores de marca (--blue-dark, --gold, --green...) vêm de tokens.css. ===== */
:root {
    --white: #FFFFFF;
    --gray-light: #f8f9fa;
    --gray-border: #e0e0e0;
    --text-dark: #1a1a1a;
    --text-muted: #666;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 16px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 80px;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(15, 37, 71, 0.97);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.navbar-hidden { transform: translateY(-100%); }
.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white) !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-brand img { height: 45px; }
.navbar-nav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    margin: 0 0.8rem;
    transition: color 0.2s;
    position: relative;
}
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}
.navbar-nav .nav-link:hover { color: var(--gold) !important; }
.navbar-nav .nav-link:hover::after { width: 100%; }
.btn-fale-conosco {
    background: var(--gold);
    color: var(--blue-dark) !important;
    border-radius: 50px;
    padding: 0.5rem 1.8rem !important;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-fale-conosco:hover {
    background: var(--gold-hover);
    color: var(--white) !important;
    transform: translateY(-1px);
}

/* ===== BOTÃO FLUTUANTE WHATSAPP ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(37,211,102,0.4);
    color: #fff;
}

/* ===== HERO ===== */
.hero {
    background: url('/static/img/banner.png') center center / cover no-repeat;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
    margin-top: -20px;
}
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgb(9 21 41 / 75%);/* overlay escuro para destacar o texto */
    z-index: 1;
}
.hero .container {
    position: relative;
    z-index: 2;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(180,154,122,0.1) 0%, transparent 70%);
    border-radius: 50%;
}
.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
}
.hero .btn-gold {
    background: var(--gold);
    color: var(--blue-dark);
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
}
.hero .btn-gold:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
    color: var(--white);
}
.hero .btn-outline-white {
    border: 2px solid rgba(255,255,255,0.6);
    color: var(--white);
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    text-decoration: none;
}
.hero .btn-outline-white:hover {
    background: var(--white);
    color: var(--blue-dark);
}

/* ===== SEÇÃO DE BUSCA RÁPIDA ===== */
.quick-search {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-lg);
}
.quick-search .form-control,
.quick-search .form-select {
    border-radius: 10px;
    border: 1px solid var(--gray-border);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
}
.quick-search .btn {
    padding: 0.7rem 2rem;
    border-radius: 10px;
    font-weight: 600;
}

/* ===== CARDS DE IMÓVEIS ===== */
.property-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    height: 100%;
    border: 1px solid #eee;
}
.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}
.property-card .card-img-wrapper {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: #f0f0f0;
}
.property-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.property-card:hover .card-img-wrapper img { transform: scale(1.05); }
.property-card .card-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--green);
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}
.property-card .card-tag.locacao {
    background: var(--gold);
    color: var(--blue-dark);
}
.property-card .card-body { padding: 1.5rem; }
.property-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 0.3rem;
}
.property-card .price small { font-size: 0.9rem; color: var(--text-muted); font-weight: 400; }
.property-card .location { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.8rem; }
.property-card .features {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid #eee;
    padding-top: 0.8rem;
}
.property-card .btn-view {
    background: var(--blue-dark);
    color: var(--white);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}
.property-card .btn-view:hover {
    background: var(--gold);
    color: var(--blue-dark);
}

/* ===== PÁGINA DE DETALHES ===== */
.detail-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #f0f0f0;
}
.detail-gallery img { width: 100%; height: 500px; object-fit: cover; }
.detail-info h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.detail-info .price-large { font-size: 2.2rem; font-weight: 700; color: var(--green); margin: 1rem 0; }
.detail-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gray-light);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
}
.contact-form-card {
    background: var(--blue-dark);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: sticky;
    top: 100px;
}
.contact-form-card .form-control {
    border-radius: 10px;
    border: none;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.1);
    color: var(--white);
}
.contact-form-card .form-control::placeholder { color: rgba(255,255,255,0.6); }
.contact-form-card .btn-submit {
    background: var(--gold);
    color: var(--blue-dark);
    border: none;
    padding: 0.8rem;
    border-radius: 10px;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s;
}
.contact-form-card .btn-submit:hover { background: var(--gold-hover); color: var(--white); }

/* ===== FOOTER ===== */
.footer {
    background: var(--blue-dark);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}
.footer h5 { font-weight: 700; margin-bottom: 1.5rem; }
.footer a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--gold); }
.footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.3s;
}
.footer .social-icons a:hover { background: var(--gold); color: var(--blue-dark); }
.footer .copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}
.selo-creci {
    display: inline-block;
    padding: 0.3rem 1rem;
    border: 2px solid var(--gold);
    color: var(--gold);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* ===== SEÇÕES COLAPSÁVEIS DO FILTRO AVANÇADO ===== */
[data-bs-toggle="collapse"] .bi-chevron-down { transition: transform 0.2s; }
[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .hero { padding: 2.5rem 0 4rem; }
    .hero h1 { font-size: 2rem; }
    .detail-gallery img { height: 300px; }
    .contact-form-card { margin-top: 2rem; position: static; }
    .whatsapp-float { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 24px; }

    /* Cards de imóvel mais compactos — em "muitos produtos", cada rolagem
       precisa mostrar mais coisa, senão a lista cansa rápido no celular. */
    .property-card .card-img-wrapper { height: 180px; }
    .property-card .card-body { padding: 1rem; }
    .property-card .price { font-size: 1.25rem; }
    .property-card .btn-view {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 0.75rem;
    }
}

/* ===== SKELETON LOADING ===== */
.skeleton-img {
    background: linear-gradient(90deg, #e9ecef 25%, #f4f6f9 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    min-height: 260px;
    width: 100%;
}
@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.img-loaded { opacity: 1; transition: opacity 0.5s; }
.img-loading { opacity: 0; }

/* ===== BADGES DE LUXO ===== */
.badge-luxo {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gold);
    color: var(--blue-dark);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.badge-luxo.exclusivo { background: #c9a96e; }
.badge-luxo.lancamento { background: #2ecc71; color: white; }
.badge-luxo.cobertura { background: #9b59b6; color: white; }
.badge-luxo.pronto-para-morar { background: #e67e22; color: white; }
.badge-luxo.compre-alugado { background: #3498db; color: white; }

/* ===== OFF‑CANVAS PREMIUM ===== */
.premium-offcanvas {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0,0,0,0.08);
    /* Padrão do Bootstrap é 400px fixos — estoura em telas menores que isso. */
    width: min(90vw, 400px);
}
.premium-offcanvas .offcanvas-header {
    background: transparent;
}
.premium-offcanvas .offcanvas-body {
    padding-top: 0;
}

/* ===== PÍLULAS DE SELEÇÃO RÁPIDA ===== */
.pill-group .pill-input:checked + .pill-label {
    background: var(--blue-dark);
    color: #fff !important;
    border-color: var(--blue-dark);
    box-shadow: 0 2px 8px rgba(15,37,71,0.2);
}
.pill-label {
    transition: all 0.2s ease;
    border: 1px solid var(--gray-border);
    font-weight: 500;
}
.pill-label:hover {
    border-color: var(--blue-dark);
    color: var(--blue-dark);
}

/* ===== PÍLULAS DE FILTROS ATIVOS ===== */
#active-filters .badge {
    font-size: 0.8rem;
    background: #f1f5f9;
    border-color: #cbd5e1;
}
#active-filters .btn-close {
    font-size: 0.5rem;
    cursor: pointer;
}

/* ===== SWITCH (MOBILIADO) ESTILIZADO ===== */
.form-check-input:checked {
    background-color: var(--blue-dark);
    border-color: var(--blue-dark);
}

/* ===== SLIDER DE PREÇO (INPUTS COM ÍCONES) ===== */
.premium-offcanvas input[type="number"] {
    border-radius: 8px;
}

/* Checkboxes estilizados */
.form-check-input:checked {
    background-color: var(--blue-dark);
    border-color: var(--blue-dark);
}
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(15, 37, 71, 0.25);
}

/* ===== SELO DO ÍCONE NAS VITRINES POR TIPO (home) ===== */
.vitrine-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ===== EXPLORE CARDS ===== */
.explore-card {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
}
.explore-card:hover {
    transform: translateY(-5px);
}
.explore-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.explore-overlay i {
    font-size: 2rem;
}

/* Badge de Oportunidade */
.badge-luxo.oportunidade {
    background: #e63946;
    color: white;
    top: 15px;
    right: 15px;
    left: auto;
    font-size: 0.7rem;
}

/* ===== HERO OPORTUNIDADES ===== */
.hero-opportunities {
    background: linear-gradient(135deg, #0F2547 0%, #1a3a63 100%);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
    margin-top: -20px;
}
.hero-opportunities::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(180,154,122,0.2) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-opportunities h1 {
    color: white;
    font-size: 2.5rem;
}
.hero-opportunities p {
    color: rgba(255,255,255,0.8);
}

/* ===== CARDS DE OPORTUNIDADE ===== */
.opportunity-card {
    border: 1px solid rgba(180,154,122,0.2);
    background: linear-gradient(145deg, #ffffff 0%, #fef9f2 100%);
}
.opportunity-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(180,154,122,0.15);
}

.btn-hero-opportunities {
    background: linear-gradient(135deg, var(--gold), #d4af7a);
    color: var(--blue-dark);
    border: none;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(180,154,122,0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.btn-hero-opportunities:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(180,154,122,0.6);
    color: var(--blue-dark);
}
.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--blue-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(180,154,122,0.4);
}

/* ===== ANIMAÇÃO DE ENTRADA DOS CARDS ===== */
.animate-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SLIDER DE PREÇO PREMIUM ===== */
.price-slider-container {
    position: relative;
    padding: 0 6px;
    margin: 0.5rem 0 1.5rem;
}
.price-slider-track {
    position: relative;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin: 20px 0;
}
.price-slider-fill {
    position: absolute;
    height: 100%;
    background: var(--blue-dark);
    border-radius: 3px;
    left: 0%;
    right: 0%;
}
/* Esconde o input range nativo */
input[type="range"].price-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    margin: 0;
}
input[type="range"].price-slider-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: all;
    width: 26px;
    height: 26px;
    background: var(--gold);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: box-shadow 0.2s;
}
input[type="range"].price-slider-thumb::-moz-range-thumb {
    pointer-events: all;
    width: 26px;
    height: 26px;
    background: var(--gold);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
}
.price-slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: -10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}
.price-slider-values span {
    background: #f1f5f9;
    padding: 4px 14px;
    border-radius: 20px;
}
/* Campos numéricos alinhados */
.slider-inputs .input-group-text {
    background: #f8fafc;
    border-right: none;
    font-size: 0.8rem;
}
.slider-inputs .form-control {
    border-left: none;
}
@media (min-width: 768px) {
    .price-slider-container {
        margin-top: 0.2rem;
    }
    .slider-inputs .col-6 {
        padding-right: 5px;
        padding-left: 5px;
    }
}

/* Sugestões de bairro — substitui o <datalist> nativo (visual do SO, sem
   como estilizar) por uma lista própria, no padrão visual do site. */
.autocomplete-wrap {
    position: relative;
    width: 100%;
}
.autocomplete-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--white);
    border: 1px solid rgba(15, 37, 71, 0.08);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    display: none;
}
.autocomplete-list.show {
    display: block;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--blue-dark);
}
.autocomplete-item i {
    color: var(--gold);
    font-size: 0.85rem;
    flex-shrink: 0;
}
.autocomplete-item strong {
    color: var(--gold-hover);
}
.autocomplete-item:hover,
.autocomplete-item.active {
    background: rgba(180, 154, 122, 0.14);
}
