/*
 * WP360 Vendor Search (wp360-vendor-search.php). Amazon-style filter rail on the left,
 * Knot-style result cards on the right. Brand navy #203d67; body text 16px+, every
 * control 48px+, so it reads without glasses.
 */

.vs {
	--navy: #203d67;
	--navy-dark: #162d4f;
	--ink: #1c2230;
	--muted: #566070;
	--line: #e3e6eb;
	--soft: #f6f4f0;
	--star: #f2a01b;
	font-family: Montserrat, system-ui, sans-serif;
	color: var(--ink);
	background: #fff;
}

.vs *,
.vs *::before,
.vs *::after {
	box-sizing: border-box;
}

.vs .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* ---- Search bar ---------------------------------------------------------- */

.vs-bar {
	background: var(--navy);
	padding: 18px 16px;
}

.vs-bar__inner {
	display: flex;
	gap: 10px;
	max-width: 1240px;
	margin: 0 auto;
}

.vs-bar__field {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	margin: 0;
	padding: 0 16px;
	background: #fff;
	border-radius: 14px;
	color: var(--muted);
}

.vs-bar__field--q {
	flex: 1 1 auto;
}

.vs-bar__field--date {
	flex: 0 0 auto;
}

.vs-bar__label {
	font-size: 15px;
	font-weight: 600;
	color: var(--muted);
	white-space: nowrap;
}

.vs .vs-bar__field input {
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font: 500 17px/1.3 Montserrat, system-ui, sans-serif;
	color: var(--ink);
	outline: none;
}

.vs .vs-bar__field--date input {
	width: 160px;
}

.vs-bar__field:focus-within {
	box-shadow: 0 0 0 3px #f2c14e;
}

.vs .vs-bar__go {
	flex: 0 0 auto;
	min-height: 56px;
	padding: 0 28px;
	border: 0;
	border-radius: 14px;
	background: #f2c14e;
	color: #1c2230;
	font: 700 17px/1 Montserrat, system-ui, sans-serif;
	cursor: pointer;
}

.vs .vs-bar__go:hover {
	background: #f5cd6b;
}

/* ---- Layout -------------------------------------------------------------- */

.vs-wrap {
	max-width: 1240px;
	margin: 0 auto;
	padding: 24px 16px 64px;
}

.vs-top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--line);
}

.vs h1.vs-top__title {
	margin: 0;
	font-size: 26px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--ink);
}

.vs p.vs-top__note {
	margin: 4px 0 0;
	font-size: 16px;
	color: var(--muted);
}

.vs-top__tools {
	display: flex;
	align-items: center;
	gap: 12px;
}

.vs-sort {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	white-space: nowrap;
	font-size: 15px;
	font-weight: 600;
	color: var(--muted);
}

.vs .vs-sort select {
	min-height: 48px;
	margin: 0;
	padding: 0 40px 0 14px;
	border: 1.5px solid #cfd4dc;
	border-radius: 12px;
	background-color: #fff;
	font: 600 16px Montserrat, system-ui, sans-serif;
	color: var(--ink);
}

.vs .vs-filters-open {
	display: none;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 18px;
	border: 1.5px solid var(--navy);
	border-radius: 999px;
	background: #fff;
	color: var(--navy);
	font: 700 16px Montserrat, system-ui, sans-serif;
	cursor: pointer;
}

.vs-badge {
	display: inline-grid;
	place-items: center;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--navy);
	color: #fff;
	font-size: 14px;
}

.vs-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.vs-chips li {
	margin: 0;
}

.vs .vs-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px;
	border-radius: 999px;
	background: #e8eef7;
	color: var(--navy);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.vs .vs-chip:hover {
	background: #d8e2f1;
}

.vs .vs-chips__clear {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 6px;
	font-size: 15px;
	font-weight: 600;
	color: var(--navy);
}

.vs-body {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 32px;
	margin-top: 24px;
}

/* ---- Filter rail --------------------------------------------------------- */

.vs-side {
	/* Scrolls with the page, like Amazon's rail. A sticky rail taller than the window
	   left its lower filters unreachable until the results ran out (Hari, 2026-11-03). */
	align-self: start;
}

.vs-side__head,
.vs-side__foot {
	display: none;
}

.vs .vs-facet {
	margin: 0 0 16px;
	padding: 0 0 12px;
	border: 0;
	border-bottom: 1px solid var(--line);
	min-width: 0;
}

.vs .vs-facet legend {
	margin: 0 0 6px;
	padding: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--ink);
}

.vs .vs-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	padding: 2px 6px;
	border-radius: 10px;
	font-size: 16px;
	line-height: 1.3;
	color: var(--ink);
	cursor: pointer;
}

.vs .vs-opt:hover {
	background: var(--soft);
}

.vs .vs-opt input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--navy);
	cursor: pointer;
}

.vs-opt__name {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.vs-opt__count {
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
}

.vs .vs-opt.is-empty {
	opacity: .45;
}

.vs .vs-opt.is-more {
	display: none;
}

.vs .vs-facet.is-expanded .vs-opt.is-more {
	display: flex;
}

.vs .vs-more,
.vs .vs-reset {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-top: 4px;
	padding: 0 6px;
	border: 0;
	background: none;
	font: 600 15px Montserrat, system-ui, sans-serif;
	color: var(--navy);
	text-decoration: underline;
	cursor: pointer;
}

.vs .vs-facet__date {
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0 12px;
	border: 1.5px solid #cfd4dc;
	border-radius: 12px;
	font: 500 16px Montserrat, system-ui, sans-serif;
}

.vs p.vs-facet__hint {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--muted);
}

/* ---- Stars --------------------------------------------------------------- */

.vs-stars {
	position: relative;
	display: inline-block;
	width: 92px;
	height: 18px;
	flex: 0 0 auto;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 18'%3E%3Cg fill='%23d9dde3'%3E%3Cpath id='s' d='M9 1.2l2.4 4.9 5.4.8-3.9 3.8.9 5.4L9 13.6l-4.8 2.5.9-5.4L1.2 6.9l5.4-.8z'/%3E%3Cuse href='%23s' x='18.5'/%3E%3Cuse href='%23s' x='37'/%3E%3Cuse href='%23s' x='55.5'/%3E%3Cuse href='%23s' x='74'/%3E%3C/g%3E%3C/svg%3E") left center / 92px 18px no-repeat;
}

.vs-stars__fill {
	position: absolute;
	inset: 0 auto 0 0;
	overflow: hidden;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 18'%3E%3Cg fill='%23f2a01b'%3E%3Cpath id='s' d='M9 1.2l2.4 4.9 5.4.8-3.9 3.8.9 5.4L9 13.6l-4.8 2.5.9-5.4L1.2 6.9l5.4-.8z'/%3E%3Cuse href='%23s' x='18.5'/%3E%3Cuse href='%23s' x='37'/%3E%3Cuse href='%23s' x='55.5'/%3E%3Cuse href='%23s' x='74'/%3E%3C/g%3E%3C/svg%3E") left center / 92px 18px no-repeat;
}

/* ---- Result cards -------------------------------------------------------- */

.vs-list {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vs .vs-card {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr) 200px;
	gap: 20px;
	align-items: start;
	margin: 0;
	padding: 14px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: #fff;
	transition: box-shadow .2s ease, border-color .2s ease;
}

.vs .vs-card:hover {
	border-color: #cfd4dc;
	box-shadow: 0 16px 34px -22px rgba(16, 24, 40, .45);
}

.vs-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 14px;
	background: var(--soft);
}

.vs .vs-card__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .4s ease;
}

.vs .vs-card:hover .vs-card__img {
	transform: scale(1.04);
}

.vs .vs-card__img--art {
	filter: saturate(.75);
}

.vs-card__nophoto {
	position: absolute;
	left: 10px;
	bottom: 10px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(16, 24, 40, .72);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}

.vs-card__mono {
	display: grid;
	place-items: center;
	height: 100%;
	font-size: 56px;
	font-weight: 700;
	color: var(--navy);
	background: linear-gradient(135deg, #eef2f8, #f7f1ea);
}

.vs-card__body {
	min-width: 0;
}

.vs p.vs-card__cats {
	margin: 2px 0 4px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--navy);
}

.vs h2.vs-card__name {
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.25;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.vs h2.vs-card__name a {
	color: var(--ink);
	text-decoration: none;
}

.vs h2.vs-card__name a:hover {
	color: var(--navy);
	text-decoration: underline;
}

.vs p.vs-card__rating {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 4px;
	font-size: 16px;
}

.vs p.vs-card__rating span {
	color: var(--muted);
}

.vs p.vs-card__rating--new {
	display: inline-flex;
	padding: 4px 10px;
	border-radius: 999px;
	background: #eef6f0;
	color: #1d5c34;
	font-size: 14px;
	font-weight: 600;
}

.vs p.vs-card__sources {
	margin: 0 0 6px;
	font-size: 14px;
	color: var(--muted);
}

.vs p.vs-card__sources a {
	color: var(--muted);
}

.vs p.vs-card__serves {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 4px 0 0;
	font-size: 16px;
	line-height: 1.45;
	color: var(--ink);
}

.vs p.vs-card__serves svg {
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--navy);
}

.vs p.vs-card__desc {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 6px 0 0;
	font-size: 16px;
	line-height: 1.5;
	color: var(--muted);
}

.vs ul.vs-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.vs ul.vs-card__badges:empty {
	display: none;
}

.vs ul.vs-card__badges li {
	margin: 0;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--soft);
	font-size: 14px;
	font-weight: 600;
	color: var(--ink);
}

.vs ul.vs-card__badges li.is-free {
	background: #eef6f0;
	color: #1d5c34;
}

.vs ul.vs-card__badges li.is-house {
	background: var(--navy);
	color: #fff;
}

.vs ul.vs-card__badges li.is-verified {
	background: #e8eef7;
	color: var(--navy);
}

.vs-card__buy {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-left: 20px;
	border-left: 1px solid var(--line);
}

.vs p.vs-card__price {
	margin: 0 0 4px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ink);
}

.vs p.vs-card__price span {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--muted);
}

.vs p.vs-card__price--ask {
	font-size: 19px;
}

.vs .vs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 18px;
	border: 1.5px solid var(--navy);
	border-radius: 999px;
	background: #fff;
	color: var(--navy);
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

.vs .vs-btn:hover {
	background: #eef2f8;
	color: var(--navy);
}

.vs .vs-btn--primary {
	background: var(--navy);
	color: #fff;
}

.vs .vs-btn--primary:hover {
	background: var(--navy-dark);
	color: #fff;
}

.vs p.vs-card__fine {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--muted);
}

.vs-empty {
	padding: 40px 28px;
	border: 1px dashed #cfd4dc;
	border-radius: 18px;
	text-align: center;
}

.vs-empty h2 {
	margin: 0 0 8px;
	font-size: 22px;
}

.vs-empty p {
	font-size: 16px;
	color: var(--muted);
}

.vs-empty .vs-btn {
	margin: 6px;
}

.vs-pages {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
}

.vs .vs-pages a {
	display: grid;
	place-items: center;
	min-width: 48px;
	min-height: 48px;
	border: 1.5px solid var(--line);
	border-radius: 12px;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
}

.vs .vs-pages a.is-current {
	border-color: var(--navy);
	background: var(--navy);
	color: #fff;
}

/* ---- Tablet: card actions move under the details ------------------------- */

@media (max-width: 1100px) {
	.vs .vs-card {
		grid-template-columns: 220px minmax(0, 1fr);
	}

	.vs-card__buy {
		grid-column: 2;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		padding: 14px 0 0;
		border-left: 0;
		border-top: 1px solid var(--line);
	}

	.vs p.vs-card__price {
		margin: 0 auto 0 0;
	}

	.vs p.vs-card__fine {
		flex-basis: 100%;
	}
}

/* ---- Phone and small tablet: filters become a sheet ---------------------- */

@media (max-width: 900px) {
	.vs-bar__inner {
		flex-wrap: wrap;
	}

	.vs-bar__field--q {
		flex-basis: 100%;
	}

	.vs-bar__field--date {
		flex: 1 1 0;
		min-width: 0;
	}

	.vs .vs-bar__field--date input {
		width: 100%;
	}

	.vs h1.vs-top__title {
		font-size: 22px;
	}

	.vs-top__tools {
		width: 100%;
		justify-content: space-between;
	}

	.vs .vs-filters-open {
		display: inline-flex;
	}

	.vs-sort > span {
		display: none;
	}

	.vs .vs-sort select {
		padding: 0 30px 0 12px;
		background-position: right 8px center;
	}

	.vs .vs-filters-open {
		padding: 0 14px;
	}

	.vs-body {
		grid-template-columns: minmax(0, 1fr);
		margin-top: 16px;
	}

	.vs-side {
		position: fixed;
		top: 0;
		right: 0;
		left: 0;
		bottom: auto;
		/* Explicit height: with top+bottom alone some phones size the sheet to the page
		 * rather than the screen, which pushed "Show N vendors" off the bottom. */
		height: 100vh;
		height: 100dvh;
		z-index: 100000;
		display: flex;
		flex-direction: column;
		padding: 0 20px;
		background: #fff;
		overflow-y: auto;
		transform: translateY(100%);
		visibility: hidden;
		transition: transform .28s ease, visibility 0s linear .28s;
	}

	.vs-side.is-open {
		transform: none;
		visibility: visible;
		transition: transform .28s ease;
	}

	.vs-side__head {
		position: sticky;
		top: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 0 -20px 16px;
		padding: 12px 20px;
		background: #fff;
		border-bottom: 1px solid var(--line);
	}

	.vs .vs-side__head h2 {
		margin: 0;
		font-size: 22px;
	}

	.vs .vs-filters-close {
		width: 48px;
		height: 48px;
		border: 0;
		border-radius: 50%;
		background: var(--soft);
		font-size: 28px;
		line-height: 1;
		color: var(--ink);
		cursor: pointer;
	}

	.vs-side__foot {
		position: sticky;
		bottom: 0;
		display: flex;
		align-items: center;
		gap: 16px;
		margin: auto -20px 0;
		padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
		background: #fff;
		border-top: 1px solid var(--line);
	}

	.vs .vs-apply {
		flex: 1 1 auto;
		min-height: 54px;
		border: 0;
		border-radius: 999px;
		background: var(--navy);
		color: #fff;
		font: 700 17px Montserrat, system-ui, sans-serif;
		cursor: pointer;
	}

	.vs .vs-side__clear {
		font-size: 16px;
		font-weight: 600;
		color: var(--navy);
	}

	body.vs-locked {
		overflow: hidden;
	}

	.vs .vs-card {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
		padding: 14px;
	}

	.vs-card__buy {
		grid-column: 1;
	}

	.vs-card__buy .vs-btn {
		flex: 1 1 140px;
	}
}
