/* ==========================================================================
   StockUp live product search dropdown
   Every rule is scoped to .su-ls (the dropdown), so nothing else on the site
   is affected. Tweak the variables below to match the brand.
   ========================================================================== */
.su-ls {
	--su-ls-bg: #fff;
	--su-ls-text: #1a1a1a;
	--su-ls-muted: #707070;
	--su-ls-border: #dedede;
	--su-ls-hover: #f5f5f5;
	--su-ls-mark: #fff3b0;      /* highlight behind the typed letters */
	--su-ls-accent: #1a1a1a;    /* "See all results" link */
	--su-ls-oos: #d72c0d;
	--su-ls-radius: 8px;
	--su-ls-thumb: 48px;
	--su-ls-z: 100000;          /* raise if the dropdown hides behind a sticky header */

	position: fixed;
	z-index: var(--su-ls-z);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--su-ls-bg);
	color: var(--su-ls-text);
	border: 1px solid var(--su-ls-border);
	border-radius: var(--su-ls-radius);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
	font-size: 14px;
	line-height: 1.35;
	text-align: left;
}
.su-ls[hidden] { display: none !important; }
.su-ls *, .su-ls *::before, .su-ls *::after { box-sizing: border-box; }

/* Status line: "Searching…", "No products found", errors */
.su-ls-status:empty { display: none; }
.su-ls-status { padding: 14px 16px; color: var(--su-ls-muted); }
.su-ls-status strong { color: var(--su-ls-text); }
.su-ls-spinner {
	display: inline-block;
	width: 14px; height: 14px;
	margin-right: 8px;
	vertical-align: -2px;
	border: 2px solid var(--su-ls-border);
	border-top-color: var(--su-ls-text);
	border-radius: 50%;
	animation: su-ls-spin .7s linear infinite;
}
@keyframes su-ls-spin { to { transform: rotate(360deg); } }

/* Results */
.su-ls-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 6px 0 !important;
	overflow-y: auto;
	overscroll-behavior: contain;
	flex: 1 1 auto;
	transition: opacity .15s;
}
.su-ls-list:empty { display: none; }
.su-ls.is-loading .su-ls-list { opacity: .55; }
.su-ls-item { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.su-ls-item::before { content: none !important; }
.su-ls-item > a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px;
	color: inherit !important;
	text-decoration: none !important;
	border: 0 !important;
	box-shadow: none !important;
}
.su-ls-item.is-active > a,
.su-ls-item > a:focus-visible { background: var(--su-ls-hover); outline: none; }

.su-ls-thumb {
	flex: 0 0 var(--su-ls-thumb);
	width: var(--su-ls-thumb);
	height: var(--su-ls-thumb);
	border: 1px solid var(--su-ls-border);
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}
.su-ls-thumb img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: contain;
	margin: 0 !important;
}

.su-ls-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.su-ls-name {
	font-weight: 500;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.su-ls-name mark { background: var(--su-ls-mark); color: inherit; padding: 0; border-radius: 2px; }
.su-ls-sku { color: var(--su-ls-muted); font-size: 12px; }
.su-ls-oos { color: var(--su-ls-oos); font-size: 12px; }

.su-ls-price {
	flex: 0 0 auto;
	font-weight: 600;
	white-space: nowrap;
	text-align: right;
}
.su-ls-price del { display: block; color: var(--su-ls-muted); font-weight: 400; font-size: 12px; }
.su-ls-price ins { text-decoration: none; background: none; }
.su-ls-price .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
}

/* "See all results" footer */
.su-ls-all {
	display: block;
	flex: 0 0 auto;
	padding: 12px 16px;
	border-top: 1px solid var(--su-ls-border);
	color: var(--su-ls-accent) !important;
	font-weight: 500;
	text-decoration: none !important;
	background: var(--su-ls-bg);
}
.su-ls-all[hidden] { display: none; }
.su-ls-all:hover, .su-ls-all:focus-visible { background: var(--su-ls-hover); outline: none; }
.su-ls-count { color: var(--su-ls-muted); font-weight: 400; }

/* Phones: slightly smaller thumbs, price under the name stays on the right */
@media (max-width: 480px) {
	.su-ls { --su-ls-thumb: 40px; font-size: 13px; }
	.su-ls-item > a { padding: 8px 12px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	.su-ls-spinner { animation-duration: 2s; }
	.su-ls-list { transition: none; }
}

/* ---------- Search box focus (header + search results page) --------------
   Removes the browser's blue focus outline inside the search box. The whole
   search bar gets a dark border instead, so keyboard users can still see
   where they are. */
.x-search input[name="s"]:focus,
.x-search input[name="s"]:focus-visible,
form[role="search"] input[name="s"]:focus,
form[role="search"] input[name="s"]:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}
.x-search:focus-within,
form[role="search"]:focus-within {
	border-color: #1a1a1a !important;
}
