/* =========================================================
   MMDeco – Site Header (+ sticky wrapper from Header & Footer)
   ========================================================= */

/* Wrapper printed by the Header & Footer builder */
.mmdeco-hf-header {
	position: relative;
	z-index: 999;
}

.mmdeco-hf-header--sticky {
	position: sticky;
	top: 0;
}

body.admin-bar .mmdeco-hf-header--sticky {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .mmdeco-hf-header--sticky {
		top: 46px;
	}
}

@media (max-width: 600px) {
	body.admin-bar .mmdeco-hf-header--sticky {
		top: 0; /* WP admin bar scrolls away on small phones */
	}
}

/* ---------- Widget ---------- */
.mmdeco-hd {
	--mmdeco-hd-link: #6e6a66;
	--mmdeco-hd-link-active: #1e1e1e;
	--mmdeco-hd-icon: #1e1e1e;
	--mmdeco-hd-icon-size: 21px;
	--mmdeco-hd-badge: #c69c53;
	--mmdeco-hd-badge-text: #ffffff;
	--mmdeco-hd-drawer-link: #1e1e1e;
	--mmdeco-hd-serif: 'Cormorant Garamond', Georgia, serif;
	--mmdeco-hd-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
	position: relative;
	font-family: var(--mmdeco-hd-sans);
}

.mmdeco-hd *,
.mmdeco-hd *::before,
.mmdeco-hd *::after {
	box-sizing: border-box;
}

.mmdeco-hd__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.mmdeco-hd__bar {
	position: relative;
	z-index: 2;
	padding: 20px 0;
	border-bottom: 1px solid #e6e1dc;
	background-color: #fff;
	transition: box-shadow 0.25s ease;
}

.mmdeco-hd--shadow.is-scrolled .mmdeco-hd__bar {
	box-shadow: 0 6px 24px rgba(30, 30, 30, 0.07);
}

.mmdeco-hd__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Logo */
.mmdeco-hd .mmdeco-hd__logo {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	color: #1e1e1e;
	text-decoration: none;
}

.mmdeco-hd__logo img {
	display: block;
	width: 150px;
	max-width: 100%;
	height: auto;
}

.mmdeco-hd .mmdeco-hd__logo-text {
	font-family: var(--mmdeco-hd-serif);
	font-size: 1.85rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

/* Menu position */
.mmdeco-hd__nav {
	display: flex;
	flex: 1 1 auto;
	min-width: 0;
}

.mmdeco-hd--menu-left .mmdeco-hd__nav { justify-content: flex-start; }
.mmdeco-hd--menu-right .mmdeco-hd__nav { justify-content: flex-end; }

/* Centered: logo and icons take equal space so the menu is truly centered */
.mmdeco-hd--menu-center .mmdeco-hd__nav { justify-content: center; }
.mmdeco-hd--menu-center .mmdeco-hd__inner > .mmdeco-hd__logo,
.mmdeco-hd--menu-center .mmdeco-hd__icons {
	flex: 1 1 0;
}

/* Desktop menu */
.mmdeco-hd .mmdeco-hd__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mmdeco-hd__nav .mmdeco-hd__menu li {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mmdeco-hd .mmdeco-hd__nav .mmdeco-hd__menu a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 0;
	color: var(--mmdeco-hd-link);
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease;
}

.mmdeco-hd .mmdeco-hd__nav .mmdeco-hd__menu a:hover,
.mmdeco-hd .mmdeco-hd__nav .mmdeco-hd__menu a:focus-visible,
.mmdeco-hd .mmdeco-hd__nav .mmdeco-hd__menu .current-menu-item > a,
.mmdeco-hd .mmdeco-hd__nav .mmdeco-hd__menu .current-menu-ancestor > a,
.mmdeco-hd .mmdeco-hd__nav .mmdeco-hd__menu .current_page_item > a {
	color: var(--mmdeco-hd-link-active);
}

.mmdeco-hd__nav .menu-item-has-children > a::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}

/* Dropdown */
.mmdeco-hd .mmdeco-hd__nav .sub-menu {
	position: absolute;
	top: 100%;
	left: -18px;
	z-index: 10;
	min-width: 210px;
	margin: 0;
	padding: 10px 0;
	list-style: none;
	border: 1px solid #ece7e1;
	border-radius: 8px;
	background-color: #fff;
	box-shadow: 0 12px 30px rgba(30, 30, 30, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.mmdeco-hd__nav li:hover > .sub-menu,
.mmdeco-hd__nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mmdeco-hd__nav .sub-menu .sub-menu {
	top: -11px;
	left: 100%;
}

.mmdeco-hd .mmdeco-hd__nav .sub-menu a {
	display: flex;
	justify-content: space-between;
	padding: 8px 18px;
	font-size: 0.85rem;
	white-space: nowrap;
}

.mmdeco-hd__nav .sub-menu .menu-item-has-children > a::after {
	margin-top: 0;
	transform: rotate(-45deg);
}

/* Icons */
.mmdeco-hd__icons {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 0 auto;
	gap: 14px;
}

.mmdeco-hd .mmdeco-hd__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(var(--mmdeco-hd-icon-size) + 12px);
	height: calc(var(--mmdeco-hd-icon-size) + 12px);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--mmdeco-hd-icon);
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.mmdeco-hd .mmdeco-hd__icon:hover,
.mmdeco-hd .mmdeco-hd__icon:focus-visible {
	background-color: rgba(30, 30, 30, 0.06);
	color: var(--mmdeco-hd-icon);
}

.mmdeco-hd__icon .mmdeco-hd__svg {
	width: var(--mmdeco-hd-icon-size);
	height: var(--mmdeco-hd-icon-size);
}

.mmdeco-hd .mmdeco-hd__count {
	position: absolute;
	top: 0;
	right: -2px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 20px;
	background-color: var(--mmdeco-hd-badge);
	color: var(--mmdeco-hd-badge-text);
	font-size: 0.65rem;
	font-weight: 600;
	line-height: 17px;
	text-align: center;
}

/* Burger (hidden on desktop) */
.mmdeco-hd .mmdeco-hd__burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0 8px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.mmdeco-hd .mmdeco-hd__burger:hover,
.mmdeco-hd .mmdeco-hd__burger:focus-visible {
	background-color: rgba(30, 30, 30, 0.06);
}

.mmdeco-hd__burger span {
	display: block;
	width: 100%;
	height: 1.5px;
	border-radius: 2px;
	background-color: var(--mmdeco-hd-icon);
}

.mmdeco-hd__burger span:nth-child(2) {
	width: 70%;
}

/* ---------- Search panel ---------- */
.mmdeco-hd__search {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1;
	padding: 18px 24px;
	border-bottom: 1px solid #e6e1dc;
	background-color: #fff;
	box-shadow: 0 14px 30px rgba(30, 30, 30, 0.06);
	animation: mmdeco-hd-down 0.22s ease;
}

.mmdeco-hd__search[hidden] {
	display: none;
}

@keyframes mmdeco-hd-down {
	from { opacity: 0; transform: translateY(-8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.mmdeco-hd__search-form {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 720px;
	margin: 0 auto;
	padding: 4px 4px 4px 18px;
	border: 1px solid #e6e1dc;
	border-radius: 50px;
	color: #6e6a66;
}

.mmdeco-hd__search-form > .mmdeco-hd__svg {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
}

.mmdeco-hd .mmdeco-hd__search-form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: #1e1e1e;
	font-family: inherit;
	font-size: 0.9rem;
}

.mmdeco-hd .mmdeco-hd__search-submit {
	flex: 0 0 auto;
	margin: 0;
	padding: 11px 22px;
	border: 0;
	border-radius: 50px;
	background-color: #1e1e1e;
	color: #fff;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
}

.mmdeco-hd .mmdeco-hd__search-submit:hover {
	background-color: #3a3a3a;
	color: #fff;
}

.mmdeco-hd .mmdeco-hd__search-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #1e1e1e;
	cursor: pointer;
}

.mmdeco-hd__search-close .mmdeco-hd__svg {
	width: 18px;
	height: 18px;
}

/* ---------- Mobile drawer ---------- */
.mmdeco-hd__overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(20, 18, 16, 0.45);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.mmdeco-hd__overlay[hidden] {
	display: none;
}

.mmdeco-hd.is-drawer-open .mmdeco-hd__overlay {
	opacity: 1;
}

.mmdeco-hd__drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	width: min(340px, 86vw);
	background-color: #fff;
	box-shadow: 10px 0 40px rgba(0, 0, 0, 0.12);
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateX(-100%);
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.mmdeco-hd__drawer[hidden] {
	display: none;
}

.mmdeco-hd.is-drawer-open .mmdeco-hd__drawer {
	transform: translateX(0);
}

body.admin-bar .mmdeco-hd__drawer {
	top: 46px;
}

@media (min-width: 783px) {
	body.admin-bar .mmdeco-hd__drawer {
		top: 32px;
	}
}

.mmdeco-hd__drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid #efebe6;
}

.mmdeco-hd__drawer-head .mmdeco-hd__logo-text {
	font-size: 1.6rem;
}

.mmdeco-hd .mmdeco-hd__drawer-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f4f1ec;
	color: #1e1e1e;
	cursor: pointer;
}

.mmdeco-hd__drawer-close .mmdeco-hd__svg {
	width: 18px;
	height: 18px;
}

.mmdeco-hd__drawer-nav {
	padding: 8px 20px;
}

.mmdeco-hd .mmdeco-hd__drawer-nav .mmdeco-hd__menu {
	display: block;
}

.mmdeco-hd__drawer-nav li {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid #f1ede8;
}

.mmdeco-hd__drawer-nav li:last-child {
	border-bottom: 0;
}

.mmdeco-hd .mmdeco-hd__drawer-nav a {
	display: block;
	padding: 14px 44px 14px 0;
	color: var(--mmdeco-hd-drawer-link);
	font-size: 0.95rem;
	font-weight: 500;
	text-decoration: none;
}

.mmdeco-hd .mmdeco-hd__drawer-nav .current-menu-item > a,
.mmdeco-hd .mmdeco-hd__drawer-nav .current_page_item > a {
	color: #c69c53;
}

.mmdeco-hd__drawer-nav .sub-menu {
	display: none;
	margin: 0 0 10px;
	padding: 0 0 0 14px;
	border-left: 1px solid #ece7e1;
}

.mmdeco-hd__drawer-nav li.is-open > .sub-menu {
	display: block;
}

.mmdeco-hd__drawer-nav .sub-menu li {
	border-bottom: 0;
}

.mmdeco-hd .mmdeco-hd__drawer-nav .sub-menu a {
	padding: 9px 44px 9px 0;
	font-size: 0.88rem;
	color: #6e6a66;
}

.mmdeco-hd .mmdeco-hd__sub-toggle {
	position: absolute;
	top: 6px;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #1e1e1e;
	cursor: pointer;
}

.mmdeco-hd__sub-toggle .mmdeco-hd__svg {
	width: 18px;
	height: 18px;
	transition: transform 0.2s ease;
}

.mmdeco-hd__drawer-nav li.is-open > .mmdeco-hd__sub-toggle .mmdeco-hd__svg {
	transform: rotate(180deg);
}

.mmdeco-hd__drawer-links {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: auto;
	padding: 18px 20px 26px;
	border-top: 1px solid #efebe6;
	background-color: #faf8f5;
}

.mmdeco-hd .mmdeco-hd__drawer-links a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	color: #1e1e1e;
	font-size: 0.9rem;
	text-decoration: none;
}

.mmdeco-hd__drawer-links .mmdeco-hd__svg {
	width: 20px;
	height: 20px;
}

body.mmdeco-hd-locked {
	overflow: hidden;
}

.mmdeco-hd__notice {
	margin: 0;
	font-size: 0.8rem;
	color: #b32d2e;
}

/* ---------- Responsive: switch to mobile menu ---------- */
@media (max-width: 1024px) {
	.mmdeco-hd--bp-tablet .mmdeco-hd__nav {
		display: none;
	}

	.mmdeco-hd--bp-tablet .mmdeco-hd__burger {
		display: inline-flex;
	}

	/* burger | logo centered | icons */
	.mmdeco-hd--bp-tablet .mmdeco-hd__inner {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		gap: 12px;
	}

	.mmdeco-hd--bp-tablet .mmdeco-hd__burger { justify-self: start; }
	.mmdeco-hd--bp-tablet .mmdeco-hd__inner > .mmdeco-hd__logo { justify-self: center; }
	.mmdeco-hd--bp-tablet .mmdeco-hd__icons { justify-self: end; }
}

@media (max-width: 767px) {
	.mmdeco-hd--bp-mobile .mmdeco-hd__nav {
		display: none;
	}

	.mmdeco-hd--bp-mobile .mmdeco-hd__burger {
		display: inline-flex;
	}

	.mmdeco-hd--bp-mobile .mmdeco-hd__inner {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		gap: 12px;
	}

	.mmdeco-hd--bp-mobile .mmdeco-hd__burger { justify-self: start; }
	.mmdeco-hd--bp-mobile .mmdeco-hd__inner > .mmdeco-hd__logo { justify-self: center; }
	.mmdeco-hd--bp-mobile .mmdeco-hd__icons { justify-self: end; }

	.mmdeco-hd__inner {
		padding: 0 16px;
	}

	.mmdeco-hd .mmdeco-hd__logo-text {
		font-size: 1.55rem;
	}

	/* Account & wishlist move into the mobile menu */
	.mmdeco-hd .mmdeco-hd__icon--account,
	.mmdeco-hd .mmdeco-hd__icon--wishlist {
		display: none;
	}

	.mmdeco-hd__icons {
		gap: 4px !important;
	}

	.mmdeco-hd__search {
		padding: 12px 16px;
	}

	.mmdeco-hd .mmdeco-hd__search-submit {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mmdeco-hd__drawer,
	.mmdeco-hd__overlay,
	.mmdeco-hd__search {
		transition: none;
		animation: none;
	}
}
