.mlspg-wrapper {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
}

.mlspg-wrapper *,
.mlspg-wrapper *::before,
.mlspg-wrapper *::after {
	box-sizing: border-box;
}

.mlspg-header {
	position: relative;
	overflow: hidden;
	padding: 24px 28px;
	margin-bottom: 22px;
	background: #2064b5;
	border-radius: 16px;
	color: #fff;
}

.mlspg-header::after {
	content: "";
	position: absolute;
	top: -75px;
	right: -55px;
	width: 190px;
	height: 190px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.09);
	pointer-events: none;
}

.mlspg-eyebrow,
.mlspg-heading,
.mlspg-subtitle {
	position: relative;
	z-index: 1;
}

.mlspg-eyebrow {
	margin-bottom: 7px;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.88);
}

.mlspg-heading {
	margin: 0;
	font-size: 27px;
	line-height: 1.22;
	font-weight: 700;
	color: #fff;
}

.mlspg-subtitle {
	max-width: 780px;
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.9);
}

.mlspg-results {
	position: relative;
	min-height: 60px;
}

.mlspg-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	align-items: stretch;
}

.mlspg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	padding: 14px 14px 16px;
	background: #fff;
	border: 1px solid #e2eaf4;
	border-radius: 15px;
	box-shadow: 0 5px 20px rgba(26, 64, 106, 0.07);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.mlspg-card:hover {
	transform: translateY(-5px);
	border-color: #b8d3f1;
	box-shadow: 0 14px 32px rgba(32, 100, 181, 0.15);
}

.mlspg-image-area {
	position: relative;
	width: 100%;
}

.mlspg-image-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 6px;
	overflow: hidden !important;
	background: #fff;
	border-radius: 18px;
	isolation: isolate;
	-webkit-mask-image: -webkit-radial-gradient(white, black);
	text-decoration: none;
}

.mlspg-image {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	object-fit: contain;
	border-radius: inherit !important;
	overflow: hidden;
	transition: transform 0.35s ease;
}

.mlspg-image-clip-yes .mlspg-image-link,
.mlspg-image-clip-yes .mlspg-image {
	clip-path: inset(0 round 18px);
}

.mlspg-card:hover .mlspg-image {
	transform: scale(1.04);
}

.mlspg-sale-badge,
.mlspg-stock-badge {
	position: absolute;
	z-index: 3;
	top: 10px;
	padding: 7px 9px;
	border-radius: 7px;
	font-size: 10px;
	line-height: 1;
	font-weight: 700;
	letter-spacing: 0.35px;
	text-transform: uppercase;
	box-shadow: 0 3px 12px rgba(20, 45, 80, 0.12);
}

.mlspg-sale-badge {
	right: 10px;
	color: #fff;
	background: #16855b;
}

.mlspg-stock-badge {
	left: 10px;
	color: #2064b5;
	background: #edf6ff;
}

.mlspg-stock-badge.is-out-of-stock {
	color: #9a2f2f;
	background: #fff0f0;
}

.mlspg-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding-top: 14px;
	text-align: left;
}

.mlspg-category {
	margin-bottom: 5px;
	color: #718096;
	font-size: 11px;
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: 0.45px;
	text-transform: uppercase;
}

.mlspg-title-link {
	display: block;
	text-decoration: none !important;
}

.mlspg-product-title {
	display: -webkit-box;
	overflow: hidden;
	min-height: 48px;
	margin: 0 0 10px;
	color: #172b43;
	font-size: 15px;
	line-height: 1.55;
	font-weight: 600;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	transition: color 0.2s ease;
}

.mlspg-title-link:hover .mlspg-product-title {
	color: #2064b5;
}

.mlspg-rating {
	margin: 0 0 8px;
}

.mlspg-rating .star-rating {
	float: none;
	margin: 0;
	color: #f1b400;
}

.mlspg-purchase-meta {
	margin-top: auto;
}

.mlspg-sku {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	column-gap: 5px;
	margin: 0 0 7px;
	color: #6f7f90;
	font-size: 12px;
	line-height: 1.4;
}

.mlspg-sku-label {
	color: #43566d;
	font-weight: 600;
}

.mlspg-sku-value {
	min-width: 0;
	overflow-wrap: anywhere;
}

.mlspg-price {
	min-height: 28px;
	margin: 0 0 13px;
	color: #2064b5;
	font-size: 18px;
	line-height: 1.4;
	font-weight: 700;
}

.mlspg-price del {
	margin-right: 5px;
	color: #8b98a7;
	font-size: 0.78em;
	font-weight: 400;
	opacity: 1;
}

.mlspg-price ins {
	color: #16855b;
	text-decoration: none;
}

.mlspg-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin: 0 !important;
	padding: 11px 15px;
	color: #fff !important;
	background: #2064b5;
	border: 1px solid #2064b5;
	border-radius: 9px;
	box-shadow: none !important;
	font-size: 13px;
	line-height: 1.3;
	font-weight: 700;
	text-align: center;
	text-decoration: none !important;
	text-transform: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mlspg-button:hover,
.mlspg-button:focus {
	color: #fff !important;
	background: #174f92;
	border-color: #174f92;
	transform: translateY(-1px);
}

.mlspg-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin-top: 28px;
}

.mlspg-page-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 6px 10px;
	color: #2064b5;
	background: #fff;
	border: 1px solid #d7e5f5;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1;
	font-weight: 600;
	text-decoration: none !important;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.mlspg-page-number:hover,
.mlspg-page-number.is-current {
	color: #fff;
	background: #2064b5;
	border-color: #2064b5;
}

.mlspg-page-dots {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 40px;
	color: #718096;
}

.mlspg-empty {
	padding: 22px;
	color: #43566d;
	background: #f2f7fd;
	border: 1px solid #d8e8f8;
	border-left: 4px solid #2064b5;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.6;
}

.mlspg-loading {
	position: absolute;
	z-index: 20;
	inset: 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 80px;
	background: rgba(255, 255, 255, 0.72);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mlspg-loading span {
	width: 34px;
	height: 34px;
	border: 3px solid #d7e5f5;
	border-top-color: #2064b5;
	border-radius: 50%;
	animation: mlspg-spin 0.75s linear infinite;
}

.mlspg-wrapper.is-loading .mlspg-loading {
	opacity: 1;
	visibility: visible;
}

@keyframes mlspg-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 1024px) {
	.mlspg-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}
}

@media (max-width: 767px) {
	.mlspg-image-clip-yes .mlspg-image-link,
	.mlspg-image-clip-yes .mlspg-image {
		clip-path: inset(0 round 14px);
	}

	.mlspg-header {
		padding: 21px 19px;
		border-radius: 13px;
	}

	.mlspg-heading {
		font-size: 22px;
	}

	.mlspg-subtitle {
		font-size: 14px;
	}

	.mlspg-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.mlspg-card {
		padding: 11px 11px 13px;
		border-radius: 12px;
	}

	.mlspg-card-body {
		padding-top: 10px;
	}

	.mlspg-product-title {
		min-height: 42px;
		font-size: 13px;
		line-height: 1.45;
	}

	.mlspg-price {
		font-size: 15px;
	}

	.mlspg-button {
		min-height: 40px;
		padding: 9px 7px;
		font-size: 11px;
	}

	.mlspg-sale-badge,
	.mlspg-stock-badge {
		top: 7px;
		padding: 6px 7px;
		font-size: 8px;
	}

	.mlspg-sale-badge {
		right: 7px;
	}

	.mlspg-stock-badge {
		left: 7px;
	}
}

@media (max-width: 390px) {
	.mlspg-grid {
		grid-template-columns: 1fr;
	}
}


/* Nawigacja kategorii AJAX */
.mlspg-category-filter {
	width: 100%;
	margin-bottom: 26px;
	overflow: hidden;
}

.mlspg-filter-title {
	width: 100%;
	padding: 8px 18px;
	color: #fff;
	background: #2064b5;
	font-size: 17px;
	line-height: 1.35;
	font-weight: 500;
	text-align: center;
}

.mlspg-filter-panel {
	padding: 34px 28px 28px;
	background: #fff;
}

.mlspg-filter-grid {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 26px;
	align-items: start;
}

.mlspg-filter-item {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-direction: column;
	min-width: 0;
	width: 100%;
	padding: 8px;
	color: inherit;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 12px;
	box-shadow: none;
	font: inherit;
	text-align: center;
	cursor: pointer;
	transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mlspg-filter-item:hover,
.mlspg-filter-item:focus-visible {
	background: #f1f7ff;
	outline: none;
	transform: translateY(-2px);
}

.mlspg-filter-item.is-active:not(.is-bottom-bar) {
	background: #edf5ff;
	border-color: #2064b5;
	box-shadow: 0 7px 20px rgba(32, 100, 181, 0.12);
}

.mlspg-filter-image {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 78px;
	height: 78px;
	margin: 0 auto 10px;
	overflow: hidden;
	background: #2064b5;
	border-radius: 50%;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.mlspg-filter-item:hover .mlspg-filter-image,
.mlspg-filter-item.is-active .mlspg-filter-image {
	transform: scale(1.05);
	box-shadow: 0 8px 18px rgba(32, 100, 181, 0.2);
}

.mlspg-filter-image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	object-fit: cover;
}

.mlspg-filter-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #fff;
	font-size: 29px;
	line-height: 1;
	font-weight: 700;
}

.mlspg-filter-label {
	display: block;
	max-width: 100%;
	color: #1458b2;
	font-size: 15px;
	line-height: 1.35;
	font-weight: 500;
	word-break: break-word;
}

.mlspg-filter-count {
	display: block;
	margin-top: 4px;
	color: #6f7f92;
	font-size: 11px;
	line-height: 1.2;
}

.mlspg-filter-item.is-bottom-bar {
	flex-direction: row;
	justify-content: center;
	min-height: 38px;
	padding: 8px 18px;
	color: #fff;
	background: #2064b5;
	border: 0;
	border-radius: 0;
}

.mlspg-filter-item.is-bottom-bar:hover,
.mlspg-filter-item.is-bottom-bar.is-active {
	background: #174f92;
	transform: none;
}

.mlspg-filter-item.is-bottom-bar .mlspg-filter-label {
	color: #fff;
	font-size: 17px;
}

@media (max-width: 1024px) {
	.mlspg-filter-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (max-width: 767px) {
	.mlspg-filter-panel {
		padding: 22px 14px 20px;
	}

	.mlspg-filter-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.mlspg-filter-image {
		width: 68px;
		height: 68px;
	}

	.mlspg-filter-label {
		font-size: 13px;
	}

	.mlspg-filter-item.is-bottom-bar .mlspg-filter-label {
		font-size: 15px;
	}
}
