/* Savera Products Mega Menu - Frontend */

.smm-products-menu-item {
	position: relative !important;
}

#smm-mega-menu-template {
	display: none !important;
}

.smm-products-menu-item > .sub-menu {
	display: none !important;
}

.smm-products-trigger {
	display: inline-flex !important;
	align-items: center;
	gap: 5px;
}

.smm-products-menu-item.smm-open .smm-products-trigger {
	color: inherit;
}

.smm-mega-menu {
	position: absolute;
	left: 50%;
	top: 100%;
	width: min(1100px, calc(100vw - 40px));
	z-index: 99999;
	background: #fff;
	border-radius: 0 0 6px 6px;
	box-shadow: 0 7px 22px rgba(0, 0, 0, .16);
	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%) translateY(-8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.smm-products-menu-item.smm-open > .smm-mega-menu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.smm-mega-inner {
	width: min(1100px, calc(100% - 60px));
	margin: 0 auto;
	display: flex;
	padding: 24px 0;
	box-sizing: border-box;
}

.smm-sidebar {
	width: 210px;
	flex: 0 0 210px;
	padding-right: 24px;
	border-right: 1px solid #ddd;
	display: flex;
	flex-direction: column;
	gap: 4px;
	box-sizing: border-box;
}

.smm-sidebar .smm-tab {
	all: unset;
	box-sizing: border-box !important;
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	background-image: none !important;
	color: #333 !important;
	padding: 14px 13px !important;
	text-align: left !important;
	font: inherit !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	line-height: 1.25 !important;
	cursor: pointer !important;
	transition: background .2s ease, color .2s ease;
}

.smm-sidebar .smm-tab:hover,
.smm-sidebar .smm-tab.is-active {
	background: #ff951c !important;
	color: #fff !important;
}

.smm-content {
	flex: 1 1 auto;
	min-width: 0;
	padding-left: 40px;
}

.smm-panel {
	display: none;
	grid-template-columns: repeat(5, minmax(90px, 1fr));
	gap: 20px;
	align-items: start;
}

.smm-panel.is-active {
	display: grid;
}

.smm-card {
	display: block;
	min-width: 0;
	color: #222;
	text-decoration: none !important;
}

.smm-card-image {
	display: flex;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	align-items: center;
	justify-content: center;
	border-radius: 13px;
	background: #eee;
	box-sizing: border-box;
}

.smm-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .3s ease;
}

.smm-card:hover .smm-card-image img {
	transform: scale(1.05);
}

.smm-image-placeholder {
	color: #777;
	font-size: 11px;
}

.smm-card-title {
	display: block;
	margin-top: 9px;
	color: #222;
	font-size: 13px;
	line-height: 1.4;
}

.smm-view-all {
	position: relative;
	min-width: 0;
	aspect-ratio: 1 / 1;
	padding: 14px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	box-sizing: border-box;
	border-radius: 13px;
	background: linear-gradient(155deg, #1768ad 0%, #052d5a 100%);
}

.smm-view-all .smm-card-title {
	position: relative;
	z-index: 2;
	margin: 0;
	color: #fff;
}

.smm-view-all-decoration,
.smm-view-all-decoration::before,
.smm-view-all-decoration::after {
	position: absolute;
	border: 2px solid rgba(255, 255, 255, .08);
	border-radius: 50%;
	content: "";
}

.smm-view-all-decoration {
	width: 115px;
	height: 115px;
	right: -45px;
	top: -35px;
}

.smm-view-all-decoration::before {
	width: 85px;
	height: 85px;
	right: 12px;
	top: 12px;
}

.smm-view-all-decoration::after {
	width: 55px;
	height: 55px;
	right: 27px;
	top: 27px;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1100px) {
	.smm-mega-inner {
		width: calc(100% - 40px);
	}

	.smm-sidebar {
		width: 175px;
		flex-basis: 175px;
		padding-right: 20px;
	}

	.smm-content {
		padding-left: 25px;
	}

	.smm-panel {
		grid-template-columns: repeat(4, minmax(85px, 1fr));
		gap: 14px;
	}

	.smm-card-title {
		font-size: 12px;
	}
}

/* Mobile: leave the normal WordPress/mobile navigation in control */
@media (max-width: 767px) {
	.smm-mega-menu {
		display: none !important;
	}
}
