:root {
    --primary: #ef5353;
    --secondary: #47396b;
    --text-muted: #64748b;
    --accent: #3498db;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --success: #27ae60;
    --bg-soft: #f8fafc;
    --border-color: #f1f5f9;
    --footer-bg: #1e293b;
    --footer-text: #94a3b8;
    --footer-title: #f8fafc;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.search-bar {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #47396b;
}

.search-bar select,
.search-bar input {
    flex: 1;
    height: 42px;
    padding: 0 10px;
    border: none;
    background: #fff;
}

.btn-search {
    background: #ef5353;
    border: none;
    color: #fff;
    padding: 0 30px;
    font-weight: bold;
    cursor: pointer;
}
.view-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 15px;
    box-sizing: border-box;
    gap: 12px;
}
@media (max-width: 480px) {
    .view-options {
        gap: 8px;
        padding: 10px 16px;
    }
    .btn-view label {
        display: none;
    }
    .btn-view {
        padding: 8px 12px;
    }
    .sort-select {
        max-width: 140px;
        text-overflow: ellipsis;
    }
}
.view-options label{
    cursor: pointer;
}
.view-toggle {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.sort-wrapper {
    display: flex;
    justify-content: flex-end;
    flex-grow: 1;
}
.sort-select {
    width: auto;
    min-width: 120px;
    max-width: 100%;
    height: 36px;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    padding: 0 10px;
    font-size: 13px;
    background-color: #f9f9f9;
}

.btn-view {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px; /* Mais pequeno e elegante */
    border-radius: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px; /* Fonte reduzida para minimalismo */
    font-weight: 600;
    color: var(--secondary); /* #47396b */
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

/* Estado Ativo - Estilo Pílula Vermelha */
.btn-view.active {
    background: var(--primary); /* #ef5353 */
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 83, 83, 0.15);
}

/* Hover suave para o botão inativo */
.btn-view:not(.active):hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
}

/* Ajuste do ícone */
.btn-view i {
    font-size: 11px;
}

.results-area {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0 100px 0;
    box-sizing: border-box;
}
.load-more-container {
    display: flex;
    justify-content: center;
    padding-top: 40px; /* Espaço entre a grelha e o botão */
}

.btn-load-more {
    background-color: #2c3e50; /* Cor escura do seu footer para harmonia */
    color: #ffffff;
    padding: 12px 40px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-load-more:hover {
    background-color: #e74c3c; /* Vermelho de destaque da sua marca */
    transform: translateY(-2px);
}
.property-card {
    width: 420px;
    border: 1px solid #eee;
}

.property-image {
    position: relative;
}

.property-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 18px;
    height: 18px;
    background: #ef5353;
    border-radius: 50%;
}

.property-info {
    padding: 16px;
}

.property-info h3 {
    font-size: 18px;
    color: #47396b;
    margin-bottom: 6px;
}
.location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
    font-size: 14px;
    margin-top: 5px;
}

.price {
    font-weight: bold;
    color: #ef5353;
    margin-bottom: 14px;
}

.features {
    display: flex;
    gap: 18px;
    font-size: 14px;
    margin-bottom: 16px;
}

.agency {
    display: flex;
    align-items: center;
    gap: 10px;
}

.agency img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}
.arcada-search-section {
    /* Um fundo cinza azulado bem clarinho que passa uma imagem de limpeza */
    background-color: #f4f7f9;
    padding: 35px 0; /* Margem equilibrada: nem muito grande, nem colada */
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.search-header {
    margin-bottom: 20px; /* Aproxima o título da barra de busca */
}

.search-header h1 {
    font-size: 26px;
    color: #334155;
    margin-bottom: 5px;
    font-weight: 700;
}

.search-header p {
    font-size: 14px;
    color: #64748b;
}

.arcada-search-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Impede que os botões pulem para baixo em telas médias */
    flex-wrap: nowrap;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: #fff;
    height: 42px;
    width: 100%;
    max-width: 550px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.search-input-group select {
    border: none;
    font-size: 14px;
    color: #47396b;
    outline: none;
    background: transparent;
    font-weight: 500;
    cursor: pointer;
    padding: 0 25px 0 5px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2347396b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C2.185 5.355 2.398 5 2.748 5h10.504a.75.75 0 0 1 .547 1.265L8.707 11.14a1 1 0 0 1-1.46 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 10px;
    min-width: 90px;
}
.divider {
    width: 1px;
    height: 20px;
    background-color: #cbd5e1;
    margin: 0 10px;
}
.search-input-group select option {
    background-color: #fff;
    color: #333;
    padding: 10px;
}
.search-input {
    border: none;
    flex: 1;
    font-size: 14px;
    outline: none;
    color: #1e293b;
    padding-left: 8px;
}

/* Bordas dos Botões Melhores */
.btn-pesquisar {
    background: #ef5353;
    color: #fff;
    border: 1px solid #db4444; /* Borda levemente mais escura que o fundo */
    height: 42px;
    padding: 0 20px;
    font-weight: 600;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap; /* Garante que o texto não quebre */
    transition: all 0.2s;
}

.btn-filters {
    background: #47396b;
    color: #fff;
    border: 1px solid #3a2f59;
    height: 42px;
    width: 42px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#map-view, .properties-grid {
    transition: opacity 0.3s ease;
}
#map-view {
    /* Centralização e Margens */
    width: calc(100% - 30px); /* Deixa 15px de respiro em cada lado */
    margin: 20px auto;        /* Centraliza horizontalmente e dá espaço vertical */

    /* Altura e Forma */
    height: 60vh;
    min-height: 400px;
    border-radius: 15px;      /* Cantos arredondados para um look moderno */

    /* Sombras e Overflow */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;         /* Garante que o mapa respeite o arredondamento */
    border: 1px solid #e2e8f0;

    display: none;
}
#map {
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
}
.d-none-important {
    display: none !important;
}
.btn-pesquisar:hover { background: #e04848; box-shadow: 0 2px 5px rgba(239,83,83,0.2); }
.btn-filters:hover { background: #3a2f59; }
.search-container-fluid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
@media (max-width: 768px) {
    #map-view {
        width: calc(100% - 24px) !important;
        height: 70vh;
        margin: 15px auto !important;
        border-radius: 12px !important;
    }
    .arcada-search-bar {
        width: 100% !important;
        margin: 0 !important;
    }
    .search-input-group select {
        width: 100% !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 8px;
    }
    .arcada-search-section {
        padding: 30px 20px;
    }
    .search-container-fluid {
        padding: 0;
    }
    .search-header h1 {
        font-size: 22px;
        padding: 0 10px;
        margin-bottom: 15px;
    }
    .arcada-search-bar {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    .search-input-group {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        padding: 10px !important;
        flex-direction: column;
        gap: 8px;
    }
    .btn-pesquisar, .btn-filters {
        width: 100% !important;
        margin: 0 !important;
        height: 48px !important;
    }
    .search-header p {
        padding: 0 10px;
        font-size: 14px;
    }
    .search-input {
        width: 100% !important;
        padding: 8px 0;
    }
}
/* 1. ESTRUTURA BASE DA MODAL */
#filterModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: flex-end; /* Alinha à direita */
    visibility: hidden;
    transition: visibility 0.3s, background-color 0.3s ease-in-out;
}

#filterModal.active {
    visibility: visible;
    background: rgba(0, 0, 0, 0.5); /* Overlay mais escuro para foco */
}

/* 2. CONTEÚDO DA MODAL (SIDEBAR) */
#filterModal .modal-content {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column; /* ESSENCIAL: Empilha Header, Body e Footer */
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
}

#filterModal.active .modal-content {
    transform: translateX(0);
}

/* 3. HEADER (FIXO) */
#filterModal .modal-header {
    flex-shrink: 0; /* Não encolhe */
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

#filterModal .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary);
    font-weight: 700;
}

/* 4. CORPO (COM SCROLL INDEPENDENTE) */
#filterModal .modal-body {
    flex: 1; /* Ocupa todo o espaço restante */
    overflow-y: auto !important; /* ATIVA O SCROLL AQUI */
    padding: 25px;
    background: #fff;
    -webkit-overflow-scrolling: touch; /* Scroll suave no iOS */
}

/* Custom Scrollbar para o corpo */
#filterModal .modal-body::-webkit-scrollbar {
    width: 6px;
}
#filterModal .modal-body::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* 5. GRUPOS DE FILTROS */
#filterModal .filter-group {
    margin-bottom: 30px;
}

#filterModal .group-title {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid de Checkboxes corrigida */
#filterModal .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colunas iguais */
    gap: 12px;
}

#filterModal .custom-checkbox {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    padding: 5px 0;
}

#filterModal .custom-checkbox input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* 6. INPUTS E SELECTS */
#filterModal .input-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

#filterModal select,
#filterModal input[type="text"] {
    width: 100%;
    height: 45px;
    border: 1px solid #e2e8f0;
    padding: 0 15px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#filterModal select:focus,
#filterModal input:focus {
    border-color: var(--primary);
}

/* 7. RODAPÉ (FIXO NA BASE) */
#filterModal .modal-footer {
    flex-shrink: 0; /* Não encolhe */
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
}

#filterModal .btn-clear {
    flex: 1;
    background: transparent;
    border: none;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    text-decoration: underline;
}

#filterModal .btn-apply {
    flex: 2;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.3s;
}

#filterModal .btn-apply:hover {
    opacity: 0.9;
}

/* 8. RESPONSIVIDADE */
@media (max-width: 480px) {
    #filterModal .modal-content {
        max-width: 100%;
    }

    #filterModal .checkbox-grid {
        grid-template-columns: 1fr;
    }
}
/**Details product */
.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Alinhado ao topo para evitar desalinhamento vertical */
    border-bottom: 2px solid var(--light);
    padding-bottom: 20px;
    margin-bottom: 20px;
    gap: 20px;
}

.title-info h1 {
    font-size: 26px;
    color: var(--secondary);
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Informação de Preço e Partilha */
.price-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: fit-content;
}

.price {
    color: var(--primary);
    font-size: 28px !important;
    font-weight: 800;
    line-height: 1;
}

.share-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.share-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    font-weight: bold;
}

.share-icons {
    display: flex;
    gap: 15px;
}

.share-icons a {
    color: var(--secondary);
    font-size: 18px;
    line-height: 1;
}

/* --- Galeria Inteligente --- */
.gallery-grid {
    display: flex;
    gap: 10px;
    height: 480px;
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
}

.main-photo {
    flex: 2;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.secondary-photos {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}
.side-item {
    flex: 1;
    overflow: hidden;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px; /* Bordas levemente mais arredondadas para um look moderno */
    display: block;
}

/* --- RESPONSIVIDADE (O SEGREDO) --- */

@media (max-width: 992px) {
    .gallery-grid { height: 380px; }
}

@media (max-width: 768px) {
    .property-header {
        flex-direction: column; /* Empilha tudo verticalmente */
        align-items: stretch;
        gap: 15px;
    }

    .price-info {
        text-align: left;
        flex-direction: row; /* Coloca Preço e Partilha lado a lado no tablet */
        justify-content: space-between;
        align-items: center;
        background: #f9f9f9;
        padding: 15px;
        border-radius: 8px;
    }

    .share-container { justify-content: flex-start; }

    .gallery-grid {
        flex-direction: column;
        height: auto;
    }
    .secondary-photos { display: none; } /* Esconde as laterais no mobile */
    .main-photo { height: 300px; }
}

@media (max-width: 480px) {
    .price-info {
        flex-direction: column; /* No telemóvel pequeno, empilha preço e ícones */
        align-items: flex-start;
    }

    .title-info h1 { font-size: 22px; }
    .price { font-size: 24px !important; }

    .share-container {
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid #eee;
        padding-top: 10px;
    }
}

/* Layout de Colunas */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

/* Detalhes */
.details-content {
    font-family: var(--font-main);
    width: 100%;
    max-width: 1200px; /* Limita a largura em telas grandes */
    margin: 0 auto;    /* Centraliza o bloco na tela */
    padding: 0 20px;   /* Adiciona respiro nas laterais (20px) */
    box-sizing: border-box; /* Garante que o padding não aumente a largura total */
}

/* Quick Specs: Rolagem lateral no mobile para não quebrar layout */
.quick-specs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding: 5px 2px 15px 2px;
    scrollbar-width: none; /* Firefox */
}
.quick-specs::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.spec {
    background: var(--bg-soft);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.spec i { color: var(--primary); margin-right: 8px; }

/* Descrição */
.description {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    line-height: 1.6;
    color: var(--text-muted);
}
.description h3 { color: var(--secondary); margin-bottom: 15px; }

/* Tabs */
.features-tabs { margin-top: 20px; border-top: 1px solid var(--border-color); padding-top: 30px; }
.tab-header { display: flex; gap: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 25px; }
.tab-btn {
    background: none; border: none; padding: 10px 5px; cursor: pointer;
    color: var(--gray); font-weight: 700; font-size: 16px;
    transition: 0.3s; border-bottom: 3px solid transparent;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Grid de Características: 1 coluna no mobile, 2 no tablet/desktop */
.features-list {
    list-style: none; padding: 0;
    display: none; /* Escondido por padrão, JS mostra o ativo */
    grid-template-columns: 1fr;
    gap: 15px;
}
.features-list.active { display: grid; }
.features-list li { color: var(--secondary); font-size: 14px; display: flex; align-items: center; }
.features-list i { color: var(--success); margin-right: 12px; font-size: 16px; }

/* Mapa Responsivo (Mantém proporção 16:9) */
/* Container Pai */
/* Container que envolve o título e o mapa */
.property-map {
    margin-top: 40px;
    width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Título alinhado com o mapa */
.map-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    padding-left: 0;
}

/* O container do Mapa */
.map-responsive {
    width: 90%;
    margin-left: 0 !important;
    margin-right: auto;
    aspect-ratio: 16 / 9;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.map-responsive iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Responsividade para Mobile */
@media (max-width: 768px) {
    .map-responsive {
        aspect-ratio: 4 / 3;
    }
}
/* Media Queries para Telas Maiores */
@media (min-width: 768px) {
    .features-list { grid-template-columns: 1fr 1fr; }
    .quick-specs { flex-wrap: wrap; overflow-x: visible; }
}

/* Sidebar e Formulário */
.agency-logo{max-width:150px;margin:0 auto 20px auto;display:block}
.agent-photo{width:100px;height:100px;border-radius:50%;object-fit:cover;margin-bottom:15px;border:3px solid var(--light)}
.agent-card{text-align:center}

/* Reseta o container pai para garantir que nada empurre o formulário */
.contact-form-card {
    background: #fff;
    border-radius: 12px; /* Cantos arredondados conforme imagem */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 380px;
}

.form-header {
    padding: 25px 20px;
    color: #483d8b;
}

.form-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.header-line {
    width: 30px;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    margin-top: 10px;
}

.form-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Estilo fiel dos inputs */
.form-body input[type="text"],
.form-body input[type="email"],
.form-body input[type="tel"],
.form-body textarea {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    background-color: #f8fafc; /* Fundo levemente cinza como no print */
    font-size: 14px;
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-row input { flex: 1; }

.form-body textarea {
    height: 80px;
    resize: none;
    border-color: var(--accent); /* Azul conforme foco na imagem */
}

/* Seção Legal */
.error-notice {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.check-group {
    display: grid;
    grid-template-columns: 35px 1fr; /* Largura fixa para o quadrado */
    align-items: center;
    margin-bottom: 15px;
}

.check-group input[type="checkbox"] {
    width: 25px;
    height: 25px;
    border: 1px solid var(--gray);
    cursor: pointer;
}

.check-group label {
    font-size: 12px;
    color: var(--secondary);
    line-height: 1.3;
    cursor: pointer;
}

.check-group label a { color: var(--accent); text-decoration: none; }


.btn-submit {
    /* Alinhamento Flexbox */
    display: flex;
    align-items: center;      /* Centraliza verticalmente (o mais importante) */
    justify-content: center;  /* Centraliza horizontalmente */
    gap: 12px;                /* Espaço fixo entre spinner e texto */

    /* Estilo do Botão */
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 0 20px;          /* Retiramos o padding vertical para usar height fixo */
    height: 55px;             /* Altura fixa garante que nada saia do lugar */
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.spinner-interno {
    display: none;            /* Escondido por padrão */
    width: 20px;              /* Tamanho fixo */
    height: 20px;             /* Tamanho fixo */
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
    box-sizing: border-box;

    animation: rodar 0.8s linear infinite;
}

.btn-submit.enviando .spinner-interno {
    display: block;
}

@keyframes rodar {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.btn-submit:hover { opacity: 0.9; }


@media (min-width:993px){.page-layout{display:grid;grid-template-columns:1fr 350px;gap:40px;align-items:start}}
@media (max-width:992px){
    .page-layout,.gallery-grid{
        display:block;width:100%
    }
    .property-header{flex-direction:column;align-items:flex-start}
    .details-content{margin-bottom:30px}}
@media (max-width:480px){
    .legal-notice span{font-size:13px}
}

/* Cláusulas Legais no Formulário */
.legal-notice {
    text-align: left;
    margin-bottom: 20px;
}

.error-msg {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--dark);
}

.checkbox-item input {
    width: auto !important; /* Sobrescreve largura 100% dos inputs globais */
    margin-top: 3px;
    accent-color: var(--primary);
}

.checkbox-item span a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

.checkbox-item span a:hover {
    text-decoration: underline;
}
.property-badges {
    display: flex;
}

.badge {
    padding: 6px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-transform: capitalize;
}
.badge-buy {
    background-color: var(--primary);
    color: #FFFFFF;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    text-transform: capitalize;
}
.badge-status {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}
#map-view {
    width: 100%;
    min-height: 500px;
    margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 5px;
}
.leaflet-popup-content img {
    margin-bottom: 5px;
}
.badge-rent {
    background-color: var(--success);
}
/* Garante que o botão não fuja da imagem principal */
.main-photo {
    flex: 2; /* Ocupa 2/3 da largura */
    position: relative;
    height: 100%;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px 0 0 4px;
}
.view-all-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background-color: #ef5353;
    color: #fff;
    padding: 4px 10px;   /
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 10;
}
.view-all-btn i {
    font-size: 13px;
}
.share-property {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    justify-content: flex-end;
}
.share-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-end;
}

.share-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--gray);
    text-transform: uppercase;
}

.share-icons a {
    color: var(--secondary);
    font-size: 18px;
    margin-left: 8px;
    transition: color 0.3s;
}

.share-icons a:hover {
    color: var(--primary);
}
.share-property span {
    font-size: 12px;
    color: var(--gray);
    font-weight: bold;
}

.share-property a {
    color: var(--secondary);
    font-size: 18px;
    transition: 0.3s;
}

.share-property a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}
.main-container {
    margin-top: 20px !important;
    margin-bottom: 80px !important;
    display: block !important;
}

@media (max-width: 768px) {
    .main-container {
        margin-top: 15px !important;
        margin-bottom: 40px !important;
    }
}
.header-main-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.header-main-title h1 {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary);
    margin: 0;           /* Remove margens padrão que podem desalinhá-lo */
}

/**
 MODAL GALLERY
 */
.modal-gallery {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); /* Fundo mais escuro para destaque */
    align-items: center;
    justify-content: center;
}

/* Container da Imagem: O segredo para não ocupar a tela toda */
.modal-content {
    position: relative;
    width: 90%;
    max-width: 1100px; /* Limite de largura */
    height: 80vh;      /* Limite de altura (80% da tela) */
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalImg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Mantém a proporção sem distorcer */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Estilização das Setas */
.modal-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 10002;
}

.modal-nav button:hover {
    background: #c82333; /* Cor primária da sua marca */
    transform: translateY(-50%) scale(1.1);
}

#prevImg { left: -30px; } /* Projeta um pouco para fora da imagem */
#nextImg { right: -30px; }

/* Contador e Botão Fechar */
.modal-counter {
    position: absolute;
    bottom: -40px;
    color: #ccc;
    font-family: sans-serif;
    font-size: 14px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    opacity: 0.8;
    z-index: 10005;
}

.close-modal:hover { opacity: 1; }

@media (max-width: 768px) {
    #prevImg { left: 10px; }
    #nextImg { right: 10px; }
    .modal-nav button { width: 40px; height: 40px; }
}