:root {
	--smm-text: #091d40;
	--smm-muted: #626771;
	--smm-accent: #2aa7ad;
	--smm-surface: #ffffff;
	--smm-surface-hover: #f5f8fb;
	--smm-border: #e6e8ec;
	--smm-shadow: 0 20px 48px rgba(6, 24, 53, 0.14);
	--smm-radius: 10px;
	--smm-panel-offset: 24px;
}

.smm-nav,
.smm-nav * {
	box-sizing: border-box;
}

.smm-nav {
	position: relative;
	width: 100%;
	z-index: 1000;
}

.smm-svg-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
	pointer-events: none;
}

.smm-nav__panel {
	display: block;
}


.smm-mobile-footer {
	display: none;
}

.smm-menu,
.smm-submenu,
.smm-mega__grid {
	margin: 0;
	padding: 0;
	list-style: none;
}

.smm-menu {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(22px, 3vw, 42px);
}

.smm-menu-item {
	position: relative;
	margin: 0;
}

.smm-menu-item--mega {
	position: static;
}


/*
 * El desplegable funciona también sin JavaScript en escritorio.
 * JavaScript añade clic, Escape y comportamiento móvil.
 */
.smm-mega,
.smm-submenu {
	display: none;
}

@media (min-width: 901px) {
	.smm-menu-item--has-children:hover > .smm-mega,
	.smm-menu-item--has-children:focus-within > .smm-mega,
	.smm-menu-item--has-children.is-open > .smm-mega,
	.smm-menu-item--has-children:hover > .smm-submenu,
	.smm-menu-item--has-children:focus-within > .smm-submenu,
	.smm-menu-item--has-children.is-open > .smm-submenu {
		display: block;
	}
}

.smm-menu__top-row {
	display: flex;
	align-items: center;
	gap: 3px;
}

.smm-menu__link {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	color: var(--smm-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: color 160ms ease;
}

.smm-menu__link:hover,
.smm-menu__link:focus-visible,
.current-menu-item > .smm-menu__link,
.current-menu-ancestor > .smm-menu__top-row .smm-menu__link {
	color: var(--smm-accent);
}

.smm-submenu-toggle {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 32px;
	padding: 0;
	color: var(--smm-text);
	background: transparent;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.smm-submenu-toggle:hover,
.smm-submenu-toggle:focus-visible {
	color: var(--smm-accent);
	background: var(--smm-surface-hover);
	outline: none;
}

.smm-submenu-toggle svg {
	width: 17px;
	height: 17px;
	transition: transform 160ms ease;
}

.smm-menu-item.is-open > .smm-menu__top-row .smm-submenu-toggle svg {
	transform: rotate(180deg);
}

/* Mega menú */
.smm-mega {
	position: absolute;
	top: calc(100% + var(--smm-panel-offset));
	left: 50%;
	width: min(940px, calc(100vw - 32px));
	transform: translateX(-50%);
	background: var(--smm-surface);
	border: 1px solid var(--smm-border);
	border-radius: var(--smm-radius);
	box-shadow: var(--smm-shadow);
}

.smm-mega__inner {
	padding: 34px 46px 40px;
}

.smm-mega__label {
	display: block;
	margin: 0 0 22px;
	color: #111827;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.smm-mega__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px 52px;
}

.smm-service-card {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
	min-height: 86px;
	padding: 11px 12px;
	color: inherit;
	border-radius: 10px;
	text-decoration: none;
	transition:
		background-color 160ms ease,
		transform 160ms ease;
}

.smm-service-card:hover,
.smm-service-card:focus-visible {
	background: var(--smm-surface-hover);
	outline: none;
	transform: translateY(-1px);
}

.smm-service-card__media {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	color: var(--smm-accent);
}

.smm-service-card__icon {
	width: 26px;
	height: 26px;
	fill: none;
	stroke: currentColor;
}

.smm-service-card__content,
.smm-service-card__title,
.smm-service-card__description {
	display: block;
}

.smm-service-card__title {
	margin-bottom: 4px;
	color: var(--smm-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.22;
}

.smm-service-card__description {
	color: var(--smm-muted);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
}

/* Dropdown normal, por ejemplo Productos */
.smm-submenu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	min-width: 230px;
	padding: 10px;
	background: var(--smm-surface);
	border: 1px solid var(--smm-border);
	border-radius: var(--smm-radius);
	box-shadow: var(--smm-shadow);
}

.smm-submenu .smm-menu__link {
	display: flex;
	width: 100%;
	min-height: auto;
	padding: 10px 12px;
	border-radius: 7px;
}

.smm-submenu .smm-menu__link:hover,
.smm-submenu .smm-menu__link:focus-visible {
	background: var(--smm-surface-hover);
}

/* Botón móvil */
.smm-mobile-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	color: var(--smm-text);
	background: transparent;
	border: 1px solid var(--smm-border);
	border-radius: 8px;
	cursor: pointer;
}


.smm-mobile-toggle__icon {
	display: grid;
	gap: 4px;
	width: 20px;
}

.smm-mobile-toggle__icon span {
	display: block;
	width: 100%;
	height: 2px;
	background: currentColor;
	border-radius: 999px;
	transition: transform 160ms ease, opacity 160ms ease;
}

.smm-nav.is-mobile-open .smm-mobile-toggle__icon span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.smm-nav.is-mobile-open .smm-mobile-toggle__icon span:nth-child(2) {
	opacity: 0;
}

.smm-nav.is-mobile-open .smm-mobile-toggle__icon span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

.smm-admin-notice {
	margin: 0;
	padding: 8px 12px;
	color: #7a2e00;
	background: #fff4e5;
	border: 1px solid #f2c28b;
	border-radius: 6px;
	font-size: 13px;
}

@media (max-width: 900px) {
	body.smm-mobile-menu-open {
		overflow: hidden;
	}

	.smm-nav {
		display: flex;
		justify-content: flex-end;
	}

	.smm-mobile-toggle {
		display: inline-flex;
	}

	/*
	 * Panel móvil a pantalla completa, siempre debajo del header.
	 * JavaScript calcula la posición y la altura disponibles.
	 */
	.smm-nav__panel {
		display: flex;
		flex-direction: column;
		position: fixed;
		z-index: 9998;
		top: var(--smm-mobile-panel-top, 70px);
		left: 0;
		right: 0;
		width: 100vw;
		height: var(--smm-mobile-panel-height, calc(100dvh - 70px));
		max-height: none;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		padding: 16px clamp(16px, 4vw, 24px) max(24px, env(safe-area-inset-bottom));
		background: var(--smm-surface);
		border: 0;
		border-top: 1px solid var(--smm-border);
		border-radius: 0;
		box-shadow: none;
		animation: smm-mobile-panel-in 180ms ease both;
	}

	.smm-nav:not(.is-mobile-open) .smm-nav__panel {
		display: none;
	}

	.smm-menu {
		display: block;
		width: min(100%, 720px);
		margin-inline: auto;
	}

	.smm-menu__top-row > .smm-menu__link {
		cursor: pointer;
	}

	.smm-mobile-footer {
		display: block;
		width: min(100%, 720px);
		margin: auto auto 0;
		padding-top: 28px;
	}

	.smm-mobile-contact {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 12px;
		width: 100%;
		min-height: 52px;
		padding: 13px 20px;
		color: #ffffff;
		background: #062b63;
		border-radius: 9px;
		font-size: 16px;
		font-weight: 600;
		line-height: 1.2;
		text-decoration: none;
	}

	.smm-mobile-contact:hover,
	.smm-mobile-contact:focus-visible {
		color: #ffffff;
		background: #0a397d;
		outline: none;
	}

	.smm-mobile-contact svg {
		width: 19px;
		height: 19px;
		flex: 0 0 auto;
	}

	.smm-menu > .smm-menu-item + .smm-menu-item {
		border-top: 1px solid var(--smm-border);
	}

	.smm-menu-item--has-children.is-open > .smm-mega,
	.smm-menu-item--has-children.is-open > .smm-submenu {
		display: block;
	}

	.smm-menu__top-row {
		justify-content: space-between;
		width: 100%;
	}

	.smm-menu > .smm-menu-item > .smm-menu__link,
	.smm-menu__top-row > .smm-menu__link {
		flex: 1;
		min-height: 52px;
		padding: 14px 8px;
		font-size: 16px;
	}

	.smm-submenu-toggle {
		width: 48px;
		height: 48px;
	}

	.smm-mega,
	.smm-submenu {
		position: static;
		width: 100%;
		min-width: 0;
		margin: 0 0 12px;
		transform: none;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.smm-mega__inner {
		padding: 4px 0 12px;
	}

	.smm-mega__label {
		display: none;
	}

	.smm-mega__grid {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.smm-service-card {
		min-height: 0;
		padding: 12px 8px;
	}

	.smm-service-card__title {
		font-size: 15px;
	}

	.smm-service-card__description {
		font-size: 13px;
	}

	.smm-submenu {
		padding: 0 0 10px 14px;
	}

	.smm-submenu .smm-menu__link {
		padding: 10px;
	}
}

@keyframes smm-mobile-panel-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.smm-menu__link,
	.smm-submenu-toggle svg,
	.smm-service-card,
	.smm-mobile-toggle__icon span {
		transition: none;
	}
}
