/*
 * iShack — premium dynamic brands panel inside the existing Max Mega Menu.
 * Rules are scoped to the Marki widget and do not affect other submenus.
 */

body.ishack-new-mega-menu #site-header {
	--ishack-brands-ink: #101828;
	--ishack-brands-muted: #667085;
	--ishack-brands-border: #e7eaf0;
	--ishack-brands-surface: #fff;
	--ishack-brands-soft: #f6f8fb;
	--ishack-brands-accent: #f5ad00;
	--ishack-brands-accent-dark: #704900;
	--ishack-brands-accent-soft: #fff6d8;
}

body.ishack-new-mega-menu #site-header .ishack-brands-panel {
	box-sizing: border-box !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	border: 1px solid var(--ishack-brands-border) !important;
	border-radius: 20px !important;
	background: var(--ishack-brands-surface) !important;
	box-shadow: 0 24px 70px rgba(16, 24, 40, 0.17) !important;
}

/*
 * Marki has an independent 70/30 layout and therefore owns the full panel.
 */
@media (min-width: 768px) {
	body.ishack-new-mega-menu #site-header .ishack-menu-enhanced > ul.mega-menu > li.ishack-brands-parent > ul.mega-sub-menu.ishack-brands-panel {
		box-sizing: border-box !important;
		width: min(1280px, calc(100vw - 32px)) !important;
		max-width: calc(100vw - 32px) !important;
		padding: 0 !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
	}
}

body.ishack-new-mega-menu #site-header .ishack-brands-panel > .mega-menu-row,
body.ishack-new-mega-menu #site-header .ishack-brands-panel > .mega-menu-row > .mega-sub-menu,
body.ishack-new-mega-menu #site-header .ishack-brands-panel .mega-menu-column,
body.ishack-new-mega-menu #site-header .ishack-brands-panel .mega-menu-column > .mega-sub-menu,
body.ishack-new-mega-menu #site-header .ishack-brands-panel .widget_ishack_brands_mega_menu {
	box-sizing: border-box !important;
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.ishack-new-mega-menu #site-header .ishack-brands-panel .mega-menu-item-object-product_brand {
	display: none !important;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu {
	box-sizing: border-box;
	width: 100%;
	color: var(--ishack-brands-ink);
	background: var(--ishack-brands-surface);
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu *,
body.ishack-new-mega-menu #site-header .ishack-brands-menu *::before,
body.ishack-new-mega-menu #site-header .ishack-brands-menu *::after {
	box-sizing: border-box;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__layout {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(310px, 3fr);
	min-height: 550px;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__layout--empty {
	grid-template-columns: 1fr;
	min-height: 0;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__catalog {
	display: flex;
	min-width: 0;
	flex-direction: column;
	padding: 30px 32px 28px;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__header {
	margin: 0 0 20px;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__eyebrow,
body.ishack-new-mega-menu #site-header .ishack-brand-promo__eyebrow {
	margin: 0 0 7px;
	color: #8a5a00;
	font-size: 10px;
	font-weight: 780;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__header h2 {
	margin: 0 !important;
	color: var(--ishack-brands-ink) !important;
	font-family: inherit !important;
	font-size: clamp(20px, 1.5vw, 25px) !important;
	font-weight: 760 !important;
	line-height: 1.18 !important;
	letter-spacing: -0.025em;
	text-transform: none !important;
}

body.ishack-new-mega-menu #site-header .ishack-brands-group + .ishack-brands-group {
	margin-top: 22px;
}

body.ishack-new-mega-menu #site-header .ishack-brands-group__header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 11px;
}

body.ishack-new-mega-menu #site-header .ishack-brands-group__icon {
	display: grid;
	width: 31px;
	height: 31px;
	flex: 0 0 31px;
	place-items: center;
	border-radius: 10px;
	color: #4a3100;
	font-size: 14px;
	font-weight: 800;
	background: linear-gradient(135deg, #ffe89d, var(--ishack-brands-accent));
}

body.ishack-new-mega-menu #site-header .ishack-brands-group__header h3 {
	margin: 0 !important;
	color: var(--ishack-brands-ink) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 760 !important;
	line-height: 1.2 !important;
	letter-spacing: -0.01em;
	text-transform: none !important;
}

body.ishack-new-mega-menu #site-header .ishack-brands-group__header p {
	margin: 3px 0 0 !important;
	color: var(--ishack-brands-muted);
	font-size: 11px;
	font-weight: 450;
	line-height: 1.25;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

body.ishack-new-mega-menu #site-header .ishack-brand-card {
	position: relative;
	display: grid !important;
	grid-template-columns: 66px minmax(0, 1fr) 16px;
	gap: 11px;
	align-items: center;
	min-width: 0;
	min-height: 82px !important;
	padding: 10px 12px !important;
	border: 1px solid var(--ishack-brands-border) !important;
	border-radius: 13px !important;
	color: var(--ishack-brands-ink) !important;
	background: #fff !important;
	box-shadow: 0 3px 12px rgba(16, 24, 40, 0.03);
	text-decoration: none !important;
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		transform 180ms ease,
		background-color 180ms ease !important;
}

body.ishack-new-mega-menu #site-header .ishack-brand-card--official {
	border-color: rgba(245, 173, 0, 0.28) !important;
	background: linear-gradient(145deg, #fff 15%, #fffbec 100%) !important;
}

body.ishack-new-mega-menu #site-header .ishack-brand-card:hover,
body.ishack-new-mega-menu #site-header .ishack-brand-card:focus-visible,
body.ishack-new-mega-menu #site-header .ishack-brand-card.is-active {
	border-color: rgba(245, 173, 0, 0.78) !important;
	color: var(--ishack-brands-ink) !important;
	background: #fffdf7 !important;
	box-shadow: 0 10px 24px rgba(16, 24, 40, 0.09);
	transform: translateY(-2px);
}

body.ishack-new-mega-menu #site-header .ishack-brand-card:focus-visible,
body.ishack-new-mega-menu #site-header .ishack-brands-menu__all:focus-visible,
body.ishack-new-mega-menu #site-header .ishack-brand-promo__cta:focus-visible {
	outline: 3px solid rgba(245, 173, 0, 0.48) !important;
	outline-offset: 3px;
}

body.ishack-new-mega-menu #site-header .ishack-brand-card__media {
	display: grid;
	width: 66px;
	height: 54px;
	place-items: center;
	padding: 7px;
	overflow: hidden;
	border-radius: 10px;
	background: var(--ishack-brands-soft);
}

body.ishack-new-mega-menu #site-header .ishack-brand-card__logo {
	display: block;
	width: 100% !important;
	max-width: 58px !important;
	height: auto !important;
	max-height: 42px !important;
	margin: 0 !important;
	object-fit: contain;
}

body.ishack-new-mega-menu #site-header .ishack-brand-card__wordmark {
	display: block;
	max-width: 100%;
	overflow: hidden;
	color: #344054;
	font-size: 12px;
	font-weight: 780;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-align: center;
	text-overflow: ellipsis;
}

body.ishack-new-mega-menu #site-header .ishack-brand-card__name {
	display: block;
	min-width: 0;
	overflow: hidden;
	font-size: 13px;
	font-weight: 720;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.ishack-new-mega-menu #site-header .ishack-brand-card__arrow {
	color: #98a2b3;
	font-size: 15px;
	transition: color 180ms ease, transform 180ms ease;
}

body.ishack-new-mega-menu #site-header .ishack-brand-card:hover .ishack-brand-card__arrow,
body.ishack-new-mega-menu #site-header .ishack-brand-card:focus-visible .ishack-brand-card__arrow,
body.ishack-new-mega-menu #site-header .ishack-brand-card.is-active .ishack-brand-card__arrow {
	color: var(--ishack-brands-accent-dark);
	transform: translateX(3px);
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__all {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	min-height: 46px !important;
	margin-top: auto !important;
	padding: 11px 15px !important;
	border: 1px solid rgba(245, 173, 0, 0.34) !important;
	border-radius: 12px !important;
	color: #3f2a00 !important;
	font-size: 12px;
	font-weight: 760;
	background: var(--ishack-brands-accent-soft) !important;
	text-decoration: none !important;
	transition: background-color 180ms ease, border-color 180ms ease !important;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__all:hover {
	border-color: rgba(245, 173, 0, 0.7) !important;
	color: #241800 !important;
	background: #fff0bd !important;
}

body.ishack-new-mega-menu #site-header .ishack-brands-menu__empty {
	margin: 0;
	padding: 20px;
	border-radius: 12px;
	color: var(--ishack-brands-muted);
	background: var(--ishack-brands-soft);
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo {
	position: relative;
	min-width: 0;
	min-height: 550px;
	overflow: hidden;
	border-left: 1px solid var(--ishack-brands-border);
	background: #f4f6f9;
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__panel {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	background: #fff;
	transform: translateY(6px);
	transition:
		opacity 190ms ease,
		visibility 190ms ease,
		transform 190ms ease;
}

body.ishack-new-mega-menu #site-header li.ishack-brands-parent.mega-toggle-on > ul.mega-sub-menu.ishack-brands-panel .ishack-brand-promo__panel.is-active {
	z-index: 2;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__media {
	position: relative;
	display: grid;
	height: 48%;
	min-height: 230px;
	place-items: center;
	overflow: hidden;
	background:
		radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.95), transparent 36%),
		linear-gradient(145deg, #f8fafc, #eef1f5);
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__image {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: cover;
	transition: transform 500ms ease;
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__panel.is-active .ishack-brand-promo__image {
	transform: scale(1.025);
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__media-shade {
	position: absolute;
	inset: auto 0 0;
	height: 40%;
	pointer-events: none;
	background: linear-gradient(180deg, transparent, rgba(16, 24, 40, 0.1));
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__logo-fallback {
	display: grid;
	width: min(220px, 72%);
	height: 120px;
	place-items: center;
	padding: 24px;
	border: 1px solid rgba(16, 24, 40, 0.06);
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.82);
	box-shadow: 0 18px 42px rgba(16, 24, 40, 0.1);
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__logo-fallback .ishack-brand-card__logo {
	max-width: 170px !important;
	max-height: 76px !important;
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__logo-fallback .ishack-brand-card__wordmark {
	font-size: 24px;
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__content {
	display: flex;
	min-height: 0;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	padding: 27px 28px 28px;
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__content h3 {
	margin: 0 0 10px !important;
	color: var(--ishack-brands-ink) !important;
	font-family: inherit !important;
	font-size: clamp(24px, 2.1vw, 32px) !important;
	font-weight: 780 !important;
	line-height: 1.08 !important;
	letter-spacing: -0.04em;
	text-transform: none !important;
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__description {
	display: -webkit-box;
	margin: 0 0 22px !important;
	overflow: hidden;
	color: var(--ishack-brands-muted);
	font-size: 13px;
	font-weight: 450;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__cta {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 44px !important;
	margin-top: auto !important;
	padding: 11px 16px !important;
	border: 1px solid rgba(122, 77, 0, 0.18) !important;
	border-radius: 11px !important;
	color: #342300 !important;
	font-size: 12px;
	font-weight: 780;
	background: linear-gradient(135deg, #ffe38d, var(--ishack-brands-accent)) !important;
	box-shadow: 0 10px 24px rgba(122, 77, 0, 0.13);
	text-decoration: none !important;
	transition: box-shadow 180ms ease, transform 180ms ease !important;
}

body.ishack-new-mega-menu #site-header .ishack-brand-promo__cta:hover {
	color: #241800 !important;
	box-shadow: 0 14px 30px rgba(122, 77, 0, 0.2);
	transform: translateY(-2px);
}

@media (min-width: 768px) and (max-width: 1099px) {
	body.ishack-new-mega-menu #site-header .ishack-brands-menu__layout {
		grid-template-columns: minmax(0, 64fr) minmax(270px, 36fr);
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-menu__catalog {
		padding: 25px 24px 24px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-menu__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-card {
		grid-template-columns: 58px minmax(0, 1fr) 14px;
		min-height: 76px !important;
		padding: 9px !important;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-card__media {
		width: 58px;
		height: 50px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-promo__content {
		padding: 24px;
	}
}

/* Existing Max Mega Menu mobile accordion, only inside the Marki section. */
@media (max-width: 767px) {
	body.ishack-new-mega-menu #site-header .ishack-menu-enhanced > ul.mega-menu > li.ishack-brands-parent > ul.mega-sub-menu.ishack-brands-panel {
		position: static !important;
		inset: auto !important;
		width: 100% !important;
		max-width: 100% !important;
		max-height: none !important;
		padding: 0 !important;
		overflow: visible !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		transform: none !important;
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-menu__layout {
		display: block;
		min-height: 0;
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-menu__catalog {
		padding: 20px 12px 16px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-menu__header {
		margin-bottom: 17px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-menu__header h2 {
		font-size: 19px !important;
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-group + .ishack-brands-group {
		margin-top: 20px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-menu__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 9px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-card {
		grid-template-columns: 58px minmax(0, 1fr);
		min-height: 76px !important;
		padding: 9px !important;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-card__media {
		width: 58px;
		height: 50px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-card__arrow {
		display: none;
	}

	body.ishack-new-mega-menu #site-header .ishack-brands-menu__all {
		margin-top: 18px !important;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-promo {
		min-height: 430px;
		margin: 0 12px 18px;
		border: 1px solid var(--ishack-brands-border);
		border-radius: 16px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-promo__media {
		height: 205px;
		min-height: 205px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-promo__content {
		padding: 22px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-promo__content h3 {
		font-size: 25px !important;
	}
}

@media (max-width: 420px) {
	body.ishack-new-mega-menu #site-header .ishack-brands-menu__grid {
		grid-template-columns: 1fr;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-card {
		grid-template-columns: 64px minmax(0, 1fr) 14px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-card__media {
		width: 64px;
	}

	body.ishack-new-mega-menu #site-header .ishack-brand-card__arrow {
		display: block;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.ishack-new-mega-menu #site-header .ishack-brands-menu *,
	body.ishack-new-mega-menu #site-header .ishack-brands-menu *::before,
	body.ishack-new-mega-menu #site-header .ishack-brands-menu *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
