/**
 * Megamenú DoroShopping — estilo marketplace (compacto, panel ancho).
 */
.dsm-megamenu {
	position: relative;
	display: inline-block;
	font-family: inherit;
	line-height: 1.35;
}

.dsm-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	border: none;
	border-radius: 4px;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	background: #e62e04;
	color: #fff;
	transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.dsm-trigger:hover,
.dsm-trigger:focus-visible {
	filter: brightness(1.06);
	box-shadow: 0 2px 8px rgb(0 0 0 / 12%);
	outline: none;
}

.dsm-trigger .dsm-chevron {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 0.25rem;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid currentColor;
	vertical-align: middle;
	transition: transform 0.2s ease;
}

.dsm-megamenu.is-open .dsm-trigger .dsm-chevron {
	transform: rotate(180deg);
}

/* Panel */
.dsm-panel {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 100050;
	min-width: min(92vw, 920px);
	max-width: 96vw;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 8px 28px rgb(15 23 42 / 12%), 0 0 1px rgb(15 23 42 / 8%);
	overflow: hidden;
}

.dsm-megamenu--click .dsm-panel {
	top: calc(100% + 8px);
}

/* Editor / sin JS: modo hover siempre visible al pasar sobre el wrapper */
.elementor-editor-active .dsm-panel,
.dsm-megamenu--hover:hover .dsm-panel {
	display: block;
}

.elementor-editor-active .dsm-panel[hidden],
.dsm-megamenu--hover:hover .dsm-panel[hidden] {
	display: block !important;
	height: auto;
	visibility: visible;
}

/* Contenido del panel */
.dsm-panel-inner {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	min-height: 280px;
}

.dsm-sidebar {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 220px;
	flex-shrink: 0;
	border-right: 1px solid #ececec;
	background: #f7f7f7;
}

.dsm-sidebar-item.is-active .dsm-sidebar-link {
	background: #fff;
	font-weight: 600;
	box-shadow: inset 3px 0 0 #e62e04;
}

.dsm-sidebar-link {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.65rem 0.85rem;
	color: #222;
	text-decoration: none;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.12s ease;
}

.dsm-sidebar-link:hover,
.dsm-sidebar-item.is-active .dsm-sidebar-link:hover {
	background: rgb(255 255 255 / 90%);
	text-decoration: none;
}

.dsm-sidebar-icon img {
	display: block;
	width: 24px;
	height: 24px;
	object-fit: contain;
	border-radius: 2px;
}

.dsm-sidebar-text {
	flex: 1;
	min-width: 0;
}

.dsm-content {
	flex: 1;
	position: relative;
	padding: 0.75rem 1rem 1rem;
	background: #fff;
}

.dsm-pane-title {
	font-size: 16px;
	margin: 0 0 0.75rem;
	font-weight: 700;
	color: #111;
}

.dsm-pane-body {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.75rem;
}

.dsm-pane-body .dsm-pane-main {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 1rem;
	width: 100%;
	min-width: 0;
}

.dsm-pane-body--has-tiles {
	gap: 1rem;
}

.dsm-columns {
	flex: 1;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 1rem 1.5rem;
}

.dsm-col-title {
	font-weight: 700;
	font-size: 13px;
	margin-bottom: 0.35rem;
	color: #222;
}

.dsm-col-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dsm-col-list li {
	margin: 0 0 0.35rem;
}

.dsm-col-list a {
	font-size: 13px;
	text-decoration: none;
	color: #555;
	transition: color 0.15s ease;
}

.dsm-col-list a:hover {
	color: #e62e04;
	text-decoration: none;
}

.dsm-link-fallback {
	font-size: 13px;
	color: #888;
	cursor: default;
}

/* Bloque destacado tipo banner AliExpress */
.dsm-featured {
	flex-shrink: 0;
	flex-grow: 0;
	width: min(240px, 32vw);
}

.dsm-featured-link {
	display: block;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid #eee;
}

.dsm-featured-img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	vertical-align: middle;
}

/* Mosaico de subcategorías (WooCommerce) */
.dsm-subcat-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	width: 100%;
}

.dsm-subcat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	padding: 0.45rem;
	text-align: center;
	transition: background 0.12s ease;
}

.dsm-subcat-card-thumb {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	line-height: 0;
	background: #f5f5f5;
	border: 1px solid rgb(15 23 42 / 5%);
	box-sizing: border-box;
	margin-bottom: 0.35rem;
}

.dsm-subcat-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dsm-subcat-card-thumb .woocommerce-placeholder,
.dsm-subcat-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	min-height: 64px;
}

.dsm-subcat-card-title {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	word-break: break-word;
	max-width: 100%;
	display: inline-block;
}

.dsm-empty,
.dsm-wc-required {
	display: inline-block;
	font-size: 13px;
	color: var(--e-global-color-text, #666);
	outline: 1px dashed #ccc;
	padding: 0.5rem 0.65rem;
	border-radius: 4px;
}

/* Hover en escritorio: panel visible */
.dsm-megamenu--hover .dsm-panel:not([hidden]) {
	animation: dsmFade 0.12s ease-out;
}

@keyframes dsmFade {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive */
@media (max-width: 767px) {
	.dsm-panel {
		left: 50%;
		transform: translateX(-50%);
		min-width: min(94vw, 420px);
	}

	.dsm-panel-inner {
		flex-direction: column;
		min-height: 0;
	}

	.dsm-sidebar {
		width: 100%;
		max-height: 180px;
		overflow-y: auto;
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		border-right: none;
		border-bottom: 1px solid #ececec;
	}

	.dsm-sidebar-item {
		flex-shrink: 0;
	}

	.dsm-sidebar-item .dsm-sidebar-link {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		min-width: 92px;
		padding: 0.5rem 0.65rem;
		font-size: 11px;
		text-align: center;
	}

	.dsm-sidebar-item.is-active .dsm-sidebar-link {
		box-shadow: inset 0 -3px 0 #e62e04;
	}

	.dsm-pane-body .dsm-pane-main {
		flex-direction: column;
	}

	.dsm-columns {
		grid-template-columns: repeat(2, 1fr);
	}

	.dsm-featured {
		width: 100%;
		max-width: 100%;
	}
}
