/* Products mega menu — compact SaaS 2×2 dropdown */

.ast-primary-header-bar .main-header-menu > .menu-item-gc-products {
	position: relative;
}

.ast-primary-header-bar .main-header-menu > .menu-item-gc-products > .menu-link {
	position: relative;
}

/* Mega panel — left edge under Products, expands right only */
.ast-primary-header-bar .menu-item-gc-products > .sub-menu,
.ast-desktop .menu-item-gc-products > .sub-menu {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	position: absolute;
	top: calc(100% + 16px);
	left: 0;
	right: auto;
	width: min(560px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	margin: 0 !important;
	padding: 16px !important;
	list-style: none;
	background: #fff !important;
	background-image: none !important;
	border: 1px solid #e8eaf0 !important;
	border-radius: 16px !important;
	box-shadow: 0 18px 48px rgba(40, 27, 74, 0.14) !important;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(var(--gc-mega-shift, 0px)) translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 10050;
	box-sizing: border-box;
}

/* Caret under Products label (near left of panel) */
.ast-primary-header-bar .menu-item-gc-products > .sub-menu::after,
.ast-desktop .menu-item-gc-products > .sub-menu::after {
	content: "";
	position: absolute;
	top: -7px;
	left: calc(28px - var(--gc-mega-shift, 0px));
	width: 14px;
	height: 14px;
	background: #fff;
	border-left: 1px solid #e8eaf0;
	border-top: 1px solid #e8eaf0;
	transform: translateX(-50%) rotate(45deg);
	pointer-events: none;
	z-index: 1;
}

/* Invisible hover bridge */
.ast-primary-header-bar .menu-item-gc-products > .sub-menu::before,
.ast-desktop .menu-item-gc-products > .sub-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -20px;
	height: 22px;
}

/* Open state */
.ast-primary-header-bar .menu-item-gc-products:hover > .sub-menu,
.ast-primary-header-bar .menu-item-gc-products:focus-within > .sub-menu,
.ast-primary-header-bar .menu-item-gc-products.gc-mega-open > .sub-menu,
.ast-desktop .menu-item-gc-products:hover > .sub-menu,
.ast-desktop .menu-item-gc-products:focus-within > .sub-menu,
.ast-desktop .menu-item-gc-products.gc-mega-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(var(--gc-mega-shift, 0px)) translateY(0);
}

.ast-primary-header-bar .menu-item-gc-products > .sub-menu .gc-mega-card,
.ast-desktop .menu-item-gc-products > .sub-menu .gc-mega-card {
	pointer-events: auto;
	cursor: pointer;
	position: relative;
	z-index: 2;
}

/* Reset Astra submenu li styles */
.ast-primary-header-bar .menu-item-gc-products > .sub-menu .menu-item,
.ast-desktop .menu-item-gc-products > .sub-menu .menu-item {
	margin: 0;
	padding: 0;
	width: auto;
	float: none;
	border: 0;
	background: transparent;
	line-height: normal;
	display: block;
}

.ast-primary-header-bar .menu-item-gc-products > .sub-menu .menu-link,
.ast-desktop .menu-item-gc-products > .sub-menu .menu-link {
	display: none !important;
}

/* Vertical SaaS cards */
.gc-mega-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	height: 100%;
	min-height: 0;
	padding: 16px 14px 14px;
	border: 1px solid #e8eaf0;
	border-radius: 14px;
	background: #fff;
	text-decoration: none !important;
	color: inherit;
	box-sizing: border-box;
	transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
}

.gc-mega-card:hover,
.gc-mega-card:focus-visible {
	transform: translateY(-2px);
	border-color: #cfc3f5;
	background: #fbfaff;
	box-shadow: 0 10px 22px rgba(96, 44, 224, 0.1);
	outline: none;
}

.gc-mega-card:focus-visible {
	box-shadow: 0 0 0 3px rgba(96, 44, 224, 0.22), 0 10px 22px rgba(96, 44, 224, 0.1);
}

.gc-mega-card__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.gc-mega-card__icon svg {
	width: 20px;
	height: 20px;
	display: block;
}

.gc-mega-card--guest .gc-mega-card__icon {
	background: #f3eefe;
	color: #602ce0;
}

.gc-mega-card--pms .gc-mega-card__icon {
	background: #eaf2ff;
	color: #2563eb;
}

.gc-mega-card--booking .gc-mega-card__icon {
	background: #e9f8ef;
	color: #16a34a;
}

.gc-mega-card--channel .gc-mega-card__icon {
	background: #fff3e8;
	color: #ea580c;
}

.gc-mega-card--blog .gc-mega-card__icon {
	background: #f3eefe;
	color: #602ce0;
}

/* Resources — single Blog card panel (same card style as Guest Experience) */
.ast-primary-header-bar .main-header-menu > .menu-item-gc-resources {
	position: relative;
}

.ast-primary-header-bar .menu-item-gc-resources > .sub-menu,
.ast-desktop .menu-item-gc-resources > .sub-menu {
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 0;
	position: absolute;
	top: calc(100% + 16px);
	left: 0;
	right: auto;
	width: min(280px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	margin: 0 !important;
	padding: 12px !important;
	list-style: none;
	background: #fff !important;
	background-image: none !important;
	border: 1px solid #e8eaf0 !important;
	border-radius: 16px !important;
	box-shadow: 0 18px 48px rgba(40, 27, 74, 0.14) !important;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(var(--gc-mega-shift, 0px)) translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 10050;
	box-sizing: border-box;
}

.ast-primary-header-bar .menu-item-gc-resources > .sub-menu::after,
.ast-desktop .menu-item-gc-resources > .sub-menu::after {
	content: "";
	position: absolute;
	top: -7px;
	left: calc(28px - var(--gc-mega-shift, 0px));
	width: 14px;
	height: 14px;
	background: #fff;
	border-left: 1px solid #e8eaf0;
	border-top: 1px solid #e8eaf0;
	transform: translateX(-50%) rotate(45deg);
	pointer-events: none;
	z-index: 1;
}

.ast-primary-header-bar .menu-item-gc-resources > .sub-menu::before,
.ast-desktop .menu-item-gc-resources > .sub-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -20px;
	height: 22px;
}

.ast-primary-header-bar .menu-item-gc-resources:hover > .sub-menu,
.ast-primary-header-bar .menu-item-gc-resources:focus-within > .sub-menu,
.ast-primary-header-bar .menu-item-gc-resources.gc-mega-open > .sub-menu,
.ast-desktop .menu-item-gc-resources:hover > .sub-menu,
.ast-desktop .menu-item-gc-resources:focus-within > .sub-menu,
.ast-desktop .menu-item-gc-resources.gc-mega-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(var(--gc-mega-shift, 0px)) translateY(0);
}

.ast-primary-header-bar .menu-item-gc-resources > .sub-menu .gc-mega-card,
.ast-desktop .menu-item-gc-resources > .sub-menu .gc-mega-card {
	pointer-events: auto;
	cursor: pointer;
	position: relative;
	z-index: 2;
}

.ast-primary-header-bar .menu-item-gc-resources > .sub-menu .menu-item,
.ast-desktop .menu-item-gc-resources > .sub-menu .menu-item {
	margin: 0;
	padding: 0;
	width: auto;
	float: none;
	border: 0;
	background: transparent;
	line-height: normal;
	display: block;
}

.ast-primary-header-bar .menu-item-gc-resources > .sub-menu .menu-link,
.ast-desktop .menu-item-gc-resources > .sub-menu .menu-link {
	display: none !important;
}

@media (max-width: 921px) {
	.ast-header-break-point .menu-item-gc-resources > .sub-menu {
		position: static !important;
		left: auto !important;
		transform: none !important;
		width: 100% !important;
		max-width: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		display: none !important;
		grid-template-columns: 1fr;
		box-shadow: none !important;
		border: 0 !important;
		border-radius: 0 !important;
		padding: 8px 0 12px !important;
		background: transparent !important;
		gap: 8px;
	}

	.ast-header-break-point .menu-item-gc-resources > .sub-menu::before,
	.ast-header-break-point .menu-item-gc-resources > .sub-menu::after {
		display: none;
	}

	.ast-header-break-point .menu-item-gc-resources.ast-submenu-expanded > .sub-menu,
	.ast-header-break-point .menu-item-gc-resources.gc-mega-open > .sub-menu {
		display: grid !important;
	}
}

.gc-mega-card:hover .gc-mega-card__icon,
.gc-mega-card:focus-visible .gc-mega-card__icon {
	transform: scale(1.04);
}

.gc-mega-card__title {
	margin: 2px 0 0;
	font-family: "Roboto Flex", sans-serif;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.3;
	color: #1f1638;
}

.gc-mega-card__text {
	margin: 0;
	font-family: "Roboto Flex", sans-serif;
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.45;
	color: #6b7280;
	flex: 1 1 auto;
}

.gc-mega-card__more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 4px;
	font-family: "Roboto Flex", sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	color: #602ce0;
	transition: gap 0.2s ease;
}

.gc-mega-card:hover .gc-mega-card__more,
.gc-mega-card:focus-visible .gc-mega-card__more {
	gap: 7px;
}

.gc-mega-card__more svg {
	display: block;
	flex: 0 0 auto;
}

/* Narrow desktop: still 2×2, slightly tighter */
@media (max-width: 1100px) {
	.ast-primary-header-bar .menu-item-gc-products > .sub-menu,
	.ast-desktop .menu-item-gc-products > .sub-menu {
		width: min(520px, calc(100vw - 24px));
		gap: 10px;
		padding: 12px !important;
	}

	.gc-mega-card {
		padding: 14px 12px 12px;
	}
}

/* Mobile / tablet: Astra accordion stack */
@media (max-width: 921px) {
	.ast-header-break-point .menu-item-gc-products > .sub-menu {
		position: static !important;
		left: auto !important;
		transform: none !important;
		width: 100% !important;
		max-width: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		display: none !important;
		grid-template-columns: 1fr;
		box-shadow: none !important;
		border: 0 !important;
		border-radius: 0 !important;
		padding: 8px 0 12px !important;
		background: transparent !important;
		gap: 8px;
	}

	.ast-header-break-point .menu-item-gc-products > .sub-menu::before,
	.ast-header-break-point .menu-item-gc-products > .sub-menu::after {
		display: none;
	}

	.ast-header-break-point .menu-item-gc-products.ast-submenu-expanded > .sub-menu,
	.ast-header-break-point .menu-item-gc-products.gc-mega-open > .sub-menu {
		display: grid !important;
	}

	.ast-header-break-point .gc-mega-card {
		padding: 14px 12px;
	}
}
