/* ==========================================================================
   [dc_home] — página inicial completa, no estilo do print de referência
   (hero vermelho/escuro com diagonais, busca flutuante, seções de
   "Carros/Motos Recentes", banners de anúncio, categorias e lojas).
   Tudo escopado em .dc-shortcode-scope (ver frontend.css) + .dc-home-shortcode,
   com !important nas propriedades visuais mais visadas por temas/Bricks,
   pelo mesmo motivo documentado em frontend.css.
   ========================================================================== */

.dc-shortcode-scope.dc-home-shortcode {
	display: block !important;
	background: #f7f7f7 !important;
}

/* Pinta o <body> inteiro (não só a div .dc-home-shortcode) pra cobrir
   toda a altura da tela, mesmo quando o conteúdo é mais baixo que o
   viewport ou quando o tema deixa um wrapper mais largo que o
   conteúdo. Os wrappers intermediários do tema (variam por tema) são
   preenchidos via JS em frontend.js. */
body.dc-home-body {
	background: #f7f7f7 !important;
}

/* ---------------- Hero ---------------- */
.dc-shortcode-scope .dc-home2-hero {
	position: relative !important;
	overflow: hidden !important;
	display: flex !important;
	align-items: center !important;
	background-image: radial-gradient(120% 140% at 78% 12%, #2a3b56 0%, var(--dc-secondary) 46%, #101827 100%);
	background-size: cover !important;
	background-position: center top !important;
	padding: 64px 24px 96px !important;
	isolation: isolate !important;
	/* Largura total da tela (full-bleed), independente da largura/coluna
	   do container do Bricks (ou de qualquer outro tema/construtor) onde
	   o shortcode [dc_home] foi inserido. */
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	box-sizing: border-box !important;
}

/* Sem foto cadastrada: usa uma altura mínima fixa pro gradiente/ilustração
   padrão. Com foto, a altura passa a ser 100% da proporção da imagem —
   controlada via "aspect-ratio" inline (definido pelo PHP e, no slider,
   atualizado pelo JS a cada troca de foto). O valor abaixo (sem !important,
   de propósito) é só um fallback pra não "colapsar" a altura enquanto o
   inline/JS ainda não definiu a proporção real (ex: 1ª pintura da página
   ou foto de fallback externa sem dimensões conhecidas). */
.dc-shortcode-scope .dc-home2-hero.dc-home2-hero-has-photo {
	aspect-ratio: 21 / 9;
}

.dc-shortcode-scope .dc-home2-hero:not(.dc-home2-hero-has-photo) {
	min-height: 500px !important;
}

.dc-shortcode-scope .dc-home2-hero-overlay {
	position: absolute !important;
	inset: 0 !important;
	z-index: 1 !important;
	background: linear-gradient(100deg, var(--dc-primary) 0 30%, transparent 30% 100%) !important;
	clip-path: polygon(0 0, 46% 0, 34% 100%, 0 100%) !important;
}

/* Com foto(s) real(is) no hero, a faixa diagonal vermelha some — a foto
   ocupa o espaço inteiro, sem recorte por cima. */
.dc-shortcode-scope .dc-home2-hero-has-photo .dc-home2-hero-overlay {
	display: none !important;
}

/* Com foto(s) real(is) no hero, garante contraste do texto branco e dos
   pontinhos do slider independente do quão clara a foto seja: escurece
   mais o lado esquerdo (onde fica o texto) e a base (onde ficam as setas/
   pontinhos), deixando o resto da foto visível. */
.dc-shortcode-scope .dc-home2-hero-has-photo::after {
	content: "" !important;
	position: absolute !important;
	inset: 0 !important;
	z-index: 1 !important;
	background:
		linear-gradient(100deg, rgba(15, 23, 42, .8) 0%, rgba(15, 23, 42, .48) 32%, rgba(15, 23, 42, 0) 58%),
		linear-gradient(0deg, rgba(15, 23, 42, .55) 0%, rgba(15, 23, 42, 0) 32%) !important;
	pointer-events: none !important;
}

.dc-shortcode-scope .dc-home2-hero-stripes {
	position: absolute !important;
	z-index: 0 !important;
	width: 150px !important;
	height: 96px !important;
	pointer-events: none !important;
	opacity: 0 !important;
	animation: dc-home2-fade-in .8s ease .5s forwards !important;
}

.dc-shortcode-scope .dc-home2-hero-stripes-l {
	top: 22px !important;
	left: 22px !important;
	background-image: repeating-linear-gradient(58deg, rgba(255, 255, 255, .5) 0 3px, transparent 3px 12px) !important;
}

.dc-shortcode-scope .dc-home2-hero-stripes-r {
	top: 22px !important;
	right: 22px !important;
	background-image: repeating-linear-gradient(122deg, rgba(226, 36, 70, .65) 0 3px, transparent 3px 12px) !important;
}

.dc-shortcode-scope .dc-home2-hero-art {
	position: absolute !important;
	z-index: 0 !important;
	right: -20px !important;
	bottom: -10px !important;
	width: min(46vw, 560px) !important;
	opacity: 0 !important;
	transform: translateX(16px) !important;
	animation: dc-home2-art-in .9s cubic-bezier(.16, 1, .3, 1) .25s forwards !important;
}

.dc-shortcode-scope .dc-home2-hero-art svg {
	width: 100% !important;
	height: auto !important;
	display: block !important;
}

.dc-shortcode-scope .dc-home2-hero-inner {
	position: relative !important;
	z-index: 2 !important;
	max-width: 1280px !important;
	margin: 0 auto !important;
	width: 100% !important;
	/* Esse bloco não tem nada clicável (é só texto/estatísticas) e sua
	   caixa invisível cobre boa parte da largura do hero — sem isso, ele
	   fica na frente do slider (z-index maior) e "engole" o toque/clique
	   antes de chegar nas setas/slides, especialmente no mobile. */
	pointer-events: none !important;
}

.dc-shortcode-scope .dc-home2-hero-eyebrow {
	display: inline-flex !important;
	align-items: center !important;
	padding: 6px 14px !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, .12) !important;
	border: 1px solid rgba(255, 255, 255, .22) !important;
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: .04em !important;
	text-transform: uppercase !important;
	margin: 0 0 18px !important;
	opacity: 0 !important;
	animation: dc-home2-fade-in .6s ease .05s forwards !important;
}

.dc-shortcode-scope .dc-home2-hero-stats {
	display: flex !important;
	gap: 28px !important;
	margin: 28px 0 0 !important;
	opacity: 0 !important;
	transform: translateY(14px) !important;
	animation: dc-home2-rise-in .7s cubic-bezier(.16, 1, .3, 1) .38s forwards !important;
}

.dc-shortcode-scope .dc-home2-hero-stat {
	display: flex !important;
	flex-direction: column !important;
	gap: 2px !important;
	padding-left: 14px !important;
	border-left: 2px solid rgba(255, 255, 255, .3) !important;
}

.dc-shortcode-scope .dc-home2-hero-stat strong {
	font-size: 22px !important;
	font-weight: 900 !important;
	color: #fff !important;
	line-height: 1 !important;
}

.dc-shortcode-scope .dc-home2-hero-stat span {
	font-size: 11.5px !important;
	color: rgba(255, 255, 255, .7) !important;
	font-weight: 600 !important;
}

@keyframes dc-home2-fade-in {
	from { opacity: 0 !important; }
	to { opacity: 1 !important; }
}

@keyframes dc-home2-rise-in {
	from { opacity: 0 !important; transform: translateY(14px) !important; }
	to { opacity: 1 !important; transform: translateY(0) !important; }
}

@keyframes dc-home2-art-in {
	from { opacity: 0 !important; transform: translateX(16px) !important; }
	to { opacity: .95 !important; transform: translateX(0) !important; }
}

@media (prefers-reduced-motion: reduce) {
	.dc-shortcode-scope .dc-home2-hero-eyebrow,
	.dc-shortcode-scope .dc-home2-hero-stats,
	.dc-shortcode-scope .dc-home2-hero-stripes,
	.dc-shortcode-scope .dc-home2-hero-art {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

@media (max-width: 900px) {
	.dc-shortcode-scope .dc-home2-hero-art {
		display: none !important;
	}
}

/* ---------------- Slider de fotos do hero ---------------- */
.dc-shortcode-scope .dc-home2-hero-slider {
	position: absolute !important;
	inset: 0 !important;
	z-index: 0 !important;
	touch-action: pan-y !important;
}

.dc-shortcode-scope .dc-home2-hero-slides {
	position: absolute !important;
	inset: 0 !important;
}

.dc-shortcode-scope .dc-home2-hero-slide {
	display: block !important;
	position: absolute !important;
	inset: 0 !important;
	/* Usa a variável --dc-hero-bg (definida inline por slide) em vez de
	   depender só do "background-image" inline. Isso é necessário porque
	   quando o slide tem link ele vira uma tag <a>, e a regra genérica
	   ".dc-shortcode-scope a { background: transparent !important; }" (em
	   frontend.css) tem !important e "vence" o background-image inline,
	   apagando a foto (fica só o azul de fundo do hero). Como esta regra
	   aqui tem 2 classes de especificidade (maior que ".dc-shortcode-scope
	   a", que é 1 classe + 1 elemento) e também usa !important, ela
	   consegue reaplicar a foto por cima do reset, tanto em <div> quanto
	   em <a>. */
	background-image: var(--dc-hero-bg, none) !important;
	background-size: cover !important;
	background-position: center top !important;
	background-repeat: no-repeat !important;
	opacity: 0 !important;
	pointer-events: none !important;
	transition: opacity 1s ease !important;
}

.dc-shortcode-scope a.dc-home2-hero-slide {
	cursor: pointer !important;
}

.dc-shortcode-scope .dc-home2-hero-slide.is-active {
	opacity: 1 !important;
	z-index: 1 !important;
	pointer-events: auto !important;
}

.dc-shortcode-scope .dc-home2-hero-link-overlay {
	position: absolute !important;
	inset: 0 !important;
	z-index: 1 !important;
	display: block !important;
	cursor: pointer !important;
}

.dc-shortcode-scope .dc-home2-hero-arrow {
	position: absolute !important;
	top: 50% !important;
	z-index: 3 !important;
	transform: translateY(-50%) !important;
	width: 40px !important;
	height: 40px !important;
	border-radius: 50% !important;
	border: none !important;
	background: rgba(15, 23, 42, .45) !important;
	color: #fff !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	cursor: pointer !important;
	transition: background .15s ease !important;
	padding: 0 !important;
}

.dc-shortcode-scope .dc-home2-hero-arrow:hover {
	background: rgba(15, 23, 42, .7) !important;
}

.dc-shortcode-scope .dc-home2-hero-arrow svg {
	width: 20px !important;
	height: 20px !important;
}

.dc-shortcode-scope .dc-home2-hero-arrow-prev {
	left: 16px !important;
}

.dc-shortcode-scope .dc-home2-hero-arrow-next {
	right: 16px !important;
}

.dc-shortcode-scope .dc-home2-hero-dots {
	position: absolute !important;
	z-index: 3 !important;
	left: 50% !important;
	bottom: 116px !important;
	transform: translateX(-50%) !important;
	display: flex !important;
	gap: 7px !important;
}

.dc-shortcode-scope .dc-home2-hero-dot {
	width: 7px !important;
	height: 7px !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, .4) !important;
	transition: background .2s ease, transform .2s ease !important;
}

.dc-shortcode-scope .dc-home2-hero-dot.is-active {
	background: #fff !important;
	transform: scale(1.3) !important;
}

@media (max-width: 640px) {
	.dc-shortcode-scope .dc-home2-hero-dots {
		bottom: 100px !important;
	}
}

/* ---------------- Busca flutuante (sobrepõe o hero) ---------------- */
.dc-shortcode-scope .dc-home2-search-float {
	position: relative !important;
	z-index: 2 !important;
	max-width: 880px !important;
	margin: -84px auto 0 !important;
	padding: 0 20px !important;
}

.dc-shortcode-scope .dc-home2-search-float .dc-busca-shortcode {
	box-shadow: 0 18px 40px rgba(15, 23, 42, .18) !important;
}

/* ---------------- Container / seções ---------------- */
.dc-shortcode-scope .dc-home2-container {
	max-width: 1280px !important;
	margin: 0 auto !important;
	padding: 44px 20px 60px !important;
}

.dc-shortcode-scope .dc-home2-section {
	margin: 0 0 40px !important;
	/* OBS: "content-visibility: auto" foi removido daqui de propósito.
	   Apesar de acelerar o carregamento inicial, essa propriedade ativa
	   automaticamente "contain: paint" na seção — mesmo quando ela está
	   visível na tela — e isso corta (clipa) qualquer conteúdo que
	   ultrapasse a caixa do elemento, incluindo o box-shadow (:hover) dos
	   cards de veículos, categorias e lojas nas laterais. Era exatamente
	   isso que fazia a sombra "sumir" à esquerda/direita dos cards. */
}

.dc-shortcode-scope .dc-home2-title {
	margin: 0 0 18px !important;
	text-align: left !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	color: var(--dc-text) !important;
}

/* ---------------- Promo (Anuncie / Encontre) ---------------- */
.dc-shortcode-scope .dc-home2-promo-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
	gap: 20px !important;
	margin: 0 0 40px !important;
}

.dc-shortcode-scope .dc-home2-promo {
	position: relative !important;
	display: flex !important;
	align-items: flex-end !important;
	min-height: 220px !important;
	border-radius: 14px !important;
	overflow: hidden !important;
	background-image: linear-gradient(135deg, #1e293b, #0f172a);
	background-size: cover !important;
	background-position: center !important;
	text-decoration: none !important;
	transition: transform .2s ease !important;
}

.dc-shortcode-scope .dc-home2-promo:hover {
	transform: translateY(-3px) !important;
}

.dc-shortcode-scope .dc-home2-promo-overlay {
	position: absolute !important;
	inset: 0 !important;
	background: linear-gradient(0deg, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .15) 65%, rgba(0, 0, 0, .35) 100%) !important;
}

.dc-shortcode-scope .dc-home2-promo-text {
	position: relative !important;
	z-index: 1 !important;
	padding: 24px !important;
	display: block !important;
}

.dc-shortcode-scope .dc-home2-promo-title {
	display: block !important;
	color: #fff !important;
	font-size: 22px !important;
	font-weight: 800 !important;
	margin: 0 0 8px !important;
}

.dc-shortcode-scope .dc-home2-promo-desc {
	display: block !important;
	color: rgba(255, 255, 255, .82) !important;
	font-size: 13.5px !important;
	line-height: 1.5 !important;
	max-width: 380px !important;
}

/* ---------------- Banner "Anuncie aqui" ---------------- */
.dc-shortcode-scope .dc-home2-ad-banner {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 140px !important;
	border-radius: 14px !important;
	overflow: hidden !important;
	background: linear-gradient(100deg, var(--dc-primary), var(--dc-blue-dark)) !important;
	text-decoration: none !important;
	margin: 0 0 40px !important;
	transition: transform .2s ease !important;
}

.dc-shortcode-scope .dc-home2-ad-banner:hover {
	transform: translateY(-2px) !important;
}

.dc-shortcode-scope .dc-home2-ad-stripes {
	position: absolute !important;
	inset: 0 !important;
	background-image: repeating-linear-gradient(58deg, rgba(255, 255, 255, .12) 0 4px, transparent 4px 16px) !important;
	pointer-events: none !important;
}

.dc-shortcode-scope .dc-home2-ad-text {
	position: relative !important;
	z-index: 1 !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	gap: 10px !important;
	color: #fff !important;
	font-size: 26px !important;
	font-weight: 900 !important;
	letter-spacing: .03em !important;
	text-align: center !important;
}

.dc-shortcode-scope .dc-home2-ad-cta {
	display: inline-flex !important;
	padding: 8px 20px !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--dc-primary) !important;
	font-size: 12.5px !important;
	font-weight: 700 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
}

/* ---------------- Categorias ---------------- */
.dc-shortcode-scope .dc-home2-categorias {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
	gap: 16px !important;
}

.dc-shortcode-scope .dc-home2-categoria {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 10px !important;
	padding: 22px 16px !important;
	border: 1px solid var(--dc-border) !important;
	border-radius: 14px !important;
	background: var(--dc-bg) !important;
	background-color: var(--dc-bg) !important;
	text-decoration: none !important;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease !important;
}

.dc-shortcode-scope .dc-home2-categoria:hover {
	box-shadow: 0 12px 28px rgba(15, 23, 42, .1) !important;
	transform: translateY(-3px) !important;
}

.dc-shortcode-scope .dc-home2-categoria img {
	width: 100% !important;
	max-width: 120px !important;
	height: 70px !important;
	object-fit: contain !important;
	display: block !important;
}

.dc-shortcode-scope .dc-home2-categoria span {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	color: var(--dc-text) !important;
}

/* No mobile, a lista de categorias vira um carrossel horizontal com
   scroll por toque (swipe), em vez de empilhar/quebrar linha. Cada
   card ganha uma largura fixa e "gruda" no scroll (scroll-snap) pra
   ficar suave de arrastar com o dedo. */
@media (max-width: 640px) {
	.dc-shortcode-scope .dc-home2-categorias {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
		scroll-snap-type: x proximity !important;
		scroll-padding-left: 0.8rem !important;
		gap: 12px !important;
		margin: 0 -0.8rem !important;
		/* padding-left precisa ser EXATAMENTE igual ao valor absoluto do
		   margin negativo (0.8rem, mesmo gutter de .dc-home2-container no
		   mobile) pra cancelar o deslocamento e o primeiro card ficar
		   rente com o título "Categorias" (que não tem padding/margin
		   extra). Botar um valor diferente daqui empurra o card pra
		   direita/esquerda do título — foi esse o erro da correção
		   anterior. */
		padding: 16px 0.8rem 16px 0.8rem !important;
		/* Esconde a barra de scroll (o gesto de arrastar continua ativo). */
		scrollbar-width: none !important;
		-ms-overflow-style: none !important;
	}

	.dc-shortcode-scope .dc-home2-categorias::-webkit-scrollbar {
		display: none !important;
	}

	.dc-shortcode-scope .dc-home2-categoria {
		flex: 0 0 auto !important;
		width: 148px !important;
		scroll-snap-align: start !important;
		padding: 18px 14px !important;
	}
}

/* ---------------- Responsivo ---------------- */
@media (max-width: 640px) {
	.dc-shortcode-scope .dc-home2-hero:not(.dc-home2-hero-has-photo) {
		min-height: 260px !important;
		padding: 34px 0.8rem 80px !important;
	}

	.dc-shortcode-scope .dc-home2-hero.dc-home2-hero-has-photo {
		padding: 34px 0.8rem 80px !important;
		/* No desktop a altura do Hero segue a proporção real da foto
		   (aspect-ratio, definido inline pelo PHP/JS). No mobile isso faz
		   a altura ficar minúscula, porque a foto do Hero costuma ser bem
		   larga (banner tipo 21:9 ou mais) — numa tela de 375px, uma foto
		   21:9 dá ~160px de altura. Por isso, aqui a gente ignora a
		   proporção da foto (que não tem !important, então perde pra essa
		   regra) e usa uma altura fixa e confortável para o hero, com a
		   foto preenchendo via "cover" (já definido mais acima), cortando
		   as bordas em vez de espremer a seção.
		   O clamp() escala um pouco com a largura da tela (min 300px,
		   máx 420px), pra caber bem tanto num celular pequeno quanto
		   num maior. */
		aspect-ratio: unset !important;
		min-height: clamp(220px, 58vw, 320px) !important;
	}

	.dc-shortcode-scope .dc-home2-search-float {
		margin-top: -54px !important;
		padding: 0 0.8rem !important;
	}

	.dc-shortcode-scope .dc-home2-container {
		padding-left: 0.8rem !important;
		padding-right: 0.8rem !important;
	}

	.dc-shortcode-scope .dc-home2-ad-text {
		font-size: 20px !important;
	}
}
