/* Cafezall Guia — visual premium app-like (prefixo .czg)
   Seletores com .czg na frente para vencer o CSS do tema. */
.czg {
	--czg-verde: #2A3428;
	--czg-verde-claro: #3d4a39;
	--czg-laranja: #EF7C3A;
	--czg-laranja-escuro: #d96a2b;
	--czg-tinta: #22271f;
	--czg-cinza: #75716a;
	--czg-borda: #eae6df;
	--czg-fundo: #faf8f5;
	--czg-sombra: 0 1px 2px rgba(34, 39, 31, .05);
	--czg-sombra-hover: 0 16px 32px -18px rgba(42, 52, 40, .4);
	color: var(--czg-tinta);
	max-width: 100%;
}
.czg, .czg *, .czg *::before, .czg *::after {
	box-sizing: border-box;
}

/* Espaçamento do topo da página (H1 + intro antes do app) */
.cz-page-content h1,
.entry-content h1 {
	line-height: 1.15;
	margin: 0 0 10px;
}
.cz-page-content h1 + p,
.entry-content h1 + p {
	margin: 0 0 24px;
	font-size: .95rem;
	line-height: 1.55;
	color: #75716a;
}

/* Mobile-first: app no fluxo; desktop sai da coluna de leitura */
.czg-app {
	margin-top: 4px;
	margin-bottom: 48px;
}
@media (max-width: 1023px) {
	/* respiro pro rodapé e pro botão flutuante do mapa */
	.czg-app { padding-bottom: 72px; }
}
@media (min-width: 1024px) {
	.czg-app {
		width: min(1320px, calc(100vw - 4rem));
		max-width: none; /* anula o clamp mobile do .czg — sem isso o breakout não acontece */
		position: relative;
		left: 50%;
		transform: translateX(-50%);
		margin-bottom: 72px;
	}
	/* H1 e intro alinhados com o app (mesma largura/posição) */
	.entry-content h1,
	.cz-page-content h1 {
		width: min(1320px, calc(100vw - 4rem));
		position: relative;
		left: 50%;
		transform: translateX(-50%);
		font-size: 2rem;
	}
	.entry-content h1 + p,
	.cz-page-content h1 + p {
		width: min(1320px, calc(100vw - 4rem));
		position: relative;
		left: 50%;
		transform: translateX(-50%);
	}
}

/* ---------- Hero ---------- */
.czg .czg-hero {
	text-align: center;
	padding: 16px 0 4px;
	margin-bottom: 14px;
}
.czg .czg-hero-xicara {
	display: block;
	margin: 0 auto 8px;
}
.czg p.czg-hero-eyebrow {
	margin: 0 0 10px;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--czg-laranja);
}
.czg h1.czg-hero-titulo {
	margin: 0 auto 14px;
	padding: 0;
	max-width: 620px;
	font-size: clamp(1.45rem, 5.5vw, 2.15rem);
	line-height: 1.15;
	font-weight: 800;
	color: var(--czg-verde);
	width: auto;
	left: auto;
	transform: none;
	position: static;
}
.czg .czg-hero-acento { color: var(--czg-laranja); }
.czg .czg-hero-linha {
	width: 44px;
	height: 2px;
	background: var(--czg-laranja);
	margin: 0 auto 18px;
}
.czg .czg-hero .czg-busca-wrap {
	display: block;
	max-width: 460px;
	margin: 0 auto 12px;
}
.czg .czg-chips-hero {
	display: flex;
	gap: 8px;
}
.czg .czg-chips-hero button.czg-perto {
	flex: 0 0 auto;
	padding: 10px 16px;
	font-size: .85rem;
}
.czg p.czg-hero-prova {
	display: none;
	margin: 16px 0 0;
	font-size: .82rem;
	font-weight: 700;
	color: var(--czg-verde);
}
.czg p.czg-hero-prova span { color: #c9c3b8; margin: 0 4px; }
@media (min-width: 768px) {
	.czg .czg-chips-hero {
		justify-content: center;
		flex-wrap: wrap;
		overflow: visible;
	}
	.czg p.czg-hero-prova { display: block; }
}
.czg .czg-painel { margin-bottom: 16px; }

/* ---------- Filtros ---------- */
.czg .czg-filtros {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 18px;
}
.czg .czg-filtros-linha {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	max-width: 100%;
}
.czg .czg-busca-wrap {
	flex: 1 1 100%;
	position: relative;
	display: block;
	margin: 0;
	min-width: 0;
}
.czg .czg-busca-icone {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #a8a49c;
	pointer-events: none;
	z-index: 1;
}
.czg input.czg-busca {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 12px 18px;
	padding-left: 44px;
	border: 1px solid var(--czg-borda);
	border-radius: 999px;
	font: inherit;
	font-size: .95rem;
	line-height: 1.4;
	color: var(--czg-tinta);
	background: #fff;
	box-shadow: var(--czg-sombra);
	touch-action: manipulation;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.czg input.czg-busca::placeholder { color: #a8a49c; opacity: 1; }
.czg select.czg-cidade {
	flex: 1 1 150px;
	min-width: 0;
	margin: 0;
	padding: 12px 16px;
	border: 1px solid var(--czg-borda);
	border-radius: 999px;
	font: inherit;
	font-size: .9rem;
	line-height: 1.4;
	color: var(--czg-tinta);
	background-color: #fff;
	box-shadow: var(--czg-sombra);
	touch-action: manipulation;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.czg input.czg-busca:focus,
.czg select.czg-cidade:focus {
	outline: none;
	border-color: var(--czg-laranja);
	box-shadow: 0 0 0 3px rgba(239, 124, 58, .16);
}
.czg button.czg-filtros-toggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 12px 17px;
	border: 1px solid var(--czg-borda);
	border-radius: 999px;
	background: #fff;
	color: var(--czg-tinta);
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
	box-shadow: var(--czg-sombra);
	transition: border-color .15s ease, transform .1s ease;
}
.czg button.czg-filtros-toggle:hover { border-color: var(--czg-laranja); }
.czg button.czg-filtros-toggle:active { transform: scale(.96); }
.czg button.czg-filtros-toggle.is-open {
	border-color: var(--czg-verde);
	background: var(--czg-verde);
	color: #fff;
}
.czg .czg-filtros-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--czg-laranja);
	color: #fff;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1;
}
.czg .czg-painel {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.czg .czg-painel[hidden] { display: none; }
.czg button.czg-perto {
	flex: 1 1 auto;
	margin: 0;
	padding: 12px 20px;
	border: none;
	border-radius: 999px;
	background: var(--czg-verde);
	color: #fff;
	font: inherit;
	font-size: .9rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	touch-action: manipulation;
	box-shadow: var(--czg-sombra);
	transition: background .15s ease, transform .1s ease;
	white-space: nowrap;
}
.czg button.czg-perto:hover { background: var(--czg-verde-claro); }
.czg button.czg-perto:active { transform: scale(.97); }
.czg button.czg-perto[disabled] { opacity: .6; cursor: wait; }

/* Chips: linha única com scroll horizontal (padrão de app) */
.czg .czg-chips {
	flex-wrap: nowrap;
	overflow-x: auto;
	padding: 2px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.czg .czg-chips::-webkit-scrollbar { display: none; }
.czg button.czg-chip {
	flex: 0 0 auto;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--czg-borda);
	border-radius: 999px;
	background: #fff;
	color: var(--czg-tinta);
	font: inherit;
	font-size: .84rem;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
	transition: border-color .15s ease, background .15s ease, color .15s ease, transform .1s ease;
}
.czg button.czg-chip:hover { border-color: var(--czg-laranja); color: var(--czg-laranja-escuro); }
.czg button.czg-chip:active { transform: scale(.96); }
.czg button.czg-chip.is-active {
	background: var(--czg-laranja);
	border-color: var(--czg-laranja);
	color: #fff;
	font-weight: 700;
}
.czg .czg-chips-attr button.czg-chip.is-active {
	background: var(--czg-verde);
	border-color: var(--czg-verde);
}

/* ---------- Corpo: lista + mapa ---------- */
.czg .czg-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}
.czg .czg-list { min-width: 0; }
.czg p.czg-count {
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--czg-cinza);
	margin: 0 0 12px;
}

/* Mapa */
.czg .czg-map {
	height: 55vh;
	min-height: 300px;
	border-radius: 20px;
	overflow: hidden;
	border: 1px solid var(--czg-borda);
	background: var(--czg-fundo);
	z-index: 0;
}

/* Mobile: mapa em tela cheia via botão flutuante */
@media (max-width: 1023px) {
	.czg .czg-mapcol { display: none; }
	.czg-app.is-map-open .czg-mapcol {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 1050;
		background: #fff;
	}
	.czg-app.is-map-open .czg-map {
		height: 100vh;
		height: 100dvh;
		min-height: 0;
		border: none;
		border-radius: 0;
	}
	.czg button.czg-map-toggle {
		position: fixed;
		left: 50%;
		bottom: calc(18px + env(safe-area-inset-bottom, 0px));
		transform: translateX(-50%);
		z-index: 1100;
		margin: 0;
		padding: 14px 28px;
		border: none;
		border-radius: 999px;
		background: var(--czg-verde);
		color: #fff;
		font: inherit;
		font-size: .95rem;
		font-weight: 700;
		line-height: 1.2;
		cursor: pointer;
		touch-action: manipulation;
		box-shadow: 0 8px 24px -6px rgba(34, 39, 31, .55);
		white-space: nowrap;
	}
	.czg button.czg-map-toggle:active { transform: translateX(-50%) scale(.96); }
}

@media (min-width: 1024px) {
	.czg .czg-body {
		grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
		gap: 32px;
	}
	.czg .czg-filtros { margin-bottom: 24px; }
	.czg button.czg-map-toggle { display: none; }
	.czg .czg-mapcol {
		display: block;
		position: sticky;
		top: 96px;
		min-width: 0;
	}
	.czg .czg-map {
		height: calc(100vh - 150px);
		min-height: 440px;
	}
	.czg .czg-busca-wrap { flex: 1 1 260px; }
	.czg button.czg-perto { flex: 0 0 auto; }
}

/* Pins e popup */
.czg-pin {
	width: 26px;
	height: 26px;
	border-radius: 50% 50% 50% 0;
	background: #EF7C3A;
	border: 2px solid #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, .35);
	transform: rotate(-45deg);
	margin: -13px 0 0 -13px;
}
.czg-pin-user {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #2563eb;
	border: 3px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
	margin: -8px 0 0 -8px;
}
.leaflet-popup-content-wrapper {
	border-radius: 14px;
	box-shadow: 0 10px 30px -12px rgba(34, 39, 31, .45);
}
.czg-popup .czg-popup-titulo {
	font-weight: 700;
	display: block;
	margin-bottom: 3px;
	color: #2A3428;
}
.czg-popup a { color: #d96a2b; font-weight: 600; }

/* ---------- Novidades (trilho horizontal) ---------- */
.czg .czg-rail-sec { margin: 2px 0 22px; }
.czg p.czg-rail-titulo {
	margin: 0 0 10px;
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--czg-laranja-escuro);
}
.czg .czg-rail {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 2px 2px 8px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.czg .czg-rail::-webkit-scrollbar { display: none; }
.czg .czg-rail article.czg-card {
	flex: 0 0 220px;
	flex-direction: column;
	gap: 0;
	padding: 0;
	contain-intrinsic-size: auto 240px;
}
.czg .czg-rail a.czg-card-capa {
	flex: none;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 18px 18px 0 0;
	align-self: stretch;
}
.czg .czg-rail .czg-card-body {
	padding: 11px 13px 13px;
	justify-content: flex-start;
}
.czg .czg-rail h3.czg-card-titulo { font-size: .92rem; }
.czg .czg-rail p.czg-card-meta {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.czg .czg-rail p.czg-card-desc,
.czg .czg-rail p.czg-card-attrs { display: none; }

/* Selo "Novo" na capa */
.czg .czg-novo {
	position: absolute;
	top: 6px;
	right: 6px;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--czg-laranja);
	color: #fff;
	font-size: .64rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1;
}

/* ---------- Cards ---------- */
.czg .czg-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	max-width: 100%;
}
.czg article.czg-card {
	position: relative;
	display: flex;
	flex-direction: row;
	gap: 13px;
	margin: 0;
	padding: 11px;
	min-width: 0;
	max-width: 100%;
	border: 1px solid var(--czg-borda);
	border-radius: 18px;
	background: #fff;
	box-shadow: var(--czg-sombra);
	cursor: pointer;
	transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
	content-visibility: auto;
	contain-intrinsic-size: auto 122px;
}
.czg article.czg-card:hover {
	border-color: #ddd7cc;
	box-shadow: var(--czg-sombra-hover);
	transform: translateY(-2px);
}
.czg article.czg-card:active { transform: scale(.99); }
.czg article.czg-card[hidden] { display: none; }

/* Capa: foto ou monograma */
.czg a.czg-card-capa {
	position: relative;
	flex: 0 0 92px;
	height: 92px;
	border-radius: 12px;
	overflow: hidden;
	display: block;
	align-self: center;
}
.czg a.czg-card-capa img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
}
.czg .czg-mono {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.czg .czg-mono span {
	color: rgba(255, 255, 255, .92);
	font-weight: 800;
	font-size: 1.4rem;
	letter-spacing: .04em;
}
.czg .czg-mono::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .14) 0, transparent 34%),
		radial-gradient(circle at 12% 88%, rgba(0, 0, 0, .12) 0, transparent 42%);
}
.czg .czg-mono-0 { background: linear-gradient(135deg, #2A3428, #4a5a44); }
.czg .czg-mono-1 { background: linear-gradient(135deg, #EF7C3A, #f2a066); }
.czg .czg-mono-2 { background: linear-gradient(135deg, #5d4433, #8a6a52); }
.czg .czg-mono-3 { background: linear-gradient(135deg, #3c4c3e, #6f8567); }

.czg .czg-card-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	justify-content: center;
}
.czg .czg-card-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	min-width: 0;
}
.czg h3.czg-card-titulo {
	font-size: 1rem;
	margin: 0;
	padding: 0;
	line-height: 1.3;
	font-weight: 700;
	min-width: 0;
}
.czg h3.czg-card-titulo a {
	color: var(--czg-verde);
	text-decoration: none;
}
.czg h3.czg-card-titulo a:hover { color: var(--czg-laranja-escuro); }
.czg .czg-nota {
	flex: 0 0 auto;
	display: inline-block;
	padding: 3px 9px;
	border-radius: 9px;
	background: var(--czg-verde);
	color: #fff;
	font-size: .8rem;
	font-weight: 700;
}
.czg p.czg-card-meta {
	margin: 0;
	font-size: .8rem;
	line-height: 1.4;
	color: var(--czg-cinza);
}
.czg .czg-faixa {
	margin-left: 6px;
	color: var(--czg-verde);
	font-weight: 700;
}
.czg .czg-dist {
	position: absolute;
	left: 5px;
	bottom: 5px;
	padding: 4px 8px;
	border-radius: 999px;
	background: rgba(34, 39, 31, .78);
	color: #fff;
	font-size: .68rem;
	font-weight: 700;
	line-height: 1;
	backdrop-filter: blur(2px);
}
.czg p.czg-card-desc {
	margin: 0;
	font-size: .84rem;
	line-height: 1.5;
	color: #4b4a44;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.czg p.czg-card-attrs {
	margin: 2px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.czg .czg-tag {
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--czg-fundo);
	border: 1px solid var(--czg-borda);
	color: var(--czg-cinza);
	font-size: .68rem;
	line-height: 1;
	white-space: nowrap;
}
.czg .czg-tag-mais { color: var(--czg-laranja-escuro); border-color: transparent; }

/* Mobile: esconder tags nos cards (ficam na ficha) para reduzir ruído */
@media (max-width: 480px) {
	.czg article.czg-card p.czg-card-attrs { display: none; }
}

/* Desktop/tablet: cards em grade com capa grande */
@media (min-width: 768px) {
	.czg .czg-cards {
		grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
		gap: 18px;
	}
	.czg article.czg-card {
		flex-direction: column;
		gap: 0;
		padding: 0;
		contain-intrinsic-size: auto 340px;
	}
	.czg a.czg-card-capa {
		flex: none;
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
		border-radius: 18px 18px 0 0;
		align-self: stretch;
	}
	.czg .czg-mono span { font-size: 2rem; }
	.czg .czg-card-body {
		padding: 16px 18px 18px;
		gap: 6px;
		justify-content: flex-start;
	}
	.czg h3.czg-card-titulo { font-size: 1.06rem; }
	.czg p.czg-card-desc { -webkit-line-clamp: 3; }
	.czg .czg-dist { left: 10px; bottom: 10px; font-size: .74rem; }
}

.czg p.czg-vazio {
	padding: 40px 24px;
	text-align: center;
	color: var(--czg-cinza);
	background: var(--czg-fundo);
	border-radius: 20px;
	margin: 0;
}
.czg p.czg-vazio::before {
	content: "☕";
	display: block;
	font-size: 2rem;
	margin-bottom: 8px;
}
.czg p.czg-vazio[hidden] { display: none; }

/* ---------- Ficha (single) ---------- */
.czg p.czg-ficha-meta {
	font-size: .95rem;
	color: var(--czg-cinza);
	margin: 0 0 14px;
}
.czg .czg-ficha-dados {
	padding: 18px 20px;
	border: 1px solid var(--czg-borda);
	border-radius: 20px;
	background: #fff;
	box-shadow: var(--czg-sombra);
	margin-bottom: 6px;
}
.czg .czg-ficha-dados p { margin: 0 0 9px; font-size: .95rem; }
.czg .czg-ficha-dados p:last-child { margin-bottom: 0; }
.czg p.czg-ficha-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.czg p.czg-ficha-links a {
	display: inline-block;
	padding: 11px 18px;
	border-radius: 999px;
	background: var(--czg-laranja);
	color: #fff;
	text-decoration: none;
	font-size: .875rem;
	font-weight: 700;
	touch-action: manipulation;
	transition: background .15s ease, transform .1s ease;
}
.czg p.czg-ficha-links a:hover { background: var(--czg-laranja-escuro); color: #fff; }
.czg p.czg-ficha-links a:active { transform: scale(.97); }
.czg .czg-map-single {
	height: 300px;
	min-height: 0;
	margin: 16px 0;
}
/* Relacionados no fim da ficha */
.czg-relacionados { margin: 44px 0 56px; }
.czg-relacionados h2 {
	margin: 0 0 18px;
	font-size: 1.35rem;
	line-height: 1.25;
}
@media (min-width: 1024px) {
	.czg-relacionados {
		width: min(1080px, calc(100vw - 4rem));
		max-width: none;
		position: relative;
		left: 50%;
		transform: translateX(-50%);
	}
	.czg-relacionados .czg-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.czg .czg-map-single { height: 240px; }
}
