/* Models Mega Menu — frontend styles
   Reference: chery.co.za 3-column mega menu
   Col 1 = Logo/Brand (dark taupe)
   Col 2 = Model tabs with inline sub-pages
   Col 3 = Car preview (image + price + button)
   All colors from CSS variables set in plugin Colors screen. */

/* ===== Wrapper ===== */
.mmm-menu {
	display: flex;
	width: 100%;
	max-width: 1100px;
	min-height: 380px;
	background: var(--mmm-group-bg, #9a9186);
	font-family: inherit;
}

.mmm-col {
	display: flex;
	flex-direction: column;
}

/* ===== Column 1: Logo ===== */
.mmm-col-logo {
	flex: 0 0 190px;
	background: var(--mmm-group-bg, #9a9186);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 32px 24px;
}

.mmm-logo-model {
	display: flex;
	align-items: flex-start;
}

.mmm-logo-model img {
	max-width: 130px;
	height: auto;
	display: block;
}

.mmm-logo-text {
	color: var(--mmm-group-text, #ffffff);
	font-size: 1.8rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1;
}

.mmm-logo-brand {
	display: flex;
	align-items: flex-end;
	margin-top: auto;
	padding-top: 24px;
}

.mmm-logo-brand img {
	max-width: 110px;
	height: auto;
	display: block;
	filter: brightness(0) invert(1);
}

.mmm-chery-svg {
	width: 110px;
	height: auto;
	color: var(--mmm-group-text, #ffffff);
}

/* ===== Column 2: Category tabs + inline sub-pages ===== */
.mmm-col-categories {
	flex: 0 0 240px;
	background: var(--mmm-group-bg, #9a9186);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

.mmm-cat-row {
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* Main model tab button (e.g. TIGGO 4) */
.mmm-cat-toggle {
	width: 100%;
	background: none;
	border: 0;
	color: var(--mmm-tab-text-dim, #cfc9c0);
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: left;
	padding: 18px 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: color 0.15s ease;
}

.mmm-cat-row.is-open > .mmm-cat-toggle,
.mmm-cat-toggle:hover {
	color: var(--mmm-tab-text, #ffffff);
}

/* Plus/Minus icon */
.mmm-cat-icon {
	width: 14px;
	height: 14px;
	position: relative;
	flex-shrink: 0;
}

.mmm-cat-icon::before,
.mmm-cat-icon::after {
	content: "";
	position: absolute;
	background: currentColor;
	border-radius: 1px;
}

.mmm-cat-icon::before {
	width: 100%;
	height: 2px;
	top: 6px;
	left: 0;
}

.mmm-cat-icon::after {
	width: 2px;
	height: 100%;
	top: 0;
	left: 6px;
	transition: transform 0.15s ease;
}

.mmm-cat-row.is-open .mmm-cat-icon::after {
	transform: scaleY(0);
}

/* Sub-pages list — hidden by default, shown when cat is open */
.mmm-sublist {
	display: none;
	flex-direction: column;
	padding: 0 0 10px 0;
	background: rgba(0, 0, 0, 0.12);
}

.mmm-cat-row.is-open .mmm-sublist {
	display: flex;
}

/* Individual sub-page link (e.g. Tiggo 4 Pro, Tiggo 4 Cross) */
.mmm-model-link {
	display: block;
	color: var(--mmm-sublist-text, rgba(255,255,255,0.75));
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 400;
	padding: 10px 24px 10px 30px;
	transition: color 0.12s ease, background 0.12s ease;
	position: relative;
}

.mmm-model-link:hover,
.mmm-model-link.is-active {
	color: var(--mmm-sublist-text-active, #ffffff);
	background: rgba(255, 255, 255, 0.08);
}

/* NEW badge support */
.mmm-model-link .mmm-badge {
	display: inline-block;
	background: #c8a96e;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 2px 6px;
	border-radius: 2px;
	margin-left: 6px;
	vertical-align: middle;
}

/* ===== Column 3: Preview panel ===== */
.mmm-preview {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	background: var(--mmm-preview-bg, #f0eeec);
	padding: 28px 36px 24px;
	position: relative;
	overflow: hidden;
}

/* Large ghost text behind the car (like reference site) */
.mmm-preview::before {
	content: attr(data-bg-text);
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 6rem;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(0, 0, 0, 0.06);
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
	line-height: 1;
}

.mmm-preview-model-name {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #999;
	min-height: 16px;
}

.mmm-preview-image {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	position: relative;
	z-index: 1;
}

.mmm-preview-image img {
	max-width: 100%;
	max-height: 220px;
	object-fit: contain;
	display: none;
	transition: opacity 0.2s ease;
}

.mmm-preview-image img[src]:not([src=""]) {
	display: block;
}

.mmm-preview-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 12px;
	position: relative;
	z-index: 1;
}

.mmm-preview-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mmm-preview-label {
	font-size: 0.72rem;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.mmm-preview-price {
	font-size: 1.7rem;
	font-weight: 800;
	color: var(--mmm-price-text, #1a1a1a);
	letter-spacing: -0.01em;
	line-height: 1.1;
}

.mmm-preview-btn {
	display: inline-block;
	background: var(--mmm-button-bg, #9a9186);
	color: var(--mmm-button-text, #ffffff);
	text-decoration: none;
	font-weight: 700;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 14px 32px;
	transition: background 0.15s ease;
	white-space: nowrap;
}

.mmm-preview-btn:hover {
	background: var(--mmm-button-bg-hover, #857c70);
	color: var(--mmm-button-text, #ffffff);
}

/* Empty state */
.mmm-preview.is-empty .mmm-preview-info {
	opacity: 0;
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
	.mmm-menu {
		flex-wrap: wrap;
	}

	.mmm-col-logo {
		flex: 0 0 100%;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 16px 20px;
	}

	.mmm-logo-brand {
		margin-top: 0;
		padding-top: 0;
	}

	.mmm-col-categories {
		flex: 0 0 50%;
	}

	.mmm-preview {
		flex: 1 1 50%;
	}
}

@media (max-width: 640px) {
	.mmm-menu {
		flex-direction: column;
	}

	.mmm-col-logo,
	.mmm-col-categories,
	.mmm-preview {
		flex: 1 1 auto;
		width: 100%;
	}

	.mmm-preview {
		padding: 20px;
		min-height: 280px;
	}

	.mmm-preview-image {
		min-height: 140px;
	}

	.mmm-preview-image img {
		max-height: 160px;
	}

	.mmm-preview-info {
		flex-direction: column;
		align-items: flex-start;
	}

	.mmm-preview-btn {
		width: 100%;
		text-align: center;
	}

	.mmm-preview::before {
		font-size: 3.5rem;
	}
}
