/**
 * M M Sanidaz — Product search (FiboSearch skin)
 * ------------------------------------------------------------------
 * FiboSearch is the search engine and UI (live suggestions, Enter / "See
 * all results" → WooCommerce's product results page). This file only
 * restyles it in the site's language: Inter, espresso / taupe / beige
 * tokens, pill field, espresso submit, 3:4 product thumbnails. Settings
 * that feed it (price in suggestions, 2-character minimum, copy) are in
 * inc/header.php.
 *
 *   Desktop  header icon → dropdown field under the icon (layout "icon")
 *   ≤991px   header icon → FiboSearch's full-screen overlay, field focused
 *
 * Legacy Additional CSS neutralised (matching its !important):
 *   `@media (min-width: 980px) { .dgwt-wcas-search-submit svg { left: 15px
 *    !important; top: 8px !important } }`
 */

/* ---------------------------------------------------------------
   Field (desktop dropdown + mobile overlay)
------------------------------------------------------------------ */

.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp {
	display: flex;
	align-items: center;
	padding: 0;
	background: transparent;
	border: 0;
}

.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	height: 48px;
	padding: 0 56px 0 20px;
	border: 1px solid var(--mmsc-color-border);
	border-radius: var(--mmsc-radius-pill);
	background: var(--mmsc-color-surface);
	box-shadow: none;
	color: var(--mmsc-color-text) !important; /* legacy `input { color: green !important }` */
	font-family: var(--mmsc-font-body);
	font-size: 15px;
	font-weight: 400 !important; /* legacy `input { font-weight: bold }` */
	line-height: 48px;
	transition: border-color var(--mmsc-transition-fast), box-shadow var(--mmsc-transition-fast);
}

.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
	color: var(--mmsc-color-text-muted);
	font-style: normal; /* FiboSearch sets italic */
	opacity: 1;
}

.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
	border-color: var(--mmsc-color-dark);
	outline: none;
	box-shadow: 0 0 0 3px rgba(213, 168, 75, 0.28);
}

/* Browser's own clear "×" duplicates FiboSearch's. */
.dgwt-wcas-search-wrapp input[type="search"].dgwt-wcas-search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

/* Submit: an espresso circle inside the right end of the pill. */
.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
	top: 50%;
	right: 4px;
	left: auto;
	width: 40px;
	min-width: 40px;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--mmsc-color-dark);
	transform: translateY(-50%);
	transition: background-color var(--mmsc-transition-fast);
}

.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover,
.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:focus-visible {
	background: var(--mmsc-color-dark-hover);
}

.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:focus-visible {
	outline: 2px solid var(--mmsc-color-accent);
	outline-offset: 2px;
}

.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit::before {
	display: none;
}

.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg.dgwt-wcas-ico-magnifier {
	position: static;
	top: auto !important;
	left: auto !important;
	width: 16px;
	height: 16px;
	margin: 0;
	fill: var(--mmsc-color-surface);
	opacity: 1;
}

/* FiboSearch's in-field spinner / clear button, moved clear of the submit. */
.dgwt-wcas-search-wrapp .dgwt-wcas-preloader {
	right: 50px;
}

.dgwt-wcas-search-wrapp .dgwt-wcas-close {
	color: var(--mmsc-color-text-muted);
}

/* ---------------------------------------------------------------
   Desktop: field drops down under the header icon
------------------------------------------------------------------ */

html:not(.dgwt-wcas-overlay-mobile-on) .dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon .dgwt-wcas-search-form {
	width: 420px;
	max-width: calc(100vw - 32px);
	padding: 12px;
	border: 1px solid var(--mmsc-color-border);
	border-radius: var(--mmsc-radius-lg);
	background: var(--mmsc-color-surface);
	box-shadow: 0 12px 32px rgba(43, 37, 33, 0.12);
	box-sizing: border-box;
}

.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon-arrow {
	border-color: var(--mmsc-color-border);
}

.dgwt-wcas-search-wrapp.dgwt-wcas-layout-icon.dgwt-wcas-layout-icon-open .dgwt-wcas-search-icon {
	opacity: 1;
	color: var(--mmsc-color-primary);
}

/* ---------------------------------------------------------------
   Suggestions
------------------------------------------------------------------ */

.dgwt-wcas-suggestions-wrapp {
	margin-top: 8px;
	padding: 6px;
	border: 1px solid var(--mmsc-color-border) !important;
	border-radius: var(--mmsc-radius-lg);
	background: var(--mmsc-color-surface);
	box-shadow: 0 12px 32px rgba(43, 37, 33, 0.12);
	box-sizing: border-box;
	font-family: var(--mmsc-font-body);
	overflow: hidden auto;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 8px 10px;
	border: 0;
	border-radius: var(--mmsc-radius-md);
	color: var(--mmsc-color-text);
	font-family: var(--mmsc-font-body);
	text-decoration: none;
	line-height: 1.35;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.dgwt-wcas-suggestion-selected {
	background: var(--mmsc-color-bg);
}

/* Category rows ("in Frocks"). */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-tax {
	min-height: 40px;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-tax .dgwt-wcas-st {
	font-size: var(--mmsc-text-sm);
	color: var(--mmsc-color-text);
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-st > span.dgwt-wcas-st-label,
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-tax .dgwt-wcas-st > span:first-child {
	color: var(--mmsc-color-text-muted);
}

/* Section headings ("Categories", "Products"). */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-headline {
	padding: 12px 10px 4px;
	pointer-events: none;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mmsc-color-text-muted);
	border: 0;
}

/* Product rows: 3:4 thumbnail, name, price. */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-si {
	flex: 0 0 48px;
	width: 48px;
	max-width: 48px;
	margin: 0;
	padding: 0;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-si img {
	display: block;
	width: 48px;
	max-width: 48px;
	height: 64px;
	max-height: none;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: var(--mmsc-color-border);
	object-fit: cover;
	object-position: center top;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-content-wrapp {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	min-width: 0;
	padding: 0;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-product .dgwt-wcas-st {
	display: -webkit-box;
	overflow: hidden;
	font-size: var(--mmsc-text-sm);
	font-weight: 500;
	line-height: 1.35;
	color: var(--mmsc-color-text) !important; /* a <div>: legacy `div { color: black !important }` */
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* The matched letters. */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-st strong,
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-st b {
	font-weight: 600;
	color: var(--mmsc-color-sale) !important; /* legacy `strong { color: black !important }` */
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-sp {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 6px;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--mmsc-color-text);
}

/* Legacy `.amount, bdi { font-size: 20px; font-weight: 700 }` and the
   column-stacked `.price` apply here too. */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-sp .amount,
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-sp bdi {
	font-size: 13px;
	font-weight: inherit;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-sp ins {
	order: 1;
	text-decoration: none;
	background: none;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-sp del {
	order: 2;
	margin: 0;
	color: var(--mmsc-color-text-muted);
	font-weight: 400;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-sp del .amount,
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-sp del bdi {
	font-size: 12px;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-sp .mmsc-discount-percent {
	order: 3;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--mmsc-color-sale);
}

/* "See all results" — the Enter behaviour, as a row. */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.js-dgwt-wcas-suggestion-more {
	justify-content: center;
	margin-top: 4px;
	padding: 12px;
	border-top: 1px solid var(--mmsc-color-border);
	border-radius: 0 0 var(--mmsc-radius-md) var(--mmsc-radius-md);
	text-transform: none;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.js-dgwt-wcas-suggestion-more .dgwt-wcas-st-more {
	font-size: var(--mmsc-text-sm);
	font-weight: 600;
	color: var(--mmsc-color-text);
	text-decoration: underline;
	text-decoration-color: var(--mmsc-color-border);
	text-underline-offset: 4px;
}

/* No results. */
.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores {
	display: block;
	padding: 20px 14px;
	text-align: center;
	cursor: default;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores .dgwt-wcas-st {
	font-size: var(--mmsc-text-sm);
	line-height: 1.55;
	color: var(--mmsc-color-text-muted);
	white-space: normal;
}

.dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion-nores.dgwt-wcas-suggestion-selected {
	background: transparent;
}

/* ---------------------------------------------------------------
   Mobile / tablet: FiboSearch's full-screen overlay
------------------------------------------------------------------ */

.dgwt-wcas-overlay-mobile {
	background: var(--mmsc-color-surface);
	font-family: var(--mmsc-font-body);
}

/* A 64px bar — the header's own height. FiboSearch places the results at a
   fixed `top: 45px !important` (its 45px bar), so that offset moves with it. */
.dgwt-wcas-overlay-mobile .dgwt-wcas-om-bar {
	display: flex;
	align-items: center;
	gap: 4px;
	box-sizing: border-box;
	height: calc(64px + env(safe-area-inset-top, 0px));
	padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(4px, env(safe-area-inset-left, 0px));
	border-bottom: 1px solid var(--mmsc-color-border);
	background: var(--mmsc-color-surface);
}

html.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
	top: calc(64px + env(safe-area-inset-top, 0px)) !important;
	height: calc(100% - 64px - env(safe-area-inset-top, 0px)) !important;
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-om-bar button.dgwt-wcas-om-return {
	display: flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--mmsc-color-text);
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-om-bar button.dgwt-wcas-om-return:hover,
.dgwt-wcas-overlay-mobile .dgwt-wcas-om-bar button.dgwt-wcas-om-return:focus {
	background: var(--mmsc-color-bg);
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-om-bar button.dgwt-wcas-om-return svg {
	width: 20px;
	height: 20px;
	fill: var(--mmsc-color-text);
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-search-wrapp-mobile {
	flex: 1;
	min-width: 0;
	max-width: none;
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-search-wrapp-mobile .dgwt-wcas-search-form {
	width: 100%;
	padding: 0;
	border: 0;
	box-shadow: none;
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	height: 44px;
	padding: 0 44px 0 18px;
	border-color: var(--mmsc-color-bg);
	background: var(--mmsc-color-bg);
	font-size: 16px; /* 16px: no iOS zoom on focus */
	line-height: 44px;
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-search-wrapp-mobile .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
	border-color: var(--mmsc-color-border);
	background: var(--mmsc-color-surface);
	box-shadow: none;
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-search-wrapp-mobile .dgwt-wcas-preloader {
	right: 12px;
}

/* Suggestions fill the screen under the bar instead of floating. */
.dgwt-wcas-overlay-mobile .dgwt-wcas-suggestions-wrapp {
	margin: 0;
	padding: 8px max(8px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
	border: 0 !important;
	border-radius: 0;
	box-shadow: none;
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion {
	padding: 10px 8px;
}

.dgwt-wcas-overlay-mobile .dgwt-wcas-suggestions-wrapp .dgwt-wcas-suggestion.js-dgwt-wcas-suggestion-more {
	border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
	.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input,
	.dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
		transition: none;
	}
}

/* =================================================================
   Search panel (inc/search.php, assets/js/search.js)
   Every header magnifier opens this panel: a full-width sheet from the
   top on tablet / desktop, the whole screen on phones. The field and the
   suggestion list inside are FiboSearch's own (restyled below).
   Legacy rules neutralised: `div { color: black !important }` (colours are
   set on every text element), Customizer `h2 { font-family: Poppins }`,
   `.amount { font-size: 20px }`.
==================================================================== */

html.mmsc-search-open {
	overflow-y: hidden !important; /* the theme scrolls <html>, not <body> */
	scrollbar-gutter: stable;
}

.mmsc-search {
	--mmsc-search-pad: var(--mmsc-space-6);
	position: fixed;
	inset: 0;
	z-index: 100002; /* above the header (9999), bottom nav and Chaty */
	font-family: var(--mmsc-font-body);
	color: var(--mmsc-color-text);
}

.mmsc-search[hidden] {
	display: none;
}

.mmsc-search__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(45, 38, 35, 0.42);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	animation: mmsc-search-fade 200ms ease both;
}

.mmsc-search__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	max-height: min(88vh, 760px);
	background: var(--mmsc-color-surface);
	box-shadow: 0 24px 60px rgba(43, 37, 33, 0.18);
	animation: mmsc-search-drop 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.mmsc-search.is-closing .mmsc-search__backdrop {
	animation: mmsc-search-fade 180ms ease reverse both;
}

.mmsc-search.is-closing .mmsc-search__panel {
	animation: mmsc-search-lift 180ms ease both;
}

@keyframes mmsc-search-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes mmsc-search-drop {
	from { opacity: 0; transform: translateY(-14px); }
	to { opacity: 1; transform: none; }
}

@keyframes mmsc-search-lift {
	from { opacity: 1; transform: none; }
	to { opacity: 0; transform: translateY(-10px); }
}

/* Bar: field + close ------------------------------------------------------ */

.mmsc-search__bar {
	display: flex;
	align-items: center;
	gap: var(--mmsc-space-3);
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	padding: var(--mmsc-space-5) var(--mmsc-search-pad) var(--mmsc-space-4);
	box-sizing: border-box;
	color: var(--mmsc-color-text) !important;
}

.mmsc-search__field {
	flex: 1;
	min-width: 0;
}

.mmsc-search .mmsc-search__field .dgwt-wcas-search-wrapp {
	max-width: none !important; /* FiboSearch inline `max-width: 600px` */
	width: 100%;
	margin: 0;
}

/* The field: a soft pill with a thin line magnifier at its start (the
   submit button itself, so a click on it still searches) and FiboSearch's
   clear x at its end. */
.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	height: 56px;
	padding: 0 52px 0 56px;
	border-color: var(--mmsc-color-border);
	background: var(--mmsc-color-bg);
	font-size: 17px;
	line-height: 56px;
	letter-spacing: 0;
}

.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
	background: var(--mmsc-color-surface);
}

.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
	right: auto;
	left: 8px;
	width: 40px;
	min-width: 40px;
	height: 40px;
	min-height: 40px;
	border: 0 !important;
	border-radius: 50%;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d2623' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='10.75' cy='10.75' r='6.25'/%3E%3Cpath d='m15.4 15.4 4.35 4.35'/%3E%3C/svg%3E") center / 21px 21px no-repeat !important;
	box-shadow: none;
	transition: background-color var(--mmsc-transition-fast);
}

.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover {
	background-color: rgba(45, 38, 35, 0.06) !important;
}

/* FiboSearch's own magnifier glyph sat off-centre in the button. */
.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit svg.dgwt-wcas-ico-magnifier {
	display: none;
}

/* FiboSearch's clear x and spinner at the end of the field. The spinner
   waits 300ms before showing, so fast answers never flash a loader. */
.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-preloader,
.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-close {
	right: 14px;
}

.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-inner-preloader {
	animation: mmsc-search-fade 150ms ease 300ms both;
}

.mmsc-search__close {
	display: inline-flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 48px;
	height: 48px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 50%;
	background: transparent !important; /* Customizer `body button` background */
	color: var(--mmsc-color-text) !important;
	cursor: pointer;
	transition: background-color var(--mmsc-transition-fast);
}

.mmsc-search__close:hover,
.mmsc-search__close:focus-visible {
	background: var(--mmsc-color-bg) !important;
}

.mmsc-search__close:focus-visible {
	outline: 2px solid var(--mmsc-color-accent);
	outline-offset: 2px;
}

/* Body: results or discovery ---------------------------------------------- */

.mmsc-search__body {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-top: 1px solid var(--mmsc-color-border);
}

.mmsc-search__inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: var(--mmsc-space-5) var(--mmsc-search-pad) var(--mmsc-space-6);
	box-sizing: border-box;
	color: var(--mmsc-color-text) !important;
}

.mmsc-search[data-state="discover"] .mmsc-search__results,
.mmsc-search[data-state="nores"] .mmsc-search__results,
.mmsc-search[data-state="results"] .mmsc-search__discover {
	display: none;
}

.mmsc-search__label {
	margin: 0 0 var(--mmsc-space-3);
	font-family: var(--mmsc-font-body) !important; /* Customizer `h2 { font-family: Poppins }` */
	font-size: 11px !important;
	font-weight: 600;
	letter-spacing: 0.1em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--mmsc-color-text-muted);
}

.mmsc-search__nores {
	margin: 0 0 var(--mmsc-space-5);
	padding: var(--mmsc-space-4);
	border-radius: var(--mmsc-radius-md);
	background: var(--mmsc-color-bg);
	font-size: 15px;
	line-height: 1.5;
	color: var(--mmsc-color-text);
}

.mmsc-search__discover {
	display: grid;
	gap: var(--mmsc-space-6);
	animation: mmsc-search-fade 200ms ease both;
}

.mmsc-search__chips,
.mmsc-search__cats,
.mmsc-search__new {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mmsc-search__chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mmsc-space-2);
}

.mmsc-search__chip {
	display: inline-flex;
	align-items: center;
	gap: var(--mmsc-space-2);
	min-height: 40px;
	padding: 0 var(--mmsc-space-4);
	border: 1px solid var(--mmsc-color-border);
	border-radius: var(--mmsc-radius-pill);
	background: var(--mmsc-color-surface);
	font-size: var(--mmsc-text-sm);
	font-weight: 500;
	color: var(--mmsc-color-text);
	text-decoration: none;
	transition: border-color var(--mmsc-transition-fast), background-color var(--mmsc-transition-fast), color var(--mmsc-transition-fast);
}

.mmsc-search__chip svg {
	width: 15px;
	height: 15px;
	color: var(--mmsc-color-text-muted);
}

.mmsc-search__chip:hover,
.mmsc-search__chip:focus-visible {
	border-color: var(--mmsc-color-dark);
	background: var(--mmsc-color-bg);
	color: var(--mmsc-color-text);
}

.mmsc-search a:focus-visible {
	outline: 2px solid var(--mmsc-color-accent);
	outline-offset: 2px;
}

.mmsc-search__cats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: var(--mmsc-space-2);
}

.mmsc-search__cats a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mmsc-space-2);
	min-height: 48px;
	padding: 0 var(--mmsc-space-4);
	border-radius: var(--mmsc-radius-md);
	background: var(--mmsc-color-bg);
	font-size: 15px;
	font-weight: 500;
	color: var(--mmsc-color-text);
	text-decoration: none;
	transition: background-color var(--mmsc-transition-fast), color var(--mmsc-transition-fast);
}

.mmsc-search__cats svg {
	flex: none;
	width: 16px;
	height: 16px;
	color: var(--mmsc-color-primary);
	transition: transform var(--mmsc-transition-fast);
}

.mmsc-search__cats a:hover,
.mmsc-search__cats a:focus-visible {
	background: #f1e8e1;
	color: var(--mmsc-color-text);
}

.mmsc-search__cats a:hover svg {
	transform: translateX(3px);
}

.mmsc-search__new {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--mmsc-space-4);
}

.mmsc-search__new a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: var(--mmsc-color-text);
	text-decoration: none;
}

.mmsc-search__new-img {
	display: block;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	border-radius: var(--mmsc-radius-md);
	background: var(--mmsc-color-bg);
}

.mmsc-search__new-img img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center top;
	transition: transform 400ms ease;
}

.mmsc-search__new a:hover .mmsc-search__new-img img {
	transform: scale(1.03);
}

.mmsc-search__new-name {
	display: -webkit-box;
	overflow: hidden;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--mmsc-color-text);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.mmsc-search__new-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--mmsc-color-text);
}

.mmsc-search__new-price .amount,
.mmsc-search__new-price bdi {
	font-size: 13px !important; /* Customizer `.amount { font-size: 20px }` */
	font-weight: inherit !important;
	color: inherit !important;
}

.mmsc-search__new-price ins {
	order: 1;
	background: none;
	text-decoration: none;
}

.mmsc-search__new-price del {
	order: 2;
	font-weight: 400;
	color: var(--mmsc-color-text-muted);
}

.mmsc-search__new-price del .amount,
.mmsc-search__new-price del bdi {
	font-size: 12px !important;
	color: var(--mmsc-color-text-muted) !important;
}

.mmsc-search__new-price .mmsc-discount-percent {
	order: 3;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--mmsc-color-sale);
}

/* Live suggestions inside the panel ---------------------------------------
   FiboSearch positions its list absolutely under the field and sets an
   inline width; in the panel it simply flows. */

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestions-wrapp {
	position: static !important;
	top: auto !important;
	left: auto !important;
	width: auto !important;
	max-height: none !important;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
	font-size: 0; /* inline-flex rows: no whitespace gaps */
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion {
	font-size: var(--mmsc-text-sm);
	padding: 10px 12px;
	transition: background-color var(--mmsc-transition-fast);
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion:hover {
	background: var(--mmsc-color-bg);
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion-headline {
	padding: var(--mmsc-space-4) 12px var(--mmsc-space-2);
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion-headline:first-child {
	padding-top: 0;
}

.mmsc-search .mmsc-search__results .dgwt-wcas-si {
	flex-basis: 60px;
	width: 60px;
	max-width: 60px;
}

.mmsc-search .mmsc-search__results .dgwt-wcas-si img {
	width: 60px;
	max-width: 60px;
	height: 80px;
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion-product .dgwt-wcas-st {
	font-size: 15px;
}

.mmsc-search .mmsc-search__results .dgwt-wcas-sp,
.mmsc-search .mmsc-search__results .dgwt-wcas-sp .amount,
.mmsc-search .mmsc-search__results .dgwt-wcas-sp bdi {
	font-size: 14px;
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion.js-dgwt-wcas-suggestion-more {
	margin-top: var(--mmsc-space-3);
	padding: 14px 12px;
	border-top: 0;
	border-radius: var(--mmsc-radius-md);
	background: var(--mmsc-color-dark);
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion.js-dgwt-wcas-suggestion-more .dgwt-wcas-st-more {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--mmsc-color-surface) !important;
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion.js-dgwt-wcas-suggestion-more:hover,
.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion.js-dgwt-wcas-suggestion-more.dgwt-wcas-suggestion-selected {
	background: var(--mmsc-color-dark-hover);
}

.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion.js-dgwt-wcas-suggestion-more .dgwt-wcas-st-more-total {
	color: rgba(255, 255, 255, 0.72) !important;
}

/* The panel shows its own "no results" + discovery instead. */
.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion-nores {
	display: none;
}

/* Tablet / desktop: two columns of product rows, discovery side by side. */
@media (min-width: 768px) {
	.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion-product {
		display: inline-flex;
		width: calc(50% - 4px);
		vertical-align: top;
		box-sizing: border-box;
	}

	.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion-product:nth-of-type(odd) {
		margin-right: 8px;
	}
}

@media (min-width: 1024px) {
	.mmsc-search__discover {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
		column-gap: var(--mmsc-space-8);
		align-items: start;
	}

	.mmsc-search__nores {
		grid-column: 1 / -1;
		margin-bottom: 0;
	}

	.mmsc-search__group {
		grid-column: 1;
	}

	.mmsc-search__group--new {
		grid-column: 2;
		grid-row: 1 / span 2;
	}

	.mmsc-search__nores:not([hidden]) ~ .mmsc-search__group--new {
		grid-row: 2 / span 2;
	}
}

/* Phones: the panel is the screen. */
@media (max-width: 767px) {
	.mmsc-search {
		--mmsc-search-pad: var(--mmsc-space-4);
	}

	.mmsc-search__backdrop {
		display: none;
	}

	.mmsc-search__panel {
		height: 100%;
		height: 100dvh;
		max-height: none;
		box-shadow: none;
		animation-name: mmsc-search-rise;
	}

	.mmsc-search.is-closing .mmsc-search__panel {
		animation-name: mmsc-search-sink;
	}

	.mmsc-search__bar {
		gap: var(--mmsc-space-1);
		padding: calc(var(--mmsc-space-3) + env(safe-area-inset-top, 0px)) var(--mmsc-space-2) var(--mmsc-space-3) var(--mmsc-search-pad);
	}

	.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
		height: 48px;
		padding: 0 44px 0 48px;
		font-size: 16px; /* no iOS zoom on focus */
		line-height: 48px;
	}

	.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
		left: 6px;
		width: 36px;
		min-width: 36px;
		height: 36px;
		min-height: 36px;
		background-size: 20px 20px !important;
	}

	.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-preloader,
	.mmsc-search .dgwt-wcas-search-wrapp .dgwt-wcas-close {
		right: 10px;
	}

	.mmsc-search__close {
		width: 44px;
		height: 44px;
	}

	.mmsc-search__inner {
		padding-bottom: calc(var(--mmsc-space-7) + env(safe-area-inset-bottom, 0px));
	}

	.mmsc-search .mmsc-search__results .dgwt-wcas-suggestion {
		padding: 10px 8px;
	}

	.mmsc-search__cats {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.mmsc-search__cats a {
		padding: 0 var(--mmsc-space-1);
		border-bottom: 1px solid var(--mmsc-color-border);
		border-radius: 0;
		background: transparent;
	}

	.mmsc-search__new {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--mmsc-space-4) var(--mmsc-space-3);
	}
}

@keyframes mmsc-search-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@keyframes mmsc-search-sink {
	from { opacity: 1; transform: none; }
	to { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
	.mmsc-search__backdrop,
	.mmsc-search__panel,
	.mmsc-search__discover,
	.mmsc-search.is-closing .mmsc-search__backdrop,
	.mmsc-search.is-closing .mmsc-search__panel {
		animation: none;
	}

	.mmsc-search__new-img img,
	.mmsc-search__cats svg {
		transition: none;
	}
}
