/* Gold Top — mobile search (pill + full-viewport overlay).
 * Both pieces are visible only at (max-width: 768px); above the breakpoint the
 * desktop sticky-header inline search remains the search affordance.
 */

/* ---------- pill (mobile only) -------------------------------------------- */
.gt-msearch-pill {
	display: none;
	box-sizing: border-box;
	width: calc(100% - 20px);
	margin: 14px 10px;
	padding: 0 18px;
	height: 48px;
	border: none;
	border-radius: 999px;
	background: #eef1f5;
	color: #4d5763;
	font-size: 15px;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
	align-items: center;
	gap: 10px;
	box-shadow: inset 0 0 0 1px rgba(20, 28, 40, 0.05);
	transition: background-color 0.18s ease, box-shadow 0.18s ease;
	touch-action: manipulation;
}

.gt-msearch-pill:hover,
.gt-msearch-pill:focus-visible {
	background: #e7ebf1;
	outline: none;
	box-shadow:
		inset 0 0 0 1px rgba(20, 28, 40, 0.05),
		0 0 0 3px rgba(243, 91, 4, 0.18);
}

.gt-msearch-pill__ico {
	display: inline-flex;
	align-items: center;
	color: #9aa3ad;
}

.gt-msearch-pill__label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-transform: none;
	letter-spacing: normal;
}

@media (max-width: 768px) {
	.gt-msearch-pill {
		display: inline-flex;
	}
}

/* ---------- overlay (mobile only) ----------------------------------------- */
/* The overlay is a light-dim backdrop; the bar and the results sit on it as
 * a white panel (auto-height, capped at 70vh) so the site stays visible
 * below — never a wall of white. No backdrop-filter blur: it's expensive
 * on mobile GPUs and made the field feel laggy. */
.gt-msearch {
	position: fixed;
	inset: 0;
	z-index: 100000;            /* above .gt-sticky (9999) */
	background: rgba(20, 28, 40, 0.22);
	display: flex;
	flex-direction: column;
}

.gt-msearch[hidden] {
	display: none;
}

/* While the overlay is open, the page beneath cannot scroll.
 * Note: do NOT add `touch-action: none` here — it blocks the overlay's own
 * scroll/input touch events on iOS Safari and makes the field feel laggy.
 * overflow:hidden alone is sufficient to lock the background. */
body.gt-msearch--open {
	overflow: hidden;
}

.gt-msearch__bar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	/* Right padding intentionally larger than the left — visually balances
	 * the 40px back button + 6px gap on the left so the search pill itself
	 * sits centered in the bar. */
	padding: 12px 20px 12px 12px;
	background: #ffffff;
	box-shadow: 0 6px 20px rgba(20, 28, 40, 0.12);
}

.gt-msearch__back {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border: none;
	background: transparent;
	color: #1c2430;
	cursor: pointer;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.gt-msearch__back:hover,
.gt-msearch__back:focus-visible {
	background: #f1f3f7;
	outline: none;
}

.gt-msearch__form {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	height: 44px;
	padding: 0 16px;
	background: #eef1f5;
	border-radius: 999px;
	transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.gt-msearch__form:focus-within {
	background: #ffffff;
	box-shadow:
		0 6px 18px rgba(20, 28, 40, 0.10),
		0 0 0 3px rgba(243, 91, 4, 0.15);
}

/* GoldTop logo nested inside the search pill, to the left of the input —
 * the brand-mark a customer sees when the input "moves up to the header"
 * on tap. Auto-omitted when the WP custom logo isn't configured. */
.gt-msearch__form-brand {
	flex: 0 0 auto;
	width: auto;
	height: 24px;
	max-width: 72px;
	object-fit: contain;
	margin-right: 10px;
	display: block;
}

/* Aggressive reset of the native search-input chrome — kills the dotted
 * focus outline some Android skins paint, the iOS clear-button decoration,
 * and any inherited browser-default outline on focus. */
.gt-msearch__input,
.gt-msearch__input:focus,
.gt-msearch__input:focus-visible,
.gt-msearch__input:active {
	flex: 1 1 auto;
	min-width: 0;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent;
	color: #1c2430;
	font-size: 16px;        /* 16px prevents iOS auto-zoom on focus */
	line-height: 1.2;
	-webkit-appearance: none;
	appearance: none;
}

.gt-msearch__input::-webkit-search-decoration,
.gt-msearch__input::-webkit-search-cancel-button,
.gt-msearch__input::-webkit-search-results-button,
.gt-msearch__input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	display: none;
}

.gt-msearch__input::-moz-focus-inner {
	border: 0;
}

.gt-msearch__input::placeholder {
	color: #9aa3ad;
	opacity: 1;
}

.gt-msearch__clear {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	margin-left: 6px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: #d7dbe2;
	color: #ffffff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.gt-msearch__clear[hidden] {
	display: none;
}

/* ---------- loader (spinner shown while results are loading) -------------- */
.gt-msearch__loader {
	flex: 0 0 auto;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 28px 16px;
	background: #ffffff;
	box-shadow: 0 12px 24px rgba(20, 28, 40, 0.10);
}

.gt-msearch__loader[hidden] {
	display: none;
}

.gt-msearch__spinner {
	width: 24px;
	height: 24px;
	border: 3px solid #eef0f3;
	border-top-color: #f35b04;
	border-radius: 50%;
	animation: gt-msearch-spin 0.7s linear infinite;
}

@keyframes gt-msearch-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.gt-msearch__spinner { animation-duration: 1.6s; }
}

/* ---------- results ------------------------------------------------------- */
/* Results: white panel that auto-grows to its content but is capped at
 * 70vh so the site stays visible below. The empty state (rendered before
 * any results) collapses to zero height. */
.gt-msearch__results {
	flex: 0 1 auto;
	max-height: 70vh;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: #ffffff;
	box-shadow: 0 12px 24px rgba(20, 28, 40, 0.10);
}

.gt-msearch__results:empty {
	display: none;
}

.gt-msearch__item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	text-decoration: none;
	color: #1c2430;
}

.gt-msearch__item + .gt-msearch__item {
	border-top: 1px solid #f1f3f7;
}

.gt-msearch__item:hover,
.gt-msearch__item.is-active {
	background: #f7f8fa;
}

.gt-msearch__thumb {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 10px;
	object-fit: cover;
	background: #f1f3f7;
}

.gt-msearch__info {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.gt-msearch__cat {
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #9aa3ad;
}

.gt-msearch__name {
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.25;
	color: #1c2430;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.gt-msearch__price {
	font-size: 14px;
	font-weight: 700;
	color: #f35b04;
}

.gt-msearch__price del { display: none; }
.gt-msearch__price ins { text-decoration: none; }

.gt-msearch__empty {
	padding: 28px 16px;
	text-align: center;
	color: #9aa3ad;
	font-size: 15px;
}

.gt-msearch__all {
	display: block;
	width: 100%;
	padding: 16px;
	border: none;
	border-top: 1px solid #eef0f3;
	background: #ffffff;
	color: #f35b04;
	font-size: 14px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.gt-msearch__all:hover,
.gt-msearch__all:focus-visible {
	background: #f35b04;
	color: #ffffff;
	outline: none;
}

/* The overlay markup is in the DOM on every device, but only the pill / sticky
 * mobile-button can open it; on desktop both triggers are hidden and the
 * overlay never receives the open state, so no display rule is needed here.
 */
