/* ============================================================
   ESTILO FINAL: SIMETRIA TOTAL + SCROLL FIXO + CORES PREMIUM
   ============================================================ */
:root {
    --azul-eu: #004687;
    --branco: #ffffff;
    --cinza-fundo: #f4f7f9;
    --texto: #1a1a1a;
    --sombra: 0 4px 15px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Montserrat', sans-serif; }

body { background-color: var(--cinza-fundo); color: var(--texto); }

/* --- ESTRUTURA GRID (O SEGREDO DA SIMETRIA) --- */
.container-detalhes {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    max-width: 1250px;
    margin: 40px auto;
    padding: 0 5%;
    /* Alinha os topos perfeitamente */
    align-items: flex-start !important; 
}

/* --- COLUNAS --- */
.coluna-conteudo { display: flex; flex-direction: column; }

.coluna-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 100px; 
    height: calc(100vh - 150px); /* Define uma altura para permitir centralização no Y */
    display: flex;
    flex-direction: column;
    justify-content: center; /* CENTRALIZA NO EIXO Y */
    align-items: stretch;    /* MANTÉM O EIXO X (LARGURA TOTAL) */
}

/* --- BLOCOS BRANCOS PADRONIZADOS --- */
.bloco-branco {
    background: var(--branco);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--sombra);
    width: 100%;
}

/* --- SLIDESHOW (ARREDONDAMENTO E SIMETRIA) --- */
.galeria-premium {
    padding: 15px !important; /* Cria a moldura que revela o arredondamento */
}

.moldura-foto {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background: #fdfdfd;
}

.moldura-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- CARACTERÍSTICAS E FORMULÁRIO --- */
.grid-icones-detalhes {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
}

.icone-card { display: flex; align-items: center; gap: 12px; }
.icone-card i { font-size: 22px; color: var(--azul-eu); }
.label-group span { display: block; font-size: 11px; color: #999; text-transform: uppercase; font-weight: 600; }
.label-group strong { display: block; font-size: 16px; font-weight: 700; }

.input-clean {
    width: 100%;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    margin-bottom: 12px;
    outline: none;
}

.btn-solicitar {
    width: 100%;
    padding: 18px;
    background: var(--azul-eu);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

/* ============================================================
   VISÃO MOBILE (PRESERVADA E LÍMPIDA)
   ============================================================ */
@media (max-width: 992px) {
    .container-detalhes { display: flex; flex-direction: column; align-items: center; padding: 0; }
    .bloco-branco { width: 95% !important; margin: 0 auto 15px auto !important; padding: 20px; border: none !important; }
    .coluna-sidebar { position: static; width: 100%; }
    .moldura-foto { height: auto; aspect-ratio: 16/9; max-height: 280px; }
    .t-item { flex: 0 0 calc(33.33% - 6px); min-width: calc(33.33% - 6px); height: 65px; }
}

/* ============================================================
   CONFIGURAÇÃO DA GALERIA E ESTRUTURA (COMPUTADOR)
   ============================================================ */

/* 1. Container Principal: Alinhamento milimétrico pelo topo */
.container-detalhes {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    max-width: 1250px;
    margin: 40px auto;
    padding: 0 5%;
    align-items: flex-start !important; /* Essencial para o scroll fixo */
}

/* 2. O Bloco da Galeria (A Moldura Branca) */
.galeria-premium {
    background: #ffffff;
    border-radius: 15px;
    padding: 15px !important; /* O padding faz o arredondamento interno aparecer */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

/* 3. A Moldura da Foto Maior */
.moldura-foto {
    width: 100%;
    height: 500px; /* Altura fixa no PC para simetria */
    border-radius: 12px; /* Arredondamento da imagem */
    overflow: hidden;
    background: #fdfdfd;
}

.moldura-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 4. Miniaturas (Thumbs) */
.thumbs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding: 0 40px;
}

.thumbs-container {
    display: flex;
    gap: 10px;
    overflow: hidden;
    width: 100%;
}

.t-item {
    min-width: calc(25% - 8px);
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    object-fit: cover;
    opacity: 0.7;
}

.t-item.active, .t-item:hover {
    opacity: 1;
    border: 2px solid #004687;
}

/* 5. Setas de Navegação */
.seta-thumb {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    color: #004687;
}

.seta-thumb.prev { left: 5px; }
.seta-thumb.next { right: 5px; }

/* ============================================================
   COLUNA DO PREÇO (FIXA AO ROLAR)
   ============================================================ */
.coluna-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 100px; /* Gruda o preço aqui */
    height: fit-content !important;
}

/* ============================================================
   MOBILE (ESTRUTURA LIMPA 95%)
   ============================================================ */
@media (max-width: 992px) {
    .container-detalhes { display: flex; flex-direction: column; align-items: center; }
    
    .bloco-branco {
        width: 95% !important;
        margin: 0 auto 15px auto !important;
        padding: 15px;
        border: none !important;
    }

    .moldura-foto {
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 280px;
    }

    .t-item {
        flex: 0 0 calc(33.33% - 6px);
        min-width: calc(33.33% - 6px);
        height: 65px;
    }

    .coluna-sidebar { position: static; width: 100%; }
}

.card-valor-venda {
    padding: 25px;
    border-bottom: 1px solid #f0f4f8;
}

.txt-venda {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8898aa;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.valor-final {
    font-size: 40px; /* Maior e mais impactante */
    color: var(--azul-eu);
    font-weight: 800; /* Extra bold */
    line-height: 1;
}


.badge-foto {
    position: absolute;
    top: 25px;
    left: 25px;
    background: rgba(0, 70, 135, 0.9); /* Azul da marca com transparência */
    color: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    z-index: 10;
}

/* ============================================================
   ESTILO FINAL: GALERIA PREMIUM E SIDEBAR REFINADA
   ============================================================ */

/* 1. DESTAQUE SOBRE A FOTO (BOTÃO AZUL) */
.galeria-premium {
    position: relative; /* Necessário para posicionar o badge */
    background: #ffffff;
    border-radius: 15px;
    padding: 15px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.badge-destaque {
    position: absolute;
    top: 30px;
    left: 30px;
    background: var(--azul-eu);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 70, 135, 0.3);
}

/* 2. AJUSTE DE ESPAÇAMENTOS NOS TEXTOS */
.coluna-conteudo h1 {
    font-size: 28px;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.descricao-imovel {
    font-size: 16px;
    line-height: 1.8; /* Aumentado para melhor leitura */
    color: #4a5568;
    margin-bottom: 30px;
    text-align: justify;
}

/* 3. CARD DE PREÇO E BOTÃO WHATSAPP */
.card-valor-venda {
    padding: 30px;
    text-align: center;
}

.valor-final {
    font-size: 42px;
    color: var(--azul-eu);
    font-weight: 800;
    display: block;
    margin: 10px 0 25px 0;
}


/* 4. CARACTERÍSTICAS (ESPAÇAMENTO INTERNO) */
.grid-icones-detalhes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 25px;
    padding: 30px 0;
    border-top: 1px solid #edf2f7;
    margin-top: 20px;
}

/* 5. MOLDURA DA FOTO (SIMETRIA) */
.moldura-foto {
    width: 100%;
    height: 520px;
    border-radius: 12px;
    overflow: hidden;
}

/* --- VERSÃO MOBILE (AJUSTE DE TEXTO) --- */
@media (max-width: 992px) {
    .valor-final { font-size: 34px; }
    .badge-destaque { top: 25px; left: 25px; font-size: 11px; }
    .bloco-branco { padding: 25px; }
}

/* ============================================================
   BOTÃO WHATSAPP (ESTILO PREMIUM REFEITO)
   ============================================================ */
.btn-whatsapp-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff !important;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 16px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.btn-whatsapp-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Garante que o ícone do Whats apareça se você usar FontAwesome */
.btn-whatsapp-premium i {
    font-size: 20px;
}

/* ============================================================
   MELHORIA DE ESPAÇAMENTO DOS TEXTOS
   ============================================================ */
.bloco-branco h2, .bloco-branco h3 {
    margin-bottom: 20px;
    line-height: 1.3;
}

.descricao-imovel p {
    line-height: 1.8; /* Espaçamento entre linhas maior */
    margin-bottom: 15px;
    color: #4a5568;
}

/* ============================================================
   VERSÃO MOBILE CORRIGIDA (SLIDESHOW NO TOPO ABSOLUTO)
   ============================================================ */
@media (max-width: 992px) {
    .container-detalhes {
        display: flex;
        flex-direction: column; /* Empilha os blocos */
        align-items: center;
        padding: 0;
        width: 100%;
        gap: 0; /* Remove espaços vazios entre colunas */
    }

    /* 1. Bloco da Galeria - Forçado para o Topo */
    .galeria-premium {
        width: 98% !important;
        margin: 0 auto 15px auto !important; /* Zero no topo para colar no menu */
        padding: 8px !important;
        order: -1 !important; /* O valor negativo joga ele para antes de TUDO */
        display: flex;
        flex-direction: column;
        align-items: center;
        border: none !important;
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }

    /* 2. Foto Maior Centralizada 98% */
    .moldura-foto {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 280px; /* Leve ajuste para preencher melhor a tela */
        border-radius: 10px;
        overflow: hidden;
    }

    .moldura-foto img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* 3. Badge de Destaque sobre a foto */
    .badge-destaque {
        position: absolute;
        top: 20px;
        left: 20px;
        font-size: 10px;
        padding: 6px 15px;
        background: var(--azul-eu);
        color: #fff;
        border-radius: 50px;
        z-index: 10;
    }

    /* 4. Thumbs (Miniaturas) Pequenas e Ajustadas */
    .thumbs-wrapper {
        position: relative;
        width: 100%;
        padding: 10px 35px; /* Ajuste para setas não cobrirem a foto */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .thumbs-container {
        display: flex;
        gap: 8px;
        width: 100%;
        justify-content: center;
        overflow: hidden;
    }

    .t-item {
        flex: 0 0 calc(25% - 6px); /* 4 itens por linha */
        max-width: calc(25% - 6px);
        height: 50px; /* Miniaturas pequenas */
        border-radius: 5px;
        object-fit: cover;
        border: 1px solid #eee;
    }

    /* 5. Setas nas Extremidades */
    .seta-thumb {
        display: flex !important;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        background: #ffffff;
        border-radius: 50%;
        z-index: 10;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        color: var(--azul-eu);
    }

    .seta-thumb.prev { left: -5px; } /* Cola na borda do bloco */
    .seta-thumb.next { right: -5px; }

    /* 6. Outros Blocos (Preço e Form) */
    .bloco-branco:not(.galeria-premium) {
        width: 95% !important;
        margin: 0 auto 15px auto !important;
        padding: 20px;
        order: 2; /* Garante que fiquem abaixo do slideshow */
    }

    /* --- CENTRALIZAÇÃO VERTICAL DA SIDEBAR (EIXO Y) --- */
.container-detalhes {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    max-width: 1250px;
    margin: 40px auto;
    padding: 0 5%;
    /* Alinha o topo da sidebar com o topo do slideshow */
    align-items: stretch !important; 
}

/* COLUNA DA ESQUERDA (GALERIA) */
.coluna-conteudo {
    display: flex;
    flex-direction: column;
}

/* COLUNA DA DIREITA (FORMULÁRIO ALINHADO E CENTRALIZADO NO Y) */
.coluna-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 100px; /* Distância do topo ao rolar */
    
    /* Centraliza o formulário verticalmente no eixo Y em relação à galeria */
    display: flex;
    flex-direction: column;
    justify-content: center; 
    
    /* Garante que o alinhamento X (largura) seja mantido */
    align-items: stretch;
    height: auto;
    min-height: 500px; /* Mesma altura base da moldura-foto para simetria */
}

/* --- AJUSTE DOS BLOCOS --- */
.bloco-branco {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

/* Garante que o primeiro bloco de cada coluna não tenha margem no topo */
.coluna-conteudo > :first-child,
.coluna-sidebar > :first-child {
    margin-top: 0 !important;
}

/* --- BOTÃO WHATSAPP E PREÇO --- */
.valor-final {
    font-size: 42px;
    color: var(--azul-eu);
    font-weight: 800;
    margin: 15px 0;
    display: block;
}

.btn-whatsapp-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff !important;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* ============================================================
   MOBILE (SLIDESHOW NO TOPO E 98%)
   ============================================================ */
@media (max-width: 992px) {
    .container-detalhes {
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    .galeria-premium {
        width: 98% !important;
        order: -1 !important; /* Força para o topo absoluto */
        margin: 0 auto 15px auto !important;
        padding: 8px !important;
    }

    .coluna-sidebar {
        position: static;
        width: 95%;
        margin: 0 auto;
        display: block;
        height: auto;
        min-height: unset;
    }

    .t-item {
        flex: 0 0 calc(25% - 6px);
        height: 50px;
    }
}













/* --- ESTILO DO MAPA (PADRÃO 100%) --- */
.mapa-container {
    width: 100%;
    border-radius: 12px; /* Mesmo arredondamento da moldura-foto */
    overflow: hidden;
    line-height: 0; /* Remove espaços vazios na base do iframe */
}

.mapa-container iframe {
    width: 100% !important;
    display: block;
}

@media (max-width: 992px) {
    .mapa-container iframe {
        height: 300px; /* Reduz altura no mobile para melhor navegação */
    }
}



/* ============================================================
   FILTRO DE BUSCA (ESTÉTICA SIMÉTRICA 95%)
   ============================================================ */
.busca-container {
    background: var(--branco);
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--sombra);
    display: flex;
    align-items: center; /* Alinha todos os itens pela linha central */
    gap: 15px;
    z-index: 100;
}

.busca-item {
    flex: 1; /* Todos os selects terão exatamente o mesmo tamanho */
}

/* Selects e Inputs */
.busca-item select {
    width: 100%;
    height: 55px;
    border-radius: 10px;
    border: 1px solid var(--borda);
    padding: 0 15px;
    font-size: 15px;
    font-weight: 600;
    color: var(--texto);
    background-color: #fcfcfc;
    cursor: pointer;
    outline: none;
    transition: 0.3s;
}

.busca-item select:focus {
    border-color: var(--azul-eu);
    box-shadow: 0 0 0 3px rgba(0, 70, 135, 0.1);
}

/* Botão de Busca Simétrico */
.btn-buscar {
    flex: 0 0 180px; /* Tamanho fixo para não quebrar a simetria */
    height: 55px;
    background: var(--azul-eu);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-buscar:hover {
    background: #003366;
    transform: translateY(-2px);
}














