/* BM Custom Menu Styles */

.bm-menu-wrapper {
	font-family: 'Inter', sans-serif;
	width: 100%;
}

.bm-nav-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 80px;
	position: relative;
}

/* Mobile Toggle Button */
.bm-mobile-toggle {
	display: none;
	flex-direction: column;
	justify-content: space-between;
	width: 30px;
	height: 21px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 1001;
	position: relative;
}

.bm-mobile-toggle span {
	width: 100%;
	height: 3px;
	background-color: #ffffff;
	border-radius: 3px;
	transition: all 0.3s ease;
}

/* Main Navigation Menu */
.bm-nav-menu {
	list-style: none;
	display: flex;
	gap: 15px;
	margin: 0;
	padding: 0;
	align-items: center;
	height: 100%;
}

.bm-nav-item {
	height: 100%;
	display: flex;
	align-items: center;
}

.bm-nav-link {
	color: #ffffff;
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 5px;
	height: 100%;
	transition: color 0.3s ease;
	position: relative;
	cursor: pointer;
	white-space: nowrap;
}

.bm-nav-link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background-color: #D71920;
	transform: scaleX(0);
	transition: transform 0.3s ease;
	transform-origin: right;
}

.bm-nav-link:hover {
	color: #ffffff;
}

.bm-nav-item:hover .bm-nav-link::after {
	transform: scaleX(1);
	transform-origin: left;
}

.bm-nav-arrow {
	transition: transform 0.3s ease;
}

.bm-nav-item:hover .bm-nav-arrow {
	transform: rotate(180deg);
}

/* Mega Menu */
.bm-megamenu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	transform: translateY(10px);
	background-color: #121212;
	border: 1px solid #333;
	border-top: 3px solid #D71920;
	width: 100%;
	max-width: 100%;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	z-index: 9999;
	border-radius: 0 0 8px 8px;
	overflow-y: auto;
	max-height: 85vh;
}

.bm-nav-item:hover .bm-megamenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.bm-megamenu-container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	padding: 40px;
	background: linear-gradient(to bottom, #121212, #0f0f0f);
}

.bm-megamenu-column {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.bm-megamenu-header-wrapper {
	grid-column: span 2;
}

.bm-megamenu-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #333;
	position: relative;
}

.bm-megamenu-icon {
	color: #D71920;
	flex-shrink: 0;
	filter: drop-shadow(0 0 8px rgba(215, 25, 32, 0.3));
}

.bm-megamenu-header h3 {
	font-size: 1.4rem;
	font-weight: 700;
	color: #ffffff;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 1px;
	flex: 1;
}

.bm-megamenu-see-all {
	font-size: 0.75rem;
	color: #a0a0a0;
	text-decoration: none;
	padding: 4px 10px;
	border: 1px solid #333;
	border-radius: 4px;
	transition: all 0.3s ease;
	white-space: nowrap;
	font-weight: 500;
	letter-spacing: 0.3px;
}

.bm-megamenu-see-all:hover {
	color: #ffffff;
	border-color: #D71920;
	background-color: rgba(215, 25, 32, 0.1);
}

.bm-megamenu-description {
	color: #a0a0a0;
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 16px 0 0 0;
}

.bm-megamenu-section {
	margin-bottom: 8px;
}

.bm-megamenu-section h4 {
	color: #D71920;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	margin: 0 0 16px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.bm-megamenu-section h4::after {
	content: '';
	flex: 1;
	height: 1px;
	background-color: #333;
}

.bm-megamenu-links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.bm-megamenu-links li a {
	color: #cccccc;
	text-decoration: none;
	font-size: 0.95rem;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
}

.bm-megamenu-links li a:hover {
	color: #ffffff;
	transform: translateX(5px);
}

.bm-megamenu-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	background-color: rgba(255, 255, 255, 0.05);
	border: 1px solid #333;
	border-radius: 6px;
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	margin-top: auto;
}

.bm-megamenu-btn:hover {
	background-color: #D71920;
	border-color: #D71920;
}

.bm-megamenu-footer {
	padding: 20px 40px;
	background-color: #0a0a0a;
	border-top: 1px solid #333;
}

.bm-megamenu-btn-full {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 12px;
	background-color: transparent;
	border: 1px solid #333;
	border-radius: 6px;
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-size: 0.9rem;
}

.bm-megamenu-btn-full:hover {
	border-color: #D71920;
	color: #D71920;
}

/* Responsive Styles */
@media (max-width: 1024px) {
	.bm-mobile-toggle {
		display: flex;
	}

	/* Burger Animation */
	.bm-mobile-toggle.active span:nth-child(1) {
		transform: translateY(9px) rotate(45deg);
	}

	.bm-mobile-toggle.active span:nth-child(2) {
		opacity: 0;
	}

	.bm-mobile-toggle.active span:nth-child(3) {
		transform: translateY(-9px) rotate(-45deg);
	}

	.bm-nav-menu {
		position: fixed;
		top: 0;
		right: 0;
		width: 100%;
		max-width: 400px;
		height: 100vh;
		background-color: #0a0a0a;
		flex-direction: column;
		align-items: flex-start;
		padding: 80px 0 20px 0;
		transform: translateX(100%);
		transition: transform 0.3s ease;
		overflow-y: auto;
		border-left: 1px solid #333;
		z-index: 1000;
	}

	.bm-nav-menu.active {
		transform: translateX(0);
	}

	.bm-nav-item {
		width: 100%;
		height: auto;
		flex-direction: column;
		align-items: flex-start;
		border-bottom: 1px solid #1a1a1a;
	}

	.bm-nav-link {
		width: 100%;
		padding: 20px 24px;
		justify-content: space-between;
		height: auto;
	}

	.bm-nav-link::after {
		display: none;
		/* Remove underline effect on mobile */
	}

	.bm-nav-arrow {
		transform: rotate(0);
	}

	.bm-nav-item.active .bm-nav-arrow {
		transform: rotate(180deg);
	}

	/* Mobile Mega Menu */
	.bm-megamenu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		display: none;
		box-shadow: none;
		border-top: 1px solid #333;
		padding: 0;
		overflow: hidden;
		transition: max-height 0.3s ease;
		background-color: #0f0f0f;
		width: 100%;
		max-height: 0;
	}

	.bm-nav-item.active .bm-megamenu {
		display: block;
		max-height: 10000px;
		/* Ensure enough space for all content */
	}

	.bm-megamenu-container {
		display: flex;
		flex-direction: column;
		padding: 20px 24px;
		gap: 0;
		/* We'll handle spacing with margins */
	}

	/* Reorder items for mobile: Farby Header -> Farby Content -> Grunty Header -> Grunty Content */

	/* 1. Header Farby */
	.bm-megamenu-container>div:nth-child(1) {
		order: 1;
		margin-bottom: 20px;
	}

	/* 2. Header Grunty - Move to position 4 */
	.bm-megamenu-container>div:nth-child(2) {
		order: 4;
		margin-top: 40px;
		margin-bottom: 20px;
		padding-top: 40px;
		border-top: 1px solid #333;
	}

	/* 3. Farby Col 1 */
	.bm-megamenu-container>div:nth-child(3) {
		order: 2;
		margin-bottom: 20px;
	}

	/* 4. Farby Col 2 */
	.bm-megamenu-container>div:nth-child(4) {
		order: 3;
	}

	/* 5. Grunty Col 1 */
	.bm-megamenu-container>div:nth-child(5) {
		order: 5;
		margin-bottom: 20px;
	}

	/* 6. Grunty Col 2 */
	.bm-megamenu-container>div:nth-child(6) {
		order: 6;
	}

	.bm-megamenu-header-wrapper {
		grid-column: auto !important;
		/* Override inline style */
	}

	.bm-megamenu-header h3 {
		font-size: 1.2rem;
	}

	.bm-megamenu-column {
		padding-left: 0;
		border-left: none;
	}
}