/* Rapid Search: search bar and dropdown.
   Brand: dark #222, yellow #FFBC00, sale red #D01345. Font is inherited (Oxanium on the site). */

.rsm { position: relative; font-family: inherit; text-align: left; }
.rsm *, .rsm *::before, .rsm *::after { box-sizing: border-box; }
.rsm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Search bar ---------- */
.rsm-form { display: flex; align-items: center; height: 46px; margin: 0; padding: 0; }
.rsm-field { position: relative; flex: 1 1 auto; min-width: 0; height: 46px; }
.rsm .rsm-input {
	display: block; width: 100%; height: 46px !important; margin: 0 !important;
	padding: 8px 44px 8px 16px !important;
	border: 1px solid #ddd !important; border-radius: 4px !important;
	background: #fff !important; color: #222 !important;
	font: inherit; font-size: 16px !important; line-height: 28px !important; /* 16px stops iPhone zooming in */
	box-shadow: none !important; outline: none !important;
	-webkit-appearance: none; appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.rsm .rsm-input::-webkit-search-cancel-button,
.rsm .rsm-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.rsm .rsm-input::placeholder { color: #666; opacity: 1; }
.rsm .rsm-input:focus { border-color: #222 !important; box-shadow: 0 0 0 3px rgba(255, 188, 0, .45) !important; outline: none !important; }

.rsm .rsm-clear {
	position: absolute; top: 0; right: 0; width: 40px; height: 100%;
	margin: 0; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none;
	color: #999 !important; font-size: 22px; line-height: 1; cursor: pointer;
}
.rsm .rsm-clear:hover, .rsm .rsm-clear:focus-visible { color: #222; background: none; }
.rsm .rsm-clear[hidden] { display: none; }

.rsm-spinner {
	display: none; position: absolute; top: 50%; right: 12px; width: 18px; height: 18px; margin-top: -9px;
	border: 3px solid #eee; border-left-color: #FFBC00; border-radius: 50%;
	animation: rsm-spin .7s linear infinite;
}
.rsm.is-loading .rsm-spinner { display: block; }
.rsm.is-loading .rsm-clear { visibility: hidden; }
@keyframes rsm-spin { to { transform: rotate(360deg); } }

.rsm .rsm-submit {
	display: flex; align-items: center; justify-content: center;
	flex: 0 0 54px; width: 54px !important; height: 46px !important; margin: 0 0 0 10px !important; padding: 0 !important;
	border: 0 !important; border-radius: 4px !important; background: #222 !important; color: #fff !important;
	cursor: pointer; box-shadow: none; transition: background-color .15s ease, color .15s ease;
}
.rsm .rsm-submit:hover, .rsm .rsm-submit:focus-visible { background: #FFBC00 !important; color: #222 !important; }
.rsm .rsm-submit svg { width: 18px; height: 18px; display: block; }

/* Dark version: for the dark mobile side menu */
.rsm--dark { margin: 10px 3px; }
.rsm--dark .rsm-form { margin: 0 8px; }
.rsm--dark .rsm-input { border-color: #fff !important; }
.rsm--dark .rsm-input:focus { border-color: #FFBC00 !important; box-shadow: 0 0 0 3px rgba(255, 188, 0, .35) !important; }
.rsm--dark .rsm-submit { background: #fff !important; color: #222 !important; height: 42px !important; }
/* In the mobile side menu the menu already scrolls, so the results join the
   page instead of being a second scroll box inside it (nested scrolling felt
   jerky). "View all results" stays pinned to the bottom of the menu. */
.rsm--dark .rsm-panel { position: relative; top: auto; margin-top: 8px; overflow: clip; }
.rsm--dark .rsm-scroll { max-height: none; overflow: visible; }

/* ---------- Dropdown ---------- */
.rsm-panel {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 99999;
	background: #fff; border-radius: 6px; overflow: hidden;
	box-shadow: 0 14px 36px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
	font-size: 14px; line-height: 1.4; color: #222;
	container-type: inline-size; container-name: rsm-panel;
}
.rsm-panel[hidden] { display: none; }
.rsm-scroll { max-height: min(70vh, 560px); max-height: min(70dvh, 560px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.rsm-scroll::-webkit-scrollbar { width: 6px; background: #fff; }
.rsm-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.rsm-list { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
.rsm-item { margin: 0; padding: 0; list-style: none; }
.rsm-link {
	position: relative; overflow: hidden;
	display: flex; align-items: center; gap: 12px;
	padding: 10px 12px; border-bottom: 1px solid #f0f0f0;
	color: #222; text-decoration: none;
}
.rsm-link:hover, .rsm-item.is-active .rsm-link { background: #f7f7f7; color: #222; text-decoration: none; }
/* Menus that style every "ul a" (the mobile side menu turns links dark with
   yellow text on hover) must not restyle the dropdown's product links. */
.rsm-panel .rsm-link { background: #fff !important; color: #222 !important; }
/* Lock the dropdown's own layout: the side menu gives every "ul a" padding,
   borders and flex rules, and some pages add gaps to spans inside links. */
.rsm-panel .rsm-list, .rsm-panel .rsm-item { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; list-style: none !important; }
.rsm-panel .rsm-link { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 12px !important; padding: 10px 12px !important; margin: 0 !important; border: 0 !important; border-bottom: 1px solid #f0f0f0 !important; border-radius: 0 !important; min-height: 0 !important; height: auto !important; width: auto !important; box-shadow: none !important; text-transform: none !important; letter-spacing: normal !important; }
.rsm-panel .rsm-thumb { display: block !important; flex: 0 0 56px !important; width: 56px !important; height: 56px !important; margin: 0 !important; padding: 0 !important; }
.rsm-panel .rsm-body { display: block !important; flex: 1 1 auto !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; gap: 0 !important; }
.rsm-panel .rsm-name { margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; padding-left: 0 !important; }
.rsm-panel .rsm-price { margin: 4px 0 0 !important; padding: 0 !important; }
.rsm-panel .rsm-stock { margin: 4px 0 0 !important; padding: 0 !important; }
.rsm-panel .rsm-link:hover, .rsm-panel .rsm-link:focus, .rsm-panel .rsm-item.is-active .rsm-link { background: #f7f7f7 !important; color: #222 !important; }
.rsm-thumb { flex: 0 0 56px; width: 56px; height: 56px; }
.rsm-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; border: 0; }
.rsm-body { flex: 1 1 auto; min-width: 0; }
.rsm-name { display: block; font-size: 15px; font-weight: 700; line-height: 1.35; color: #222; }
.rsm-item.is-sale .rsm-name { padding-right: 24px; }
.rsm-name mark { background: linear-gradient(transparent 60%, rgba(255, 188, 0, .55) 60%); color: inherit; font-weight: inherit; padding: 0; }
.rsm-price { display: block; margin-top: 4px; font-size: 15px; font-weight: 700; color: #222; }
.rsm-price del { margin-right: 6px; font-size: 13px; font-weight: 600; color: #888; opacity: 1; }
.rsm-price ins { color: #D01345; text-decoration: none; background: none; }
.rsm-price .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.rsm-stock { display: inline-flex !important; align-items: center; gap: 6px !important; margin-top: 4px; font-size: 12px !important; font-weight: 600 !important; line-height: 1 !important; letter-spacing: .01em; }
/* Lifted 1px: the site font sits high in its line box, so a centred dot looked low. */
.rsm-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; transform: translateY(-1px); }
.rsm-stock.is-ready { color: #1a7f37 !important; }
.rsm-stock.is-preorder { color: #b45309 !important; }
.rsm-stock.is-out { color: #8a8a8a !important; }

.rsm-ribbon-wrap { position: absolute; top: 0; right: 0; width: 47px; height: 42px; overflow: hidden; pointer-events: none; }
.rsm-ribbon {
	position: absolute; top: 8px; right: -22px; width: 77px; padding: 2px 0;
	transform: rotate(45deg); background: #D01345; color: #fff;
	font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-align: center;
}

.rsm-more {
	position: sticky; bottom: 0; z-index: 2; display: block;
	padding: 12px 14px; background: #FFBC00; color: #222;
	font-size: 14px; font-weight: 700; letter-spacing: .04em; text-align: center; text-transform: uppercase;
	text-decoration: none;
}
.rsm-more::after { content: " \2192"; }
.rsm-more:hover, .rsm-more.is-active { background: #222; color: #fff; text-decoration: none; }
.rsm-empty { padding: 16px; font-size: 15px; color: #555; }

/* Wide dropdown (desktop header): two columns, bigger pictures */
@container rsm-panel (min-width: 500px) {
	.rsm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rsm-panel .rsm-item:nth-child(odd) .rsm-link { border-right: 1px solid #f0f0f0 !important; }
	.rsm-panel .rsm-link { gap: 14px !important; padding: 12px 14px !important; }
	.rsm-panel .rsm-thumb { flex-basis: 72px !important; width: 72px !important; height: 72px !important; }
	.rsm-name { font-size: 16px; }
	.rsm-scroll { max-height: 500px; }
}
