/**
 * home.css — front-page.php.
 *
 * 2026-09-04: reescrito fiel a .specs/mockups/homepage-conteudo-apenas.html
 * (ver BACKLOG.md) — tokens do mockup traduzidos pros de main.css (--red →
 * --vermelho, --ink → --preto, --surface → --card, --border → --linha,
 * --green → --verde, --amber → --amarelo — mesma tradução já usada em
 * outras rodadas desta sessão). Depende de feirao-busca (busca.css) pelas
 * classes .card-veiculo/.cv-* dos "Destaques da semana" (reaproveitadas,
 * não duplicadas — só a moldura de scroll horizontal é nova aqui).
 *
 * Mini-site (.ms-hero/.ms-hero-com-capa) não foi tocado nesta rodada —
 * fora de escopo, mockup é só da home principal. 2026-09-19: adicionado
 * .ms-search-wrap (campo de busca restrita ao estoque da loja, reaproveita
 * .smart-search-box/.search-btn já existentes).
 */

.wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ================= HERO ================= */
.home-hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(115deg, #15161A 0%, #22242B 55%, #2E1416 100%);
	padding: 56px 24px 40px;
}
.home-hero-conteudo {
	position: relative;
	z-index: 2;
	max-width: 1200px;
	margin: 0 auto;
}
.home-hero h1 {
	font-family: 'Oswald', sans-serif;
	font-size: 36px;
	font-weight: 700;
	letter-spacing: -0.015em;
	margin: 0 0 10px;
	max-width: 640px;
	line-height: 1.15;
}
.home-hero h1 .accent {
	color: #FF6B6B;
}
.home-hero .sub {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.72);
	max-width: 520px;
	margin: 0 0 30px;
	line-height: 1.5;
}

.smart-search-wrap {
	max-width: 640px;
}
.smart-search-box {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--card);
	border-radius: 50px;
	padding: 8px 8px 8px 22px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.smart-search-box svg {
	color: var(--grafite-claro);
	flex-shrink: 0;
}
.smart-search-box input {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	font-size: 15px;
	color: var(--preto);
	padding: 10px 0;
	min-width: 0;
	font-family: 'Inter', sans-serif;
}
.search-btn {
	background: var(--vermelho);
	color: #fff;
	border: none;
	border-radius: 50px;
	padding: 12px 26px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
}
.search-btn:hover {
	background: var(--vermelho-escuro);
}

.search-suggestions {
	position: relative;
	margin-top: 8px;
	background: var(--card);
	border-radius: 10px;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	display: none;
}
.search-suggestions.show {
	display: block;
}
.suggestion-item {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 11px 16px;
	text-decoration: none;
	color: inherit;
}
.suggestion-item:hover {
	background: var(--fundo);
}
.suggestion-item .s-ic {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: var(--vermelho-tinta);
	color: var(--vermelho);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 10px;
	font-weight: 700;
}
.suggestion-item .s-name {
	font-size: 13px;
	font-weight: 700;
	flex: 1;
	color: var(--preto);
}
.suggestion-item .s-count {
	font-size: 11px;
	color: var(--grafite-claro);
	white-space: nowrap;
}
.suggestion-empty {
	padding: 14px 16px;
	font-size: 12.5px;
	color: var(--grafite-claro);
}

.search-subrow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 14px;
	flex-wrap: wrap;
	gap: 10px;
}
.location-chip {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	color: rgba(255, 255, 255, 0.75);
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	padding: 7px 13px;
	border-radius: 20px;
}
.location-chip svg {
	opacity: 0.8;
	flex-shrink: 0;
}
.advanced-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
}
.advanced-toggle:hover {
	color: #fff;
}
.advanced-toggle svg {
	transition: transform 0.15s ease;
}
.advanced-toggle.open svg {
	transform: rotate(180deg);
}

.advanced-filters {
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 14px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	padding: 16px;
}
.advanced-filters.show {
	display: grid;
}
.adv-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.adv-field label {
	font-size: 11px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.55);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.adv-field input,
.adv-field select {
	padding: 9px 11px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	font-size: 13px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-family: 'Inter', sans-serif;
}
.adv-field select option {
	color: var(--preto);
}

.hero-stats {
	display: flex;
	gap: 34px;
	padding: 22px 4px 0;
	flex-wrap: wrap;
}
.hero-stat {
	display: flex;
	align-items: baseline;
	gap: 8px;
}
.hero-stat .n {
	font-family: 'Oswald', sans-serif;
	font-size: 22px;
	color: #fff;
	/* 2026-09-04: Duvanir viu "0veículos anunciados" grudado em staging —
	   margin explícito além do gap do flex, redundância proposital (belt
	   and suspenders) já que o gap sozinho não bastou visualmente. */
	margin-right: 2px;
}
.hero-stat .l {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
}

/* ================= SEÇÕES GENÉRICAS ================= */
.wrap > .section-head,
section > .wrap > .section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 24px;
	flex-wrap: wrap;
	gap: 10px;
}
.section-head h2 {
	font-family: 'Oswald', sans-serif;
	font-size: 23px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0 0 5px;
}
.section-head p {
	font-size: 13.5px;
	color: var(--grafite-claro);
	margin: 0;
}
.see-all {
	font-size: 13px;
	font-weight: 700;
	color: var(--vermelho);
	text-decoration: none;
	white-space: nowrap;
}

main#primary.site-main > section {
	padding: 52px 0;
}
main#primary.site-main > section:first-child {
	padding-top: 0;
}

/* ================= MARCAS ================= */
.brands-strip {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding-bottom: 6px;
}
.brand-chip {
	flex: 0 0 auto;
	width: 96px;
	height: 76px;
	background: var(--card);
	border: 1px solid var(--linha);
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-decoration: none;
	transition: border-color 0.12s;
}
.brand-chip:hover {
	border-color: var(--vermelho);
}
.brand-chip .logo {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Oswald', sans-serif;
	font-weight: 700;
	font-size: 12px;
	color: #fff;
}
.brand-chip .logo-img {
	object-fit: contain;
	background: var(--fundo);
	padding: 4px;
}
.brand-chip .name {
	font-size: 11px;
	font-weight: 600;
	color: var(--grafite);
	text-align: center;
}

/* ================= DESTAQUES (scroll horizontal de card-veiculo.php) =================
   2026-09-11, pedido do Duvanir: a scrollbar nativa horizontal ficava
   feia — trocada por setas, mesmo racional visual já aplicado no hero/
   lightbox de single-veiculo.php (.tri-nav), replicado aqui em vez de
   compartilhado entre folhas de estilo (cada página carrega só o próprio
   CSS, sem dependência cruzada). */
.vehicle-scroll-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}
.vehicle-scroll {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding-bottom: 10px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.vehicle-scroll::-webkit-scrollbar {
	display: none;
}
.vehicle-scroll .card-veiculo {
	flex: 0 0 260px;
	scroll-snap-align: start;
}
.vehicle-scroll-nav {
	position: absolute;
	top: 0;
	bottom: 10px;
	margin: auto 0;
	background: rgba(18, 18, 20, 0.75);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	border: none;
	color: #fff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	z-index: 2;
}
.vehicle-scroll-nav:hover {
	background: rgba(18, 18, 20, 0.9);
}
.vehicle-scroll-nav svg {
	width: 20px;
	height: 20px;
}
.vehicle-scroll-nav.prev {
	left: 4px;
}
.vehicle-scroll-nav.next {
	right: 4px;
}
@media (max-width: 720px) {
	/* Mobile: sem espaço lateral pras setas de 40px, e touch-scroll já
	   funciona bem sem elas — mesmo racional do hero (.tri-nav some,
	   ver single-veiculo.css). */
	.vehicle-scroll-nav {
		display: none;
	}
}

/* ================= COMO FUNCIONA ================= */
.home-como-funciona {
	background: var(--fundo);
	border-top: 1px solid var(--linha);
	border-bottom: 1px solid var(--linha);
}
.steps-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}
.step-card {
	text-align: left;
}
.step-num {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--vermelho-tinta);
	color: var(--vermelho);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Oswald', sans-serif;
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 14px;
}
.step-card h4 {
	font-size: 14.5px;
	font-weight: 800;
	margin: 0 0 6px;
}
.step-card p {
	font-size: 12.5px;
	color: var(--grafite-claro);
	line-height: 1.5;
	margin: 0;
}

/* ================= PROCURO UM VEÍCULO ================= */
.procuro-banner {
	background: linear-gradient(120deg, #16171A, #2A1113);
	border-radius: 20px;
	padding: 40px 44px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	color: #fff;
	flex-wrap: wrap;
}
.procuro-banner .p-copy {
	flex: 1 1 320px;
}
.procuro-banner h3 {
	font-family: 'Oswald', sans-serif;
	font-size: 23px;
	font-weight: 700;
	margin: 0 0 8px;
	letter-spacing: -0.01em;
}
.procuro-banner p {
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.68);
	max-width: 440px;
	line-height: 1.55;
	margin: 0 0 18px;
}
.procuro-banner .btn-white {
	background: #fff;
	color: var(--preto);
	border: none;
	padding: 12px 22px;
	border-radius: 6px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}
.procuro-banner .p-visual {
	width: 150px;
	height: 150px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* ================= LOJAS EM DESTAQUE =================
   Card movido pra main.css em 2026-09-04 — .loja-card/.lojas-grid agora
   são reaproveitados também por archive-loja.php (/lojas/), que não
   carrega home.css. Ver template-parts/card-loja.php. */

/* ================= CTA DUPLA ================= */
.cta-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
.cta-card {
	border-radius: 20px;
	padding: 34px 30px;
	color: #fff;
	position: relative;
	overflow: hidden;
}
.cta-card.pf {
	background: linear-gradient(120deg, #D81324, #8F0D18);
}
.cta-card.pj {
	background: linear-gradient(120deg, #22242B, #111214);
}
.cta-card h3 {
	font-family: 'Oswald', sans-serif;
	font-size: 21px;
	font-weight: 700;
	margin: 0 0 8px;
	max-width: 280px;
}
.cta-card p {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.75);
	max-width: 300px;
	margin: 0 0 20px;
	line-height: 1.5;
}
.cta-card .btn-white {
	background: #fff;
	color: var(--preto);
	border: none;
	padding: 11px 20px;
	border-radius: 6px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

/* ================= CONFIANÇA ================= */
.home-trust {
	padding-top: 0;
}
.trust-row {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}
.trust-item {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 220px;
}
.trust-ic {
	width: 42px;
	height: 42px;
	border-radius: 11px;
	background: var(--vermelho-tinta);
	color: var(--vermelho);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.trust-item .t-title {
	font-size: 13px;
	font-weight: 800;
	margin-bottom: 2px;
}
.trust-item .t-desc {
	font-size: 11.5px;
	color: var(--grafite-claro);
}

/* ================= Mini-site (não tocado nesta rodada) ================= */
.ms-hero {
	background-size: cover;
	background-position: center;
	position: relative;
}
.ms-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(18, 18, 20, 0.72);
}
.ms-hero .home-hero-conteudo {
	position: relative;
}
.ms-hero-com-capa {
	min-height: 400px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ms-search-wrap {
	margin-top: 8px;
}
.home-recentes,
.home-recentes-cabecalho,
.home-recentes-grid,
.home-recentes .vehicle-scroll-wrap {
	max-width: 1200px;
	margin: 0 auto;
}
.home-recentes {
	padding: 44px 20px;
}
.home-recentes-cabecalho {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 18px;
}
.home-recentes-cabecalho h2 {
	font-family: 'Oswald', sans-serif;
	font-size: 21px;
}
.home-recentes-cabecalho a {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--vermelho);
}
.home-recentes-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 18px;
}

@media (max-width: 900px) {
	.home-hero h1 {
		font-size: 27px;
	}
	.smart-search-box {
		flex-wrap: wrap;
		border-radius: 14px;
		padding: 14px;
	}
	.smart-search-box input {
		flex: 1 1 100%;
		order: 1;
		padding: 4px 0 10px;
	}
	.smart-search-box svg {
		order: 0;
	}
	.search-btn {
		order: 2;
		width: 100%;
		justify-content: center;
	}
	.search-subrow {
		flex-direction: column;
		align-items: flex-start;
	}
	.advanced-filters {
		grid-template-columns: 1fr;
	}
	.steps-grid {
		grid-template-columns: 1fr 1fr;
	}
	/* 3 estatísticas (veículos/lojas/cidades) com texto de largura variável
	   quebravam 2+1 no flex-wrap (achado ao vivo, 2026-09-14, auditoria
	   mobile da home) — o 3º item ("cidades atendidas") sobrava sozinho
	   numa linha, com aparência de erro. Empilhado (1 por linha) evita
	   qualquer quebra desigual, independente do comprimento do texto. */
	.hero-stats {
		flex-direction: column;
		gap: 10px;
	}
	.cta-grid {
		grid-template-columns: 1fr;
	}
	.procuro-banner {
		padding: 30px 24px;
	}
	.procuro-banner .p-visual {
		display: none;
	}
	.trust-row {
		flex-direction: column;
	}
	/* .trust-item usa `flex: 1 1 220px` pensado pro layout em linha (220px
	   de LARGURA) — em column, flex-basis vira ALTURA, forçando cada item
	   (~40px de conteúdo real) a ocupar 220px de altura vazia (achado ao
	   vivo, 2026-09-14, auditoria mobile da home: gaps enormes entre
	   "Localização automática"/"Fale direto pelo WhatsApp"/etc). Reset pro
	   conteúdo ditar a altura de verdade. */
	.trust-item {
		flex-basis: auto;
	}
	.ms-hero-com-capa {
		min-height: 260px;
	}
}
