/*
Theme Name: MACPPLAN 2
Theme URI: https://macpplan.com.br/
Author: Ricardo Lanes
Description: Tema responsivo para o portal de imoveis MACPPLAN (CPT imovel + Meta Box).
Version: 2.1.0
Text Domain: macpplan2
*/

:root {
	--brand: #6d1c14;
	--brand-dark: #3d0e09;
	--brand-mid: #8a2a1f;
	--page: #d5d1cf;
	--surface: #e8e5e3;
	--surface-2: #dcd8d6;
	--field: #f5f3f2;
	--line: #b7b1ae;
	--ink: #231d1c;
	--muted: #5f5654;
	--wa: #1f9d55;
	--radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--ink);
	background: var(--page);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---- Cabecalho (unica area branca) ---- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 0 var(--brand); }
.site-header__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.logo img { height: 100px; width: auto; transition: height .25s ease; }
.site-header.is-scrolled .logo img { height: 58px; }
@media (max-width: 899px) { .logo img { height: 74px; } .site-header.is-scrolled .logo img { height: 52px; } }
.contact-top { display: none; font-style: normal; font-size: .82rem; color: var(--muted); text-align: right; line-height: 1.45; }
.contact-top a { color: var(--brand); font-weight: 800; text-decoration: none; }
.contact-top span { display: block; }
.menu-toggle { background: var(--brand); color: #fff; border: 0; border-radius: var(--radius); padding: 11px 18px; font: inherit; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; cursor: pointer; }
.site-nav { background: var(--brand-dark); display: none; }
.site-nav.is-open { display: block; }
.nav-list { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-direction: column; }
.nav-list a { display: block; padding: 13px 4px; color: #f3e6e3; text-decoration: none; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.nav-list li:last-child a { border-bottom: 0; }
.nav-list a:hover, .nav-list .current-menu-item > a { background: var(--brand); color: #fff; }

/* ---- Botoes e campos ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--brand); color: #fff; border: 2px solid var(--brand); border-radius: var(--radius); padding: 12px 20px; font: inherit; font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--wa { background: var(--wa); border-color: var(--wa); }
.btn--wa:hover { background: #17803f; border-color: #17803f; }
.btn--block { display: flex; width: 100%; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: .7rem; font-weight: 800; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .1em; }
.field input, .field select, .field textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--field); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(109, 28, 20, .45); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row--3 { grid-template-columns: repeat(3, 1fr); }
.seg { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 12px; border: 2px solid var(--brand); border-radius: var(--radius); overflow: hidden; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 10px; font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); cursor: pointer; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid rgba(109, 28, 20, .45); outline-offset: -3px; }

/* ---- Faixa de abertura (home) ---- */
.hero-band { background: var(--brand-dark); color: #fff; padding: 34px 0 78px; background-image: repeating-linear-gradient(-58deg, rgba(255, 255, 255, .045) 0 2px, transparent 2px 22px); }
.kicker { margin: 0 0 10px; font-size: .75rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #d9b9b3; }
.hero-band h1 { font-size: clamp(1.9rem, 5vw, 3.4rem); font-weight: 900; margin: 0 0 12px; max-width: 18ch; text-transform: uppercase; letter-spacing: -.015em; }
.hero-band p.lead { margin: 0; max-width: 54ch; color: #ecdad6; font-size: 1.05rem; }

.listagem { padding-bottom: 48px; }
.filters { margin-top: -54px; position: relative; z-index: 2; }
.filters__box { background: var(--surface); border-top: 5px solid var(--brand); padding: 0 16px; box-shadow: 0 14px 34px rgba(30, 8, 5, .28); }
.filters__box > summary { cursor: pointer; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; color: var(--brand); }
.filters__box > summary::after { content: "+"; font-size: 1.3rem; line-height: 1; }
.filters__box[open] > summary::after { content: "−"; }
.filters__form { padding-bottom: 16px; }

.hero { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 18px; }
.hero img { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16 / 6; object-fit: cover; }
.results { padding-top: 26px; }
.results__count { color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--brand); }
.cards { display: grid; gap: 20px; }
.empty { text-align: center; padding: 30px 0; color: var(--muted); }
.more { text-align: center; margin-top: 26px; }
.more[hidden], #ver-mais[hidden] { display: none; }

/* ---- Cards ---- */
.card { background: var(--surface); display: flex; flex-direction: column; border-bottom: 4px solid var(--line); transition: transform .18s, border-color .18s; }
.card:hover { transform: translateY(-4px); border-bottom-color: var(--brand); }
.card--destaque { border-bottom-color: var(--brand); }
.card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__pricetag { position: absolute; left: 0; bottom: 0; background: var(--brand); color: #fff; font-weight: 900; font-size: 1.25rem; padding: 8px 16px; letter-spacing: -.01em; }
.badge { position: absolute; right: 0; top: 14px; background: #fff; color: var(--brand); font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .14em; padding: 5px 12px; }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__type { margin: 0; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--brand); order: -1; }
.card__title { margin: 0; font-size: 1.1rem; font-weight: 800; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--brand); }
.chips { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0; }
.chips li { font-size: .78rem; font-weight: 700; padding: 2px 12px 2px 0; margin-right: 12px; border-right: 1px solid var(--line); color: var(--muted); }
.chips li:last-child { border-right: 0; }
.card__excerpt { margin: 0; font-size: .9rem; color: #403836; }
.card__foot { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card__cod { font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: var(--muted); margin-right: auto; }
.card__foot .btn { padding: 8px 14px; font-size: .72rem; }

/* ---- Pagina de imovel ---- */
.imovel { padding-top: 14px; padding-bottom: 48px; }
.crumbs { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.imovel__head { display: grid; gap: 14px; margin-bottom: 14px; background: var(--brand-dark); color: #fff; padding: 22px 20px; border-left: 8px solid var(--brand-mid); }
.imovel__head a { color: #fff; }
.imovel__cod { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #d9b9b3; }
.imovel__title { font-size: 1.5rem; margin: 4px 0 8px; font-weight: 900; text-transform: uppercase; }
.imovel__local, .imovel__tipo { margin: 0; color: #ecdad6; }
.imovel__local small { display: block; color: #cfb1ab; }
.imovel__price { margin: 0; font-size: 2.1rem; font-weight: 900; color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 20px; }
.gallery__item { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.gallery__item[hidden] { display: none; }
.gallery__item--main { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.gallery__all { grid-column: 1 / -1; justify-self: start; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery__item:hover img { transform: scale(1.04); }
.imovel__grid { display: grid; gap: 20px; }
.block { background: var(--surface); padding: 20px 20px 10px; margin-bottom: 16px; border-top: 4px solid var(--brand); }
.block h2 { font-size: .85rem; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; color: var(--brand); margin-bottom: 14px; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; margin: 0 0 10px; }
.specs div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: .68rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.specs dd { margin: 2px 0 0; font-weight: 800; font-size: 1.05rem; }
.tags { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { background: var(--surface-2); color: var(--brand-dark); padding: 6px 12px; font-size: .8rem; font-weight: 700; border-left: 3px solid var(--brand); }
.link-ext { font-weight: 800; }
.contact-card { background: var(--brand); color: #fff; padding: 20px; display: grid; gap: 10px; }
.contact-card h2 { font-size: .85rem; margin: 0; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; color: #f0d9d4; }
.contact-card a { color: #fff; }
.contact-card__fones { margin: 0; text-align: center; font-weight: 800; }
.contact-card .field { margin-bottom: 8px; }
.contact-card .field > span { color: #e5c9c4; }
.contact-card .btn:not(.btn--wa) { background: #fff; color: var(--brand); border-color: #fff; }
.contact-card .btn:not(.btn--wa):hover { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }
.contact-card .btn--ghost { background: transparent !important; color: #fff !important; border-color: rgba(255, 255, 255, .6) !important; }
.contact-card .btn--ghost:hover { background: rgba(255, 255, 255, .15) !important; }

/* ---- Paginas e posts ---- */
.pagina { padding-top: 28px; padding-bottom: 48px; }
.page__title { font-size: 1.9rem; font-weight: 900; text-transform: uppercase; color: var(--brand-dark); padding-bottom: 12px; border-bottom: 4px solid var(--brand); display: inline-block; }
.prose { background: var(--surface); padding: 22px; border-top: 4px solid var(--brand); }
.prose .page__title { display: block; }
.block.prose { padding-bottom: 12px; }
.prose p, .prose li { max-width: 75ch; }
.post-item { background: var(--surface); padding: 16px 18px; margin-bottom: 14px; border-left: 6px solid var(--brand); }
.post-item h2 { font-size: 1.2rem; margin: 0 0 4px; }
.post-item__date { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; }
.form-card { background: var(--surface); border-top: 4px solid var(--brand); padding: 22px; max-width: 640px; margin-top: 18px; }
.notice { padding: 12px 14px; font-weight: 700; margin: 8px 0; border-left: 5px solid; }
.notice--ok { background: #d9eadf; color: #14643a; border-color: #14643a; }
.notice--erro { background: #efd9d5; color: #8a1c10; border-color: #8a1c10; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; background: var(--surface); text-decoration: none; font-weight: 700; }

/* ---- Rodape ---- */
.site-footer { background: var(--brand-dark); color: #ead6d2; padding: 30px 0 96px; font-size: .9rem; border-top: 6px solid var(--brand); }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 8px; }
.site-footer .copy { opacity: .7; font-size: .78rem; }
.wa-float { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); z-index: 60; }

/* ---- Lightbox ---- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; }
.lightbox::backdrop { background: rgba(20, 8, 6, .93); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .14); color: #fff; border: 0; width: 46px; height: 46px; font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: var(--brand); }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---- Telas maiores ---- */
@media (min-width: 640px) {
	.cards { grid-template-columns: repeat(2, 1fr); }
	.gallery { grid-template-columns: repeat(3, 1fr); }
	.imovel__title { font-size: 2rem; }
	.specs { grid-template-columns: repeat(3, 1fr); }
	.contact-top { display: block; }
}
@media (min-width: 900px) {
	.menu-toggle { display: none; }
	.site-nav { display: block; }
	.nav-list { flex-direction: row; gap: 2px; padding: 0; }
	.nav-list a { border-bottom: 0; padding: 15px 18px; }
	.imovel__head { grid-template-columns: 1fr auto; align-items: end; padding: 28px; }
	.gallery { grid-template-columns: repeat(4, 1fr); }
	.gallery__item--main { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
	.imovel__grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
	.contact-card { position: sticky; top: 130px; }
}
@media (min-width: 1000px) {
	.cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
	.filters__box { padding: 4px 24px 8px; }
	.filters__box > summary { display: none; }
	.filters__form { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 14px; padding-top: 18px; align-items: end; }
	.filters__form > :nth-child(1) { grid-column: span 3; }
	.filters__form > :nth-child(2) { grid-column: span 3; margin-bottom: 12px; }
	.filters__form > :nth-child(3), .filters__form > :nth-child(4), .filters__form > :nth-child(5) { grid-column: span 2; }
	.filters__form > :nth-child(6) { grid-column: span 4; }
	.filters__form > :nth-child(7) { grid-column: span 5; }
	.filters__form > :nth-child(8) { grid-column: span 3; margin-bottom: 12px; }
	.filters__form .field-row .field { margin-bottom: 12px; }
}

@media print {
	.site-header, .site-footer, .wa-float, .contact-card, .lightbox, .crumbs, .hero-band, .filters { display: none !important; }
	body { background: #fff; }
	.imovel__head { background: none; color: #000; border: 0; padding: 0; }
	.imovel__head * { color: #000 !important; }
	.block { border: 1px solid #ccc; }
	.imovel__grid { display: block; }
	.gallery { grid-template-columns: repeat(3, 1fr); }
	.gallery__item--main { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
