/* ==========================================================================
   JF Bebidas 2027 — páginas Home e Contactos (sobre jf-design.css)
   ========================================================================== */

/* Listas usadas como grelhas */
html body :is(.jf-factos, .jf-logos, .jf-categorias, .jf-locais, .jf-comerciais, .jf-local__contactos, .jf-home__canais, .jf-categoria__sub) {
	list-style: none;
	margin: 0;
	padding: 0;
}

html body .jf-btn .jf-icone { width: 18px; height: 18px; }

/* Âncoras (#comercial, #mensagem, #precos) não ficam por baixo do cabeçalho fixo. */
html body .jf [id] { scroll-margin-top: 150px; }
html body a.jf-etiqueta { text-decoration: none; transition: border-color var(--jf-dur-curta), background-color var(--jf-dur-curta); }
html body a.jf-etiqueta:hover { border-color: var(--jf-texto); background-color: var(--jf-superficie); }

/* Abertura */
html body .jf-contactos__abertura { padding-block: clamp(3rem, 2rem + 5vw, 7rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }
html body .jf-home__abertura {
	position: relative;
	isolation: isolate;
	padding: 0;
	background-color: var(--jf-texto);
	color: #fff;
}
html body .jf-home__abertura::before,
html body .jf-home__foto {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
html body .jf-home__foto { z-index: -2; }
html body .jf-home__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
html body .jf-home__abertura::before {
	content: "";
	z-index: -1;
	background: linear-gradient(90deg, rgba(23, 13, 16, .94), rgba(23, 13, 16, .67) 53%, rgba(23, 13, 16, .12)),
		linear-gradient(0deg, rgba(23, 13, 16, .86), transparent 30%);
}
html body .jf-home__banner {
	min-height: clamp(34rem, 76svh, 52rem);
	display: grid;
	grid-template-rows: 1fr auto;
}
html body .jf-home__intro {
	align-self: center;
	max-width: 48rem;
	padding-block: clamp(3rem, 9vw, 7rem);
}
html body .jf-home__intro :is(.jf-display, .jf-sobretitulo, .jf-lead) { color: #fff; }
html body .jf-home__intro .jf-display { font-size: clamp(3.75rem, 9vw, 8.25rem); }
html body .jf-home__intro em { display: block; }
html body .jf-home__intro .jf-lead { max-width: 35rem; margin: 1.5rem 0; }
html body .jf-home__barra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 1rem;
	min-height: 3.75rem;
	padding-block: .75rem;
	border-top: 1px solid rgba(255, 255, 255, .38);
	font-size: var(--jf-t-pequeno);
}
html body .jf-home__barra a { color: inherit; text-underline-offset: .22em; }

@media (max-width: 600px) {
	html body .jf-home__banner { min-height: 33rem; }
	html body .jf-home__foto img { object-position: 64% 50%; }
	html body .jf-home__abertura::before {
		background: linear-gradient(100deg, rgba(23, 13, 16, .89), rgba(23, 13, 16, .57)),
			linear-gradient(0deg, rgba(23, 13, 16, .8), transparent 36%);
	}
}
html body .jf-secao--colada { padding-top: 0; }

/* Campanha sazonal da página inicial */
html body .jf-natal {
	color: #fff;
	background: radial-gradient(ellipse at 73% 40%, #563032 0%, #2e171c 48%, #1b1115 79%);
}
html body .jf-natal__contentor { padding-block: clamp(2rem, 5vw, 4rem) 1.25rem; }
html body .jf .jf-natal__rotulo {
	color: #f3d4a1;
	font: 600 .8rem/1.5 var(--jf-sans);
	letter-spacing: .14em;
	text-transform: uppercase;
	margin: 0;
}
html body .jf-natal__banner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
	gap: clamp(1rem, 4vw, 4rem);
	align-items: center;
	padding-block: 1.75rem;
}
html body .jf-natal [hidden] { display: none !important; }
html body .jf-natal__banner .jf-display { color: #fff; font-size: clamp(3.2rem, 6.3vw, 7.1rem); }
html body .jf-natal__produtor { margin: 0 0 .5rem; color: #f3d4a1; }
html body .jf-natal__descricao { max-width: 29rem; margin: 1rem 0 1.5rem; color: #fff4e8; }
html body .jf-natal__fotografias {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	align-items: end;
	justify-items: center;
	height: clamp(19rem, 34vw, 30rem);
	gap: .65rem;
	padding: .8rem 1rem 1.6rem;
	background: radial-gradient(ellipse closest-side at 50% 46%, rgba(242, 196, 131, .27), transparent),
		radial-gradient(ellipse closest-side at 50% 84%, rgba(11, 5, 4, .66), transparent);
}
html body .jf-natal__imagem {
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: contain;
	object-position: bottom center;
	filter: drop-shadow(.25rem .65rem .8rem rgba(0, 0, 0, .35));
}
html body .jf-natal__banner--lhoste .jf-natal__fotografias { gap: clamp(.25rem, 1vw, .9rem); padding-inline: 0; }
html body .jf-natal__banner--lhoste .jf-natal__imagem { max-height: 89%; }
html body .jf-natal__banner--lhoste .jf-natal__imagem--les-loges { max-height: 100%; }
html body .jf-natal__banner--castelares .jf-natal__fotografias { grid-auto-flow: initial; grid-template-columns: 1.35fr 1fr; }
html body .jf-natal__banner--castelares .jf-natal__imagem { align-self: center; object-position: center; }
html body .jf-natal__imagem--thierry-fournier,
html body .jf-natal__imagem--cortes-reguengo { max-height: 87%; }
html body .jf-natal__navegacao,
html body .jf-natal__acoes { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
html body .jf-natal__navegacao { justify-content: center; }
html body .jf-natal__navegacao button {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid #ab8f90;
	border-radius: 50%;
	background: transparent;
	color: #fff;
}
html body .jf-natal__navegacao .jf-natal__indicador { border-color: transparent; }
html body .jf-natal__indicador span { width: .55rem; height: .55rem; border: 1px solid #f3d4a1; border-radius: 50%; }
html body .jf-natal__indicador[aria-current="true"] span { background: #f3d4a1; }
html body .jf-natal__navegacao button:hover { background: #67424a; }
html body .jf-natal :is(a, button):focus-visible { outline: 2px solid #f3d4a1; outline-offset: 3px; }
html body .jf-natal__acoes { gap: .9rem 1.4rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #ab8f90; }
html body .jf-natal__acoes a { color: #fff; }
html body .jf-natal__selecao { background: #fff; }
html body .jf-natal__grupo { margin-top: 2rem; }
html body .jf-natal__grelha {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: .8rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}
html body .jf-natal__grelha a {
	display: grid;
	gap: .75rem;
	height: 100%;
	padding: clamp(.75rem, 3vw, 1.5rem);
	border-radius: 8px;
	color: var(--jf-texto);
	text-align: center;
	background: var(--jf-cartao, #f4f2ee);
}
html body .jf-natal__grelha img { width: 100%; height: clamp(7rem, 19vw, 13rem); object-fit: contain; }
@media (max-width: 650px) {
	html body .jf-natal__banner { grid-template-columns: minmax(0, 1fr); }
	html body .jf-natal__fotografias { height: clamp(13rem, 62vw, 18rem); padding: 0 0 1rem; }
	html body .jf-natal__grelha { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Cabeça de secção */
html body .jf-home__cabeca { max-width: 820px; margin-bottom: var(--jf-e-7); }
html body .jf-home__cabeca .jf-lead { margin: var(--jf-e-4) 0 0; }
html body .jf-home__mais { margin: var(--jf-e-6) 0 0; }

/* Marcas em destaque: 8 cartões em 4×2 (2×4 no telemóvel), logótipo grande + nome. */
html body .jf-marcas {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}
html body .jf-marca {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background-color: var(--jf-pedra);
	border: 1px solid transparent;
	border-radius: var(--jf-raio-painel);
	transition: background-color var(--jf-dur-curta), border-color var(--jf-dur-curta);
}
html body .jf-marca__logo {
	aspect-ratio: 3 / 2; /* a proporção fica na zona do logótipo; o nome ocupa o que precisar */
	display: grid;
	place-items: center;
	min-height: 0;
	overflow: hidden;
}
/* Os ficheiros têm ~45% de margem branca: ampliar corta-a; "multiply" funde o branco com o fundo do cartão. */
html body .jf-marca__logo img {
	width: 62%;
	height: auto;
	transform: scale(1.5);
	mix-blend-mode: multiply;
	transition: transform .45s var(--jf-ease);
}
html body .jf-marca--sem-margem .jf-marca__logo img { width: 76%; transform: none; }
html body .jf-marca__nome {
	padding: 0 12px 18px;
	text-align: center;
	font: 500 var(--jf-t-micro) / 1.3 var(--jf-sans);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--jf-texto-2);
}
html body .jf-marca:hover { background-color: var(--jf-superficie); border-color: var(--jf-acento); }
html body .jf-marca:hover .jf-marca__logo img { transform: scale(1.58); }
html body .jf-marca--sem-margem:hover .jf-marca__logo img { transform: scale(1.06); }
html body .jf-home__mais { margin-top: var(--jf-e-6); }
@media (max-width: 899px) {
	html body .jf-marcas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	html body .jf-marca:not(.jf-marca--sem-margem) .jf-marca__logo img { transform: scale(1.35); }
}

/* Carrossel de marcas (Home): todas as marcas em fila contínua; 5 visíveis no computador, 3 no tablet, 2 no
   telemóvel. As duas filas iguais andam juntas uma largura inteira, por isso o fim encaixa no início.
   Para com o rato por cima, com o botão Pausar e ao navegar com o teclado (aí a fila passa a ter scroll e
   o elemento com foco fica à vista). Com "reduzir movimento": parada, percorre-se com o dedo ou o trackpad. */
html body .jf-carrossel { --jf-carrossel-gap: 12px; --jf-carrossel-visiveis: 5; }
html body .jf-carrossel__janela {
	container-type: inline-size;
	display: flex;
	overflow: hidden;
	padding-block: 3px; /* o contorno do foco não fica cortado */
}
html body .jf-carrossel__fila {
	display: flex;
	flex: none;
	margin: 0;
	padding: 0;
	list-style: none;
}
html body .jf-carrossel__fila > .jf-marca {
	flex: 0 0 calc((100cqi - (var(--jf-carrossel-visiveis) - 1) * var(--jf-carrossel-gap)) / var(--jf-carrossel-visiveis));
	margin-right: var(--jf-carrossel-gap);
}
/* Cartões só com o logótipo (o nome vai no texto alternativo). Os antigos (fundo #FFFAF4, muita margem)
   são ampliados como no mural da página Marcas; os novos (800×500) ocupam o cartão. */
html body .jf-carrossel .jf-marca__logo { display: grid; color: inherit; text-decoration: none; }
html body .jf-carrossel .jf-marca:not(.jf-marca--sem-margem) .jf-marca__logo img { width: 72%; transform: scale(1.45); filter: brightness(1.05); }
html body .jf-carrossel .jf-marca--sem-margem .jf-marca__logo img { width: 86%; transform: none; filter: none; }
/* Hover e foco só nas marcas com ligação aos produtos (respondem a um clique). */
html body .jf-carrossel .jf-marca:not(:has(a)):hover { background-color: var(--jf-pedra); border-color: transparent; }
html body .jf-carrossel .jf-marca:not(:has(a)):hover .jf-marca__logo img { transform: scale(1.45); }
html body .jf-carrossel .jf-marca--sem-margem:not(:has(a)):hover .jf-marca__logo img { transform: none; }
html body .jf-carrossel .jf-marca:has(a):hover .jf-marca__logo img { transform: scale(1.52); }
html body .jf-carrossel .jf-marca--sem-margem:has(a):hover .jf-marca__logo img { transform: scale(1.04); }
html body .jf-carrossel a.jf-marca__logo:focus-visible { outline: 2px solid var(--jf-texto) !important; outline-offset: -2px; border-radius: inherit; }

/* Cor de fundo da marca (Painel → Marcas): na zona do logótipo, no carrossel e no mural. */
html body .jf-marca--cor .jf-marca__logo { background-color: var(--jf-marca-fundo); }
html body .jf-marca--cor .jf-marca__logo img { mix-blend-mode: normal; filter: none !important; }
html body .jf-carrossel .jf-marca--cor:hover { background-color: var(--jf-marca-fundo); }

html body .jf-carrossel__base {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--jf-e-3) var(--jf-e-5);
	margin-top: var(--jf-e-6);
}
html body .jf-carrossel__pausa {
	min-height: 44px;
	padding: 0 var(--jf-e-4);
	border: 1px solid var(--jf-linha-forte);
	border-radius: var(--jf-raio);
	background: transparent;
	color: var(--jf-texto);
	font: 500 var(--jf-t-pequeno) / 1 var(--jf-sans);
	cursor: pointer;
}
html body .jf-carrossel__pausa:hover { border-color: var(--jf-texto); }
@media (prefers-reduced-motion: no-preference) {
	html body .jf-carrossel__fila { animation: jf-carrossel calc(var(--jf-n, 30) * 4.5s) linear infinite; }
	html body .jf-carrossel:is(:hover, .is-pausado) .jf-carrossel__fila { animation-play-state: paused; }
	html body .jf-carrossel__janela:focus-within { overflow-x: auto; }
	html body .jf-carrossel__janela:focus-within .jf-carrossel__fila { animation: none; }
}
@keyframes jf-carrossel { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
	html body .jf-carrossel__janela { overflow-x: auto; scroll-snap-type: x mandatory; }
	html body .jf-carrossel__fila > .jf-marca { scroll-snap-align: start; }
	html body .jf-carrossel__fila[aria-hidden="true"],
	html body .jf-carrossel__pausa { display: none; }
}
@media (max-width: 1099px) { html body .jf-carrossel { --jf-carrossel-visiveis: 3; } }
@media (max-width: 699px) { html body .jf-carrossel { --jf-carrossel-visiveis: 2; } }

/* Logótipos novos (800×500, transparentes): sem ampliação nem filtro, também no mural da página Marcas. */
html body .jf-marcas--mural .jf-marca--sem-margem .jf-marca__logo img,
html body .jf-marcas--mural .jf-marca--sem-margem:hover .jf-marca__logo img { width: 82%; transform: none; filter: none; }

/* Factos */
html body .jf-factos .jf-facto { margin: 0; }

/* Categorias */
html body .jf-categorias {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: var(--jf-e-4);
}
html body .jf-categoria {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--jf-e-3);
	min-height: 240px;
	padding: var(--jf-e-6);
	box-sizing: border-box;
	background-color: var(--jf-superficie);
	border: 1px solid var(--jf-linha);
	border-radius: var(--jf-raio-painel);
	transition: border-color var(--jf-dur-curta);
}
html body .jf-categoria p { margin: 0; color: var(--jf-texto-2); }
html body .jf-categoria__icone {
	width: 48px; height: 48px;
	color: var(--jf-texto-2);
	margin-bottom: var(--jf-e-3);
	transition: color var(--jf-dur-curta), transform .35s var(--jf-ease);
}
html body .jf-categoria__link { color: inherit; text-decoration: none; }
html body .jf-categoria__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
html body .jf-categoria__link:focus-visible { outline: none !important; }
html body .jf-categoria:has(.jf-categoria__link:focus-visible) { outline: 2px solid var(--jf-texto); outline-offset: 3px; }
html body .jf-categoria__seta {
	margin-top: auto;
	align-self: flex-end;
	color: var(--jf-texto);
	transition: transform .35s var(--jf-ease), color var(--jf-dur-curta);
}
html body .jf-categoria__seta .jf-icone { width: 24px; height: 24px; }
html body .jf-categoria:has(.jf-categoria__link):hover { border-color: var(--jf-acento); }
html body .jf-categoria:has(.jf-categoria__link):hover .jf-categoria__icone { color: var(--jf-acento); transform: translateY(-3px); }
html body .jf-categoria:has(.jf-categoria__link):hover .jf-categoria__seta { color: var(--jf-acento); transform: translateX(4px); }
html body .jf-categoria__sub { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: var(--jf-e-3); }

/* Preços para clientes */
html body .jf-home__precos { display: grid; gap: var(--jf-e-6); }
html body .jf-home__precos .jf-cadeado { margin: 0 0 var(--jf-e-4); }
html body .jf-passos p { margin: var(--jf-e-2) 0 0; }

/* Contacto final (escuro) */
html body .jf-home__final { background-color: var(--jf-texto); color: rgba(255, 255, 255, .78); }
html body .jf-home__final .jf-display { color: #fff; }
html body .jf-home__final .jf-lead { color: rgba(255, 255, 255, .72); margin: var(--jf-e-5) 0 0; }
html body .jf-home__final-in {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: var(--jf-e-7);
	align-items: end;
}
html body .jf-home__canais { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
html body .jf-home__canais a {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	height: 100%;
	box-sizing: border-box;
	padding: 18px;
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: var(--jf-raio-painel);
	color: #fff;
	text-decoration: none;
	transition: border-color var(--jf-dur-curta), background-color var(--jf-dur-curta);
}
html body .jf-home__canais a span { min-width: 0; }

/* A secção final e o rodapé são ambos escuros: uma linha fina separa-os. */
html body .jf-home + .jf-rod,
html body .elementor-location-footer .jf-rod { border-top: 1px solid rgba(255, 255, 255, .12); }
html body .jf-home__canais a:hover { border-color: #fff; background-color: rgba(255, 255, 255, .04); }
html body .jf-home__canais .jf-icone { width: 22px; height: 22px; margin-top: 2px; color: rgba(255, 255, 255, .7); }
html body .jf-home__canais small {
	display: block;
	margin-bottom: 2px;
	font-size: var(--jf-t-micro);
	letter-spacing: .06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .55);
}

/* Contactos: locais */
html body .jf-locais {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: var(--jf-e-5);
}
html body .jf-local {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background-color: var(--jf-superficie);
	border: 1px solid var(--jf-linha);
	border-radius: var(--jf-raio-painel);
}
html body .jf-mapa {
	display: grid;
	place-content: center;
	justify-items: center;
	gap: var(--jf-e-3);
	aspect-ratio: 16 / 9;
	padding: var(--jf-e-5);
	box-sizing: border-box;
	background-color: #E2E0DA;
	text-align: center;
}
html body .jf-mapa p { margin: 0; }
html body .jf-mapa.is-carregado { display: block; padding: 0; }
html body .jf-mapa iframe { display: block; width: 100%; height: 100%; border: 0; }
html body .jf-local__info { display: grid; gap: var(--jf-e-4); padding: var(--jf-e-6); }
html body .jf-local__info address { font-style: normal; color: var(--jf-texto-2); }
html body .jf-local__contactos li { display: flex; align-items: center; gap: .6em; }
html body .jf-local__contactos li + li { margin-top: .4rem; }
html body .jf-local__contactos .jf-icone { width: 18px; height: 18px; color: var(--jf-texto-2); }
html body .jf-local__contactos a { color: var(--jf-texto); }

/* Contactos: comerciais */
html body .jf-filtro { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--jf-e-6); }
html body .jf-filtro .jf-etiqueta { min-height: 40px; padding-inline: 1em; cursor: pointer; font-family: var(--jf-sans); }
/* Lista de comerciais: uma linha por comercial (nome e função · concelhos · "Ver contacto"), contacto em acordeão.
   Ao escolher a zona ficam só os dessa zona (e os de "Todos os concelhos"), já abertos e com a zona a vermelho. */
html body .jf-comerciais__cabeca {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--jf-e-5) var(--jf-e-7);
	margin-bottom: var(--jf-e-6);
}
html body .jf-comerciais__cabeca .jf-home__cabeca { margin-bottom: 0; }
html body .jf-comerciais__zona { flex: 0 1 320px; margin: 0; }
html body .jf-comerciais__zona label {
	font-size: var(--jf-t-micro);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--jf-texto-2);
}
html body .jf-comerciais__zona select { cursor: pointer; }
html body .jf-comerciais__estado { margin: 0 0 var(--jf-e-3); min-height: 1.4em; }
html body .jf-comerciais { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--jf-linha); }
html body .jf-comercial { border-bottom: 1px solid var(--jf-linha); }
html body .jf-comercial[hidden] { display: none; }
html body .jf-comercial__linha {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
	align-items: center;
	gap: var(--jf-e-3) var(--jf-e-5);
	padding-block: var(--jf-e-4);
}
html body .jf .jf-comercial__nome { margin: 0; font: 500 1.0625rem / 1.3 var(--jf-sans); letter-spacing: 0; }
html body .jf .jf-comercial__funcao {
	margin: .15rem 0 0;
	font-size: var(--jf-t-micro);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--jf-texto-2);
}
html body .jf .jf-comercial__zonas { margin: 0; font-size: var(--jf-t-pequeno); color: var(--jf-texto-2); }
html body .jf-comercial__zona + .jf-comercial__zona::before { content: " · "; color: var(--jf-linha-forte); }
html body .jf-comercial__zona.is-ativa,
html body .jf-comercial.is-filtrado .jf-comercial__zona.is-todas { color: var(--jf-acento); font-weight: 500; }
html body .jf-comercial__ver {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	min-height: 44px; /* área de toque */
	padding: 0;
	border: 0;
	background: none;
	color: var(--jf-texto);
	font: 500 var(--jf-t-micro) / 1 var(--jf-sans);
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
}
html body .jf-comercial__ver:hover { color: var(--jf-acento); }
html body .jf-comercial__seta { width: 16px; height: 16px; transition: transform var(--jf-dur-curta) ease; }
html body .jf-comercial__ver[aria-expanded="true"] .jf-comercial__seta { transform: rotate(180deg); }
html body .jf-comercial__contacto { padding: 0 0 var(--jf-e-5); }
html body .jf-comercial__contacto[hidden] { display: none; }
html body .jf-comercial__contacto .jf-btn { min-height: 44px; font-size: var(--jf-t-pequeno); }
html body .jf-comercial .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
@media (max-width: 699px) {
	html body .jf-comerciais__zona { flex-basis: 100%; }
	html body .jf-comercial__linha { grid-template-columns: minmax(0, 1fr) auto; }
	html body .jf-comercial__zonas { grid-column: 1; grid-row: 2; }
	html body .jf-comercial__ver { grid-column: 2; grid-row: 1 / span 2; }
	html body .jf-comercial__contacto .jf-btn { flex: 1 1 100%; }
}

/* Contactos: formulário */
html body .jf-contactos__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: var(--jf-e-7);
	align-items: start;
}
html body .jf-contactos__form .jf-painel > p { margin: var(--jf-e-3) 0 var(--jf-e-6); }
html body .jf-contactos__lado { display: grid; gap: var(--jf-e-6); padding-top: var(--jf-e-3); }
html body .jf-contactos__lado p { margin: 0; }
html body .jf-contactos__rotulo { color: var(--jf-texto-2) !important; }

html body .jf-form .jf-form__grelha {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--jf-e-5);
}
html body .jf-form .jf-campo { margin: 0; }
html body .jf-form .jf-campo--largo { grid-column: 1 / -1; }
html body .jf-form .jf-campo > label { display: block; margin-bottom: var(--jf-e-2); }
html body .jf-form .wpcf7-form-control-wrap { display: block; }
html body .jf-form .jf-campo :is(input, textarea) {
	width: 100%;
	min-height: 48px;
	padding: .75rem .875rem;
	box-sizing: border-box;
	border: 1px solid var(--jf-linha-forte);
	border-radius: var(--jf-raio);
	background-color: var(--jf-superficie);
	color: var(--jf-texto);
	font: inherit;
}
html body .jf-form .jf-campo textarea { min-height: 160px; resize: vertical; }
html body .jf-form .jf-campo :is(input, textarea):focus { border-color: var(--jf-texto); }
html body .jf-form .jf-campo :is(input, textarea):focus-visible { outline: 2px solid var(--jf-texto) !important; outline-offset: 2px !important; }
html body .jf-form .wpcf7-not-valid { border-color: var(--jf-acento) !important; }
html body .jf-form .wpcf7-not-valid-tip { margin-top: 6px; font-size: var(--jf-t-pequeno); color: var(--jf-acento); }
html body .jf-form .jf-form__aceitar { margin: var(--jf-e-5) 0; font-size: var(--jf-t-pequeno); }
html body .jf-form .jf-form__aceitar label { display: flex; gap: 10px; align-items: flex-start; }
html body .jf-form .jf-form__aceitar input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--jf-acento); }
html body .jf-form .jf-form__aceitar a { color: var(--jf-texto); text-decoration: underline; }
html body .jf-form input[type="submit"].jf-btn { border: 0; }
html body .jf-form .wpcf7-spinner { margin-left: 12px; }
html body .jf-form .wpcf7-response-output {
	margin: var(--jf-e-5) 0 0 !important;
	padding: var(--jf-e-4) !important;
	border: 1px solid var(--jf-linha-forte) !important;
	border-radius: var(--jf-raio);
	font-size: var(--jf-t-pequeno);
}
html body .jf-form.sent .wpcf7-response-output { border-color: var(--jf-texto) !important; }
html body .jf-form.invalid .wpcf7-response-output,
html body .jf-form.failed .wpcf7-response-output { border-color: var(--jf-acento) !important; }

/* Responsivo */
@media (max-width: 899px) {
	html body .jf-home__final-in,
	html body .jf-contactos__form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	html body .jf-home__canais,
	html body .jf-form .jf-form__grelha { grid-template-columns: minmax(0, 1fr); }
	html body .jf-categoria { min-height: 0; padding: var(--jf-e-5); }
	html body .jf-acoes .jf-btn { flex: 1 1 100%; }
}


/* ==========================================================================
   Marcas e Galeria (Fase 5)
   ========================================================================== */

html body :is(.jf-fotos) { list-style: none; margin: 0; padding: 0; }
html body .jf-pag__abertura { padding-block: clamp(3rem, 2rem + 5vw, 7rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }
html body .jf-pag__abertura .jf-lead { margin: var(--jf-e-5) 0 0; }
html body .jf-pag__filtro { margin-bottom: var(--jf-e-3); }
html body .jf-pag__estado { margin: 0 0 var(--jf-e-5); font-size: var(--jf-t-pequeno); }
html body [data-jf-filtrar] > [hidden] { display: none !important; }

/* Marcas: mural com 5 colunas no computador, 3 no tablet, 2 no telemóvel. */
html body .jf-marcas--mural { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* Logótipos 301×301 com fundo #FFFAF4: brightness(1.05) torna-o branco puro e o "multiply" funde-o com o cartão. */
html body .jf-marcas--mural .jf-marca__logo img { width: 70%; transform: scale(1.3); filter: brightness(1.05); }
html body .jf-marcas--mural .jf-marca:hover .jf-marca__logo img { transform: scale(1.36); }
html body .jf-marca--link { position: relative; }
html body .jf-marca__ligacao { display: grid; gap: 4px; color: var(--jf-texto-2); text-decoration: none; }
html body .jf-marca__ligacao::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
html body .jf-marca__ligacao:focus-visible { outline: none !important; }
html body .jf-marca--link:has(.jf-marca__ligacao:focus-visible) { outline: 2px solid var(--jf-texto); outline-offset: 3px; }
html body .jf-marca__ver {
	font-size: var(--jf-t-micro);
	letter-spacing: 0;
	text-transform: none;
	color: var(--jf-texto);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: var(--jf-linha-forte);
}
html body .jf-marca--link:hover .jf-marca__ver { color: var(--jf-acento); text-decoration-color: currentColor; }
html body .jf-marca--texto { justify-content: center; min-height: 8rem; }
html body .jf-marca--texto .jf-marca__nome { padding: 16px 12px; }
@media (max-width: 1099px) {
	html body .jf-marcas--mural { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
	html body .jf-marcas--mural { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	html body .jf-marcas--mural .jf-marca:not(.jf-marca--sem-margem) .jf-marca__logo img { transform: scale(1.22); }
}

/* Fecho com um só botão */
html body .jf-pag__fecho-in {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--jf-e-6);
	align-items: end;
}
html body .jf-pag__fecho .jf-lead { margin: var(--jf-e-4) 0 0; }
@media (max-width: 899px) {
	html body .jf-pag__fecho-in { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

/* Galeria: grelha em que as fotos ao alto ocupam duas linhas. */
html body .jf-fotos {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(150px, 12vw + 40px, 250px);
	grid-auto-flow: dense;
	gap: 12px;
}
html body .jf-foto--alta { grid-row: span 2; }
html body .jf-foto figure { position: relative; height: 100%; margin: 0; overflow: hidden; border-radius: var(--jf-raio-painel); background-color: var(--jf-linha); }
html body .jf-foto__abrir { display: block; height: 100%; cursor: zoom-in; }
html body .jf-foto__abrir img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s var(--jf-ease);
}
html body .jf-foto__abrir:focus-visible { outline: none !important; }
html body .jf-foto figure:has(.jf-foto__abrir:focus-visible) { outline: 2px solid var(--jf-texto); outline-offset: 3px; }
html body .jf-foto figcaption {
	position: absolute;
	inset: auto 0 0;
	display: grid;
	gap: 2px;
	padding: 36px 14px 12px;
	font: 500 var(--jf-t-pequeno) / 1.3 var(--jf-sans);
	color: #fff;
	background: linear-gradient(to top, rgba(20, 20, 22, .78), rgba(20, 20, 22, 0));
	pointer-events: none;
}
html body .jf-foto__grupo { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; opacity: .78; }
@media (hover: hover) {
	html body .jf-foto figcaption { opacity: 0; transform: translateY(6px); transition: opacity var(--jf-dur-curta), transform .35s var(--jf-ease); }
	html body .jf-foto:hover figcaption,
	html body .jf-foto figure:has(:focus-visible) figcaption { opacity: 1; transform: none; }
	html body .jf-foto:hover .jf-foto__abrir img { transform: scale(1.04); }
}
@media (max-width: 1099px) {
	html body .jf-fotos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
	html body .jf-fotos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; grid-auto-rows: 160px; }
	html body .jf-foto figcaption { padding: 28px 10px 8px; font-size: .75rem; }
	html body .jf-foto__grupo { display: none; }
}

/* Vista ampliada */
html.jf-sem-scroll { overflow: hidden; }
html body .jf-ampliada {
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: clamp(56px, 6vw, 72px) clamp(12px, 7vw, 96px) clamp(16px, 3vw, 32px);
	box-sizing: border-box;
	border: 0;
	background: rgba(20, 20, 22, .96);
	color: #fff;
}
html body .jf-ampliada::backdrop { background: rgba(20, 20, 22, .6); }
html body .jf-ampliada[open] { display: grid; place-items: center; }
html body .jf-ampliada__figura { display: grid; justify-items: center; gap: var(--jf-e-4); max-height: 100%; margin: 0; min-height: 0; }
html body .jf-ampliada__figura img {
	max-width: 100%;
	max-height: calc(100dvh - 160px);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: var(--jf-raio-painel);
}
html body .jf-ampliada figcaption { font: 400 var(--jf-t-pequeno) / 1.4 var(--jf-sans); text-align: center; color: #fff; }
html body .jf-ampliada .jf-secundario { color: rgba(255, 255, 255, .62); }
html body .jf-ampliada__botao {
	position: absolute;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: var(--jf-raio);
	background: rgba(20, 20, 22, .5);
	color: #fff;
	cursor: pointer;
	transition: border-color var(--jf-dur-curta), background-color var(--jf-dur-curta);
}
html body .jf-ampliada__botao:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
html body .jf-ampliada__botao:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html body .jf-ampliada__botao .jf-icone { width: 22px; height: 22px; }
html body .jf-ampliada__fechar { top: 12px; right: 12px; }
html body .jf-ampliada__ant,
html body .jf-ampliada__seg { top: 50%; translate: 0 -50%; }
html body .jf-ampliada__ant { left: 12px; }
html body .jf-ampliada__ant .jf-icone { transform: rotate(180deg); }
html body .jf-ampliada__seg { right: 12px; }
@media (max-width: 699px) {
	html body .jf-ampliada__ant,
	html body .jf-ampliada__seg { top: auto; bottom: 12px; translate: none; }
	html body .jf-ampliada__figura img { max-height: calc(100dvh - 190px); }
}
