/* ==========================================================================
   Alleimob Signature — páginas internas: imóvel e portfólio (usa home.css)
   ========================================================================== */

/* Cabeçalho sempre escuro nas páginas internas */
.inner .hd { background: rgba(11,11,10,.96); }
.inner { background: var(--paper); }
html.lb-lock, html.lb-lock body { overflow: hidden; }

.btn-outline-dark { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; }
.btn-wa svg { fill: currentColor; stroke: none; }

/* ---------- Galeria ---------- */
.pg { position: relative; background: var(--ink); }
.pg-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pg-grid::-webkit-scrollbar { display: none; }
.pg-item { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; max-height: 72svh; padding: 0; border: 0; background: var(--ink-2); cursor: zoom-in; overflow: hidden; }
.pg-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.7,.2,1), filter .4s; }
.pg-count { position: absolute; right: 14px; bottom: 14px; font-size: 12px; letter-spacing: .06em; color: #fff; background: rgba(11,11,10,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 5px 11px; border-radius: 999px; pointer-events: none; }
.pg-all { display: none; }
.pg-none { aspect-ratio: 16 / 7; display: grid; place-content: center; text-align: center; color: var(--gold); background: radial-gradient(circle at 50% 40%, #222 0%, var(--ink) 70%); }
.pg-none .brand-name { font-size: 40px; }
.pg-none small { color: rgba(255,255,255,.55); letter-spacing: .2em; text-transform: uppercase; font-size: 11px; }

/* ---------- Layout ---------- */
.pd-layout { display: grid; gap: 8px; padding-top: 26px; padding-bottom: 64px; }
.pd-main { min-width: 0; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold-deep); }
.crumbs span { color: var(--line); }

.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pd-tag { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); color: var(--gold-deep); }
.pd-tag-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.pd-tag-warn { background: #FFF6E0; border-color: #F0D9A0; color: #8A6A1C; }
.pd-tag-sold { background: var(--ink); border-color: var(--ink); color: #fff; }

.pd-head h1 { font-size: clamp(32px, 8vw, 54px); line-height: 1.05; max-width: 22ch; text-wrap: balance; }
.pd-sub { margin: 12px 0 0; font-size: 16px; color: var(--muted); }
.pd-place { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 14px; color: #3D3A35; }
.pd-place svg { width: 17px; height: 17px; fill: none; stroke: var(--gold-deep); stroke-width: 1.7; flex: none; }

.pd-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.pd-price small { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pd-price strong { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 7vw, 42px); line-height: 1.1; }
.pd-tools { display: flex; align-items: center; gap: 8px; }
.pd-code { font-size: 12px; color: var(--muted); margin-right: 4px; }
.pd-icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; transition: border-color .2s, transform .2s; }
.pd-icon-btn:hover { border-color: var(--gold); transform: translateY(-1px); }
.pd-icon-btn svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; }
.fav-inline.is-on svg { fill: #C0392B; stroke: #C0392B; }
.pd-icon-btn.is-copied::after { content: "Link copiado"; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; background: var(--ink); color: #fff; padding: 5px 10px; border-radius: 8px; }

/* Números principais */
.facts { list-style: none; margin: 26px 0 0; padding: 18px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fact-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; }
.fact-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-deep); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fact-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.fact-txt strong { font-weight: 500; font-size: 16px; }
.fact-txt small { font-size: 12px; color: var(--muted); }

/* Seções do conteúdo */
.pd-sec { padding: 38px 0 0; }
.pd-sec h2 { font-size: clamp(28px, 6vw, 38px); margin-bottom: 14px; }
.pd-muted { color: var(--muted); margin: 0 0 18px; font-size: 14px; }

.pd-desc { position: relative; color: #3D3A35; font-size: 15.5px; line-height: 1.75; }
.pd-desc p { margin: 0 0 14px; }
.pd-desc p:first-child { font-family: var(--serif); font-size: 24px; line-height: 1.3; color: var(--ink); }
.pd-desc h4 { font-family: var(--serif); font-weight: 600; font-size: 22px; color: var(--ink); margin: 26px 0 10px; }
.pd-desc strong { font-weight: 500; color: var(--ink); }
.pd-desc ul { margin: 0 0 16px; padding-left: 20px; }
.pd-desc li { margin-bottom: 6px; }
.pd-desc li::marker { color: var(--gold); }
.pd-desc a { color: var(--gold-deep); word-break: break-all; }
.pd-desc.is-cut { max-height: 420px; overflow: hidden; }
.pd-desc.is-cut::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%); }
.pd-more { margin-top: 14px; border: 0; background: none; padding: 0; font-weight: 500; font-size: 14px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; cursor: pointer; }

.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feat li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; }
.feat svg { flex: none; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--gold-deep); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.map { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M0 60h120M60 0v120' stroke='%23E6E0D5' stroke-width='1'/%3E%3Cpath d='M0 20c40 10 80-10 120 5M0 95c30-15 70 10 120-8' stroke='%23DCCFB4' stroke-width='2' fill='none'/%3E%3C/svg%3E"); display: grid; place-items: center; aspect-ratio: 16 / 7; }
.map.is-on { aspect-ratio: 16 / 10; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-load { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 12px 20px; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 8px 24px rgba(11,11,10,.08); }
.map-load svg { width: 18px; height: 18px; fill: none; stroke: var(--gold-deep); stroke-width: 1.8; }

.broker { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; margin-top: 38px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.broker img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.broker small { display: block; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }
.broker strong { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.15; }
.broker span { font-size: 12.5px; color: var(--muted); }
.broker .btn { grid-column: 1 / -1; min-height: 44px; }

/* Formulário de visita */
.pd-side { scroll-margin-top: calc(var(--hd-h) + 16px); }
.book { margin-top: 30px; background: var(--soft); border-radius: 20px; padding: 24px 20px; }
.book h2 { font-size: 32px; margin-bottom: 8px; }
.book-sub { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); }
.book-form { display: grid; gap: 12px; }
.book .fld input, .book .fld select { background: #fff; }
.book .cform-msg { margin: 0; }
.book-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--muted); font-size: 12px; }
.book-or::before, .book-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.book .cform-note { margin-top: 14px; }
.book .cform-note a { color: inherit; }

/* Veja também */
.pd-similar .sec-head-row .btn { align-self: flex-start; }

/* ---------- Fotos em tela cheia ---------- */
.lb { position: fixed; inset: 0; z-index: 120; background: rgba(8,8,7,.97); display: none; grid-template-rows: auto 1fr auto; color: #fff; }
.lb.is-open { display: grid; animation: lbIn .25s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 14px 10px 20px; }
.lb-count { font-size: 13px; letter-spacing: .08em; color: rgba(255,255,255,.75); }
.lb-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 0 8px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(11,11,10,.5); display: none; place-items: center; cursor: pointer; }
.lb-nav svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav:hover { background: var(--gold); border-color: var(--gold); }
.lb-nav:hover svg { stroke: var(--ink); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.lb-thumbs::-webkit-scrollbar { display: none; }
.lb-th { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #222; cursor: pointer; opacity: .5; transition: opacity .2s, border-color .2s; }
.lb-th img { width: 100%; height: 100%; object-fit: cover; }
.lb-th.is-on { opacity: 1; border-color: var(--gold); }

/* ---------- Imóvel não encontrado ---------- */
.nf { background: var(--soft); }
.nf-in { min-height: 60svh; display: flex; flex-direction: column; justify-content: center; padding-top: 70px; padding-bottom: 90px; max-width: 720px; }
.nf h1 { font-size: clamp(36px, 8vw, 56px); margin-bottom: 14px; }
.nf p:not(.eyebrow) { color: var(--muted); }
.nf-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ==========================================================================
   Portfólio (casas.php)
   ========================================================================== */
.ph { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,10,.35), rgba(11,11,10,.85)); }
.ph-in { position: relative; z-index: 1; padding-top: 54px; padding-bottom: 92px; }
.ph h1 { font-size: clamp(40px, 10vw, 68px); }
.ph p:not(.eyebrow) { margin: 12px 0 0; max-width: 560px; color: rgba(255,255,255,.78); font-weight: 300; }

.pf { position: relative; z-index: 2; margin-top: -56px; }
.pf-card { background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(11,11,10,.12); padding: 16px; }
.pf-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; background: none; padding: 4px 2px; font-weight: 500; font-size: 15px; cursor: pointer; }
.pf-toggle svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.pf-toggle em { font-style: normal; font-size: 12px; color: var(--ink); background: var(--gold-soft); border-radius: 999px; padding: 2px 9px; margin-left: 6px; }
.pf-fields { display: none; gap: 12px; margin-top: 14px; }
.pf-card.is-open .pf-fields { display: grid; }
.pf .fld > span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.pf .fld select, .pf .fld input { min-height: 46px; font-size: 15px; }
.pf-go { min-height: 46px; }

.pl { padding: 36px 0 80px; }
.pl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.pl-count { margin: 0; font-size: 14px; color: var(--muted); }
.pl-count strong { color: var(--ink); font-weight: 500; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; text-decoration: none; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.pl-chip:hover { border-color: var(--gold); }
.pl-chip b { font-weight: 400; color: var(--muted); }
.pl-sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pl-sort select { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: #fff; font-size: 13.5px; color: var(--ink); cursor: pointer; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.pager a, .pager span { min-width: 44px; height: 44px; padding: 0 12px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 14px; background: #fff; }
.pager a:hover { border-color: var(--gold); }
.pager .is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .gap { border: 0; background: none; min-width: 20px; padding: 0; }

.pl-empty { text-align: center; padding: 50px 20px; background: var(--soft); border-radius: 20px; }
.pl-empty h2 { font-size: 34px; margin-bottom: 8px; }
.pl-empty p { color: var(--muted); margin: 0 0 20px; }
.pl-empty .btn { margin: 4px; }

/* ===================== Telas maiores ===================== */
@media (min-width: 600px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .feat { grid-template-columns: 1fr 1fr; }
  .broker { grid-template-columns: auto 1fr auto; }
  .broker .btn { grid-column: auto; }
  .broker:not(:has(img)) { grid-template-columns: 1fr auto; }
  .book { padding: 28px; }
  .pf-fields { grid-template-columns: 1fr 1fr; }
  .pf-fields .fld-q { grid-column: 1 / -1; }
  .pf-go { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  /* Galeria em mosaico: foto grande + 4 menores */
  .pg { padding: 16px 0 0; background: var(--paper); }
  .pg-grid { max-width: 1240px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: min(62vh, 600px); min-height: 420px; overflow: hidden; }
  .pg-item { aspect-ratio: auto; max-height: none; border-radius: 0; }
  .pg-item:nth-child(n+6) { display: none; }
  .pg-item:first-child { grid-row: 1 / 3; border-radius: 18px 0 0 18px; }
  .pg-item:nth-child(3) { border-top-right-radius: 18px; }
  .pg-item:nth-child(5) { border-bottom-right-radius: 18px; }
  .pg-item:hover img { transform: scale(1.04); filter: brightness(.92); }
  .pg-n1 { grid-template-columns: 1fr; }
  .pg-n1 .pg-item:first-child { border-radius: 18px; }
  .pg-n2 { grid-template-columns: 1.6fr 1fr; }
  .pg-n2 .pg-item:nth-child(2) { grid-row: 1 / 3; border-radius: 0 18px 18px 0; }
  .pg-n3 { grid-template-columns: 2fr 1fr; }
  .pg-n3 .pg-item:nth-child(2) { border-top-right-radius: 18px; }
  .pg-n3 .pg-item:nth-child(3) { border-radius: 0 0 18px 0; }
  .pg-n4 { grid-template-columns: 2fr 1fr 1fr; }
  .pg-n4 .pg-item:nth-child(2) { grid-row: 1 / 3; }
  .pg-n4 .pg-item:nth-child(3) { border-top-right-radius: 18px; }
  .pg-n4 .pg-item:nth-child(4) { grid-column: 3; border-bottom-right-radius: 18px; }
  .pg-count { display: none; }
  .pg-all { position: absolute; right: calc(max(0px, (100% - 1240px) / 2) + 48px); bottom: 20px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); padding: 11px 18px; font-size: 13.5px; font-weight: 500; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
  .pg-all:hover { background: var(--gold); }
  .pg-all svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .pg-none { max-width: 1248px; margin: 0 auto; border-radius: 18px; aspect-ratio: 16 / 5; }

  .pd-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; padding-top: 40px; padding-bottom: 100px; align-items: start; }
  .pd-side { position: sticky; top: calc(var(--hd-h) + 24px); }
  .book { margin-top: 0; background: #fff; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(11,11,10,.08); }
  .facts { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
  .pd-sec { padding-top: 54px; }
  .lb-nav { display: grid; }
  .lb-stage { padding: 0 90px 8px; }
  .lb-thumbs { justify-content: center; }
  .lb-th { width: 84px; height: 60px; }

  .ph-in { padding-top: 80px; padding-bottom: 130px; }
  .pf { margin-top: -64px; }
  .pf-card { padding: 10px; border-radius: 999px; }
  .pf-toggle { display: none; }
  .pf-fields, .pf-card.is-open .pf-fields { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr auto; align-items: end; gap: 0; margin: 0; }
  .pf .fld { padding: 6px 18px; border-right: 1px solid var(--line); }
  .pf .fld:nth-last-child(2) { border-right: 0; }
  .pf .fld-q { grid-column: auto; }
  .pf .fld select, .pf .fld input { border: 0; min-height: 30px; padding: 0; box-shadow: none !important; background: transparent; }
  .pf-go { grid-column: auto; border-radius: 999px; min-height: 56px; padding: 0 28px; }
  .pl { padding: 48px 0 110px; }
}

/* Guias do blog na página do imóvel e texto da cidade no portfólio */
.pd-guides ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pd-guides li { border-bottom: 1px solid var(--line); }
.pd-guides a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; color: inherit; text-decoration: none; font-size: 15px; }
.pd-guides a::after { content: "→"; color: var(--gold-deep); }
.pd-guides a:hover { color: var(--gold-deep); }
.pl-intro { max-width: 760px; margin: 0 0 28px; color: #5c5a55; font-size: 15px; line-height: 1.7; }
.pl-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 40px 0 0; font-size: 14px; }
.pl-links a { color: inherit; }
