/* ============================================================
   Beniche Mobile App Shell — port of React mobile.css (mobile header,
   bottom nav, sheet menu only). Other mobile sections are ported in
   subsequent roadmap steps.
   Desktop shell (Header + Footer) is hidden on mobile via media query
   below; mobile shell is hidden on desktop.
   ============================================================ */

:root {
	--mn-violet: #6d28d9;
	--mn-violet-deep: #4c1d95;
	--mn-violet-soft: #ede9fe;
	--mn-green: #16a34a;
	--mn-green-deep: #15803d;
	--mn-orange: #f97316;
	--mn-red: #ef4444;
	--mn-pink: #ec4899;
	--mn-bg: #fafafa;
	--mn-card: #ffffff;
	--mn-text: #1f2937;
	--mn-muted: #6b7280;
	--mn-line: #f1f5f9;
	--mn-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- MOBILE HEADER ---------- */
.mn-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	padding: 14px 18px 10px;
	display: grid;
	grid-template-columns: 40px 1fr 40px;
	align-items: center;
	gap: 8px;
}
.dark .mn-header { background: #0f172a; }

.mn-header-btn {
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	display: grid;
	place-items: center;
	cursor: pointer;
	color: var(--mn-text);
	position: relative;
	padding: 0;
}
.dark .mn-header-btn { color: #e5e7eb; }
.mn-header-btn svg { width: 24px; height: 24px; }

.mn-header-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-weight: 900;
	font-size: 26px;
	letter-spacing: -0.02em;
	text-decoration: none;
	color: inherit;
}
.mn-header-logo .word {
	background: linear-gradient(90deg, var(--mn-violet), #9333ea);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.mn-logo-mark { width: 34px; height: 34px; flex-shrink: 0; }

.mn-cart-badge {
	position: absolute;
	top: 4px;
	inset-inline-start: 4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--mn-green);
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	display: grid;
	place-items: center;
	font-family: inherit;
}

/* ---------- BOTTOM NAV ---------- */
.mn-bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 60;
	background: #fff;
	border-top: 1px solid var(--mn-line);
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	padding: 8px 0 max(8px, env(safe-area-inset-bottom));
	box-shadow: 0 -10px 30px -15px rgba(15,23,42,0.15);
}
.dark .mn-bottom-nav { background: #0f172a; border-color: #1e293b; }

.mn-nav-item {
	border: 0;
	background: transparent;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 6px 4px;
	cursor: pointer;
	color: var(--mn-muted);
	font-family: inherit;
	position: relative;
	transition: color 0.2s;
	text-decoration: none;
}
.dark .mn-nav-item { color: #94a3b8; }
.mn-nav-item.on { color: var(--mn-violet); }
.mn-nav-item svg { width: 24px; height: 24px; }
.mn-nav-item span { font-size: 11px; font-weight: 700; }
.mn-nav-item .badge {
	position: absolute;
	top: 2px;
	left: calc(50% + 6px);
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--mn-green);
	color: #fff;
	font-size: 10px;
	font-weight: 900;
	display: grid;
	place-items: center;
}

/* ---------- SHEET (mobile menu) ---------- */
.mn-sheet-bg {
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,0.5);
	z-index: 70;
	backdrop-filter: blur(2px);
	animation: mn-fade 0.2s;
	display: none;
}
.mn-sheet-bg.is-open { display: block; }

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

.mn-sheet {
	position: fixed;
	top: 0;
	bottom: 0;
	right: 0;
	width: min(82vw, 320px);
	background: #fff;
	z-index: 71;
	padding: 20px;
	overflow-y: auto;
	animation: mn-slide-r 0.3s var(--mn-ease);
	box-shadow: -20px 0 40px -20px rgba(0,0,0,0.25);
	transform: translateX(100%);
	pointer-events: none;
}
.dark .mn-sheet { background: #0f172a; }
.mn-sheet.is-open { transform: translateX(0); pointer-events: auto; }

@keyframes mn-slide-r { from { transform: translateX(100%); } to { transform: translateX(0); } }

.mn-sheet-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
}
.mn-sheet-title {
	font-weight: 900;
	font-size: 22px;
	background: linear-gradient(90deg, #6d28d9, #9333ea);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.mn-sheet h4 {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 900;
	color: var(--mn-text);
}
.dark .mn-sheet h4 { color: #e5e7eb; }
.mn-sheet ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.mn-sheet li {
	padding: 12px 0;
	border-bottom: 1px solid var(--mn-line);
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 10px;
}
.dark .mn-sheet li { border-color: #1e293b; }
.mn-sheet li:last-child { border: 0; }
.mn-sheet li a {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	color: inherit;
	text-decoration: none;
	font: inherit;
	background: none;
	border: 0;
	cursor: pointer;
	text-align: right;
}
.dark .mn-sheet li a { color: #e5e7eb; }
.mn-sheet li a:hover { color: var(--mn-violet); }
.mn-sheet-icon { font-size: 18px; }
.mn-sheet-close {
	position: absolute;
	top: 14px;
	left: 14px;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #f1f5f9;
	border: 0;
	font-size: 16px;
	cursor: pointer;
	color: var(--mn-text);
}
.dark .mn-sheet-close { background: #1e293b; color: #e5e7eb; }

/* Body padding when mobile bottom nav is visible */
body.bn-is-mobile main { padding-bottom: 80px; }
body.bn-is-mobile .bn-site-header .bn-utility-strip,
body.bn-is-mobile .bn-site-header .bn-top-bar,
body.bn-is-mobile .bn-site-header .bn-nav-bar { display: none; }

/* ---------- DESKTOP: hide mobile shell, show desktop header ---------- */
@media (min-width: 821px) {
	.mn-header,
	.mn-bottom-nav { display: none !important; }
	.mn-sheet,
	.mn-sheet-bg { display: none !important; }
}
@media (max-width: 820px) {
	.bn-site-header .bn-utility-strip,
	.bn-site-header .bn-top-bar,
	.bn-site-header .bn-nav-bar { display: none !important; }
	body { padding-bottom: 80px; }
}
