/**
 * Nested drill-down mobile menu (RMRC-279).
 * Panel-stack layout/visuals. Panel switching itself is handled by
 * assets/js/mobile-drilldown-menu.js.
 */

.drilldown-menu {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.drilldown-panel {
	position: absolute;
	inset: 0;
	background: #fff;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	pointer-events: none;
	z-index: 1;
}

.drilldown-panel.is-prev {
	transform: translateX(-100%);
	z-index: 2;
}

/* Declared after .is-prev so it wins the cascade if a panel is ever
   (incorrectly) marked with both classes at once. */
.drilldown-panel.is-active {
	transform: translateX(0);
	pointer-events: auto;
	z-index: 3;
}

.drilldown-panel-header,
.drilldown-panel-header--root {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	/* border-bottom: 1px solid var(--lp--custom-preset--border-color, #eee); */
}

.drilldown-panel-header--root .drilldown-panel-title {
	font-size: 14px;
}

.drilldown-back {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 0;
	padding: 0;
	font-size: 15px;
	color: var(--lp--base-preset--body--color, #333);
	cursor: pointer;
}

.drilldown-back-icon {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.drilldown-close {
	background: none;
	border: 0;
	padding: 0;
	font-size: 24px;
	line-height: 1;
	color: var(--lp--base-preset--body--color, #333);
	cursor: pointer;
}

.drilldown-panel-titlebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
}

.drilldown-panel-title {
	margin: 0;
	font-size: 20px;
	color: var(--lp--base-preset--heading--color, #1a1a1a);
}

.drilldown-panel-title-icon {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
}

.drilldown-list {
	list-style: none;
	margin: 0;
	padding: 0 20px;
}

.drilldown-menu .drilldown-list li {
	border-bottom: 1px solid var(--lp--custom-preset--border-color, #eee);
}

.drilldown-list li:last-child {
	border-bottom: 0;
}

.drilldown-menu .drilldown-list a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	color: var(--lp--base-preset--heading--color, #1a1a1a);
	text-decoration: none;
}

.drilldown-menu .drilldown-list a:hover {
	color: var(--lp--base-preset--link--color);
}

.drilldown-menu .drilldown-list--root a {
	font-size: 20px;
}

.drilldown-icon {
	width: 41px;
	height: 41px;
	object-fit: contain;
	flex-shrink: 0;
	border-radius: 4px;
}

/* Sub-category two-column layout (Shop Products -> category panel) */
.drilldown-list--two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 20px;
}

.drilldown-list--two-col li {
	grid-column: auto;
}

/* Systems cards: icon + title + subtitle */
.drilldown-list--cards a {
	align-items: flex-start;
}

.drilldown-card-text {
	display: flex;
	flex-direction: column;
}

.drilldown-menu .drilldown-card-title {
	color: var(--lp--base-preset--heading--color, #1a1a1a);
	font-size: 16px;
}

.drilldown-card-subtitle {
	font-size: 11px;
	color: var(--lp--base-preset--body--color, #666);
}

.drilldown-menu .drilldown-view-all {
	display: block;
	margin: 16px 20px 20px;
	font-weight: 700;
	color: var(--lp--base-preset--heading--color, #1a1a1a);
	text-decoration: none;
}

/* Highlight the row leading to the currently open panel, matching the
   design's "current path" state (e.g. "Shop Products" turns blue while
   its sub-panel is open). */
.drilldown-menu .drilldown-list a.is-current-path {
	color: var(--lp--base-preset--link--color, #1e6fd9);
}
