.clc-catalog-search {
	position: relative;
	width: 100%;
	max-width: 720px;
}

.clc-catalog-search__form {
	position: relative;
	margin: 0;
}

.clc-catalog-search__control {
	position: relative;
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	align-items: center;
	min-height: 52px;
	overflow: hidden;
	border: 1px solid var(--clc-line, #dfe4dc);
	border-radius: 999px;
	background: #fff;
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.clc-catalog-search__control:focus-within {
	border-color: var(--clc-green-600, #21722d);
	box-shadow: 0 0 0 3px rgba(33, 114, 45, 0.13);
}

.clc-catalog-search__icon {
	width: 20px;
	height: 20px;
	margin-left: 16px;
	fill: none;
	stroke: var(--clc-green-700, #21722d);
	stroke-linecap: round;
	stroke-width: 1.8;
}

.clc-catalog-search__input {
	width: 100%;
	min-width: 0;
	height: 50px;
	margin: 0;
	padding: 0 12px;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--clc-ink, #20231f);
	font: inherit;
	font-size: 0.875rem;
}

.clc-catalog-search__input::placeholder {
	color: var(--clc-muted, #667066);
	opacity: 0.9;
}

.clc-catalog-search__input::-webkit-search-cancel-button {
	cursor: pointer;
}

.clc-catalog-search__submit {
	align-self: stretch;
	margin: 4px;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: var(--clc-green-700, #21722d);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 750;
	letter-spacing: 0.055em;
	text-transform: uppercase;
	transition: background-color 140ms ease, transform 100ms ease;
}

.clc-catalog-search__submit:hover {
	background: var(--clc-green-900, #123d22);
}

.clc-catalog-search__submit:active {
	transform: translateY(1px);
}

.clc-catalog-search__submit:focus-visible {
	outline: 3px solid rgba(33, 114, 45, 0.28);
	outline-offset: 2px;
}

.clc-catalog-search__submit-icon {
	display: none;
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 2;
}

.clc-catalog-search__panel {
	position: absolute;
	z-index: 120;
	top: calc(100% + 10px);
	right: 0;
	left: 0;
	max-height: min(560px, 72vh);
	overflow: auto;
	border: 1px solid var(--clc-line, #dfe4dc);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 22px 55px rgba(18, 61, 34, 0.17);
}

.clc-catalog-search__section {
	margin: 0;
	padding: 8px;
}

.clc-catalog-search__section + .clc-catalog-search__section {
	border-top: 1px solid var(--clc-line, #dfe4dc);
}

.clc-catalog-search__heading {
	margin: 0;
	padding: 8px 8px 4px;
	color: var(--clc-muted, #667066);
	font-size: 0.625rem;
	font-weight: 750;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.clc-catalog-search__category,
.clc-catalog-search__product {
	color: var(--clc-ink, #20231f);
	text-decoration: none;
}

.clc-catalog-search__category {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	padding: 8px;
	border-radius: 10px;
}

.clc-catalog-search__category::before {
	display: inline-grid;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	place-items: center;
	border-radius: 50%;
	background: var(--clc-sage, #dce8d8);
	color: var(--clc-green-900, #123d22);
	content: "↗";
	font-size: 0.875rem;
}

.clc-catalog-search__category-name {
	margin-right: auto;
	font-size: 0.875rem;
	font-weight: 700;
}

.clc-catalog-search__category-count {
	color: var(--clc-muted, #667066);
	font-size: 0.75rem;
}

.clc-catalog-search__product {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	padding: 8px 8px;
	border-radius: 10px;
}

.clc-catalog-search__category:hover,
.clc-catalog-search__category.is-active,
.clc-catalog-search__product:hover,
.clc-catalog-search__product.is-active {
	background: var(--clc-surface, #fbf9f4);
}

.clc-catalog-search__category:focus-visible,
.clc-catalog-search__product:focus-visible {
	outline: 2px solid var(--clc-green-600, #21722d);
	outline-offset: -2px;
}

.clc-catalog-search__product-image {
	width: 64px;
	height: 64px;
	border-radius: 10px;
	background: var(--clc-cream, #f5f1e8);
	object-fit: cover;
}

.clc-catalog-search__product-copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 4px;
}

.clc-catalog-search__product-name {
	overflow: hidden;
	font-size: 0.875rem;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.clc-catalog-search__product-meta {
	overflow: hidden;
	color: var(--clc-muted, #667066);
	font-size: 0.625rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.clc-catalog-search__product-price {
	color: var(--clc-green-900, #123d22);
	font-size: 0.75rem;
	font-weight: 750;
	white-space: nowrap;
}

.clc-catalog-search__product-price del {
	display: none;
}

.clc-catalog-search__all {
	width: 100%;
	padding: 12px 16px;
	border: 0;
	border-top: 1px solid var(--clc-line, #dfe4dc);
	background: var(--clc-cream, #f5f1e8);
	color: var(--clc-green-900, #123d22);
	cursor: pointer;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 750;
	letter-spacing: 0.035em;
	text-transform: uppercase;
}

.clc-catalog-search__all:hover {
	background: var(--clc-sage, #dce8d8);
}

.clc-catalog-search__empty {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 24px;
	color: var(--clc-muted, #667066);
	font-size: 0.875rem;
}

.clc-catalog-search__empty strong {
	color: var(--clc-ink, #20231f);
	font-size: 1rem;
}

.clc-catalog-search__empty a {
	align-self: flex-start;
	margin-top: 8px;
	color: var(--clc-green-700, #21722d);
	font-weight: 700;
	text-underline-offset: 3px;
}

.clc-catalog-search__loading {
	display: grid;
	gap: 4px;
	padding: 8px;
}

.clc-catalog-search__skeleton {
	display: grid;
	grid-template-columns: 54px 1fr;
	gap: 12px;
	align-items: center;
	padding: 8px;
}

.clc-catalog-search__skeleton-image,
.clc-catalog-search__skeleton-lines i {
	display: block;
	border-radius: 8px;
	background: var(--clc-cream, #f5f1e8);
}

.clc-catalog-search__skeleton-image {
	width: 54px;
	height: 54px;
}

.clc-catalog-search__skeleton-lines {
	display: grid;
	gap: 8px;
}

.clc-catalog-search__skeleton-lines i {
	width: 78%;
	height: 10px;
}

.clc-catalog-search__skeleton-lines i + i {
	width: 48%;
}

@media (prefers-reduced-motion: reduce) {
	.clc-catalog-search__control,
	.clc-catalog-search__submit,
	.clc-catalog-search__skeleton-image,
	.clc-catalog-search__skeleton-lines i {
		animation: none;
		transition: none;
	}
}

@media (max-width: 700px) {
	.clc-catalog-search {
		max-width: none;
	}

	.clc-catalog-search__control {
		grid-template-columns: 40px minmax(0, 1fr) auto;
		min-height: 48px;
	}

	.clc-catalog-search__input {
		height: 46px;
		padding-inline: 8px;
		/* 16px exactos, y en pixeles a proposito: Safari en iOS agranda la
		   pagina sola al enfocar un campo con menos de eso, y este buscador
		   esta en el encabezado de todo el sitio. */
		font-size: 16px;
	}

	.clc-catalog-search__icon {
		margin-left: 16px;
	}

	.clc-catalog-search__submit {
		padding-inline: 16px;
	}

	.clc-catalog-search__panel {
		position: absolute;
		top: calc(100% + 4px);
		right: 0;
		bottom: auto;
		left: 0;
		max-height: min(66vh, 560px);
	}

	.clc-catalog-search__product {
		grid-template-columns: 54px minmax(0, 1fr);
	}

	.clc-catalog-search__product-image {
		width: 54px;
		height: 54px;
	}

	.clc-catalog-search__product-price {
		display: none;
	}
}

@media (max-width: 420px) {
	.clc-catalog-search__submit span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.clc-catalog-search__submit {
		display: grid;
		width: 43px;
		padding: 0;
		place-items: center;
	}

	.clc-catalog-search__submit-icon {
		display: block;
	}
}
