.lumera-rd .wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--lm-topbar-h));
	z-index: 1000;
	margin: 0;
	padding: 0;
}
@media (max-width: 600px) {
	.admin-bar.lumera-rd .wp-site-blocks > header.wp-block-template-part { top: calc(0px - var(--lm-topbar-h)); }
}

.lm-header { background: #fff; transition: box-shadow .2s ease; }
.lm-header.is-scrolled { box-shadow: 0 4px 18px rgba(20, 30, 40, .08); }

/* Top bar */
.lm-topbar { height: var(--lm-topbar-h); background: var(--lm-ink); color: #fff; font-size: 13px; }
.lm-topbar .lm-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lm-topbar-msg { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lm-topbar-msg .lm-icon { color: var(--lm-primary); }
.lm-topbar-links { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }
.lm-topbar-links a { display: inline-flex; align-items: center; gap: 6px; color: #fff; opacity: .85; text-decoration: none; }
.lm-topbar-links a:hover { opacity: 1; }

/* Main bar */
.lm-mainbar .lm-wrap {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 28px;
	min-height: 78px;
}
.lm-burger { display: none; }
.lm-logo { display: flex; align-items: center; text-decoration: none; }
.lm-logo img { display: block; width: auto; height: 46px; max-width: 180px; object-fit: contain; }
.lm-logo-text { font-size: 22px; font-weight: 700; color: var(--lm-ink); }

.lm-search { position: relative; display: flex; width: 100%; max-width: 680px; margin: 0; }
.lm-search input[type="search"] {
	width: 100%;
	height: 46px;
	padding: 0 52px 0 18px;
	border: 1.5px solid var(--lm-line);
	border-radius: 10px;
	background: var(--lm-bg);
	color: var(--lm-ink);
	font: inherit;
	font-size: 15px;
	outline: none;
	-webkit-appearance: none;
	transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.lm-search input[type="search"]:focus { border-color: var(--lm-primary); background: #fff; box-shadow: 0 0 0 4px var(--lm-primary-soft); }
.lm-search button {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: var(--lm-primary);
	color: #fff;
	cursor: pointer;
}

.lm-actions { display: flex; align-items: center; gap: 6px; }
.lm-action {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 10px;
	color: var(--lm-ink) !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
}
.lm-action:hover { background: var(--lm-primary-soft); color: var(--lm-primary-dark) !important; }
.lm-cart-icon { position: relative; display: inline-flex; }
.lm-cart-count {
	position: absolute;
	top: -7px;
	right: -9px;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 10px;
	background: var(--lm-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 15px;
	text-align: center;
}
.lm-cart-count.is-empty { display: none; }

/* Category nav */
.lm-catnav { border-top: 1px solid var(--lm-line); border-bottom: 1px solid var(--lm-line); background: #fff; }
.lm-catnav-list { display: flex; align-items: stretch; gap: 4px; margin: 0; padding: 0; list-style: none; }
.lm-catnav-item { position: static; }
.lm-catnav-item.has-sub { position: relative; }
.lm-catnav-link {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 46px;
	padding: 0 14px;
	color: var(--lm-ink) !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
}
.lm-catnav-item:hover > .lm-catnav-link,
.lm-catnav-item:focus-within > .lm-catnav-link { color: var(--lm-primary) !important; border-bottom-color: var(--lm-primary); }
.lm-catnav-all > .lm-catnav-link { padding-left: 0; }
.lm-catnav-shop { margin-left: auto; }

.lm-sub, .lm-mega {
	position: absolute;
	top: 100%;
	z-index: 20;
	visibility: hidden;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
	background: #fff;
	box-shadow: var(--lm-shadow);
	border: 1px solid var(--lm-line);
}
.lm-catnav-item:hover > .lm-sub,
.lm-catnav-item:focus-within > .lm-sub,
.lm-catnav-item:hover > .lm-mega,
.lm-catnav-item:focus-within > .lm-mega { visibility: visible; opacity: 1; transform: none; }
.lm-sub { left: 0; min-width: 440px; padding: 16px; border-radius: 0 0 12px 12px; }
.lm-sub-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; margin: 0 0 10px; padding: 0; list-style: none; }
.lm-sub-list a, .lm-mega a { display: block; padding: 7px 8px; border-radius: 6px; color: var(--lm-text) !important; font-size: 14px; text-decoration: none !important; }
.lm-sub-list a:hover, .lm-mega li a:hover { background: var(--lm-primary-soft); color: var(--lm-primary-dark) !important; }
.lm-sub-all { display: inline-flex !important; align-items: center; gap: 4px; font-weight: 700; color: var(--lm-primary) !important; font-size: 14px; text-decoration: none !important; }
.lm-mega { left: 0; right: 0; padding: 24px 0; }
.lm-mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px 32px; }
.lm-mega-col ul { margin: 4px 0 0; padding: 0; list-style: none; columns: 2; column-gap: 12px; }
.lm-mega-col:only-child ul, .lm-mega-col:first-child ul { columns: 3; }
.lm-mega-col:first-child { grid-column: span 2; }
.lm-mega-title { font-weight: 700 !important; color: var(--lm-ink) !important; font-size: 15px !important; }
.lm-mega-title small { color: var(--lm-muted); font-weight: 500; }

/* Drawer */
.lm-drawer-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(15, 20, 25, .45); opacity: 0; transition: opacity .25s ease; }
.lm-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: 1101;
	width: min(360px, 88vw);
	display: flex;
	flex-direction: column;
	background: #fff;
	transform: translateX(-102%);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
	visibility: hidden;
}
.lm-drawer-open { overflow: hidden; }
.lm-drawer-open .lm-drawer { transform: none; visibility: visible; }
.lm-drawer-open .lm-drawer-overlay { opacity: 1; }
.lm-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--lm-line); }
.lm-logo-sm img { height: 36px; }
.lm-drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 28px; }
.lm-drawer-body .lm-search { margin-bottom: 8px; }
.lm-drawer-label { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lm-muted); }
.lm-acc, .lm-drawer-links { margin: 0; padding: 0; list-style: none; }
.lm-acc-item { border-bottom: 1px solid var(--lm-line); }
.lm-acc-toggle, .lm-acc-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 50px;
	padding: 0 4px;
	border: 0;
	background: none;
	color: var(--lm-ink) !important;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	text-align: left;
	text-decoration: none !important;
	cursor: pointer;
}
.lm-acc-toggle .lm-icon { transition: transform .2s ease; color: var(--lm-muted); }
.lm-acc-toggle[aria-expanded="true"] .lm-icon { transform: rotate(180deg); }
.lm-acc-panel { margin: 0; padding: 0 0 10px 8px; list-style: none; }
.lm-acc-panel a { display: flex; justify-content: space-between; padding: 10px 6px; color: var(--lm-text) !important; font-size: 15px; text-decoration: none !important; }
.lm-acc-panel small { color: var(--lm-muted); }
.lm-drawer-links a { display: block; padding: 10px 4px; color: var(--lm-text) !important; font-size: 15px; text-decoration: none !important; }
.lm-drawer .lm-btn-wa { margin-top: 18px; }

/* Bottom nav (mobile) */
.lm-bottomnav { display: none; }

@media (max-width: 1023px) {
	:root { --lm-topbar-h: 32px; }
	.lm-topbar { font-size: 12px; }
	.lm-topbar .lm-wrap { justify-content: center; }
	.lm-topbar-links { display: none; }
	.lm-mainbar .lm-wrap {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "burger logo actions" "search search search";
		gap: 6px 8px;
		min-height: 0;
		padding-top: 8px;
		padding-bottom: 10px;
	}
	.lm-burger { display: inline-flex; grid-area: burger; margin-left: -8px; }
	.lm-mainbar .lm-logo { grid-area: logo; justify-self: center; }
	.lm-logo img { height: 36px; max-width: 150px; }
	.lm-mainbar .lm-search { grid-area: search; max-width: none; }
	.lm-search input[type="search"] { height: 44px; font-size: 16px; }
	.lm-actions { grid-area: actions; gap: 0; margin-right: -8px; }
	.lm-action { padding: 10px; }
	.lm-action-label, .lm-action-account { display: none; }
	.lm-catnav { display: none; }

	.lm-bottomnav {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1050;
		display: grid;
		grid-template-columns: repeat(5, 1fr);
		height: calc(var(--lm-bottomnav-h) + env(safe-area-inset-bottom));
		padding-bottom: env(safe-area-inset-bottom);
		background: #fff;
		border-top: 1px solid var(--lm-line);
		box-shadow: 0 -4px 16px rgba(20, 30, 40, .06);
	}
	.lm-bottomnav a, .lm-bottomnav button {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		padding: 0;
		border: 0;
		background: none;
		color: var(--lm-muted) !important;
		font: inherit;
		font-size: 11px;
		font-weight: 600;
		text-decoration: none !important;
		cursor: pointer;
	}
	.lm-bottomnav .is-active { color: var(--lm-primary) !important; }
	.lm-no-bottomnav .lm-bottomnav, .lm-has-atc-bar .lm-bottomnav { display: none; }
}
