/* =====================================================================
   Fácil Gado — M1 Vitrine (home, lista, ficha, vendido)
   Complementa app.css. Mobile-first, sem overflow em 360 px, alvos ≥ 44 px,
   movimento discreto e desligado em prefers-reduced-motion.
   ===================================================================== */

/* ---------- Alvos de toque ≥ 44 px nas telas da vitrine ---------- */
.vt-chips .chip, .vt-regions .chip, .vt-quick .chip, .vt-active .chip { min-height: 44px; }
.vt-types a, .vt-type span { min-height: 44px; }
.vt-results .pagination a, .vt-results .pagination span { min-width: 44px; height: 44px; }
.ad-gallery .gallery-nav { width: 44px; height: 44px; }
.vt-card .fav { width: 44px; height: 44px; }

/* ---------- Home: hero e busca rápida ---------- */
.vt-hero-title { max-width: 18ch; overflow-wrap: anywhere; }
.vt-hero .lead { max-width: 56ch; }
.vt-hero-search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: end; max-width: 880px; }
.vt-hero-search .segmented { justify-self: start; max-width: 100%; }
.vt-hero-search .btn { width: 100%; }
.vt-hero-field { display: grid; gap: .25rem; min-width: 0; }
.vt-hero-field label { padding-inline: .35rem; font-size: .78rem; font-weight: 650; color: var(--text-2); }
.vt-hero-field .select { min-height: 52px; }
.vt-type input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (min-width: 760px) {
  .vt-hero-search { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; }
  .vt-hero-search .segmented { align-self: end; margin-bottom: 4px; }
  .vt-hero-search .btn { width: auto; }
}
.vt-hero-links { margin-top: 14px; --gap: .5rem; }
.vt-hero-stats strong small { font-size: .55em; font-family: var(--font-sans); color: var(--text-3); margin-left: 2px; }

/* Hero com foto (Nelore no pasto, domínio público). Celular: foto em pé com o boi no centro; computador: boi à direita do texto. */
.vt-hero--photo { color: #fff; background: var(--green-950); display: flex; align-items: center; min-height: min(84svh, 760px); padding-block: clamp(32px, 8vw, 112px) clamp(40px, 7vw, 96px); }
.vt-hero--photo::before, .vt-hero--photo::after { content: none; }
.vt-hero--photo > .container { width: 100%; }
.vt-hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.vt-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; transform-origin: 50% 70%; animation: vt-hero-zoom 24s var(--ease) both; }
.vt-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(4 24 16 / .82) 0%, rgb(4 24 16 / .5) 34%, rgb(4 24 16 / .55) 62%, rgb(4 24 16 / .92) 100%); }
@media (min-width: 700px) {
  .vt-hero-bg img { object-position: 70% 72%; }
  .vt-hero-bg::after { background: linear-gradient(90deg, rgb(4 24 16 / .92) 0%, rgb(4 24 16 / .74) 36%, rgb(4 24 16 / .18) 70%, rgb(4 24 16 / .04) 100%), linear-gradient(0deg, rgb(4 24 16 / .6), transparent 38%); }
}
@media (max-width: 699px) {
  /* Celular: a foto vira uma faixa no topo (boi inteiro à mostra) e o texto entra no degradê logo abaixo. */
  .vt-hero--photo { --band: min(72vw, 380px); min-height: 0; align-items: flex-start; padding-top: calc(var(--band) - 44px); }
  .vt-hero-bg { bottom: auto; height: var(--band); }
  .vt-hero-bg img { object-position: 50% 45%; }
  .vt-hero-bg::after { background: linear-gradient(180deg, rgb(4 24 16 / .05) 0%, rgb(4 24 16 / .12) 50%, rgb(6 35 26 / .85) 85%, var(--green-950) 100%); }
  .vt-hero--photo .eyebrow { font-size: .7rem; }
  /* minmax(0, 1fr) + quebra de linha: em 320 px "Estou procurando" (nowrap) passava da borda da tela */
  .vt-hero--photo .vt-hero-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .vt-hero--photo .vt-hero-links .btn { min-width: 0; padding-inline: .6rem; font-size: .86rem; gap: .35rem; white-space: normal; text-align: center; line-height: 1.15; }
  .vt-hero-credit { top: 6px; bottom: auto; }
}
/* Até 374 px (320 e 360 do Android) sem ícone: o texto cabe numa linha */
@media (max-width: 374.98px) { .vt-hero--photo .vt-hero-links .btn .icon { display: none; } }
@keyframes vt-hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.vt-hero--photo .eyebrow { color: var(--lime-300); }
.vt-hero--photo .vt-hero-title { color: #fff; font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4rem); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; text-shadow: 0 2px 30px rgb(0 0 0 / .28); }
.vt-hero--photo .lead { color: rgb(255 255 255 / .88); font-size: clamp(1rem, .95rem + .35vw, 1.2rem); }
.vt-hero--photo .hero-search { border-color: transparent; box-shadow: 0 24px 60px -18px rgb(0 0 0 / .55); }
.vt-hero--photo .vt-hero-links .btn { color: #fff; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.vt-hero--photo .vt-hero-links .btn:hover { background: rgb(255 255 255 / .2); }
.vt-hero--photo .hero-stats strong { color: #fff; }
.vt-hero--photo .hero-stats span, .vt-hero--photo .hero-stats strong small { color: rgb(255 255 255 / .74); }
.vt-hero-credit { position: absolute; right: 10px; bottom: 6px; font-size: .66rem; color: rgb(255 255 255 / .55); }
@media (prefers-reduced-motion: reduce) { .vt-hero-bg img { animation: none; } }

/* Faixa do Selo de Confiança e chamadas de captação */
.vt-seal-band { display: grid; gap: 1rem; align-items: center; grid-template-columns: auto minmax(0, 1fr); }
.vt-seal-band > .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 860px) { .vt-seal-band { grid-template-columns: auto minmax(0, 1fr) auto; } .vt-seal-band > .btn { grid-column: auto; } }
.vt-cta-grid { --gap: 16px; }
.vt-cta-alt { background: var(--green-800); }
.vt-eyebrow-light { color: var(--lime-300); }
.vt-steps { padding: 0; list-style: none; }
@media (min-width: 860px) { .vt-steps { grid-template-columns: repeat(3, 1fr); } }
.vt-regions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Card da vitrine ---------- */
/* As regras do card (.listing-card / .vt-card) ficam só no app.css: o card também aparece na conta e no painel, que não carregam este arquivo. */
.vt-grid { --gap: 16px; }

/* ---------- Vitrine: cabeçalho, barra e filtros ---------- */
.vt-head { padding-top: 18px; }
.vt-head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1.5rem; margin-top: .5rem; }
.vt-h1 { font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem); overflow-wrap: anywhere; }
.vt-types { max-width: 100%; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; } /* se não couber: desliza, com esmaecido do app.js */
@media (max-width: 359.98px) { .vt-types a { padding-inline: .7rem; } } /* Todos · Gado · Fazendas cabem inteiros em 320 px */
/* Computador/mouse: as categorias quebram linha (app.css); um pouco mais justas, cabem numa linha só de 1280 px para cima
   e a barra fixa de busca fica baixa. */
@media (min-width: 768px) and (min-height: 500px), (hover: hover) and (pointer: fine) { .vt-chips:not(.vt-wrap) { gap: .4rem; } .vt-chips .chip { padding-inline: .75rem; } }
.vt-types::-webkit-scrollbar { display: none; }
.vt-bar { margin-top: 12px; }
.vt-bar-row { display: flex; gap: .5rem; align-items: center; }
.vt-search { display: flex; gap: .5rem; flex: 1 1 auto; min-width: 0; }
.vt-search .input-icon { flex: 1 1 auto; min-width: 0; }
.vt-search .input { min-height: 46px; }
.vt-search-btn { flex: none; min-height: 46px; padding-inline: .8rem; }
@media (min-width: 768px) { .vt-search-btn { padding-inline: 1.1rem; } }
.vt-filter-btn { flex: none; min-height: 46px; }
/* Em telas estreitas o botão fica só com o ícone (o nome "Filtros" segue para o leitor de tela) e a busca ganha espaço */
@media (max-width: 399.98px) {
  .vt-filter-btn { min-width: 46px; padding-inline: .7rem; }
  .vt-filter-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}
.vt-thermo-note { display: flex; gap: .35rem; align-items: flex-start; margin-top: 12px; }
.vt-thermo-note .icon { flex: none; margin-top: 1px; }
.vt-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--brand); color: var(--brand-contrast); font-size: .75rem; font-weight: 750; }

.vt-layout { display: grid; gap: 24px; padding-top: 4px; }
.vt-results { min-width: 0; }
.vt-total { margin: 0; }
.vt-sort { display: flex; align-items: center; gap: .5rem; }
.vt-sort .select { width: auto; min-height: 44px; padding-block: .45rem; }
.vt-active { margin-bottom: 16px; }
.vt-active .chip .icon { opacity: .8; }
.vt-nudge { margin-top: 28px; }
.vt-wrap { flex-wrap: wrap; mask-image: none; overflow: visible; }
.vt-seal-filter { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .5rem; }
.vt-seal-filter label { cursor: pointer; }
.vt-seal-filter input:focus-visible + .chip { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Painel de filtros: bottom sheet no celular (abre por :target sem JS ou .is-open com JS) */
.vt-sheet { min-width: 0; }
.vt-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.vt-sheet-body { padding: 16px; }
.vt-sheet-foot { display: flex; gap: .6rem; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.vt-sheet-foot .btn { flex: 1; }
@media (max-width: 1023.98px) {
  .vt-sheet {
    position: fixed; z-index: 85; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column;
    max-height: 88dvh; background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-lg);
    transform: translateY(105%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s;
  }
  .vt-sheet:target, .vt-sheet.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .vt-sheet-head { position: relative; padding-top: 22px; }
  .vt-sheet-head::before { content: ""; position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); }
  .vt-sheet-form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
  .vt-sheet-body { overflow-y: auto; overscroll-behavior: contain; padding-inline: var(--gutter); flex: 1 1 auto; }
  .vt-sheet-foot { padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
  .vt-scrim { position: fixed; inset: 0; z-index: 84; background: rgb(6 20 14 / .5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .vt-scrim.is-visible { opacity: 1; pointer-events: auto; }
  :root.vt-lock, :root.vt-lock body { overflow: hidden; }
}
@media (min-width: 1024px) {
  .vt-layout { grid-template-columns: 280px minmax(0, 1fr); align-items: start; gap: 32px; }
  .vt-sheet { position: sticky; top: calc(var(--header-h) + 96px); max-height: calc(100dvh - var(--header-h) - 112px); overflow-y: auto; scrollbar-width: thin; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
  .vt-sheet [data-sheet-close], .vt-filter-btn { display: none; }
  .vt-sheet-foot { position: sticky; bottom: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
}

/* ---------- Ficha do anúncio ---------- */
.ad { padding-top: 14px; }
.ad .breadcrumbs { margin-bottom: 12px; }
.ad-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "gallery" "aside" "main"; }
.ad-gallery { grid-area: gallery; min-width: 0; }
.ad-aside { grid-area: aside; min-width: 0; }
.ad-main { grid-area: main; min-width: 0; }
@media (min-width: 1024px) {
  .ad-grid { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "gallery aside" "main aside"; column-gap: 40px; row-gap: 32px; align-items: start; }
  .ad-aside { grid-row: 1 / span 2; align-self: stretch; }
  .ad-box { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100dvh - var(--header-h) - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; }
}
/* Notebook baixo (768 px ou menos de altura útil): a caixa segue a página, sem rolagem interna escondendo os botões */
@media (min-width: 1024px) and (max-height: 820px) {
  .ad-box { position: static; max-height: none; overflow: visible; padding-right: 0; }
  /* ...e, ao rolar para a descrição, a barra de preço + oferta do celular aparece embaixo (alinhada ao conteúdo) */
  .sticky-cta { display: flex; bottom: 0; padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))); }
}
/* Onde a barra aparece, o fim do rodapé não fica escondido atrás dela */
@media (max-width: 1023.98px), (min-width: 1024px) and (max-height: 820px) {
  body:has([data-sticky-cta]) .site-footer { padding-bottom: calc(32px + 72px); }
}
/* Teclado: com o foco no botão da barra, ela aparece mesmo antes de rolar (senão o foco fica fora da tela) */
.sticky-cta:focus-within { transform: none; }
/* Notebook baixo: com a barra na tela, o aviso (toast) sobe acima dela e não tapa o botão (celular/tablet: app.css) */
@media (min-width: 1024px) and (max-height: 820px) {
  body:has(.sticky-cta.is-visible, .sticky-cta:focus-within) .toasts { bottom: 88px; }
}
/* Seções da ficha: 28 px entre elas no celular e 40 px no computador; dentro de cada uma, o espaço normal (1rem).
   (Antes o .stack-xl no .ad-main não separava as seções e ainda vazava 40 px para dentro delas.) */
:where(.ad-main) > * { --stack: 1rem; }
.ad-main > * + * { margin-top: 1.75rem; }
@media (min-width: 1024px) { .ad-main > * + * { margin-top: 2.5rem; } }
.ad-title { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem); overflow-wrap: anywhere; }
.ad-price .big small { font-family: var(--font-sans); font-size: .9rem; font-weight: 650; color: var(--text-3); letter-spacing: 0; }
.ad-price .big { overflow-wrap: anywhere; }
.price-box .rows div { flex-wrap: wrap; }
.vt-convention, .vt-commission { display: flex; gap: .35rem; align-items: flex-start; }
.vt-commission { display: block; color: var(--text-2); }
.vt-share { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: .25rem; }
.vt-share .btn, .vt-share form { width: 100%; padding-inline: .5rem; }
.vt-share form .btn { width: 100%; }
/* "Enviar para alguém" (wa.me) só no computador: no celular o "Compartilhar" já abre o WhatsApp */
@media (max-width: 1023.98px) { .vt-share .vt-share-wa { display: none; } }
.vt-share .btn { white-space: normal; text-align: center; line-height: 1.15; } /* com "Salvar" são 3 botões em 400 px: o rótulo quebra em vez de vazar */
.vt-share form { display: flex; } /* "Salvar" com a mesma altura dos vizinhos */
.vt-fav[aria-pressed="true"] { color: #e0245e; }
.vt-fav[aria-pressed="true"] .icon { fill: currentColor; }
.vt-seal-mini { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--text-2); }
.trust-ring.sm { --size: 34px; }
.trust-ring.sm span { font-size: 11px; }

/* Galeria: vídeo vertical sem corte (CSS-11), fachada do embed */
.ad-gallery .gallery-main video, .ad-gallery .gallery-main iframe { object-fit: contain; background: #000; }
.ad-gallery .gallery-thumb { flex-basis: 64px; }
@media (min-width: 640px) { .ad-gallery .gallery-thumb { flex-basis: 84px; } }

/* Ícone dentro de texto corrido (o reset deixa svg como bloco) */
:is(.ad, .vt-dialog, .vt-preview, .vt-head) :is(p, h2, h3, li, dd) > .icon { display: inline-block; vertical-align: -.2em; }
.ad p > a > .icon { display: inline-block; vertical-align: -.2em; } /* "Simular o ponto de compra": ícone na mesma linha do link */
.ad-gallery .gallery-thumb { display: grid; place-items: center; background: var(--green-950); }
.vt-thumb-video { font-size: .7rem; font-weight: 700; color: #dff3e6; text-transform: uppercase; letter-spacing: .06em; }
.ad-gallery .gallery-thumb .play .icon { width: 22px; height: 22px; }

/* Selo, detalhes e descrição */
.vt-trust-head { display: flex; gap: 16px; align-items: center; }
.vt-trust-list { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .vt-trust-list { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; } }
.vt-trust-list .icon { margin-top: 2px; }
.vt-details { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.vt-details > div { display: grid; gap: .2rem; padding: 14px 16px; border-top: 1px solid var(--line); }
.vt-details > div:first-child { border-top: 0; }
.vt-details dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; }
.vt-details dd { overflow-wrap: anywhere; }
@media (min-width: 640px) { .vt-details > div { grid-template-columns: 180px minmax(0, 1fr); gap: 1rem; } }
.vt-more summary { list-style: none; cursor: pointer; display: grid; gap: .75rem; justify-items: start; }
.vt-more summary::-webkit-details-marker { display: none; }
.vt-more summary:focus-visible .vt-more-btn { outline: 2px solid var(--focus); outline-offset: 2px; }
.vt-more .vt-more-close, .vt-more[open] .vt-more-open, .vt-more[open] .vt-more-preview { display: none; }
.vt-more[open] .vt-more-close { display: inline; }
.vt-more[open] summary { order: 2; margin-top: .75rem; }
.vt-more[open] { display: flex; flex-direction: column; }
.ad-main .spec dd { overflow-wrap: anywhere; }
.vt-similar-cta { padding: clamp(22px, 4vw, 36px); }

/* Formulários em diálogo */
.vt-use-ask { margin-top: .35rem; padding-inline: .6rem; }
.vt-offer-total { display: grid; gap: .35rem; padding: 14px 16px; }
.vt-legal { display: grid; gap: .3rem; padding-left: 1.1rem; }
dialog.vt-dialog .modal-foot { flex-wrap: wrap; }
/* Sem JS: o link #oferta/#interesse mostra o diálogo como painel fixo */
dialog.modal:target:not([open]) { display: flex; flex-direction: column; position: fixed; inset: auto 0 0 0; z-index: 90; margin: 0 auto; max-height: 92dvh; }

/* Faixa de prévia (equipe) */
.vt-preview { background: var(--warning-soft); border-bottom: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); padding-block: 10px; }
.vt-preview p { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

/* ---------- Vendido / encerrado ---------- */
/* minmax(0, 1fr): o botão "Quero um lote parecido" (nowrap) alargava a trilha e o card cortava a borda direita em 320 px */
.vt-sold-card { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.vt-sold-card .btn { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 379.98px) { .vt-sold-card .btn-lg { padding-inline: 1rem; font-size: 1rem; } }
@media (min-width: 860px) { .vt-sold-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; } }
.vt-sold-media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.vt-sold-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.65) brightness(.9); }
.vt-stamp { position: absolute; left: 18px; top: 18px; padding: .35rem 1rem; border: 3px solid #fff; border-radius: 12px; background: rgb(11 51 38 / .62); color: #fff; font-family: var(--font-display); font-size: clamp(1.2rem, 1rem + 1vw, 1.7rem); font-weight: 800; letter-spacing: .05em; text-transform: uppercase; transform: rotate(-6deg); box-shadow: var(--shadow); animation: vt-stamp .6s var(--ease-spring) both; }
@keyframes vt-stamp { from { opacity: 0; transform: rotate(-6deg) scale(1.4); } }

@media (prefers-reduced-motion: reduce) {
  .vt-sheet, .vt-scrim { transition: none !important; }
  .vt-stamp { animation: none; }
}
/* Sem JS o .reveal do app.css ficaria invisível (opacity 0): nas telas da vitrine o conteúdo aparece sempre */
@media (scripting: none) {
  .reveal { opacity: 1; transform: none; }
}
