/* Perfuma Mobile Menu — "The Fragrance Shop" style tiled menu
 * Scoped to #main-menu (Flatsome mobile offcanvas) so nothing else is affected.
 */

/* ---------- Container ---------- */
#main-menu.mobile-sidebar {
	background: #fff;
	padding: 0;
}
#main-menu .sidebar-menu {
	padding: 0;
}
/* Hide Flatsome's built-in close button — we render our own inside the header */
#main-menu .mfp-close {
	display: none !important;
}

/* ---------- Rounded header bar ---------- */
.pmm-header {
	padding: 14px 0 14px 0;
	background: #fff;
}
.pmm-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #2d1b69;           /* deep purple like reference */
	color: #fff;
	padding: 18px 22px;
	border-top-right-radius: 999px;
	border-bottom-right-radius: 999px;
	width: 88%;
	min-height: 56px;
	box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.pmm-header__title {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: .3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pmm-header__close {
	color: #fff !important;
	background: transparent;
	border: 0;
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 12px;
	flex: 0 0 auto;
}
.pmm-header__close:hover,
.pmm-header__close:focus {
	color: #fff !important;
	opacity: .85;
}

/* The close button sits on the rounded pill — but reference shows X on the white
 * area just past the pill end. Pull it out of the pill visually. */
.pmm-header__bar {
	position: relative;
	padding-right: 60px;             /* space for the X outside the pill */
}
.pmm-header__close {
	position: absolute;
	right: -44px;                    /* sits in the white area next to the pill */
	top: 50%;
	transform: translateY(-50%);
	color: #222 !important;
	width: 40px;
	height: 40px;
}

/* ---------- Search field ---------- */
.pmm-search {
	display: flex;
	align-items: center;
	margin: 14px 14px 10px;
	padding: 2px 10px 2px 18px;
	background: #f5f5f5;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	height: 54px;
}
.pmm-search__input {
	flex: 1 1 auto;
	background: transparent;
	border: 0;
	outline: none;
	box-shadow: none;
	font-size: 17px;
	color: #333;
	padding: 0;
	margin: 0;
	height: 50px;
	line-height: 50px;
	font-style: italic;
}
.pmm-search__input::placeholder {
	color: #b5b5b5;
	font-style: italic;
}
.pmm-search__btn {
	background: transparent;
	border: 0;
	color: #2d1b69;
	padding: 0 6px;
	min-height: 40px;
	box-shadow: none;
}
.pmm-search__btn:hover,
.pmm-search__btn:focus {
	background: transparent;
	color: #2d1b69;
	box-shadow: none;
}

/* ---------- Tiled category rows ---------- */
#main-menu .nav-sidebar.nav-vertical > li {
	display: block;
	border: 0;
	margin: 0;
	padding: 0;
	background: #f4f4f4;
}
/* alternating bands — tiles have a white gap between them */
#main-menu .nav-sidebar.nav-vertical > li + li {
	margin-top: 10px;
}

#main-menu .nav-sidebar.nav-vertical > li > a {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	min-height: 140px;
	padding: 22px 22px;
	font-size: 22px;
	font-weight: 700;
	color: #111 !important;
	text-transform: none;           /* reference is Title Case, not uppercase */
	letter-spacing: 0;
	line-height: 1.1;
	border: 0;
	background: transparent;
}

#main-menu .nav-sidebar.nav-vertical > li > a:hover,
#main-menu .nav-sidebar.nav-vertical > li > a:focus {
	background: #ececec;
	color: #111 !important;
}

/* Big image on the right — sidebar uses class ux-sidebar-menu-icon */
#main-menu .nav-sidebar.nav-vertical > li > a > img.ux-sidebar-menu-icon,
#main-menu .nav-sidebar.nav-vertical > li > a > img.ux-menu-icon {
	order: 2;
	margin: 0 0 0 auto;
	width: auto !important;
	height: 110px !important;
	max-width: 45%;
	object-fit: contain;
	padding: 0;
	background: transparent;
	border-radius: 0;
}

/* Hide Flatsome's built-in search-form li — we render our own */
#main-menu .nav-sidebar > li.header-search-form {
	display: none !important;
}

/* ---------- PMM Ajax Search dropdown ---------- */
.pmm-search { position: relative; }

.pmm-search-results {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0; right: 0;
	background: #fff;
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba(0,0,0,.10);
	z-index: 9999;
	max-height: 340px;
	overflow-y: auto;
}
.pmm-search-results.is-open { display: block; }

.pmm-search-result {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	text-decoration: none;
	color: #111;
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
}
.pmm-search-result:last-child { border-bottom: 0; }
.pmm-search-result:hover { background: #f7f7f7; }

.pmm-search-result img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 6px;
	flex: 0 0 44px;
}
.pmm-search-result__info { flex: 1; min-width: 0; }
.pmm-search-result__title {
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.pmm-search-result__price { font-size: 13px; color: #555; margin-top: 2px; }

.pmm-search-result--msg {
	padding: 14px;
	color: #888;
	font-size: 14px;
	text-align: center;
	display: block;
}

/* Arrow chevron (if submenu) — hide to match reference */
#main-menu .nav-sidebar.nav-vertical > li > a .nav-sidebar-drop-toggle,
#main-menu .nav-sidebar.nav-vertical > li > a .icon-angle-down {
	display: none;
}

/* Submenu items stay readable underneath */
#main-menu .nav-sidebar.nav-vertical li ul.children,
#main-menu .nav-sidebar.nav-vertical li ul.sub-menu {
	background: #fff;
	padding: 4px 12px;
}

/* ---------- Desktop safety: only apply tile styles on mobile ---------- */
@media (min-width: 850px) {
	/* The mobile sidebar is only used on mobile anyway, but guard the huge row
	   height just in case something exposes it at desktop widths. */
	#main-menu .nav-sidebar.nav-vertical > li > a {
		min-height: 56px;
		padding: 12px 16px;
		font-size: 15px;
	}
	#main-menu .nav-sidebar.nav-vertical > li > a > img.ux-menu-icon {
		height: 40px !important;
	}
}
