/* ==========================================================================
   MG Home Brands Grid — editorial layout for top product brands
   ========================================================================== */

.mg-brand-highlights {
	background:
		linear-gradient(135deg, rgba(214, 153, 66, 0.10) 0%, rgba(255, 255, 255, 0) 30%),
		linear-gradient(215deg, rgba(73, 13, 120, 0.08) 0%, rgba(255, 255, 255, 0) 34%),
		linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
	padding: 64px 16px 70px;
	border-top: 1px solid rgba(82, 4, 125, 0.04);
	position: relative;
	overflow: hidden;
}

.mg-brand-highlights::before {
	content: '';
	position: absolute;
	inset: 28px max(16px, calc((100vw - 1280px) / 2));
	border: 1px solid rgba(73, 13, 120, 0.06);
	pointer-events: none;
}

.mg-brand-highlights__inner {
	max-width: 1180px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

.mg-brand-highlights__header {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	align-items: end;
	gap: 34px;
	text-align: left;
	margin: 0 auto 36px;
	max-width: none;
}

.mg-brand-highlights__eyebrow {
	grid-column: 1;
	grid-row: 1;
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #d69942;
	margin-bottom: 14px;
	position: relative;
	padding-left: 32px;
}
.mg-brand-highlights__eyebrow::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 22px;
	height: 1px;
	background: #d69942;
}

.mg-brand-highlights__title {
	grid-column: 1;
	grid-row: 2;
	display: block;
	font-family: 'Coolvetica', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: clamp(34px, 4vw, 52px);
	line-height: 1.04;
	font-weight: 700;
	color: #2c0844;
	margin: 0 0 14px;
	letter-spacing: -0.012em;
}

.mg-brand-highlights__lead {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: end;
	display: block;
	font-size: 17px;
	line-height: 1.55;
	color: #5a4a6a;
	margin: 0;
	max-width: 620px;
}

.mg-brand-highlights__tiles {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 16px;
}

.mg-brand-highlights__tile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.94), #fff),
		linear-gradient(135deg, rgba(214, 153, 66, 0.14), rgba(73, 13, 120, 0.08));
	border: 1px solid rgba(214, 153, 66, 0.26);
	border-radius: 16px;
	padding: 28px 24px 24px;
	text-decoration: none;
	color: inherit;
	position: relative;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
	min-height: 188px;
	overflow: hidden;
	box-shadow: 0 18px 44px rgba(44, 8, 68, 0.08);
}

.mg-brand-highlights__tile:nth-child(1),
.mg-brand-highlights__tile:nth-child(2) {
	grid-column: span 3;
	min-height: 220px;
}

.mg-brand-highlights__tile:nth-child(n+3) {
	grid-column: span 2;
}

.mg-brand-highlights__tile::before {
	content: '';
	position: absolute;
	right: -34px;
	top: -42px;
	width: 156px;
	height: 120px;
	background: var(--mg-brand-accent, rgba(73, 13, 120, 0.08));
	opacity: 0.75;
	transform: rotate(12deg);
	transition: transform 0.25s ease, opacity 0.25s ease;
	pointer-events: none;
}

.mg-brand-highlights__tile::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	height: 4px;
	width: 100%;
	background: linear-gradient(90deg, #d69942 0%, var(--mg-brand-accent-strong, #490D78) 100%);
	opacity: 0.85;
	transition: opacity 0.3s ease;
}

.mg-brand-highlights__tile:hover {
	transform: translateY(-6px);
	box-shadow: 0 26px 56px rgba(82, 4, 125, 0.14);
	border-color: rgba(214, 153, 66, 0.45);
}
.mg-brand-highlights__tile:focus-visible {
	outline: 3px solid rgba(214, 153, 66, 0.45);
	outline-offset: 3px;
}
.mg-brand-highlights__tile:hover::after {
	opacity: 1;
}
.mg-brand-highlights__tile:hover::before {
	transform: rotate(12deg) translateY(8px);
	opacity: 1;
}

.mg-brand-highlights__tile--ventus {
	--mg-brand-accent: rgba(40, 111, 175, 0.13);
	--mg-brand-accent-strong: #286faf;
}
.mg-brand-highlights__tile--maigas {
	--mg-brand-accent: rgba(198, 40, 40, 0.12);
	--mg-brand-accent-strong: #c62828;
}
.mg-brand-highlights__tile--frigonor {
	--mg-brand-accent: rgba(15, 122, 69, 0.12);
	--mg-brand-accent-strong: #0f7a45;
}
.mg-brand-highlights__tile--ecobeck {
	--mg-brand-accent: rgba(37, 171, 113, 0.12);
	--mg-brand-accent-strong: #25ab71;
}
.mg-brand-highlights__tile--santa-mariana {
	--mg-brand-accent: rgba(214, 153, 66, 0.18);
	--mg-brand-accent-strong: #d69942;
}

.mg-brand-highlights__logo {
	position: relative;
	z-index: 1;
	width: 100%;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: 4px;
	padding-right: 112px;
	box-sizing: border-box;
}
.mg-brand-highlights__logo-img {
	max-width: 100%;
	max-height: 56px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
.mg-brand-highlights__logo-placeholder {
	font-family: 'Coolvetica', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: clamp(22px, 2.1vw, 32px);
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #2c0844;
	text-transform: uppercase;
	line-height: 1;
}

.mg-brand-highlights__count {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: calc(100% - 32px);
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 10px 24px rgba(44, 8, 68, 0.10);
	color: #490D78;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.mg-brand-highlights__name {
	display: none; /* shown only on small screens to compensate for missing logo style */
	font-size: 14px;
	font-weight: 700;
	color: #2c0844;
	letter-spacing: 0.02em;
}

.mg-brand-highlights__subcopy {
	position: relative;
	z-index: 1;
	font-size: 13px;
	line-height: 1.45;
	color: #6b6080;
	flex-grow: 1;
}

.mg-brand-highlights__cta {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	color: #490D78;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin-top: 6px;
}
.mg-brand-highlights__cta svg {
	transition: transform 0.2s ease;
}
.mg-brand-highlights__tile:hover .mg-brand-highlights__cta svg {
	transform: translateX(3px);
}

@media (max-width: 1024px) {
	.mg-brand-highlights__header {
		grid-template-columns: 1fr;
		gap: 16px;
		text-align: center;
	}
	.mg-brand-highlights__eyebrow,
	.mg-brand-highlights__title,
	.mg-brand-highlights__lead {
		grid-column: auto;
		grid-row: auto;
	}
	.mg-brand-highlights__lead {
		margin: 0 auto;
	}
	.mg-brand-highlights__tiles {
		grid-template-columns: repeat(3, 1fr);
	}
	.mg-brand-highlights__tile:nth-child(1),
	.mg-brand-highlights__tile:nth-child(2),
	.mg-brand-highlights__tile:nth-child(n+3) {
		grid-column: auto;
		min-height: 170px;
	}
}

@media (max-width: 720px) {
	.mg-brand-highlights {
		padding: 38px 14px 42px;
	}
	.mg-brand-highlights::before {
		inset: 12px;
	}
	.mg-brand-highlights__header {
		margin-bottom: 22px;
	}
	.mg-brand-highlights__eyebrow {
		font-size: 10px;
		letter-spacing: 0.16em;
		margin-bottom: 10px;
	}
	.mg-brand-highlights__title {
		font-size: 28px;
		margin-bottom: 10px;
	}
	.mg-brand-highlights__lead {
		font-size: 14px;
		line-height: 1.45;
	}
	.mg-brand-highlights__tiles {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.mg-brand-highlights__tile {
		padding: 16px 14px 14px;
		min-height: 144px;
		gap: 6px;
		border-radius: 12px;
		box-shadow: 0 12px 28px rgba(44, 8, 68, 0.06);
	}
	.mg-brand-highlights__tile::before {
		width: 100px;
		height: 82px;
		right: -38px;
		top: -34px;
	}
	.mg-brand-highlights__count {
		position: static;
		order: 4;
		margin-top: 2px;
		padding: 5px 8px;
		font-size: 9.5px;
	}
	.mg-brand-highlights__logo {
		height: 30px;
		margin-bottom: 2px;
		padding-right: 0;
	}
	.mg-brand-highlights__logo-placeholder {
		font-size: 16px;
		letter-spacing: 0.02em;
		line-height: 1.1;
		overflow-wrap: anywhere;
	}
	.mg-brand-highlights__subcopy {
		font-size: 11.5px;
		line-height: 1.35;
	}
	.mg-brand-highlights__cta {
		font-size: 10px;
		letter-spacing: 0.04em;
		margin-top: 2px;
	}
}

@media (max-width: 420px) {
	.mg-brand-highlights__tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
