/* =======================================================================
 * ESTILOS DA PÁGINA DE RESULTADOS (FILTRO DE BUSCA)
 * ======================================================================= */

/* ==========================================
 * 1. CONFIGURAÇÕES GLOBAIS
 * ========================================== */
body {
    font-family: 'DM Sans', sans-serif;
}

/* ==========================================
 * 2. LAYOUT PRINCIPAL (DIVISÃO TELA)
 * ========================================== */
/* Espaço para o header fixo do site (não é afetado pelos paddings responsivos) */
main.pagina-resultados { margin-top: 88px; }

.pagina-resultados {
    display: flex;
    gap: 30px;
    padding: 40px;
    align-items: flex-start;
}

/* ==========================================
 * 3. BARRA LATERAL (MENU DE FILTROS)
 * ========================================== */
.filtros {
    flex: 0 0 280px;
    padding: 20px;
    border-radius: 20px;
    background-color: var(--cor-secao);
    box-shadow: 0 4px 12px #00000015;
    display: flex;
    flex-direction: column;
}

.filtros label {
    margin-bottom: 5px;
}

.filtros input, 
.filtros select {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #00000030;
}

.aplica-filtro {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background-color: #FFE4BD;
    color: #312719;
    margin-top: 8px;
    cursor: pointer;
}

.aplica-filtro:active {
    transform: scale(0.96);
}


/* ==========================================
 * 4. ÁREA DE RESULTADOS (TOPO E GRID)
 * ========================================== */
.resultados {
    flex: 1;
    min-width: 0;
}

.topo-resultados {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

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

.ordenacao select {
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #00000030;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    align-items: stretch;
}


/* ==========================================
 * 5. ESTILIZAÇÃO DO CARD DO ESTABELECIMENTO
 * ========================================== */
.card-resultados{
    box-shadow: 0 4px 12px #00000015;
    border-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow: hidden;
    height: 100%;
}
.card-resultados > img  {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center center;
    background-color: #f7f7f7;
    flex-shrink: 0;
}
.top-categorias{
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(255, 228, 189, 0.9);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: bold;
    backdrop-filter: blur(4px);
}
.top-favoritos {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background-color: rgba(255, 228, 189, 0.9);
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}
.top-favoritos .estrela {
    color: #666;
    font-size: 14px;
}
.top-favoritos.ativo .estrela {
    color: #d97706;
}
.localizacao{
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.localizacao img {
    width: 14px;
    height: auto;
    margin: 0;
}
.conteudo-card{
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}
.informacoes{
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.informacoes h3{
    margin: 0 0 4px 0;
    font-size: 17px;
    color: #312719;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.info-extra {
    font-size: 12.5px; 
    color: #555; 
    margin: 2px 0 6px 0 !important;
}
.descricao-card {
    font-size: 13px;
    color: #666;
    margin: 4px 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.ver-detalhes-btn{
    background-color: #edd19c; 
    border: 1px solid #c8b082; 
    border-radius: 10px; 
    padding: 10px; 
    width: 100%; 
    font-weight: bold; 
    cursor: pointer; 
    margin-top: auto;
    transition: background-color 0.2s;
}
.ver-detalhes-btn:hover {
    background-color: #e2c184;
}

#mensagem-favorito {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #312719;
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px #00000030;
    z-index: 1000;
    display: none;
}

/* ========================================== */
/* MODAL HORIZONTAL E GALERIA                 */
/* ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content-horizontal {
    background-color: #1e2530;
    color: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    display: flex;
    flex-direction: row;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    font-family: 'DM Sans', sans-serif;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-fechar-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-fechar-modal:hover {
    background-color: rgba(239, 68, 68, 0.8);
    transform: scale(1.05);
}

.modal-lado-imagem {
    flex: 1;
    background-color: #0f141c;
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.modal-img-horizontal {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.modal-galeria-miniaturas {
    display: flex;
    gap: 8px;
    padding: 10px;
    background-color: #0b0f15;
    overflow-x: auto;
    max-height: 80px;
}

.modal-galeria-miniaturas img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s;
}

.modal-galeria-miniaturas img:hover,
.modal-galeria-miniaturas img.ativo {
    border-color: #25d366;
    opacity: 1;
}

.modal-lado-info {
    flex: 1.2;
    padding: 35px 30px 30px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-lado-info h2 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.modal-desc {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.modal-detalhes-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.04);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    color: #cbd5e1;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-detalhes-lista p {
    margin: 0;
}

.modal-detalhes-lista strong {
    color: #ffffff;
}

.btn-whatsapp-horizontal {
    background-color: #25d366;
    color: white;
    padding: 14px;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: background-color 0.2s, transform 0.1s;
    display: block;
}

.btn-whatsapp-horizontal:hover {
    background-color: #20ba5a;
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .card-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filtros {
        flex: 0 0 220px;
    }
}

@media (max-width: 768px) {
    .modal-content-horizontal {
        flex-direction: column;
        max-width: 450px;
    }
    .modal-lado-imagem {
        min-height: 220px;
    }
    .modal-lado-info {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .pagina-resultados {
        flex-direction: column;
        padding: 20px;
    }
    .filtros {
        width: 100%;
        flex: auto;
    }
    .card-container {
        grid-template-columns: 1fr;
    }
}