/* Muster USA — search popup + admin-bar offsets for fixed panels. */

/* Admin bar ---------------------------------------------------------------
 * The WP toolbar is fixed 32px (46px under 783px) and sits at z-index 99999.
 * Fixed panels start below it. Under 601px the toolbar scrolls away, so panels
 * go full height and stack above it instead. */
body { --admin-bar: 0px; }
body.admin-bar { --admin-bar: 32px; }
@media (max-width: 782px) { body.admin-bar { --admin-bar: 46px; } }
@media (max-width: 600px) {
	body.admin-bar { --admin-bar: 0px; }
	.admin-bar .cart-drawer,
	.admin-bar .search-popup,
	.admin-bar .primary-nav,
	.admin-bar .shop-filters { z-index: 100001; }
	.admin-bar .drawer-scrim,
	.admin-bar .search-scrim,
	.admin-bar .nav-scrim,
	.admin-bar .filters-scrim { z-index: 100000; }
	.admin-bar .site-header:has(.primary-nav.is-open) { z-index: 100001; }
}
.cart-drawer,
.search-popup { top: var(--admin-bar); }
@media (max-width: 1000px) { .primary-nav { top: var(--admin-bar); } }
@media (max-width: 900px) { .shop-filters { top: var(--admin-bar); } }

/* Search popup ----------------------------------------------------------- */

.search-scrim { position: fixed; inset: 0; z-index: 190; background: rgba(0, 18, 51, .55); }
.search-popup {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 200;
	max-height: calc(100vh - var(--admin-bar));
	max-height: calc(100dvh - var(--admin-bar));
	overflow-y: auto;
	background: #fff;
	border-bottom: 6px solid var(--color-gold);
	animation: muster-drop var(--base) var(--ease);
}
@keyframes muster-drop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

.search-popup__form {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 0 15px;
	background: #fff;
	border-bottom: 1px solid var(--color-graphite);
}
.search-popup__form::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	height: 2px;
	width: 0;
	background: var(--color-flame-orange);
}
.search-popup.is-loading .search-popup__form::after { animation: muster-load 900ms var(--ease) infinite; }
@keyframes muster-load { 0% { left: 0; width: 0; } 50% { left: 0; width: 60%; } 100% { left: 100%; width: 0; } }
.search-popup__icon { font-size: 28px; color: var(--color-midnight-navy); flex: none; }
.search-popup .search-popup__input {
	flex: 1;
	min-width: 0;
	min-height: 52px;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: var(--font-display);
	font-stretch: var(--stretch);
	font-size: 28px;
	font-weight: 800;
	text-transform: uppercase;
	color: var(--color-deep-ink);
}
.search-popup .search-popup__input::placeholder { color: var(--color-stone); font-weight: 700; }
.search-popup .search-popup__input::-webkit-search-cancel-button { display: none; }
.search-popup__clear { border: 0; background: transparent; color: var(--color-stone); cursor: pointer; padding: 6px; font-size: 22px; display: inline-flex; }
.search-popup__clear:hover { color: var(--color-flame-orange); }
.search-popup__close i { font-size: 26px; }

.search-popup__body { padding: 25px 0 35px; }
.search-popup__idle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; }
.search-popup__aside { display: flex; flex-direction: column; gap: 25px; }

.search-block + .search-block { margin-top: 0; }
.search-popup__results .search-block + .search-block { margin-top: 25px; }
.search-block__head { display: flex; justify-content: space-between; align-items: baseline; }
.search-block__title {
	margin: 0 0 12px;
	font-family: var(--font-serif);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .071em;
	text-transform: uppercase;
	color: var(--color-flame-orange);
}
.search-block__link { border: 0; background: none; padding: 0; font-size: 12px; color: var(--text-muted); text-decoration: underline; cursor: pointer; }
.search-block__link:hover { color: var(--color-flame-orange); }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	border: 1px solid var(--color-ash-gray);
	border-radius: var(--radius);
	background: #fff;
	font-family: var(--font-display);
	font-size: 13px;
	color: var(--color-graphite);
	cursor: pointer;
	transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chip i { font-size: 15px; color: var(--color-stone); }
.chip:hover { border-color: var(--color-flame-orange); color: var(--color-flame-orange); }
.chip:hover i { color: var(--color-flame-orange); }

.search-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-fog); }
.search-links li { border-bottom: 1px solid var(--color-fog); }
.search-links a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	font-stretch: var(--stretch);
	font-weight: 800;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--color-midnight-navy);
	text-decoration: none;
}
.search-links a:hover { color: var(--color-flame-orange); }

/* Product rows / grid */
.search-products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; }
.search-products--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.search-product {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 8px;
	border-radius: var(--radius);
	text-decoration: none;
	color: var(--color-graphite);
	transition: background var(--fast) var(--ease);
}
.search-product img { width: 64px; height: 64px; flex: none; object-fit: cover; background: var(--color-powder-blue); }
.search-product:hover, .search-product.is-active { background: var(--color-fog); }
.search-product__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-product__name { font-stretch: var(--stretch); font-weight: 800; font-size: 15px; line-height: 1.2; text-transform: uppercase; color: var(--color-midnight-navy); }
.search-product:hover .search-product__name { color: var(--color-flame-orange); }
.search-product__sub { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-product__price { font-weight: 800; font-size: 14px; color: var(--color-deep-ink); }
.search-product__price del { font-weight: 400; color: var(--text-muted); font-size: .85em; }
.search-product__price ins { text-decoration: none; color: var(--color-flame-orange); }
.search-products--grid .search-product { flex-direction: column; align-items: flex-start; padding: 0 0 8px; }
.search-products--grid .search-product img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.search-products--grid .search-product__text { padding: 0 4px; }
.search-products--grid .search-product:hover, .search-products--grid .search-product.is-active { background: transparent; }
.search-product mark, .search-terms mark { background: none; color: var(--color-flame-orange); }

.search-terms { list-style: none; margin: 0; padding: 0; }
.search-terms a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 8px;
	border-radius: var(--radius);
	color: var(--color-deep-ink);
	text-decoration: none;
	font-weight: 700;
}
.search-terms a i { color: var(--color-stone); font-size: 18px; }
.search-terms a em { margin-left: auto; font-style: normal; font-family: var(--font-serif); font-size: 12px; color: var(--text-muted); }
.search-terms a:hover, .search-terms a.is-active { background: var(--color-fog); }

.search-popup__all { margin-top: 20px; }
.search-popup__all.is-active { background: var(--color-flame-orange-press); border-color: var(--color-flame-orange-press); }
.search-empty { display: flex; align-items: center; gap: 15px; padding: 20px; margin-bottom: 25px; background: var(--color-powder-blue); border-radius: var(--radius); }
.search-empty i { font-size: 40px; color: var(--color-flame-orange); flex: none; }
.search-empty p { margin: 0; color: var(--color-deep-ink); }

@media (max-width: 900px) {
	.search-popup__idle { grid-template-columns: 1fr; gap: 25px; }
	.search-products { grid-template-columns: 1fr; }
	.search-products--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.search-popup { max-height: 100vh; max-height: 100dvh; bottom: 0; border-bottom: 0; }
	.search-popup__form { padding: 12px 0; }
	.search-popup .search-popup__input { font-size: 20px; min-height: 44px; }
	.search-popup__icon { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .search-popup { animation: none; } }
