/* Mega-menu de categorias - estilo navy/amarillo del sitio.
   Desktop: panel tipo "master-detail" (lista de Lineas a la izquierda,
   Sub-Lineas de la Linea activa a la derecha, en grid de columnas).
   Mobile: pantalla completa con flujo de 2 pasos (lista -> detalle -> volver). */

.db-mega-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(1, 19, 64, 0.45);
	/* Blocksy's own mobile offcanvas panel (#offcanvas.ct-panel) uses
	   z-index:999999 - el trigger "Categorías" vive DENTRO de ese panel en
	   mobile, asi que este overlay tiene que quedar por encima de ESO
	   tambien (no solo del ribbon de avisos, z-index:100000), si no se abre
	   "detras" del menu hamburguesa y sus controles quedan inalcanzables. */
	z-index: 1000001;
}

.db-mega-backdrop.is-open {
	display: block;
}

.db-mega-menu {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000002;
	background: #fff;
	box-shadow: 0 12px 32px rgba(1, 19, 64, 0.22);
	max-height: 100vh;
	overflow: hidden;
}

.db-mega-menu.is-open {
	display: block;
}

.db-mega-menu-inner {
	max-width: 1100px;
	margin: 0 auto;
	max-height: 100vh;
	display: flex;
	flex-direction: column;
}

.db-mega-menu-close-row {
	display: flex;
	justify-content: flex-end;
	padding: 10px 16px 0;
}

.db-mega-close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: #011340;
	cursor: pointer;
	padding: 10px 14px;
	/* boton de cierre siempre >=44px de area tocable (recomendacion Apple/Google) */
	min-width: 44px;
	min-height: 44px;
}

.db-mega-menu-body {
	display: flex;
	overflow: hidden;
	padding: 8px 0 24px;
}

.db-mega-master {
	list-style: none;
	margin: 0;
	padding: 0 8px 0 24px;
	width: 260px;
	flex-shrink: 0;
	overflow-y: auto;
	border-right: 1px solid #eee;
}

.db-mega-master-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	text-decoration: none;
	color: #011340;
	font-weight: 700;
	font-size: 14.5px;
	padding: 12px 12px;
	border-radius: 8px;
}

.db-mega-master-item:hover,
.db-mega-master-item.is-active {
	background: #FEC917;
	color: #011340;
}

.db-mega-master-chevron path {
	fill: currentColor;
	opacity: 0.6;
}

.db-mega-detail {
	flex: 1;
	overflow-y: auto;
	padding: 0 32px;
	position: relative;
}

.db-mega-detail-back {
	display: none;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	color: #011340;
	font-weight: 700;
	font-size: 13px;
	padding: 10px 0 16px;
	cursor: pointer;
}

.db-mega-detail-back svg path {
	fill: currentColor;
}

.db-mega-detail-panel {
	display: none;
}

.db-mega-detail-panel.is-active {
	display: block;
}

.db-mega-detail-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 17px;
	font-weight: 800;
	color: #011340;
	text-decoration: none;
	border-bottom: 2px solid #FEC917;
	padding-bottom: 10px;
	margin-bottom: 16px;
}

.db-mega-detail-heading:hover {
	color: #022266;
}

.db-mega-detail-heading svg path {
	fill: currentColor;
}

.db-mega-sublist {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 3;
	column-gap: 24px;
}

.db-mega-sublist li {
	break-inside: avoid;
	margin-bottom: 10px;
}

.db-mega-sublist a {
	display: block;
	text-decoration: none;
	color: #333;
	font-size: 13.5px;
	padding: 5px 0;
}

.db-mega-sublist a:hover {
	color: #011340;
	text-decoration: underline;
}

body.db-mega-scroll-lock {
	overflow: hidden;
}

@media (max-width: 900px) {
	.db-mega-menu {
		bottom: 0;
	}

	.db-mega-menu-inner {
		height: 100%;
	}

	.db-mega-menu-body {
		padding: 0;
		position: relative;
		flex: 1;
	}

	.db-mega-master {
		width: 100%;
		border-right: none;
		padding: 0 16px;
		transition: transform 0.2s ease;
	}

	.db-mega-master-item {
		padding: 14px 12px;
		font-size: 15px;
	}

	.db-mega-detail {
		position: absolute;
		inset: 0;
		background: #fff;
		padding: 0 20px 24px;
		transform: translateX(100%);
		transition: transform 0.2s ease;
		display: flex;
		flex-direction: column;
	}

	.db-mega-detail-back {
		display: flex;
	}

	.db-mega-sublist {
		columns: 2;
	}

	.db-mega-menu.showing-detail .db-mega-master {
		transform: translateX(-100%);
	}

	.db-mega-menu.showing-detail .db-mega-detail {
		transform: translateX(0);
	}
}

@media (max-width: 480px) {
	.db-mega-sublist {
		columns: 1;
	}
}
