/*
 * Gemelly — pesquisa (lupa do cabeçalho + janela, e o campo da página de
 * resultados). Medidas em px/em: o Bricks deixa 1rem = 10px.
 */

.gml-pesq {
	font-family: var(--gml-fonte-texto);
	color: var(--gml-texto);
}

/* Lupa ------------------------------------------------------------------ */
.gml-pesq__abrir {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: var(--gml-primaria);
	transition: background-color var(--gml-transicao), color var(--gml-transicao);
}
.gml-pesq__abrir:hover { background: var(--gml-suave); }
.gml-pesq__abrir:focus-visible { outline: 2px solid var(--gml-acento); outline-offset: 2px; }

/* Janela ---------------------------------------------------------------- */
html.gml-pesq-aberta { overflow: hidden; }

.gml-pesq__janela {
	position: fixed;
	inset: 0 0 auto 0;
	width: 100%;
	max-width: none;
	max-height: 100dvh;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--gml-texto);
	overflow: auto;
}
.gml-pesq__janela::backdrop {
	background: rgba(46, 35, 30, .46);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.gml-pesq__janela[open] .gml-pesq__caixa { animation: gmlPesqDesce .38s cubic-bezier(.2, .7, .2, 1) both; }
.gml-pesq__janela[open]::backdrop { animation: gmlPesqFundo .3s ease both; }
@keyframes gmlPesqDesce { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes gmlPesqFundo { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	.gml-pesq__janela[open] .gml-pesq__caixa,
	.gml-pesq__janela[open]::backdrop { animation: none; }
}

.gml-pesq__caixa {
	background: var(--gml-fundo);
	padding: 28px clamp(20px, 5vw, 64px) 44px;
	box-shadow: 0 30px 60px -30px rgba(46, 35, 30, .45);
	border-bottom: 1px solid var(--gml-borda);
}
.gml-pesq__interno { max-width: 860px; margin: 0 auto; }

.gml-pesq__topo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}
.gml-pesq__sobre,
.gml-pesq__rotulo {
	margin: 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--gml-acento);
}
.gml-pesq__fechar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--gml-borda);
	border-radius: 50%;
	background: transparent;
	color: var(--gml-primaria);
	cursor: pointer;
	transition: border-color var(--gml-transicao), transform var(--gml-transicao);
}
.gml-pesq__fechar:hover { border-color: var(--gml-primaria); transform: rotate(90deg); }

/* Formulário (janela e página) ------------------------------------------ */
.gml-pesq__form {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	border-bottom: 1px solid var(--gml-primaria);
	padding: 4px 0 10px;
}
.gml-pesq__lupa { display: inline-flex; color: var(--gml-acento); }
.gml-pesq .gml-pesq__campo {
	flex: 1;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--gml-fonte-titulo);
	font-size: clamp(22px, 3.4vw, 34px);
	line-height: 1.2;
	color: var(--gml-primaria);
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.gml-pesq .gml-pesq__campo::placeholder { color: var(--gml-taupe); opacity: .75; }
.gml-pesq .gml-pesq__campo::-webkit-search-cancel-button { -webkit-appearance: none; }
.gml-pesq__form:focus-within { border-bottom-color: var(--gml-acento); }
.gml-pesq__enviar {
	flex: none;
	padding: 13px 22px;
	border: 1px solid var(--gml-primaria);
	border-radius: 2px;
	background: var(--gml-primaria);
	color: var(--gml-fundo);
	font-family: var(--gml-fonte-texto);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color var(--gml-transicao), color var(--gml-transicao);
}
.gml-pesq__enviar:hover { background: transparent; color: var(--gml-primaria); }
.gml-pesq__enviar:focus-visible,
.gml-pesq__atalho:focus-visible,
.gml-pesq__item:focus-visible,
.gml-pesq__todos:focus-visible { outline: 2px solid var(--gml-acento); outline-offset: 3px; }

/* Na página de resultados: campo mais discreto. */
.gml-pesq--campo .gml-pesq__form { text-align: left; border: 1px solid var(--gml-borda); border-radius: 999px; padding: 6px 6px 6px 22px; background: var(--gml-superficie); }
.gml-pesq--campo .gml-pesq__form:focus-within { border-color: var(--gml-acento); }
.gml-pesq--campo .gml-pesq__campo { font-family: var(--gml-fonte-texto); font-size: 15px; padding: 10px 0; text-align: left; }
.gml-pesq--campo .gml-pesq__enviar { border-radius: 999px; }

/* Atalhos --------------------------------------------------------------- */
.gml-pesq__atalhos { margin-top: 26px; }
.gml-pesq__atalhos[hidden] { display: none; }
.gml-pesq__atalhos ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.gml-pesq__atalho {
	display: inline-block;
	padding: 9px 18px;
	border: 1px solid var(--gml-borda);
	border-radius: 999px;
	font-size: 12.5px;
	letter-spacing: .04em;
	color: var(--gml-primaria);
	text-decoration: none;
	transition: border-color var(--gml-transicao), background-color var(--gml-transicao);
}
.gml-pesq__atalho:hover { border-color: var(--gml-acento); background: var(--gml-superficie); }

/* Resultados ------------------------------------------------------------ */
.gml-pesq__resultados { margin-top: 26px; }
.gml-pesq__resultados:empty { display: none; }
.is-buscando .gml-pesq__resultados { opacity: .55; transition: opacity .2s ease; }
.gml-pesq__lista {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px 24px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
.gml-pesq__item {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px;
	margin: 0 -10px;
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
	transition: background-color var(--gml-transicao);
}
.gml-pesq__item:hover { background: var(--gml-superficie); }
.gml-pesq__foto {
	flex: none;
	width: 64px;
	height: 76px;
	overflow: hidden;
	border-radius: 6px;
	background: var(--gml-suave);
}
.gml-pesq__foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gml-pesq__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gml-pesq__nome { font-family: var(--gml-fonte-titulo); font-size: 18px; line-height: 1.25; color: var(--gml-primaria); }
.gml-pesq__preco { font-size: 13px; letter-spacing: .06em; color: var(--gml-texto-suave); }
.gml-pesq__preco del { opacity: .6; margin-right: 6px; }
.gml-pesq__preco ins { text-decoration: none; }
.gml-pesq__todos {
	display: inline-flex;
	margin-top: 20px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--gml-primaria);
	text-decoration: none;
	border-bottom: 1px solid var(--gml-acento);
	padding-bottom: 4px;
}
.gml-pesq__vazio { margin: 0; font-size: 14px; line-height: 1.7; color: var(--gml-texto-suave); }

@media (max-width: 640px) {
	.gml-pesq__caixa { padding-top: 20px; padding-bottom: 28px; }
	.gml-pesq__lista { grid-template-columns: 1fr; }
	.gml-pesq--icone .gml-pesq__enviar { display: none; } /* no celular o Enter do teclado pesquisa */
}
