/* -----------------------------------------------------------------
 * Themezur Ideal SaaS Mega Menu System (Pixel-Perfect Styling)
 * ----------------------------------------------------------------- */

/* Mega Menu Item Container */
.tz-nav-list > li.tz-menu-item--mega {
	position: relative !important;
}

/* Mega Dropdown Panel Base */
.tz-mega-dropdown {
	position: absolute !important;
	top: calc(100% + 4px) !important;
	left: 0 !important;
	z-index: 99999 !important;
	display: none !important;
	opacity: 0;
	pointer-events: none;
	padding-top: 8px; /* Smooth hover bridge */
}

/* Show when parent is hovered or active */
.tz-nav-list > li.tz-menu-item--mega:hover > .tz-mega-dropdown,
.tz-nav-list > li.tz-menu-item--mega.is-active > .tz-mega-dropdown,
.tz-mega-dropdown:hover {
	display: block !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

/* -----------------------------------------------------------------
 * Feature 3: Entrance Animation Styles
 * ----------------------------------------------------------------- */
.tz-mega-anim--slide {
	transform: translateY(8px);
	transition: opacity 180ms ease, transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tz-nav-list > li.tz-menu-item--mega:hover > .tz-mega-anim--slide {
	transform: translateY(0);
}

.tz-mega-anim--fade {
	transition: opacity 220ms ease;
}

.tz-mega-anim--scale {
	transform: scale(0.94);
	transition: opacity 200ms ease, transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tz-nav-list > li.tz-menu-item--mega:hover > .tz-mega-anim--scale {
	transform: scale(1);
}

.tz-mega-anim--flip {
	transform: perspective(600px) rotateX(-15deg);
	transform-origin: top center;
	transition: opacity 220ms ease, transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.tz-nav-list > li.tz-menu-item--mega:hover > .tz-mega-anim--flip {
	transform: perspective(600px) rotateX(0deg);
}

/* -----------------------------------------------------------------
 * Inner Glassmorphism / Dark SaaS Card & Background Image Overlay (Feature 2)
 * ----------------------------------------------------------------- */
.tz-mega-dropdown__inner {
	position: relative;
	background: #0f172a !important; /* Premium Dark SaaS Panel */
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	border-radius: 16px !important;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.2) !important;
	overflow: hidden;
	color: #ffffff !important;
}

.tz-mega-bg-overlay {
	position: absolute;
	inset: 0;
	background-image: var(--tz-mega-bg-img);
	background-size: cover;
	background-position: center;
	opacity: 0.14;
	pointer-events: none;
	mix-blend-mode: overlay;
	z-index: 0;
}

/* Theme Presets */
.tz-mega-dropdown--theme-dark .tz-mega-dropdown__inner {
	background: #0f172a !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	color: #ffffff !important;
}

.tz-mega-dropdown--theme-light .tz-mega-dropdown__inner {
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14) !important;
	color: #0f172a !important;
}

.tz-mega-dropdown--theme-light .tz-mega-item__title { color: #0f172a !important; }
.tz-mega-dropdown--theme-light .tz-mega-item__desc { color: #64748b !important; }
.tz-mega-dropdown--theme-light .tz-mega-section__label { color: #64748b !important; }
.tz-mega-dropdown--theme-light .tz-mega-section__label::after { background: #e2e8f0 !important; }
.tz-mega-dropdown--theme-light .tz-mega-item:hover { background: #f1f5f9 !important; }
.tz-mega-dropdown--theme-light .tz-mega-footer { background: #f8fafc !important; border-top-color: #e2e8f0 !important; }
.tz-mega-dropdown--theme-light .tz-mega-footer__text { color: #64748b !important; }
.tz-mega-dropdown--theme-light .tz-mega-footer__btn { color: #2563eb !important; }

.tz-mega-dropdown--theme-custom .tz-mega-dropdown__inner {
	background: var(--tz-mega-custom-bg, #0f172a) !important;
	color: var(--tz-mega-custom-text, #ffffff) !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.tz-mega-dropdown--theme-custom .tz-mega-item__title { color: var(--tz-mega-custom-text, #ffffff) !important; }

/* Width Variants */
.tz-mega-dropdown--compact {
	width: min(760px, 92vw) !important;
}

.tz-mega-dropdown--container {
	width: min(1160px, 94vw) !important;
}

.tz-mega-dropdown--full {
	width: 96vw !important;
	left: 50% !important;
	transform: translateX(-50%) !important;
}

/* Grid & Column Layout */
.tz-mega-grid {
	position: relative;
	z-index: 1;
	display: grid !important;
	gap: 24px !important;
	padding: 24px !important;
	margin: 0 !important;
	list-style: none !important;
}

.tz-mega-grid--cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.tz-mega-grid--cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.tz-mega-grid--cols-4 { grid-template-columns: repeat(4, 1fr) !important; }

.tz-mega-col {
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
	min-width: 0 !important;
}

/* Section Header Labels */
.tz-mega-section__label {
	font-size: 0.75rem !important;
	font-weight: 800 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	color: #94a3b8 !important;
	margin: 0 0 10px 4px !important;
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
}

.tz-mega-section__label::after {
	content: '' !important;
	flex: 1 !important;
	height: 1px !important;
	background: rgba(255, 255, 255, 0.15) !important;
}

/* Rich SaaS Menu Link Item */
.tz-mega-item {
	display: flex !important;
	align-items: flex-start !important;
	gap: 12px !important;
	padding: 10px 12px !important;
	border-radius: 12px !important;
	text-decoration: none !important;
	color: inherit !important;
	background: transparent !important;
	transition: background 160ms ease, transform 140ms ease !important;
}

.tz-mega-item:hover {
	background: rgba(255, 255, 255, 0.08) !important;
	transform: translateY(-1px) !important;
}

/* Rounded Icon Box */
.tz-mega-item__icon-wrap {
	width: 38px !important;
	height: 38px !important;
	border-radius: 10px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: rgba(37, 99, 235, 0.2) !important;
	color: #60a5fa !important;
	flex-shrink: 0 !important;
	transition: transform 180ms ease, background 180ms ease, color 180ms ease !important;
}

.tz-mega-item:hover .tz-mega-item__icon-wrap {
	transform: scale(1.08) !important;
	background: #2563eb !important;
	color: #ffffff !important;
}

.tz-mega-item__img {
	width: 20px !important;
	height: 20px !important;
	object-fit: contain !important;
}

/* Item Content & Title */
.tz-mega-item__content {
	flex: 1 !important;
	min-width: 0 !important;
}

.tz-mega-item__head {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
}

.tz-mega-item__title {
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
}

/* Badges */
.tz-mega-badge {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 0.62rem !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	padding: 3px 6px !important;
	border-radius: 999px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.04em !important;
}

.tz-mega-badge--green { background: #10b981 !important; color: #ffffff !important; }
.tz-mega-badge--purple { background: #a855f7 !important; color: #ffffff !important; }
.tz-mega-badge--blue { background: #2563eb !important; color: #ffffff !important; }
.tz-mega-badge--red { background: #ef4444 !important; color: #ffffff !important; }

/* Item Subtitle / Description */
.tz-mega-item__desc {
	margin: 3px 0 0 !important;
	font-size: 0.8rem !important;
	line-height: 1.45 !important;
	opacity: 0.75 !important;
	font-weight: 400 !important;
}

/* -----------------------------------------------------------------
 * Feature 1: Featured Product / Promo Banner Card Column
 * ----------------------------------------------------------------- */
.tz-mega-col--promo {
	grid-column: span 1;
}

.tz-mega-promo-card {
	position: relative;
	height: 100%;
	min-height: 180px;
	border-radius: 14px;
	overflow: hidden;
	background: color-mix(in srgb, var(--tz-mid-accent, #2563eb) 14%, #1e293b);
	border: 1px solid rgba(255, 255, 255, 0.15);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 16px;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.tz-mega-promo-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.tz-mega-promo-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.55;
	transition: transform 300ms ease;
}

.tz-mega-promo-card:hover .tz-mega-promo-card__img {
	transform: scale(1.05);
}

.tz-mega-promo-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: #ef4444;
	color: #ffffff;
	font-size: 0.68rem;
	font-weight: 800;
	padding: 4px 8px;
	border-radius: 999px;
	text-transform: uppercase;
}

.tz-mega-promo-card__body {
	position: relative;
	z-index: 2;
}

.tz-mega-promo-card__title {
	margin: 0 0 4px;
	font-size: 1.05rem;
	font-weight: 800;
	color: #ffffff;
}

.tz-mega-promo-card__desc {
	margin: 0 0 12px;
	font-size: 0.82rem;
	color: #cbd5e1;
}

.tz-mega-promo-card__btn {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 8px;
	background: var(--tz-mid-accent, #2563eb);
	color: #ffffff !important;
	font-weight: 700;
	font-size: 0.8rem;
	text-decoration: none !important;
}

/* -----------------------------------------------------------------
 * Feature 4: Main Bar Glowing Animated Badges
 * ----------------------------------------------------------------- */
.tz-glowing-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.62rem;
	font-weight: 800;
	line-height: 1;
	padding: 3px 7px;
	border-radius: 999px;
	margin-left: 6px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #ffffff;
	animation: tzBadgePulse 2s infinite;
}

.tz-glowing-badge--red { background: #ef4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
.tz-glowing-badge--green { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.6); }
.tz-glowing-badge--purple { background: #a855f7; box-shadow: 0 0 10px rgba(168, 85, 247, 0.6); }
.tz-glowing-badge--gold { background: #f59e0b; box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }

@keyframes tzBadgePulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.08); }
	100% { transform: scale(1); }
}

/* -----------------------------------------------------------------
 * Feature 5: WooCommerce Categories Grid with Thumbnails
 * ----------------------------------------------------------------- */
.tz-mega-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 12px;
	padding: 16px 24px 0;
	position: relative;
	z-index: 1;
}

.tz-mega-cat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 10px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	text-decoration: none !important;
	color: inherit;
	transition: background 160ms ease, transform 160ms ease;
}

.tz-mega-cat-card:hover {
	background: rgba(255, 255, 255, 0.1);
	transform: translateY(-2px);
}

.tz-mega-cat-card__img,
.tz-mega-cat-card__placeholder {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	object-fit: cover;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.1);
	font-size: 20px;
}

.tz-mega-cat-card__name {
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.2;
}

.tz-mega-cat-card__count {
	font-size: 0.7rem;
	opacity: 0.65;
	margin-top: 2px;
}

/* Bottom Callout Banner Footer */
.tz-mega-footer {
	position: relative;
	z-index: 1;
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 12px !important;
	padding: 14px 24px !important;
	background: rgba(255, 255, 255, 0.04) !important;
	border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
	font-size: 0.88rem !important;
}

.tz-mega-footer__text {
	opacity: 0.8 !important;
	font-weight: 500 !important;
}

.tz-mega-footer__btn {
	font-weight: 700 !important;
	color: #34d399 !important;
	text-decoration: none !important;
	transition: opacity 140ms ease !important;
}

.tz-mega-footer__btn:hover {
	opacity: 0.85 !important;
	text-decoration: underline !important;
}

/* Product collection cards */
.tz-mega-products {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tz-mega-product {
	display: flex;
	gap: 10px;
	align-items: center;
	text-decoration: none !important;
	color: inherit;
	padding: 6px;
	border-radius: 10px;
	transition: background 140ms ease;
}

.tz-mega-product:hover {
	background: rgba(255, 255, 255, 0.06);
}

.tz-mega-product__thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
}

.tz-mega-product__thumb img,
.tz-mega-product__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tz-mega-product__title {
	display: block;
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.3;
}

.tz-mega-product__price {
	display: block;
	font-size: 0.78rem;
	opacity: 0.85;
	margin-top: 2px;
}

/* Brand logos */
.tz-mega-brands {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.tz-mega-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 8px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
	text-decoration: none !important;
	color: inherit;
}

.tz-mega-brand__img {
	max-width: 100%;
	max-height: 36px;
	object-fit: contain;
}

.tz-mega-brand__name {
	font-size: 0.8rem;
	font-weight: 700;
	text-align: center;
}

/* Tabs */
.tz-mega-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px 20px 0;
	position: relative;
	z-index: 1;
}

.tz-mega-tabs__btn {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.04);
	color: inherit;
	border-radius: 999px;
	padding: 0.35rem 0.85rem;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
}

.tz-mega-tabs__btn.is-active,
.tz-mega-tabs__btn[aria-selected="true"] {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.28);
}

.tz-mega-tabpanel[hidden] {
	display: none !important;
}

.tz-mega-tabs-promo {
	padding: 0 16px 16px;
}

.tz-mega-promo-card--image_overlay {
	position: relative;
	overflow: hidden;
	min-height: 220px;
}

.tz-mega-promo-card--image_overlay .tz-mega-promo-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tz-mega-promo-card--image_overlay .tz-mega-promo-card__body {
	position: relative;
	z-index: 1;
	margin-top: auto;
	padding: 16px;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
	color: #fff;
}

.tz-mega-promo-html,
.tz-mega-promo-card__html {
	font-size: 0.85rem;
	line-height: 1.45;
	opacity: 0.92;
}

.tz-mega-dropdown--theme-light .tz-mega-product:hover,
.tz-mega-dropdown--theme-light .tz-mega-brand {
	background: #f1f5f9;
}

.tz-mega-dropdown--theme-light .tz-mega-tabs__btn {
	border-color: #e2e8f0;
	background: #f8fafc;
	color: #0f172a;
}

.tz-mega-dropdown--theme-light .tz-mega-tabs__btn.is-active {
	background: #e2e8f0;
}

/* Mobile: mega panels collapse; accordion opens via .sub-menu-open */
@media (max-width: 991px) {
	.tz-mega-dropdown {
		position: static !important;
		transform: none !important;
		opacity: 1 !important;
		display: none !important;
		pointer-events: auto !important;
		width: 100% !important;
		padding-top: 0 !important;
	}

	.tz-nav-list > li.tz-menu-item--mega.sub-menu-open > .tz-mega-dropdown,
	.tz-nav-list > li.tz-menu-item--mega.is-active > .tz-mega-dropdown {
		display: block !important;
	}

	.tz-mega-dropdown__inner {
		background: transparent !important;
		box-shadow: none !important;
		border: none !important;
	}

	.tz-mega-grid {
		grid-template-columns: 1fr !important;
		padding: 8px 0 !important;
	}

	.tz-mega-cat-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		padding: 8px 0 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tz-mega-dropdown,
	.tz-mega-dropdown__inner,
	.tz-glowing-badge {
		animation: none !important;
		transition: none !important;
	}
}
