/* Ms Couture header. Hides the theme header and floats a rounded bar over the page. */
body.mch-on .header-wrapper,
body.mch-on .mobile-header-wrapper,
body.mch-on .sticky-header-wrapper { display: none !important; }

html.mch-lock { overflow: hidden; }

/* Room under the floating header on pages the theme draws (products, shop, cart, account). */
body.mch-offset { padding-top: 104px !important; }
@media (max-width: 1024px) { body.mch-offset { padding-top: 84px !important; } }

.mch {
	position: fixed;
	top: calc(16px + var(--wp-admin--admin-bar--height, 0px));
	left: 0;
	right: 0;
	z-index: 9990;
	padding: 0 24px;
	pointer-events: none;
	font-family: "Albert Sans", Arial, sans-serif;
}
.mch *, .mch-drawer *, .mch-search * { box-sizing: border-box; }

.mch-bar {
	pointer-events: auto;
	max-width: 1280px;
	height: 66px;
	margin: 0 auto;
	padding: 0 18px 0 28px;
	display: flex;
	align-items: center;
	gap: 24px;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(40, 18, 4, .08);
	transition: height .3s ease, box-shadow .3s ease, background-color .3s ease, transform .55s cubic-bezier(.2, .8, .2, 1), opacity .35s ease;
}

/* Tucked away while scrolling down; a small button waits in the corner. */
.mch.is-tucked .mch-bar { transform: translateY(-140%) scale(.96); opacity: 0; pointer-events: none; }
.mch-peek {
	position: absolute;
	top: 0;
	right: max(24px, calc((100% - 1280px) / 2));
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #111111 !important;
	box-shadow: 0 10px 30px rgba(40, 18, 4, .18);
	cursor: pointer;
	opacity: 0;
	transform: scale(.4) rotate(-90deg);
	pointer-events: none;
	transition: opacity .35s ease, transform .5s cubic-bezier(.2, .8, .2, 1), background-color .2s ease;
}
.mch-peek svg { width: 22px; height: 22px; }
.mch-peek:hover { background: #F6F5F3 !important; }
.mch.is-tucked .mch-peek { opacity: 1; transform: none; pointer-events: auto; transition-delay: .15s; }
.mch.is-scrolled .mch-bar { height: 58px; background: #fff; box-shadow: 0 10px 34px rgba(40, 18, 4, .16); }

.mch-logo { flex: 0 0 auto; display: flex; align-items: center; color: #111111 !important; text-decoration: none !important; }
.mch-logo img { display: block; height: 42px !important; width: auto !important; max-width: none !important; }
.mch.is-scrolled .mch-logo img { height: 38px !important; }
.mch-panel .mch-logo img { height: 34px !important; }
.mch-wordmark { font-family: "Albert Sans", Arial, sans-serif; font-size: 24px; line-height: 1; color: #111111; letter-spacing: .3px; }

.mch-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.mch .mch-menu, .mch-drawer .mch-menu { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mch .mch-menu { display: flex; align-items: center; gap: 30px; }
.mch .mch-menu li, .mch-drawer .mch-menu li { position: relative; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.mch .mch-menu li::before, .mch-drawer .mch-menu li::before { content: none !important; }
.mch .mch-menu > li > a {
	display: inline-flex;
	align-items: center;
	padding: 22px 0;
	color: #111111 !important;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .3px;
	text-decoration: none !important;
	background-image: linear-gradient(#111111, #111111);
	background-size: 0 1.5px;
	background-position: 0 calc(100% - 16px);
	background-repeat: no-repeat;
	transition: background-size .3s ease;
}
.mch .mch-menu > li > a:hover,
.mch .mch-menu > li > a:focus-visible,
.mch .mch-menu > .current-menu-item > a,
.mch .mch-menu > .is-current > a { background-size: 100% 1.5px; }
.mch .menu-item-has-children > a::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-left: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}
.mch .sub-menu {
	position: absolute;
	top: 100%;
	left: -20px;
	min-width: 220px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 14px 40px rgba(40, 18, 4, .14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.mch li:hover > .sub-menu, .mch li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mch .sub-menu a { display: block; padding: 10px 20px; color: #111111 !important; font-size: 14px; text-decoration: none !important; }
.mch .sub-menu a:hover, .mch .sub-menu a:focus-visible { background: #FFFFFF; }

.mch-icons { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.mch-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #111111 !important;
	cursor: pointer;
	transition: background-color .2s ease;
	pointer-events: auto;
}
.mch-icon:hover, .mch-icon:focus-visible { background: #F6F5F3 !important; }
.mch-icon svg { display: block; width: 21px; height: 21px; }
.mch a:focus-visible, .mch button:focus-visible, .mch-drawer a:focus-visible, .mch-drawer button:focus-visible, .mch-search :focus-visible { outline: 2px solid #111111; outline-offset: 2px; }
.mch-count, .mch-wcount {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 9px;
	background: #111111;
	color: #FFFFFF;
	font-size: 10px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
}
.mch-count:empty, .mch-wcount:empty { display: none; }
.mch-burger { display: none !important; }

/* Phone menu */
.mch-drawer[hidden], .mch-search[hidden] { display: none !important; }
.mch-drawer {
	position: fixed;
	inset: 0;
	z-index: 9995;
	display: flex;
	justify-content: flex-end;
	background: rgba(40, 18, 4, .35);
	opacity: 0;
	transition: opacity .3s ease;
	font-family: "Albert Sans", Arial, sans-serif;
}
.mch-drawer.is-open { opacity: 1; }
.mch-panel {
	width: min(86vw, 380px);
	height: 100%;
	padding: calc(20px + var(--wp-admin--admin-bar--height, 0px)) 28px 32px;
	display: flex;
	flex-direction: column;
	gap: 28px;
	overflow-y: auto;
	background: #FFFFFF;
	transform: translateX(100%);
	transition: transform .35s ease;
}
.mch-drawer.is-open .mch-panel { transform: none; }
.mch-panel-top { display: flex; align-items: center; justify-content: space-between; }
.mch-drawer .mch-menu { display: flex; flex-direction: column; gap: 0; margin-top: 8px !important; }
.mch-drawer .mch-menu > li { border-bottom: 1px solid #EEECE8; }
.mch-drawer .mch-menu a { display: block; padding: 14px 0; color: #111111 !important; font-family: "Albert Sans", Arial, sans-serif; font-size: 16px; font-weight: 500; letter-spacing: .02em; line-height: 1.3; text-decoration: none !important; }
.mch-drawer .sub-menu { list-style: none; margin: -4px 0 10px; padding: 0 0 0 14px; }
.mch-drawer .sub-menu a { padding: 8px 0; font-size: 14px; font-weight: 400; opacity: .8; }
.mch-panel-link { margin-top: auto; color: #111111 !important; font-size: 12px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none !important; opacity: .75; }
.mch-panel-link + .mch-panel-link { margin-top: 14px; }

/* Search */
.mch-search {
	position: fixed;
	inset: 0;
	z-index: 9996;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 20vh 24px 24px;
	background: rgba(253, 226, 205, .97);
	opacity: 0;
	transition: opacity .3s ease;
	font-family: "Albert Sans", Arial, sans-serif;
}
.mch-search.is-open { opacity: 1; }
.mch-search form { width: 100%; max-width: 760px; }
.mch-search-label { display: block; margin-bottom: 18px; color: #111111; font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.mch-search-row { display: flex; border-bottom: 2px solid #642D0A; }
.mch-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 72px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #111111 !important;
	font-family: "Albert Sans", Arial, sans-serif !important;
	font-size: 40px !important;
	outline: none;
}
.mch-search input[type="search"]::placeholder { color: #111111; opacity: .4; }
.mch-search button[type="submit"] {
	flex: 0 0 auto;
	padding: 0 8px 0 24px !important;
	border: 0 !important;
	background: transparent !important;
	color: #111111 !important;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	cursor: pointer;
}
.mch-search-close { position: absolute; top: calc(20px + var(--wp-admin--admin-bar--height, 0px)); right: 24px; }

@media (max-width: 1024px) {
	.mch-peek { right: 12px; width: 46px; height: 46px; }
	.mch { top: calc(10px + var(--wp-admin--admin-bar--height, 0px)); padding: 0 12px; }
	.mch-bar { height: 58px; padding: 0 8px 0 18px; gap: 8px; justify-content: space-between; }
	.mch.is-scrolled .mch-bar { height: 54px; }
	.mch-nav { display: none; }
	.mch-burger { display: inline-flex !important; }
	.mch-wordmark { font-size: 21px; }
	.mch-logo img, .mch.is-scrolled .mch-logo img { height: 34px !important; }
	.mch-search input[type="search"] { font-size: 28px !important; height: 60px; }
}
@media (max-width: 480px) {
	.mch-account, .mch-wish { display: none !important; }
	.mch-logo img, .mch.is-scrolled .mch-logo img { height: 30px !important; }
}
@media (max-width: 360px) {
	.mch-logo img, .mch.is-scrolled .mch-logo img { height: 26px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.mch-bar, .mch-panel, .mch-drawer, .mch-search, .mch .sub-menu { transition: none !important; }
}

/* Menu items stay on one line ("Custom Couture" never wraps); tighter spacing on smaller laptops. */
.mch .mch-menu > li > a { white-space: nowrap !important; }
@media (max-width: 1360px) and (min-width: 1025px) { .mch .mch-menu { gap: 22px; } }
@media (max-width: 1180px) and (min-width: 1025px) { .mch .mch-menu { gap: 16px; } .mch .mch-menu > li > a { font-size: 14px !important; } }
