/*
Theme Name: Imobiliaria Pro 5
Theme URI: https://isabellacortes.com.br
Author: Isabella Côrtes
Description: Tema imobiliário premium com ACF – visual sofisticado e responsivo
Version: 5.0
Text Domain: imobiliaria-pro5
*/

/* ============================================================
   VARIÁVEIS & RESET
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
    --brand:    #A20000;
    --brand-dk: #7d0000;
    --brand-lt: #f8e8e8;
    --dark:     #1a1a1a;
    --gray:     #6b6b6b;
    --light:    #f7f5f3;
    --white:    #ffffff;
    --radius:   14px;
    --shadow:   0 4px 24px rgba(0,0,0,.08);
    --shadow-hover: 0 10px 40px rgba(162,0,0,.15);
    --transition: .3s cubic-bezier(.4,0,.2,1);
    --font-display: 'Libre Baskerville', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--light);
    color: var(--dark);
    overflow-x: hidden;
    line-height: 1.6;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    background: var(--white);
    border-bottom: 1px solid rgba(0,0,0,.07);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Logo */
.custom-logo-link { display: flex; align-items: center; }
.custom-logo      { height: 150px; width: auto; }

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
}

.site-nav a {
    font-size: .95rem;
    font-weight: 500;
    color: var(--dark);
    letter-spacing: .01em;
    transition: color var(--transition);
    position: relative;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px; left: 0;
    width: 0; height: 2px;
    background: var(--brand);
    transition: width var(--transition);
}

.site-nav a:hover       { color: var(--brand); }
.site-nav a:hover::after{ width: 100%; }

/* CTA no nav */
.nav-cta {
    background: var(--brand);
    color: var(--white) !important;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600 !important;
    transition: background var(--transition), transform var(--transition) !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover  { background: var(--brand-dk) !important; transform: translateY(-1px); }

/* Hamburger mobile */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================================
   HERO BANNER
   ============================================================ */

.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a0000 0%, #3d0000 50%, #6b0000 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 72px 32px;
    width: 100%;
}

.hero__tagline {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    margin-bottom: 16px;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 12px;
}

.hero__subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,.7);
    margin-bottom: 48px;
    font-weight: 300;
}

/* ============================================================
   PAINEL DE FILTROS
   ============================================================ */

.filter-panel {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-panel.standalone {
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.filter-group { display: flex; flex-direction: column; gap: 6px; }

.filter-group label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: .9rem;
    background: var(--white);
    color: var(--dark);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b6b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(162,0,0,.12);
}

.btn-filter {
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    display: block;
    width: 100%;
}

.btn-filter-primary {
    background: var(--brand);
    color: var(--white);
}

.btn-filter-primary:hover {
    background: var(--brand-dk);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(162,0,0,.3);
}

.btn-filter-secondary {
    background: transparent;
    color: var(--gray);
    border: 1.5px solid #e0e0e0;
    text-decoration: none;
}

.btn-filter-secondary:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* ============================================================
   SEÇÃO IMÓVEIS
   ============================================================ */

.imoveis-section { padding: 60px 0; }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 12px;
    flex-wrap: wrap;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--dark);
}

.results-count {
    font-size: .875rem;
    color: var(--gray);
}

/* ============================================================
   CARDS DE IMÓVEIS
   ============================================================ */

.imoveis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.imovel-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.imovel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.imovel-card__thumb {
    position: relative;
    overflow: hidden;
}

.imovel-card__thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.imovel-card:hover .imovel-card__thumb img {
    transform: scale(1.05);
}

.imovel-card__badge {
    position: absolute;
    top: 14px; left: 14px;
    background: var(--brand);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
}

.imovel-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.imovel-card__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.3;
    transition: color var(--transition);
}

.imovel-card:hover .imovel-card__title { color: var(--brand); }

.imovel-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.spec-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--light);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: .78rem;
    color: var(--gray);
    font-weight: 500;
}

.spec-pill svg {
    width: 13px; height: 13px;
    flex-shrink: 0;
}

.imovel-card__footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.imovel-card__price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand);
    font-family: var(--font-display);
}

.imovel-card__cta {
    font-size: .8rem;
    font-weight: 600;
    color: var(--brand);
    letter-spacing: .04em;
    transition: gap var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.imovel-card__cta::after {
    content: '→';
    transition: transform var(--transition);
}

.imovel-card:hover .imovel-card__cta::after {
    transform: translateX(4px);
}

/* Sem resultados */
.no-results {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.no-results h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--gray);
}

/* ============================================================
   PÁGINA SINGLE
   ============================================================ */

.single-hero {
    background: var(--dark);
    padding: 20px 0 0;
}

.single-hero__img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    cursor: pointer;
}

.single-content { padding: 48px 0 80px; }

.single-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.single-price {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--brand);
    margin-bottom: 32px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.spec-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 5px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
}

.spec-item__icon {
    width: 40px; height: 40px;
    background: var(--brand-lt);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.spec-item__label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray);
    margin-bottom: 2px;
}

.spec-item__value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

/* Galeria thumbnails */
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 40px;
}

.gallery-thumbs a img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity var(--transition), transform var(--transition);
}

.gallery-thumbs a:hover img {
    opacity: .85;
    transform: scale(1.02);
}

/* Descrição */
.imovel-description {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.imovel-description h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--dark);
}

.imovel-description p { color: var(--gray); line-height: 1.8; margin-bottom: 12px; }

/* Botão WhatsApp */
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #25d366;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 18px 32px;
    border-radius: var(--radius);
    width: 100%;
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    letter-spacing: .02em;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(37,211,102,.35);
    color: var(--white);
}

.btn-whatsapp svg { width: 24px; height: 24px; flex-shrink: 0; }

/* Sticky sidebar */
.single-sidebar {
    position: sticky;
    top: 90px;
}

.agent-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 20px;
}

.agent-card__name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark);
}

.agent-card__role {
    font-size: .85rem;
    color: var(--gray);
    margin-bottom: 20px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,.75);
    padding: 60px 0 32px;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    margin-bottom: 48px;
}

.footer-brand__logo {
    height: 44px;
    width: auto;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.footer-brand p {
    font-size: .9rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-brand__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    transition: color var(--transition);
}

.footer-brand__phone:hover { color: var(--brand); }

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand);
    display: inline-block;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul a {
    font-size: .9rem;
    color: rgba(255,255,255,.65);
    transition: color var(--transition), padding-left var(--transition);
}

.footer-col ul a:hover { color: var(--white); padding-left: 6px; }

.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 24px;
    text-align: center;
    font-size: .82rem;
    color: rgba(255,255,255,.4);
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
}

.container-lg {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .imoveis-grid      { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

@media (max-width: 768px) {
    .site-header__inner { padding: 14px 20px; }

    .site-nav {
        display: none;
        position: fixed;
        top: 0; right: 0;
        width: 280px; height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 32px 32px;
        box-shadow: -8px 0 32px rgba(0,0,0,.15);
        gap: 24px;
        z-index: 1000;
        transition: transform var(--transition);
    }

    .site-nav.open { display: flex; }

    .nav-toggle { display: flex; }

    .custom-logo { height: 150px; }

    .hero { min-height: auto; }
    .hero__content { padding: 48px 20px; }

    .filter-panel {
        grid-template-columns: 1fr 1fr;
        padding: 20px;
    }

    .imoveis-grid { grid-template-columns: 1fr; gap: 16px; }

    .site-footer__grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
        gap: 32px;
    }

    .container, .container-lg { padding: 0 10px; }

    .specs-grid { grid-template-columns: 1fr 1fr; }

    .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .filter-panel { grid-template-columns: 1fr; }
    .specs-grid { grid-template-columns: 1fr 1fr; }
    .gallery-thumbs { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   PAGINAÇÃO
   ============================================================ */

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--dark);
    background: var(--white);
    border: 1.5px solid #e8e8e8;
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-links .page-numbers:hover {
    background: var(--brand);
    color: var(--white);
    border-color: var(--brand);
    box-shadow: 0 4px 16px rgba(162,0,0,.2);
}

.nav-links .page-numbers.current {
    background: var(--brand);
    color: var(--white);
    border-color: var(--brand);
    box-shadow: 0 4px 16px rgba(162,0,0,.2);
}

.nav-links .page-numbers.dots {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--gray);
}

/* ============================================================
   FIXES MOBILE
   ============================================================ */

/* Grid single não ultrapassa tela */
@media (max-width: 768px) {
    .single-content .container-lg > div {
        grid-template-columns: 1fr !important;
    }

    /* Relacionados vira 1 coluna */
    .imoveis-relacionados {
        grid-template-columns: 1fr !important;
    }
}