/* ========================================
   PÁGINA DE LISTAGEM DE IMÓVEIS - ESTILO HOUZEZ
   ======================================== */

/* Page Header */
.page-header {
    background: #f7f8fa;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.page-header-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Breadcrumb */
.breadcrumb-nav .breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: #6b7280;
}

.breadcrumb-item a {
    color: #6b7280;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #9ca3af;
    margin: 0 5px;
    font-size: 16px;
}

.breadcrumb-item.active {
    color: #111827;
    font-weight: 500;
}

/* Page Title */
.page-title-wrapper {
    text-align: left;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

/* Imóveis Section */
.imoveis-section {
    padding: 40px 0 60px;
    background: #ffffff;
}

/* Search Toolbar */
.search-toolbar {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.result-count {
    font-size: 14px;
    color: #6b7280;
}

.result-count strong {
    color: #111827;
    font-weight: 600;
}

.toolbar-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sort-select {
    padding: 8px 35px 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #ffffff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23374151" d="M6 9L1 4h10z"/></svg>') no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 6px;
}

.view-btn {
    padding: 6px 10px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.view-btn.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Filters Sidebar */
.filters-sidebar {
    background: #ffffff;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: visible;
}

.filters-header {
    background: #f9fafb;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.filters-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.filters-body {
    padding: 20px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    transition: all 0.2s;
    background: #ffffff;
}

.filter-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.btn-filter {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-filter-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-filter-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-filter-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-filter-secondary:hover {
    background: #e5e7eb;
}

/* Property Grid */
.properties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Property Card Horizontal - Estilo Houzez */
.property-card-horizontal {
    display: flex;
    text-decoration: none;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 280px;
    width: 100%;
}

.property-card-horizontal:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

/* Property Image Wrapper - Lado Esquerdo */
.property-image-wrapper-horizontal {
    position: relative;
    width: 350px;
    overflow: hidden;
    flex-shrink: 0;
}

.property-image-wrapper-horizontal .property-image-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
}

.property-image-wrapper-horizontal img,
.property-image-wrapper-horizontal > a > div {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.property-card-horizontal:hover .property-image-wrapper-horizontal img {
    transform: scale(1.05);
}

/* Property Content - Lado Direito */
.property-content-horizontal {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: var(--white);
}

/* Preço - Horizontal */
.property-price-horizontal {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 15px 0;
}

/* Ajustes de espaçamento para elementos abaixo do preço */
.property-content-horizontal .property-title-houzez {
    margin-bottom: 12px;
}

.property-content-horizontal .property-location-houzez {
    margin-bottom: 12px;
}

.property-content-horizontal .property-features-houzez {
    margin-bottom: 12px;
    gap: 15px;
}

.property-content-horizontal .property-type-label {
    margin-bottom: 15px;
}

/* Botões de Ação no Rodapé - Horizontal */
.property-footer-actions-horizontal {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.property-action-btn-footer {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-phone {
    background: #6b7280;
    color: #ffffff;
}

.btn-phone:hover {
    background: #4b5563;
}

.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
}

.btn-whatsapp:hover {
    background: #20BA5A;
}

.btn-contatar {
    background: #FF5722;
    color: #ffffff;
}

.btn-contatar:hover {
    background: #E64A19;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item .page-link {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    background: #ffffff;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.page-item .page-link:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 100px 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.no-results svg {
    margin-bottom: 24px;
    opacity: 0.4;
}

.no-results h3 {
    font-size: 20px;
    color: #111827;
    margin-bottom: 12px;
    font-weight: 600;
}

.no-results p {
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Seção de imóveis - Remover padding lateral no container */
    .imoveis-section {
        padding: 30px 0 40px;
    }

    .imoveis-section .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Page Header */
    .page-header {
        padding: 15px 0;
    }

    .page-header .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-title {
        font-size: 20px;
    }

    /* Breadcrumb menor em mobile */
    .breadcrumb-nav .breadcrumb {
        font-size: 12px;
        flex-wrap: wrap;
    }

    .breadcrumb-item svg {
        width: 12px;
        height: 12px;
    }

    /* Toolbar */
    .toolbar-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .toolbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    /* Esconder filtros por padrão em mobile */
    .filters-sidebar {
        margin-bottom: 20px;
    }

    .filters-body {
        display: none;
    }

    .filters-sidebar.filters-open .filters-body {
        display: block;
    }

    /* Botão toggle para mostrar/esconder filtros */
    .filters-header {
        cursor: pointer;
        position: relative;
        user-select: none;
        padding: 15px;
    }

    .filters-header h3 {
        font-size: 14px;
        padding-right: 30px;
    }

    .filters-header::after {
        content: "+";
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 24px;
        font-weight: 600;
        color: var(--primary-color);
        transition: transform 0.3s ease;
    }

    .filters-sidebar.filters-open .filters-header::after {
        content: "−";
    }

    .filters-body {
        padding: 15px;
    }

    .filter-group {
        margin-bottom: 20px;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .property-actions {
        opacity: 1;
        transform: translateY(0);
    }

    /* Cards horizontais se tornam verticais em mobile */
    .property-card-horizontal {
        flex-direction: column;
        height: auto;
    }

    .property-image-wrapper-horizontal {
        width: 100%;
        height: 220px;
        position: relative;
    }

    .property-image-wrapper-horizontal .property-image-link {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .property-content-horizontal {
        padding: 16px;
    }

    .property-price-horizontal {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .property-title-houzez {
        font-size: 16px !important;
    }

    .property-location-houzez {
        font-size: 13px !important;
    }

    .property-features-houzez {
        gap: 10px !important;
    }

    .property-feature-item svg {
        width: 16px !important;
        height: 16px !important;
    }

    .property-feature-item span {
        font-size: 12px !important;
    }

    .property-type-label {
        font-size: 11px !important;
    }

    .property-footer-actions-horizontal {
        flex-wrap: wrap;
    }

    .property-action-btn-footer {
        font-size: 11px;
        padding: 8px 10px;
    }

    /* Botões de ação sobre a imagem em mobile */
    .property-action-buttons {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    /* Sort select em mobile */
    .sort-select {
        width: 100%;
        font-size: 13px;
    }

    /* Toolbar em mobile */
    .search-toolbar {
        padding: 15px;
    }

    .result-count {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* Container mobile */
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Page Header */
    .page-header {
        padding: 12px 0;
    }

    .page-title {
        font-size: 18px;
    }

    /* Breadcrumb ainda menor */
    .breadcrumb-nav .breadcrumb {
        font-size: 11px;
    }

    /* Filtros */
    .filters-header {
        padding: 12px;
    }

    .filters-header h3 {
        font-size: 13px;
    }

    .filters-body {
        padding: 12px;
    }

    .filter-label {
        font-size: 12px;
    }

    .filter-control {
        font-size: 13px;
        padding: 8px 10px;
    }

    /* Toolbar */
    .search-toolbar {
        padding: 12px;
        margin-bottom: 15px;
    }

    .result-count {
        font-size: 12px;
    }

    .sort-select {
        font-size: 12px;
        padding: 8px 30px 8px 10px;
    }

    /* Cards */
    .properties-grid {
        gap: 15px;
    }

    .property-card-horizontal {
        border-radius: 10px;
    }

    .property-image-wrapper-horizontal {
        height: 200px;
    }

    .property-content-horizontal {
        padding: 14px;
    }

    .property-price-horizontal {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .property-title-houzez {
        font-size: 15px !important;
        line-height: 1.3 !important;
    }

    .property-location-houzez {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }

    .property-features-houzez {
        gap: 8px !important;
        margin-bottom: 10px !important;
    }

    .property-feature-item {
        gap: 4px !important;
    }

    .property-feature-item svg {
        width: 14px !important;
        height: 14px !important;
    }

    .property-feature-item span {
        font-size: 11px !important;
    }

    .property-type-label {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }

    .property-footer-actions-horizontal {
        gap: 6px;
        padding-top: 10px;
    }

    .property-action-btn-footer {
        font-size: 10px;
        padding: 7px 8px;
        gap: 4px;
    }

    .property-action-btn-footer svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Badges */
    .property-status-badge,
    .property-transaction-badge {
        font-size: 9px !important;
        padding: 4px 8px !important;
    }

    /* Botões de ação sobre a imagem */
    .property-action-buttons {
        gap: 6px !important;
        top: 10px !important;
        right: 10px !important;
    }

    .property-action-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .property-action-btn svg {
        width: 14px !important;
        height: 14px !important;
    }

    /* Paginação */
    .pagination {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-item .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }

    /* No results */
    .no-results {
        padding: 60px 15px;
    }

    .no-results svg {
        width: 48px;
        height: 48px;
    }

    .no-results h3 {
        font-size: 18px;
    }

    .no-results p {
        font-size: 14px;
    }

    /* Seção de imóveis */
    .imoveis-section {
        padding: 20px 0 30px;
    }
}

/* Prevenir overflow horizontal em todos os tamanhos */
* {
    max-width: 100%;
}

body {
    overflow-x: hidden;
}

.container {
    overflow-x: hidden;
}

/* Remover scrollbar vertical indesejada no header */
.page-header,
.page-header-content,
.breadcrumb-nav,
.page-title-wrapper {
    overflow: visible !important;
}

/* Prevenir overflow nos containers */
.imoveis-section .container,
.page-header .container {
    overflow: visible !important;
}

/* Remover overflow de TODOS os elementos da página de imóveis */
body,
html,
.imoveis-section,
.imoveis-section *,
.page-header,
.page-header *,
.filters-sidebar,
.filters-sidebar *,
aside,
aside *,
.row,
.col-lg-3,
.col-lg-9 {
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
}

/* Exceção para elementos que PRECISAM de overflow hidden */
.property-image-wrapper-horizontal,
.property-card-horizontal {
    overflow: hidden !important;
}

/* Forçar body sem scroll */
body.overflow-fix {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Aside (sidebar de filtros) sem altura fixa */
aside.col-lg-3 {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
}

/* ========================================
   SEÇÃO DE IMÓVEIS SUGERIDOS
   ======================================== */
.suggested-properties-section {
    background: #f9fafb;
    padding: 60px 0 80px;
    border-top: 1px solid #e5e7eb;
}

.section-header {
    margin-bottom: 50px;
}

/* Copiar estilos da home para centralizar título e posicionar botões */
.suggested-properties-section .section-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.suggested-properties-section .section-header-content > div:first-child {
    text-align: center;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
}

.section-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* Navigation Buttons - Copiar estilos da home */
.suggested-properties-section .slider-nav-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-self: flex-end;
    margin-top: 5px;
}

.suggested-properties-section .slider-nav-btn {
    padding: 5px 12px;
    background: #87CEEB;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.suggested-properties-section .slider-nav-btn:hover {
    background: #5DADE2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Slider Wrapper */
.suggested-slider-wrapper {
    overflow: hidden;
    position: relative;
}

.suggested-properties-grid {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease-in-out;
}

.suggested-properties-grid.sugeridos-slider .property-card-houzez {
    flex: 0 0 calc((100% - 60px) / 3);
    max-width: calc((100% - 60px) / 3);
    min-width: calc((100% - 60px) / 3);
}

/* Responsive para Imóveis Sugeridos */
@media (max-width: 1200px) {
    .suggested-properties-grid.sugeridos-slider .property-card-houzez {
        flex: 0 0 calc((100% - 30px) / 2);
        max-width: calc((100% - 30px) / 2);
        min-width: calc((100% - 30px) / 2);
    }
}

@media (max-width: 768px) {
    .suggested-properties-section {
        padding: 40px 0 60px;
    }

    .suggested-properties-section .section-header-content {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    .suggested-properties-section .slider-nav-buttons {
        align-self: flex-end;
    }

    .suggested-properties-section .slider-nav-btn {
        padding: 4px 10px;
        font-size: 10px;
    }

    .suggested-properties-grid.sugeridos-slider .property-card-houzez {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 100%;
    }
}
