/* Nexcore Commerce — menu de categorias em painel (src/Modules/Catalog/CategoryMenu.php).
   Escuro ou claro; cores de destaque e letra dos tokens. Botões e ligações com
   as cores forçadas em normal, :hover, :focus e :active (o Hello pinta-os de
   rosa). .ncc-cm.ncc-cm: para ganhar à regra das ligações da loja. */

/* ------------------------------------------------- botão no cabeçalho */
.nexcore-header-pro.ncc-cm-on .nexcore-mobile-toggle { display: none !important; }
.nexcore-header-pro.ncc-cm-on .nexcore-logo-section { display: flex; align-items: center; gap: 6px; }
.nexcore-header-pro button.ncc-cm-toggle,
.nexcore-header-pro button.ncc-cm-toggle:is(:hover, :focus, :active) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: 0 4px 0 -8px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	box-shadow: none;
	color: var(--ncc-text, #1a1a1a);
	cursor: pointer;
}
.nexcore-header-pro button.ncc-cm-toggle:is(:hover, :focus-visible) { background: color-mix(in srgb, var(--ncc-text, #1a1a1a) 6%, transparent); outline: none; }
.ncc-cm-burger { display: inline-flex; flex-direction: column; gap: 5px; width: 22px; }
.ncc-cm-burger i { display: block; height: 2px; border-radius: 2px; background: currentColor; }
@media (min-width: 1025px) {
	.nexcore-header-pro button.ncc-cm-toggle.ncc-cm-toggle--mobile { display: none; }
}

html.ncc-cm-lock { overflow: hidden; }

/* -------------------------------------------------------------- painel */
.ncc-cm {
	--cm-bg: #252526;
	--cm-fg: #f4f4f5;
	--cm-muted: #a1a1aa;
	--cm-line: rgba(255, 255, 255, .08);
	--cm-hover: rgba(255, 255, 255, .06);
	--cm-accent: color-mix(in srgb, var(--ncc-primary, #145c98) 55%, #fff);
	--cm-pad: 28px;
	position: fixed;
	inset: 0;
	z-index: 100000;
	font-family: var(--ncc-font, inherit);
}
/* Claro (por omissão): branco, texto escuro, pormenores na cor da loja. */
.ncc-cm.ncc-cm--light {
	--cm-bg: var(--ncc-surface, #fff);
	--cm-fg: var(--ncc-text, #1a1a1a);
	--cm-muted: var(--ncc-muted, #6b7280);
	--cm-line: color-mix(in srgb, var(--ncc-text, #1a1a1a) 8%, transparent);
	--cm-hover: color-mix(in srgb, var(--ncc-primary, #145c98) 6%, var(--ncc-surface, #fff));
	--cm-accent: var(--ncc-primary, #145c98);
}
.ncc-cm.ncc-cm--light .ncc-cm-backdrop { background: rgba(15, 23, 42, .35); }
.ncc-cm.ncc-cm--light .ncc-cm-head { border-bottom: 1px solid var(--cm-line); }
.ncc-cm.ncc-cm--light .ncc-cm-list li + li { border-top: 1px solid var(--cm-line); }
.ncc-cm.ncc-cm--light .ncc-cm-icon { color: var(--cm-fg); }
.ncc-cm[hidden] { display: none; }
.ncc-cm .ncc-cm-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .28s ease;
}
.ncc-cm .ncc-cm-panel {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	width: min(420px, 100vw);
	background: var(--cm-bg);
	color: var(--cm-fg);
	box-shadow: 0 0 40px rgba(0, 0, 0, .25);
	transform: translateX(-100%);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.ncc-cm.is-open .ncc-cm-backdrop { opacity: 1; }
.ncc-cm.is-open .ncc-cm-panel { transform: none; }

.ncc-cm .ncc-cm-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex: 0 0 auto;
	padding: 20px 18px 16px var(--cm-pad);
}
.ncc-cm.ncc-cm a.ncc-cm-logo,
.ncc-cm.ncc-cm a.ncc-cm-logo:is(:hover, :focus, :active, :visited) { display: inline-flex; align-items: center; color: var(--cm-fg); text-decoration: none; }
.ncc-cm .ncc-cm-logo img { display: block; width: auto; max-width: 190px; max-height: 42px; }
/* No escuro, o logótipo fica branco (silhueta). */
.ncc-cm.ncc-cm--dark .ncc-cm-logo img { filter: brightness(0) invert(1); }
.ncc-cm .ncc-cm-logo--text { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.ncc-cm.ncc-cm button.ncc-cm-close,
.ncc-cm.ncc-cm button.ncc-cm-close:is(:hover, :focus, :active) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--cm-fg);
	cursor: pointer;
}
.ncc-cm.ncc-cm button.ncc-cm-close:is(:hover, :focus-visible) { background: var(--cm-hover); outline: none; }

/* Ecrãs (um por nível), a deslizar */
.ncc-cm .ncc-cm-screens { position: relative; flex: 1 1 auto; overflow: hidden; }
.ncc-cm .ncc-cm-screen {
	position: absolute;
	inset: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 0 32px;
	transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .28s ease;
}
.ncc-cm .ncc-cm-screen[hidden] { display: none; }
.ncc-cm .ncc-cm-screen.from-right { transform: translateX(100%); }
.ncc-cm .ncc-cm-screen.from-left { transform: translateX(-30%); opacity: 0; }
.ncc-cm .ncc-cm-screen.to-left { transform: translateX(-30%); opacity: 0; }
.ncc-cm .ncc-cm-screen.to-right { transform: translateX(100%); }

.ncc-cm .ncc-cm-list { margin: 0; padding: 0; list-style: none; }
.ncc-cm .ncc-cm-list li { margin: 0; padding: 0; }
.ncc-cm.ncc-cm :is(a, button).ncc-cm-item,
.ncc-cm.ncc-cm :is(a, button).ncc-cm-item:is(:hover, :focus, :active, :visited) {
	display: flex;
	align-items: center;
	gap: 18px;
	width: 100%;
	min-height: 62px;
	margin: 0;
	padding: 12px 22px 12px var(--cm-pad);
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--cm-fg);
	font-family: inherit;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: 0;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
}
.ncc-cm.ncc-cm :is(a, button).ncc-cm-item:is(:hover, :focus-visible) { background: var(--cm-hover); outline: none; }
.ncc-cm .ncc-cm-icon { display: inline-flex; flex: 0 0 auto; width: 30px; justify-content: center; color: var(--cm-fg); }
.ncc-cm .ncc-cm-icon .a { stroke: var(--cm-accent); }
.ncc-cm .ncc-cm-icon :is(circle, rect).a { fill: var(--cm-accent); }
.ncc-cm .ncc-cm-label { flex: 1 1 auto; min-width: 0; }
.ncc-cm .ncc-cm-chevron { flex: 0 0 auto; color: var(--cm-muted); }

/* Cabeçalho de um subnível */
.ncc-cm .ncc-cm-subhead { padding: 6px 22px 6px calc(var(--cm-pad) - 10px); }
.ncc-cm.ncc-cm button.ncc-cm-back,
.ncc-cm.ncc-cm button.ncc-cm-back:is(:hover, :focus, :active) {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 40px;
	margin: 0;
	padding: 6px 10px 6px 4px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: var(--cm-muted);
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	text-transform: none;
	cursor: pointer;
}
.ncc-cm.ncc-cm button.ncc-cm-back:is(:hover, :focus-visible) { color: var(--cm-fg); background: var(--cm-hover); outline: none; }
.ncc-cm .ncc-cm-title { margin: 6px 10px 4px; color: var(--cm-fg); font-size: 24px; font-weight: 700; line-height: 1.2; }
.ncc-cm.ncc-cm a.ncc-cm-all,
.ncc-cm.ncc-cm a.ncc-cm-all:visited {
	display: block;
	margin: 0 0 8px;
	padding: 10px var(--cm-pad) 14px;
	border-bottom: 1px solid var(--cm-line);
	color: var(--cm-accent);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.ncc-cm.ncc-cm a.ncc-cm-all:is(:hover, :focus, :active) { color: var(--cm-accent); text-decoration: underline; text-underline-offset: 3px; outline: none; }

@media (max-width: 640px) {
	.ncc-cm .ncc-cm-panel { width: 100vw; box-shadow: none; }
	.ncc-cm { --cm-pad: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	.ncc-cm .ncc-cm-panel,
	.ncc-cm .ncc-cm-screen,
	.ncc-cm .ncc-cm-backdrop { transition: none; }
}
