.ts-search-layout {
	display: none;
	gap: 2rem;
	margin-top: 1rem;
}

#ts-woo-search-root.ts-search-active .ts-search-layout {
	display: flex;
}

.ts-search-facets {
	flex: 0 0 220px;
}

.ts-search-results {
	flex: 1;
}

.ts-search-hits .ais-Hits-list,
.ts-search-hits .ais-InfiniteHits-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1rem;
	list-style: none;
	padding: 0;
}

.ts-search-hits .ais-InfiniteHits-loadMore {
	grid-column: 1 / -1;
	margin-top: 1rem;
}

.ts-search-hits .ais-InfiniteHits-loadMore--disabled {
	display: none;
}

.ts-hit {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
}

.ts-hit img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.ts-hit-price {
	font-weight: 600;
}

.ts-hit-sku {
	font-size: 0.75rem;
	opacity: 0.6;
}

.ts-hit-type {
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	opacity: 0.6;
}

.ts-search-category-facet {
	margin-bottom: 1.5rem;
}

.ts-search-facets .ais-RefinementList-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ts-facet-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex: 1;
	min-width: 0;
	cursor: pointer;
}

.ts-facet-item .ais-RefinementList-labelText {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-facet-item__view {
	flex: 0 0 auto;
	text-decoration: none;
	color: inherit;
	opacity: 0.6;
}

.ts-facet-item__view:hover {
	opacity: 1;
}

/* The satellite theme sets .ais-Pagination-item to display:inline-block
   without a vertical-align, so items align to the text baseline — the
   "»" (last page) item ends up a few pixels lower since its content has a
   different baseline than the numbered pages. */
.ts-search-pagination .ais-Pagination-item {
	vertical-align: middle;
}

/* Compact header/nav search — a small box that expands into a floating
   dropdown panel, unlike .ts-search-layout's full inline sidebar+grid. */
.ts-compact {
	position: relative;
	max-width: 260px;
}

.ts-compact-box .ais-SearchBox-input {
	width: 100%;
}

.ts-compact-panel {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 100;
	width: 320px;
	max-width: 90vw;
	margin-top: 0.5rem;
	padding: 0.5rem;
	background: #fff;
	border: 1px solid #d6d6e7;
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ts-compact--active .ts-compact-panel {
	display: block;
}

.ts-compact-hits .ais-Hits-list {
	max-height: 320px;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	list-style: none;
}

.ts-compact-hit {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem;
	text-decoration: none;
	color: inherit;
	border-radius: 3px;
}

.ts-compact-hit:hover {
	background: #f5f5fa;
}

.ts-compact-hit img {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	object-fit: cover;
}

.ts-compact-hit-text {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.ts-compact-hit-sku {
	font-size: 0.7rem;
	opacity: 0.6;
}

.ts-compact-hit-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ts-compact-hit-price {
	flex: 0 0 auto;
	font-weight: 600;
}

.ts-compact-hit-type {
	flex: 0 0 auto;
	text-transform: uppercase;
	font-size: 0.65rem;
	letter-spacing: 0.05em;
	opacity: 0.6;
}

.ts-compact-see-all {
	display: block;
	margin-top: 0.25rem;
	padding: 0.5rem;
	border-top: 1px solid #efeff5;
	text-align: center;
	font-size: 0.85rem;
}

.ts-compact-empty {
	padding: 0.5rem;
	opacity: 0.6;
}
