* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-whatsapp: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --dark: #1e293b;
    --gray: #64748b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #f3f4f6 100%);
    color: var(--dark);
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==================== HEADER ==================== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.foto-corretor-mini {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
}

.foto-corretor-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo h1 {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.3s;
    padding: 0.25rem 0;
}

.btn-admin {
    background: var(--gradient-primary);
    color: white !important;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem 1rem;
}

.hero-text h2 {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-text p {
    font-size: 1rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.btn-whatsapp-hero {
    display: inline-block;
    background: var(--gradient-whatsapp);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.3s;
}

/* ==================== FILTROS ==================== */
.section-title {
    text-align: center;
    font-family: 'Space Grotesk', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.filtros-section {
    padding: 2rem 0;
}

.filtros {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.2rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filtro-group {
    width: 100%;
}

.filtro-group label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
    display: block;
    color: var(--gray);
}

.filtro-input {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.filtro-actions {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.btn-primary, .btn-secondary {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    flex: 1;
}

/* ==================== CARDS ==================== */
.imoveis-section {
    padding: 2rem 0;
}

.imoveis-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.imovel-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: var(--shadow-md);
}

.imovel-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.imovel-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.imovel-info {
    padding: 1rem;
}

.imovel-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.imovel-local {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.imovel-detalhes {
    display: flex;
    gap: 0.8rem;
    margin: 0.8rem 0;
    font-size: 0.75rem;
    color: var(--gray);
    flex-wrap: wrap;
}

.preco {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

/* ==================== PAGINAÇÃO ==================== */
.paginacao {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.paginacao button {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

.paginacao button.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* ==================== CONTATO ==================== */
.contato-section {
    padding: 2rem 0;
}

.contato-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.contato-foto {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary);
}

.contato-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contato-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.contato-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.btn-whatsapp-contato, .btn-email {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
}

.btn-whatsapp-contato {
    background: var(--gradient-whatsapp);
    color: white;
}

.btn-email {
    background: var(--primary);
    color: white;
}

.creci {
    color: var(--gray);
    font-size: 0.75rem;
}

/* ==================== DETALHES ==================== */
.detalhes-container {
    max-width: 1280px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.btn-voltar {
    background: var(--gray);
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.galeria-principal {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.galeria-principal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.galeria-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.galeria-thumbs img {
    width: 70px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Mapa container */
.mapa-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.mapa-container h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.mapa {
    width: 100%;
    height: 250px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #e2e8f0;
}

.endereco {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0.8rem 0;
    word-break: break-word;
}

.link-maps {
    margin-top: 0.8rem;
}

.link-maps a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.85rem;
}

/* Informações do imóvel */
.info-principal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.info-principal h1 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.preco-destaque {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0;
}

.caracteristicas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin: 1rem 0;
}

.caracteristica {
    background: #f8fafc;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.caracteristica span {
    display: block;
    font-size: 0.7rem;
    color: var(--gray);
    margin-bottom: 0.3rem;
}

.caracteristica strong {
    font-size: 0.9rem;
    word-break: break-word;
}

.custo-mensal {
    background: #fef3c7;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.custo-mensal h3 {
    font-size: 1rem;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.custo-mensal p {
    font-size: 0.9rem;
    margin: 0.3rem 0;
    color: #92400e;
}

.descricao {
    margin: 1rem 0;
}

.descricao h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.descricao p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #475569;
}

.contato-box {
    background: #f8fafc;
    padding: 1.2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: 1rem;
}

.contato-box h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.whatsapp-btn {
    background: var(--gradient-whatsapp);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin: 0.5rem 0;
}

.btn-compartilhar, .btn-copiar-link {
    background: #6366f1;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin: 0.5rem 0;
}

.btn-copiar-link {
    background: #64748b;
}

.contato-info {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.8rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #94a3b8;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    font-size: 0.75rem;
}

/* ==================== MEDIA QUERIES ==================== */
@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-text h2 {
        font-size: 2.2rem;
    }
    
    .filtros {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
    }
    
    .filtro-group {
        flex: 1;
        min-width: 150px;
    }
    
    .filtro-actions {
        flex: 0.5;
        margin-top: 0;
    }
    
    .imoveis-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .galeria-principal {
        height: 400px;
    }
    
    .mapa {
        height: 300px;
    }
}

@media (min-width: 1024px) {
    .hero-text h2 {
        font-size: 2.8rem;
    }
    
    .imoveis-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.8rem;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    nav a {
        font-size: 0.95rem;
    }
    
    .galeria-principal {
        height: 500px;
    }
    
    .mapa {
        height: 350px;
    }
}

/* ==================== MOBILE OVERRIDES ==================== */
@media (max-width: 767px) {
    .hero-text h2 {
        font-size: 1.5rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    .galeria-principal {
        height: 250px;
    }
    
    .galeria-thumbs img {
        width: 60px;
        height: 55px;
    }
    
    .preco-destaque {
        font-size: 1.4rem;
        text-align: center;
    }
    
    .caracteristica strong {
        font-size: 0.85rem;
    }
    
    .descricao p {
        font-size: 0.85rem;
    }
    
    .whatsapp-btn, .btn-compartilhar, .btn-copiar-link {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
    
    .info-principal h1 {
        font-size: 1.2rem;
        text-align: center;
    }
}

/* ==================== ANIMAÇÕES ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.imovel-card {
    animation: fadeInUp 0.3s ease-out;
}

/* ==================== UTILITÁRIOS ==================== */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}