/* Search: icon button in the header + a compact panel that drops below the bar. */
.bl-search--btn {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--bl-nav);
	cursor: pointer;
	transition: color 0.2s ease;
}

.bl-search--btn:hover {
	color: var(--bl-brand-2);
}

.bl-sp {
	position: fixed;
	left: 0;
	right: 0;
	top: var(--bl-sp-top, 110px);
	z-index: 1100;
	max-height: calc(100vh - var(--bl-sp-top, 110px) - 16px);
	overflow-y: auto;
	border-bottom: 1px solid var(--bl-line);
	background: var(--bl-bg);
	box-shadow: 0 30px 50px -30px rgba(79, 64, 34, 0.35);
	animation: bl-sp-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bl-sp[hidden],
.bl-sp__veil[hidden] {
	display: none;
}

@keyframes bl-sp-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
}

.bl-sp__veil {
	position: fixed;
	inset: 0;
	z-index: 1090;
	background: rgba(40, 34, 20, 0.28);
	animation: bl-sp-fade 0.25s ease;
}

@keyframes bl-sp-fade {
	from {
		opacity: 0;
	}
}

.bl-sp__in {
	max-width: 960px;
	margin: 0 auto;
	padding: 18px 20px 26px;
}

.bl-sp__form {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 8px 6px 20px;
	border: 0;
	border-radius: 9999px;
	background: rgba(234, 226, 211, 0.55);
	box-shadow: none;
	transition: background-color 0.25s ease;
}

/* one calm field: a sand pill, no outline and no ring, a touch deeper while typing */
.bl-sp__form:focus-within {
	background: rgba(234, 226, 211, 0.85);
	box-shadow: none;
}

.bl-sp__ico {
	display: grid;
	color: var(--bl-brand-2);
}

.bl-sp__input {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--bl-brand);
	font: 400 17px/1 var(--bl-sans);
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.bl-sp__input::placeholder {
	color: var(--bl-brand-3);
}

.bl-sp__input::-webkit-search-cancel-button {
	display: none;
}

.bl-sp__switch {
	display: flex;
	flex: none;
	padding: 3px;
	border-radius: 9999px;
	background: transparent;
}

.bl-sp__switch button {
	height: 32px;
	padding: 0 16px;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	color: var(--bl-brand-2);
	font: 400 12px/1 var(--bl-sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.bl-sp__switch button[aria-selected='true'] {
	background: #fbf9f5;
	color: var(--bl-brand);
}

.bl-sp__close {
	display: grid;
	place-items: center;
	flex: none;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--bl-brand);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.bl-sp__close:hover {
	background: var(--bl-brand-hover);
}

.bl-sp__body {
	min-height: 8px;
	padding-top: 18px;
}

.bl-sp__label {
	margin: 0 0 10px;
	color: var(--bl-brand-2);
	font: 400 11px/1 var(--bl-sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.bl-sp__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.bl-sp__chips a {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--bl-line);
	border-radius: 9999px;
	color: var(--bl-brand);
	font: 400 13px/1 var(--bl-sans);
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bl-sp__chips a:hover {
	border-color: var(--bl-brand-3);
	background: var(--bl-brand-hover);
}

.bl-sp__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bl-sp__item a {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 8px 10px;
	border-radius: 16px;
	color: var(--bl-brand);
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.bl-sp__item a:hover,
.bl-sp__item a:focus-visible {
	background: rgba(234, 226, 211, 0.38);
}

.bl-sp__thumb {
	flex: none;
	width: 76px;
	height: 95px;
	overflow: visible;
}

.bl-sp__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.bl-sp__name {
	display: block;
	font: 400 16px/1.25 var(--bl-serif);
}

.bl-sp__price {
	display: block;
	margin-top: 4px;
	color: var(--bl-brand-2);
	font: 400 12.5px/1.2 var(--bl-sans);
}

.bl-sp__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding-bottom: 2px;
	border-bottom: 1px solid var(--bl-brand-3);
	color: var(--bl-brand);
	font: 400 12px/1.2 var(--bl-sans);
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
}

.bl-sp__all:hover {
	border-color: var(--bl-brand);
}

.bl-sp__none {
	margin: 4px 0 0;
	color: var(--bl-brand-2);
	font: 400 14px/1.4 var(--bl-sans);
}

.bl-sp__item {
	animation: bl-sp-rise 0.3s ease backwards; /* backwards, not both: a finished animation must not leave a stacking context that stops the photo blending into the page */
	animation-delay: calc(var(--i, 0) * 40ms);
}

@keyframes bl-sp-rise {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

@media (max-width: 959px) {
	.bl-sp__in {
		padding: 12px 12px 22px;
	}
	.bl-sp__form {
		flex-wrap: wrap;
		padding: 6px 8px 8px 14px;
		border-radius: 24px;
	}
	.bl-sp__input {
		flex: 1 1 60%;
		font-size: 16px;
	}
	.bl-sp__switch {
		order: 3;
		flex: 1 1 100%;
	}
	.bl-sp__switch button {
		flex: 1;
	}
	.bl-sp__list {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bl-sp,
	.bl-sp__veil,
	.bl-sp__item {
		animation: none;
	}
}

/* ---------------------------------------------------------------- results page */
.bl-sres {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: clamp(40px, 6vw, 72px) 20px 24px;
	text-align: center;
}

.bl-sres__eyebrow {
	margin: 0;
	color: var(--bl-brand-2);
	font: 400 11px/1.2 var(--bl-sans);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.bl-sres__title {
	margin: 0;
	color: var(--bl-brand);
	font: 300 clamp(30px, 4.4vw, 48px)/1.15 var(--bl-serif);
	text-wrap: balance;
	overflow-wrap: anywhere;
}

.bl-sres__form {
	display: flex;
	align-items: center;
	gap: 12px;
	width: min(560px, 100%);
	margin-top: 6px;
	padding: 6px 6px 6px 20px;
	border-radius: 9999px;
	background: rgba(234, 226, 211, 0.55);
	color: var(--bl-brand-2);
	transition: background-color 0.25s ease;
}

.bl-sres__form:focus-within {
	background: rgba(234, 226, 211, 0.85);
}

.bl-sres__form input[type='search'] {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--bl-brand);
	font: 400 16px/1 var(--bl-sans);
	-webkit-appearance: none;
	appearance: none;
}

.bl-sres__form input::placeholder {
	color: var(--bl-brand-2);
	opacity: 0.7;
}

.bl-sres__form .bl-pill {
	flex: none;
}

.bl-sres__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 18px;
	margin-top: 4px;
}

.bl-sres__count {
	margin: 0;
	color: var(--bl-brand-2);
	font: 400 14px/1.4 var(--bl-sans);
}

.bl-sres__tabs {
	display: flex;
	gap: 8px;
}

.bl-sres__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 16px;
	border-radius: 9999px;
	background: transparent;
	color: var(--bl-brand);
	font: 400 12px/1 var(--bl-sans);
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease;
}

.bl-sres__tab span {
	color: var(--bl-brand-2);
}

.bl-sres__tab:hover,
.bl-sres__tab.is-on {
	background: var(--bl-brand-hover);
}

/* nothing found */
.bl-sres__empty {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 56px 20px 72px;
	text-align: center;
	list-style: none;
}

.bl-sres__none {
	margin: 0;
	color: var(--bl-brand);
	font: 300 clamp(22px, 3vw, 30px)/1.25 var(--bl-serif);
}

.bl-sres__hint {
	margin: 0 0 12px;
	color: var(--bl-brand-2);
	font: 400 14px/1.6 var(--bl-sans);
}

.bl-sres__chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}
