/**
 * Smart Search for ocStore 3.
 *
 * Every rule is scoped under .ssx-root so nothing can leak into the theme:
 * no element selectors outside the scope, no resets, no global properties.
 *
 * Themes style bare tags (`article`, `a`, `p`, `img`) with heavy paddings and
 * decorations, and this file may be linked before the theme stylesheet, so the
 * scope starts with a reset and every component rule carries two classes to
 * outrank both the reset and the theme.
 */
.ssx-root,
.ssx-host {
	--ssx-brand: #162c46;
	--ssx-accent: #b30014;
	--ssx-text: #162c46;
	--ssx-muted: #8b9099;
	--ssx-line: #e8eaee;
	--ssx-line-soft: #f1f2f5;
	--ssx-bg: #fff;
	--ssx-soft: #f6f7f9;
	--ssx-hover: #f4f6f8;
	--ssx-ok: #1f7a4d;
	--ssx-radius: 4px;
}

.ssx-root {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-sizing: border-box;
	color: var(--ssx-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
}

/* --------------------------------------------------------------- reset */

.ssx-root article,
.ssx-root section,
.ssx-root aside,
.ssx-root div,
.ssx-root span,
.ssx-root p,
.ssx-root a,
.ssx-root strong,
.ssx-root small,
.ssx-root em,
.ssx-root b,
.ssx-root h1,
.ssx-root h2,
.ssx-root h3,
.ssx-root h4,
.ssx-root ul,
.ssx-root ol,
.ssx-root li,
.ssx-root form,
.ssx-root label,
.ssx-root button,
.ssx-root img,
.ssx-root svg {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	outline: 0;
	float: none;
	max-width: none;
	min-width: 0;
	min-height: 0;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-style: normal;
	font-weight: 400;
	line-height: inherit;
	letter-spacing: normal;
	list-style: none;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	text-shadow: none;
	transform: none;
	transition: none;
	animation: none;
	opacity: 1;
}

.ssx-root input,
.ssx-root select {
	margin: 0;
	color: inherit;
	font-family: inherit;
	line-height: normal;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}

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

.ssx-root *::before,
.ssx-root *::after {
	content: none;
}

.ssx-root [hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------- input */

/**
 * The enhanced field belongs to the theme, so it only borrows the corner radius
 * that ties it to the panel below. The class is doubled because this file may be
 * linked before the theme stylesheet and would otherwise lose the tie break.
 */
.ssx-host.ssx-host {
	border-radius: var(--ssx-radius);
}

.ssx-host.ssx-host > input {
	border-radius: inherit;
}

/* Theme full-screen search close control: same 4px corners as the field.
   The variable lives on .ssx-host, and this button sits outside it. */
.fss__close__btn.fss__close__btn {
	border-radius: 4px;
}

/* Soft dim over the page — no blur, just a light shade. */
.fss__overlay {
	background: rgba(22, 44, 70, 0.45);
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

.ssx-root .ssx-box {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 6px 0 14px;
	min-height: 46px;
	background: var(--ssx-bg);
	border: 1px solid var(--ssx-line);
	border-radius: var(--ssx-radius);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ssx-root .ssx-box:focus-within {
	border-color: var(--ssx-brand);
	box-shadow: 0 0 0 3px rgba(22, 44, 70, 0.08);
}

.ssx-root .ssx-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 44px;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	box-shadow: none;
	appearance: none;
}

.ssx-root .ssx-input::placeholder {
	color: var(--ssx-muted);
	opacity: 1;
}

.ssx-root .ssx-submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--ssx-radius);
	background: transparent;
	color: var(--ssx-text);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ssx-root .ssx-submit:hover {
	background: var(--ssx-soft);
	color: var(--ssx-accent);
}

.ssx-root .ssx-icon {
	display: block;
	width: 19px;
	height: 19px;
}

/* ---------------------------------------------------------------- dropdown */

/* Same frame as the field above it, so the pair reads as one control. */
.ssx-root.ssx-panel {
	position: absolute;
	z-index: 99999;
	max-height: 70vh;
	overflow: hidden;
	background: var(--ssx-bg);
	border: 1px solid var(--ssx-brand);
	border-radius: var(--ssx-radius);
	box-shadow: 0 18px 44px -12px rgba(22, 44, 70, 0.26), 0 4px 12px rgba(22, 44, 70, 0.07);
}

.ssx-root .ssx-layout {
	display: flex;
	align-items: stretch;
	max-height: inherit;
}

.ssx-root .ssx-history {
	flex: 0 0 190px;
	max-width: 190px;
	padding: 14px 12px;
	overflow-y: auto;
	background: var(--ssx-soft);
	border-right: 1px solid var(--ssx-line);
}

.ssx-root .ssx-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
	max-height: inherit;
}

/**
 * Only the hit list may give up height when the panel is short. Letting the
 * banner or the brand chips shrink does not make them any smaller — it just
 * pushes their second row over the products underneath.
 */
.ssx-root.ssx-panel .ssx-banner,
.ssx-root.ssx-panel .ssx-chips,
.ssx-root.ssx-panel .ssx-empty {
	flex: 0 0 auto;
}

/**
 * A phone with the keyboard open leaves the panel barely two rows tall, and the
 * blocks that cannot shrink would add up past that and push the footer button
 * out of sight. So in a short panel the hits and that button get the space:
 * brands scroll in one line and the category list steps aside.
 */
/* Keep brand chips compact in a short panel, but leave categories visible:
   after a layout/typo correction the visitor still needs a path into the
   catalogue, and the hit list is the only block that can give up height. */

.ssx-root.ssx-panel--short .ssx-chips {
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding: 10px 12px 8px;
	scrollbar-width: none;
}

.ssx-root.ssx-panel--short .ssx-chips::-webkit-scrollbar {
	display: none;
}

/* Binotel / similar theme bubbles sit on z-index ~99999998 and cover the
   "show all" button. Hide them only while the dropdown owns the screen. */
html.ssx-open #bwc-widget-action,
html.ssx-open #bwc-chat,
html.ssx-open .bwc-widget,
html.ssx-open .bwc-widget-action,
html.ssx-open [id^="bwc-"],
html.ssx-open .binotel-widget,
html.ssx-open .ringostat-phone,
html.ssx-open #ringostat_phone {
	visibility: hidden !important;
	pointer-events: none !important;
}

/* --------------------------------------------------------------- headings */

.ssx-root .ssx-title {
	margin: 0 0 8px;
	color: var(--ssx-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.ssx-root .ssx-muted {
	color: var(--ssx-muted);
	font-size: 12.5px;
}

.ssx-root .ssx-history-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px;
	margin-bottom: 8px;
}

.ssx-root .ssx-history-head .ssx-title {
	min-width: 0;
	margin: 0;
}

.ssx-root .ssx-history-head .ssx-text-btn {
	flex: 0 0 auto;
	white-space: nowrap;
}

.ssx-root .ssx-history-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ssx-root .ssx-history-item {
	display: block;
	width: 100%;
	padding: 7px 9px;
	border-radius: var(--ssx-radius);
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 13px;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ssx-root .ssx-history-item:hover {
	background: var(--ssx-bg);
	color: var(--ssx-accent);
}

.ssx-root .ssx-text-btn {
	background: transparent;
	color: var(--ssx-muted);
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	transition: color 0.15s ease;
}

.ssx-root .ssx-text-btn:hover {
	color: var(--ssx-accent);
}

.ssx-root .ssx-banner {
	padding: 12px 16px 0;
	color: var(--ssx-muted);
	font-size: 13px;
}

.ssx-root .ssx-banner strong {
	color: var(--ssx-text);
	font-weight: 600;
}

/* ------------------------------------------------------------------- chips */

.ssx-root .ssx-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px 16px 0;
}

/* Idle panel: popular searches sit under the product rows as soft chips. */
.ssx-root .ssx-queries {
	padding: 4px 8px 10px;
}

.ssx-root .ssx-queries .ssx-title {
	padding: 10px 8px 2px;
}

.ssx-root .ssx-chips--queries {
	padding: 6px 8px 0;
}

.ssx-root .ssx-chip {
	padding: 6px 12px;
	border: 1px solid var(--ssx-line);
	border-radius: var(--ssx-radius);
	background: var(--ssx-bg);
	color: inherit;
	font: inherit;
	font-size: 12.5px;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ssx-root .ssx-chip:hover {
	border-color: var(--ssx-brand);
	background: var(--ssx-soft);
}

.ssx-root .ssx-chip--active {
	border-color: var(--ssx-brand);
	background: var(--ssx-brand);
	color: #fff;
}

/* --------------------------------------------------------------- item rows */

.ssx-root .ssx-list {
	padding: 6px 8px 8px;
}

.ssx-root .ssx-list--drop {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.ssx-root .ssx-list--drop::-webkit-scrollbar {
	width: 8px;
}

.ssx-root .ssx-list--drop::-webkit-scrollbar-thumb {
	background: #d8dce2;
	border-radius: var(--ssx-radius);
	border: 2px solid var(--ssx-bg);
}

.ssx-root .ssx-list .ssx-title {
	padding: 8px 8px 2px;
}

.ssx-root .ssx-item {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.ssx-root .ssx-item + .ssx-item {
	border-top: 1px solid var(--ssx-line-soft);
}

/* Two columns for panels that follow a full width search bar. */
.ssx-root.ssx-panel--wide .ssx-list--drop {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-content: start;
	gap: 0 14px;
	padding: 6px 12px 10px;
}

.ssx-root.ssx-panel--wide .ssx-list--drop > .ssx-title,
.ssx-root.ssx-panel--wide .ssx-list--drop > .ssx-queries {
	grid-column: 1 / -1;
}

.ssx-root.ssx-panel--wide .ssx-item,
.ssx-root.ssx-panel--wide .ssx-item + .ssx-item {
	border-top: 0;
	border-bottom: 1px solid var(--ssx-line-soft);
}

.ssx-root .ssx-hit {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 8px;
	border: 0;
	border-radius: var(--ssx-radius);
	color: inherit;
	text-decoration: none;
	transition: background-color 0.12s ease;
}

.ssx-root .ssx-hit:hover,
.ssx-root .ssx-hit:focus {
	background: var(--ssx-hover);
	color: inherit;
	text-decoration: none;
}

.ssx-root .ssx-thumb {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 62px;
	height: 62px;
	padding: 3px;
	overflow: hidden;
	background: var(--ssx-bg);
	border-radius: var(--ssx-radius);
}

.ssx-root .ssx-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.ssx-root .ssx-item--compact .ssx-thumb {
	width: 54px;
	height: 54px;
}

.ssx-root .ssx-body {
	flex: 1 1 auto;
	display: block;
	min-width: 0;
}

.ssx-root .ssx-vendor {
	display: block;
	color: var(--ssx-muted);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ssx-root .ssx-name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	margin-top: 2px;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.35;
	overflow: hidden;
}

.ssx-root .ssx-hit:hover .ssx-name {
	color: var(--ssx-accent);
}

.ssx-root .ssx-sku {
	display: block;
	margin-top: 3px;
	color: var(--ssx-muted);
	font-size: 11px;
}

.ssx-root .ssx-side {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	text-align: right;
	white-space: nowrap;
}

.ssx-root .ssx-price {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 1px;
}

.ssx-root .ssx-price-now {
	font-size: 15px;
	font-weight: 700;
}

.ssx-root .ssx-price-old {
	color: var(--ssx-muted);
	font-size: 11.5px;
	text-decoration: line-through;
}

.ssx-root .ssx-price-off {
	color: var(--ssx-accent);
	font-size: 11px;
	font-weight: 600;
}

.ssx-root .ssx-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: var(--ssx-radius);
	background: rgba(31, 122, 77, 0.1);
	color: var(--ssx-ok);
	font-size: 10.5px;
	font-weight: 400;
}

.ssx-root .ssx-badge--out {
	background: rgba(179, 0, 20, 0.08);
	color: var(--ssx-accent);
}

/* ------------------------------------------------------------ empty/footer */

.ssx-root .ssx-empty {
	padding: 28px 16px;
	color: var(--ssx-muted);
	text-align: center;
}

.ssx-root .ssx-cats {
	flex: 0 0 auto;
	padding: 12px 16px;
	border-top: 1px solid var(--ssx-line);
	background: var(--ssx-bg);
}

.ssx-root .ssx-cat-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
}

.ssx-root .ssx-cat {
	color: inherit;
	font-size: 12.5px;
	text-decoration: none;
	border-bottom: 1px solid var(--ssx-line);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.ssx-root .ssx-cat:hover {
	color: var(--ssx-accent);
	border-color: currentColor;
}

.ssx-root .ssx-panel-footer {
	flex: 0 0 auto;
	padding: 12px 16px;
	border-top: 1px solid var(--ssx-line);
	background: var(--ssx-bg);
}

.ssx-root .ssx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	border: 1px solid var(--ssx-brand);
	border-radius: var(--ssx-radius);
	background: var(--ssx-brand);
	color: #fff;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ssx-root .ssx-btn:hover {
	background: var(--ssx-accent);
	border-color: var(--ssx-accent);
	color: #fff;
}

.ssx-root .ssx-btn--wide {
	width: 100%;
}

/* ------------------------------------------------------------ results page */

.ssx-root .ssx-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 14px 0;
	font-size: 12.5px;
}

.ssx-root .ssx-crumb {
	color: var(--ssx-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}

.ssx-root .ssx-crumb:hover {
	color: var(--ssx-accent);
}

.ssx-root .ssx-crumb--last {
	color: var(--ssx-text);
}

.ssx-root .ssx-crumb-sep {
	color: #c8ccd3;
}

.ssx-root.ssx-page {
	margin: 0 0 28px;
}

.ssx-page .ssx-form {
	margin: 0 0 14px;
	max-width: 560px;
}

.ssx-page .ssx-banner {
	padding: 0 0 12px;
}

.ssx-page .ssx-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	padding: 12px 14px;
	background: var(--ssx-soft);
	border-radius: var(--ssx-radius);
}

.ssx-page .ssx-check,
.ssx-page .ssx-field {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	color: var(--ssx-muted);
	font-size: 13px;
	font-weight: 400;
	cursor: pointer;
}

.ssx-page .ssx-check span,
.ssx-page .ssx-field span {
	color: var(--ssx-text);
}

/* The reset disables pseudo content, so the tick is a background image. */
.ssx-page .ssx-check input[type="checkbox"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 1px solid #d5d9e0;
	border-radius: var(--ssx-radius);
	background: var(--ssx-bg);
	appearance: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ssx-page .ssx-check input[type="checkbox"]:checked {
	border-color: var(--ssx-brand);
	background-color: var(--ssx-brand);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 13px;
}

.ssx-page .ssx-field input,
.ssx-page .ssx-field select {
	height: 34px;
	padding: 0 8px;
	border: 1px solid var(--ssx-line);
	border-radius: var(--ssx-radius);
	background: var(--ssx-bg);
	color: var(--ssx-text);
	font: inherit;
	font-size: 13px;
}

.ssx-page .ssx-field input:focus,
.ssx-page .ssx-field select:focus {
	border-color: var(--ssx-brand);
	outline: 0;
}

.ssx-page .ssx-field input {
	width: 88px;
}

.ssx-page .ssx-facets,
.ssx-page .ssx-cats {
	padding: 16px 0 0;
	border: 0;
	background: none;
}

.ssx-page .ssx-facets-title {
	margin: 0 0 8px;
	color: var(--ssx-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.ssx-page .ssx-facets .ssx-chips {
	padding: 0;
}

.ssx-page .ssx-meta {
	margin: 18px 0 8px;
	color: var(--ssx-muted);
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* Themes tint the page background, so the list paints its own white sheet
   instead of letting that tint show through the rows. */
.ssx-page .ssx-list {
	padding: 4px;
	background: var(--ssx-bg);
	border: 1px solid var(--ssx-line);
	border-radius: var(--ssx-radius);
}

.ssx-page .ssx-hit {
	padding: 12px 12px;
}

.ssx-page .ssx-thumb,
.ssx-page .ssx-item--compact .ssx-thumb {
	width: 68px;
	height: 68px;
}

/* A single column would stretch each row across the whole container. */
@media (min-width: 900px) {
	.ssx-page .ssx-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 12px;
		padding: 8px;
	}

	.ssx-page .ssx-item,
	.ssx-page .ssx-item + .ssx-item {
		border-top: 0;
		border-bottom: 1px solid var(--ssx-line-soft);
	}

	.ssx-page .ssx-hit {
		padding: 12px 8px;
	}
}

.ssx-page .ssx-more {
	display: flex;
	justify-content: center;
	padding: 22px 0 0;
}

/* ------------------------------------------------------------------ mobile */

@media (max-width: 640px) {
	/* Fallback only: the script caps the panel by the room under the field. */
	.ssx-root.ssx-panel {
		max-height: 78vh;
	}

	.ssx-root .ssx-history {
		display: none;
	}

	/* Wrapped brand chips climb over the first product on narrow screens;
	   one swipeable row stays inside the panel frame instead. */
	.ssx-root.ssx-panel .ssx-chips {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding: 10px 12px 8px;
		scrollbar-width: none;
	}

	.ssx-root.ssx-panel .ssx-chips::-webkit-scrollbar {
		display: none;
	}

	.ssx-root.ssx-panel .ssx-chip {
		flex: 0 0 auto;
	}

	.ssx-root .ssx-hit {
		gap: 10px;
		padding: 10px 6px;
	}

	.ssx-root .ssx-thumb,
	.ssx-root .ssx-item--compact .ssx-thumb {
		width: 52px;
		height: 52px;
	}

	.ssx-root .ssx-side {
		align-items: flex-end;
	}

	.ssx-root .ssx-price-now {
		font-size: 14px;
	}

	.ssx-root .ssx-name {
		font-size: 13px;
	}

	/* Wrapping a flex row leaves ragged columns once the labels differ in
	   width, so narrow screens get an explicit two column grid instead. */
	.ssx-page .ssx-filters {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: center;
		gap: 10px;
		padding: 12px;
	}

	.ssx-page .ssx-filters > .ssx-check,
	.ssx-page .ssx-filters > .ssx-field--sort,
	.ssx-page .ssx-filters > .ssx-text-btn {
		grid-column: 1 / -1;
	}

	.ssx-page .ssx-filters > .ssx-text-btn {
		justify-self: start;
	}

	.ssx-page .ssx-field {
		min-width: 0;
	}

	.ssx-page .ssx-field span {
		flex: 0 0 auto;
	}

	.ssx-page .ssx-field input,
	.ssx-page .ssx-field select {
		width: 100%;
		min-width: 0;
		height: 38px;
	}

	.ssx-page .ssx-form {
		max-width: none;
	}
}
