/**
 * STAD mobile menu drawer — full-screen DARK boudoir panel: × close top-right,
 * search pill, category tabs, image card grid, drill-in sub-panels.
 *
 * Two things this file has to fight on STAD:
 *   1. Surfaces are ink, text is ivory (design tokens) — so every panel bg is a
 *      dark token, never a hardcoded white.
 *   2. The Elementor global kit paints every bare <button> with its button
 *      background (`.elementor-kit-N button {…}`, specificity 0,1,1) — which
 *      turned the tabs, the close button and the drill-in cards into solid
 *      crimson blocks. Button rules are scoped under `.ly-mmenu …` (0,2,0) so
 *      they beat the kit without an !important war; the toggle (outside the
 *      drawer) uses a double-class instead.
 */

/* ---------- Hamburger toggle ---------- */

.ly-mmenu__toggle.ly-mmenu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	background: transparent;
	color: var( --ly-color-text, #f5ede6 );
	cursor: pointer;
}

/* ---------- Drawer shell ---------- */

.ly-mmenu {
	position: fixed;
	inset: 0;
	/* --ly-z-drawer (310) > --ly-z-modal (300, side-cart): the full-screen
	   menu must win the stacking tie, not DOM order. */
	z-index: var( --ly-z-drawer, 310 );
	background: var( --ly-color-bg, #0b0508 );
	transform: translateX( -100% );
	/* visibility flips AFTER the slide-out finishes (0s + 280ms delay);
	   without the delay it snaps hidden in the same frame as close and the
	   exit animation never plays. */
	transition: transform 280ms cubic-bezier( 0.2, 0, 0, 1 ), visibility 0s linear 280ms;
	visibility: hidden;
	/* Deliberately NO overflow:hidden. This element has a transform (its slide),
	   and on iOS/WebKit `overflow:hidden` + `transform` on the SAME element clips
	   a transformed CHILD to the wrong region — the drill-in sub-panel (its own
	   translateX) painted BLANK on mobile even while on-screen, recovering only on
	   a forced reflow (e.g. Esc). Desktop composited it correctly, which masked
	   the bug in every headless probe. Clipping isn't needed here anyway: closed
	   sub-panels sit one full viewport-width to the right (past the screen edge)
	   and are visibility:hidden, and the body scroll-lock (.ly-mmenu-lock) blocks
	   horizontal scroll whenever the drawer is open — so nothing can peek. The
	   editor preview re-adds overflow:hidden (transform:none there → no bug). */
}

.ly-mmenu[aria-hidden="false"] {
	transform: translateX( 0 );
	visibility: visible;
	/* Opening must show immediately — no visibility delay on the way in. */
	transition: transform 280ms cubic-bezier( 0.2, 0, 0, 1 ), visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
	.ly-mmenu,
	.ly-mmenu[aria-hidden="false"] {
		transition: none;
	}
}

/* Lock applied to BOTH html and body — body alone is unreliable on iOS
   Safari (background can still scroll behind the fixed overlay). */
html.ly-mmenu-lock,
body.ly-mmenu-lock {
	overflow: hidden;
}

/* Elementor editor preview — the drawer renders inline (static, visible) so
   authors can see and style it; open/close behavior is disabled there. */
.ly-mmenu.ly-mmenu--preview {
	/* relative (not static) so the absolute drill-in sub-panel is contained
	   within the preview box in the Elementor editor. */
	position: relative;
	inset: auto;
	transform: none;
	visibility: visible;
	transition: none;
	border: 1px dashed var( --ly-color-border, rgba(245, 237, 230, 0.12) );
	border-radius: 12px;
	max-height: 480px;
	/* Safe here (transform:none above → no WebKit clip bug): keeps the closed
	   drill-in sub-panels inside the preview box instead of spilling out. */
	overflow: hidden;
}

.ly-mmenu__inner {
	height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px 24px 48px;
	box-sizing: border-box;
}

/* ---------- Top row (close) ---------- */

.ly-mmenu__top {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 8px;
}

.ly-mmenu .ly-mmenu__close {
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: var( --ly-color-text, #f5ede6 );
	cursor: pointer;
	border-radius: 12px;
	transition: background-color 150ms ease, color 150ms ease;
}

.ly-mmenu .ly-mmenu__close:hover {
	background: var( --ly-color-primary-soft, rgba(224, 16, 47, 0.14) );
	color: var( --ly-color-primary, #e0102f );
}

/* ---------- Search pill ---------- */

.ly-mmenu__search {
	position: relative;
	margin: 0 0 18px;
	padding: 0 0 22px;
	border-bottom: 1px solid var( --ly-color-border, rgba(245, 237, 230, 0.12) );
}

.ly-mmenu__search input[type="search"] {
	width: 100%;
	box-sizing: border-box;
	padding: 15px 54px 15px 20px;
	border: 1.5px solid var( --ly-color-border-strong, rgba(245, 237, 230, 0.20) );
	border-radius: 999px;
	/* 16px floor — smaller triggers iOS auto-zoom on focus. */
	font-size: 16px;
	font-family: inherit;
	color: var( --ly-color-text, #f5ede6 );
	background: var( --ly-color-surface-alt, #1b0e13 );
	outline: none;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ly-mmenu__search input[type="search"]:focus {
	border-color: var( --ly-color-primary, #e0102f );
	box-shadow: 0 0 0 3px rgba( 224, 16, 47, 0.22 );
}

.ly-mmenu__search input[type="search"]::placeholder {
	color: var( --ly-color-text-muted, rgba(245, 237, 230, 0.70) );
}

.ly-mmenu .ly-mmenu__search button[type="submit"] {
	position: absolute;
	right: 8px;
	top: 4px;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: var( --ly-color-primary, #e0102f );
	cursor: pointer;
}

/* ---------- Category tabs ---------- */

.ly-mmenu__tabs {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	margin: 0 0 20px;
	border-bottom: 1px solid var( --ly-color-border, rgba(245, 237, 230, 0.12) );
}

.ly-mmenu__tabs::-webkit-scrollbar {
	display: none;
}

.ly-mmenu .ly-mmenu__tab {
	position: relative;
	flex: 0 0 auto;
	padding: 4px 0 14px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: var( --ly-font-body, 'Manrope', system-ui, sans-serif );
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var( --ly-color-text-muted, rgba(245, 237, 230, 0.70) );
	transition: color 160ms ease;
}

.ly-mmenu .ly-mmenu__tab.is-active {
	color: var( --ly-color-primary, #e0102f );
}

.ly-mmenu .ly-mmenu__tab.is-active::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var( --ly-color-primary, #e0102f );
	border-radius: 2px;
}

/* ---------- Card grid ---------- */

.ly-mmenu__panel[hidden] {
	display: none;
}

.ly-mmenu__shopall {
	display: inline-block;
	margin: 0 0 16px;
	font-weight: 600;
	font-size: 0.95rem;
	color: var( --ly-color-primary, #e0102f );
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ly-mmenu__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 14px;
}

/* Scoped (0,2,0) so the kit's `button { background }` can't paint the drill-in
   card buttons crimson — they must read identical to the <a> cards. */
.ly-mmenu .ly-mmenu__card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-decoration: none;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	font: inherit;
	text-align: inherit;
	color: inherit;
	cursor: pointer;
}

.ly-mmenu__card-media {
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: 14px;
	overflow: hidden;
	background: var( --ly-color-surface-alt, #1b0e13 );
}

.ly-mmenu__card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* No image set yet — a dark tile with a faint frame. */
.ly-mmenu__card-media.is-empty {
	border: 1px solid var( --ly-color-border, rgba(245, 237, 230, 0.12) );
}

.ly-mmenu__card-label {
	text-align: center;
	font-family: var( --ly-font-body, 'Manrope', system-ui, sans-serif );
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.3;
	color: var( --ly-color-text, #f5ede6 );
}

/* Accent card — add CSS class `ly-menu-coral` to the menu item in
   Appearance → Menus (Screen Options → enable CSS Classes). */
.ly-mmenu__card--coral .ly-mmenu__card-label {
	color: var( --ly-color-secondary, #e0102f );
}

/* ---------- Footer (account + WhatsApp) ---------- */

.ly-mmenu__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 24px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var( --ly-color-border, rgba(245, 237, 230, 0.12) );
}

.ly-mmenu__flink {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var( --ly-font-body, 'Manrope', system-ui, sans-serif );
	font-size: 1rem;
	font-weight: 600;
	color: var( --ly-color-text, #f5ede6 );
	text-decoration: none;
}

.ly-mmenu__flink svg {
	flex: 0 0 auto;
}

.ly-mmenu__flink--wa {
	color: #25d366;
}

/* ---------- Drill-in sub-panel (level 2) ---------- */

.ly-mmenu__subpanel {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	background: var( --ly-color-bg, #0b0508 );
	transform: translateX( 100% );
	visibility: hidden;
	/* Match the drawer: visibility flips after the slide finishes on the way
	   out, immediately on the way in. */
	transition: transform 260ms cubic-bezier( 0.2, 0, 0, 1 ), visibility 0s linear 260ms;
}

.ly-mmenu__subpanel.is-open {
	transform: translateX( 0 );
	visibility: visible;
	transition: transform 260ms cubic-bezier( 0.2, 0, 0, 1 ), visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
	.ly-mmenu__subpanel,
	.ly-mmenu__subpanel.is-open {
		transition: none;
	}
}

.ly-mmenu__subhead {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	padding: 14px 20px;
	border-bottom: 1px solid var( --ly-color-border, rgba(245, 237, 230, 0.12) );
}

.ly-mmenu .ly-mmenu__back {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	margin-left: -8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: var( --ly-color-primary, #e0102f );
	cursor: pointer;
}

.ly-mmenu__subtitle {
	flex: 1 1 auto;
	font-family: var( --ly-font-body, 'Manrope', system-ui, sans-serif );
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var( --ly-color-text, #f5ede6 );
}

.ly-mmenu__subhead .ly-mmenu__close {
	flex: 0 0 auto;
	margin-right: -8px;
}

.ly-mmenu__sublist {
	list-style: none;
	margin: 0;
	padding: 6px 24px 40px;
	/* Take the remaining height under the fixed sub-head and scroll inside it —
	   without flex:1 + min-height:0 the list sizes to its content and a long
	   sub-menu overflows the drawer (clipped, unreachable). */
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ly-mmenu__sublist a {
	display: block;
	padding: 15px 0;
	font-family: var( --ly-font-body, 'Manrope', system-ui, sans-serif );
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var( --ly-color-text, #f5ede6 );
	text-decoration: none;
	border-bottom: 1px solid var( --ly-color-border, rgba(245, 237, 230, 0.12) );
}

.ly-mmenu__sublist a:last-child {
	border-bottom: 0;
}

/* Editor empty-state */
.ly-mmenu-empty {
	padding: 12px 16px;
	border: 1px dashed var( --ly-color-border, rgba(245, 237, 230, 0.12) );
	border-radius: 8px;
	font-size: 0.9rem;
	color: var( --ly-color-text-muted, rgba(245, 237, 230, 0.70) );
}
