/* Konfigurator systemów – wejścia w kategoriach i na karcie produktu oraz panel wysuwany.
   Lekki plik ładowany w sklepie; pełny CSS konfiguratora dochodzi dopiero po otwarciu panelu. */

@keyframes mxsc-shine {
	0%,
	60% { left: -60%; }
	100% { left: 140%; }
}

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

@keyframes mxsc-tile-glow {
	50% { box-shadow: 0 0 0 1px rgba(104, 181, 255, .55), 0 0 26px -2px rgba(104, 181, 255, .55); }
}

/* ---------- Kafelek w siatce produktów ---------- */

ul.products > li.mxsc-tile {
	display: flex !important;
	float: none;
	width: auto;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
}

ul.products > li.mxsc-tile::before,
ul.products > li.mxsc-tile::after {
	display: none !important;
}

body a.mxsc-tile__link {
	position: relative;
	isolation: isolate;
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	min-height: 100%;
	padding: 26px 22px 22px !important;
	overflow: hidden;
	border: 1px solid rgba(104, 181, 255, .42) !important;
	border-radius: 18px !important;
	background:
		radial-gradient(420px 260px at 85% -10%, rgba(47, 128, 217, .45), transparent 65%),
		radial-gradient(300px 220px at -10% 110%, rgba(36, 116, 198, .28), transparent 60%),
		linear-gradient(165deg, #0b2b57 0%, #071731 62%, #050f22 100%) !important;
	color: #e8f4fb !important;
	text-align: left !important;
	text-decoration: none !important;
	box-shadow: 0 18px 40px -24px rgba(4, 31, 70, .9);
	transition: transform .3s cubic-bezier(.22, .8, .24, 1), box-shadow .3s;
}

/* Delikatna siatka w tle, jak w konfiguratorze. */
body a.mxsc-tile__link::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(104, 181, 255, .07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(104, 181, 255, .07) 1px, transparent 1px);
	background-size: 26px 26px;
	-webkit-mask-image: linear-gradient(180deg, #000, transparent 75%);
	mask-image: linear-gradient(180deg, #000, transparent 75%);
}

body a.mxsc-tile__link::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -60%;
	width: 36%;
	background: linear-gradient(100deg, transparent, rgba(157, 206, 255, .16), transparent);
	transform: skewX(-20deg);
	animation: mxsc-shine 5.5s ease-in-out infinite;
	pointer-events: none;
}

body a.mxsc-tile__link:hover,
body a.mxsc-tile__link:focus-visible {
	color: #fff !important;
	transform: translateY(-4px);
	box-shadow: 0 0 0 1px rgba(104, 181, 255, .7), 0 22px 44px -18px rgba(47, 128, 217, .75);
}

body a.mxsc-tile__link:focus-visible {
	outline: 2px solid #68b5ff !important;
	outline-offset: 3px;
}

body .mxsc-tile__ico {
	display: grid;
	place-items: center;
	width: 72px !important;
	height: 72px !important;
	margin: 0 0 6px !important;
	border: 1px solid rgba(104, 181, 255, .5);
	border-radius: 20px;
	background: rgba(104, 181, 255, .1);
	animation: mxsc-tile-glow 3.2s ease-in-out infinite;
}

body .mxsc-tile__ico svg {
	width: 44px !important;
	height: 44px !important;
	fill: none;
	stroke: #68b5ff;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	filter: drop-shadow(0 0 6px rgba(104, 181, 255, .55));
}

body .mxsc-tile__ico .a {
	fill: rgba(104, 181, 255, .22);
}

body .mxsc-tile__kicker {
	color: #68b5ff !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	letter-spacing: .14em !important;
	line-height: 1.2 !important;
	text-transform: uppercase !important;
}

body .mxsc-tile__title {
	display: block;
	margin: 0 !important;
	color: #fff !important;
	font-size: clamp(19px, 1.5vw, 23px) !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
}

body .mxsc-tile__text {
	color: #b4cce6 !important;
	font-size: 14.5px !important;
	line-height: 1.5 !important;
}

body .mxsc-tile__list {
	display: grid;
	gap: 8px;
	margin: 6px 0 18px !important;
}

body .mxsc-tile__list > span {
	position: relative;
	padding-left: 26px !important;
	color: #e8f4fb !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
}

body .mxsc-tile__list > span::before {
	content: "";
	position: absolute;
	top: 1px;
	left: 0;
	width: 17px;
	height: 17px;
	border: 1px solid rgba(104, 181, 255, .6);
	border-radius: 50%;
	background: rgba(104, 181, 255, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%2368b5ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat;
}

body .mxsc-tile__go {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	margin: auto 0 0 !important;
	padding: 0 16px !important;
	border-radius: 14px;
	background: linear-gradient(135deg, #2f80d9, #68b5ff);
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
	text-align: center !important;
	box-shadow: 0 10px 22px -12px rgba(104, 181, 255, .9);
	transition: box-shadow .25s, filter .25s;
}

body .mxsc-tile__go > span {
	display: inline-block;
	transition: transform .25s;
}

body a.mxsc-tile__link:hover .mxsc-tile__go {
	filter: brightness(1.08);
	box-shadow: 0 0 22px -2px rgba(104, 181, 255, .8);
}

body a.mxsc-tile__link:hover .mxsc-tile__go > span {
	transform: translateX(4px);
}

/* ---------- Przycisk w pasku nad listą ---------- */

body a.mxsc-tb {
	display: inline-flex !important;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	margin: 0 !important;
	padding: 0 20px !important;
	border: 1px solid #0b2b57 !important;
	border-radius: 999px !important;
	background: linear-gradient(135deg, #0b2b57, #12477f) !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	white-space: nowrap;
	text-decoration: none !important;
	box-shadow: 0 6px 16px -8px rgba(11, 43, 87, .7);
	transition: transform .2s, box-shadow .2s;
}

body a.mxsc-tb:hover,
body a.mxsc-tb:focus-visible {
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 0 0 3px rgba(104, 181, 255, .35), 0 8px 18px -8px rgba(11, 43, 87, .8);
}

body a.mxsc-tb svg {
	width: 18px !important;
	height: 18px !important;
	fill: none;
	stroke: #9dceff;
	stroke-width: 2;
	stroke-linecap: round;
}

/* ---------- Link na karcie produktu ---------- */

body .mxsc-pl-wrap {
	margin: 4px 0 16px !important;
	padding: 0 !important;
}

body a.mxsc-pl {
	display: flex !important;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 11px 14px !important;
	border: 1px solid #d3e4f7 !important;
	border-radius: 14px !important;
	background: linear-gradient(100deg, #f3f8ff, #fff) !important;
	color: #0b1739 !important;
	font-size: 14.5px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	text-decoration: none !important;
	transition: border-color .2s, box-shadow .2s;
}

body a.mxsc-pl:hover,
body a.mxsc-pl:focus-visible {
	border-color: #0073e6 !important;
	box-shadow: 0 0 0 3px rgba(0, 115, 230, .1);
}

body a.mxsc-pl svg {
	flex: 0 0 34px;
	width: 34px !important;
	height: 34px !important;
	padding: 7px;
	border-radius: 10px;
	background: #0b2b57;
	fill: none;
	stroke: #9dceff;
	stroke-width: 2;
	stroke-linecap: round;
}

body a.mxsc-pl > span:not(.mxsc-pl__go) {
	flex: 1;
	min-width: 0;
}

body .mxsc-pl__go {
	color: #0073e6;
	font-size: 18px;
	transition: transform .2s;
}

body a.mxsc-pl:hover .mxsc-pl__go {
	transform: translateX(4px);
}

/* ---------- Panel wysuwany ---------- */

html.mxsc-lock,
html.mxsc-lock body {
	overflow: hidden !important;
}

html.mxsc-lock body {
	padding-right: var(--mxsc-scrollbar, 0) !important;
}

.mxsc-drawer {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
}

.mxsc-drawer[hidden] {
	display: none !important;
}

.mxsc-drawer__scrim {
	position: absolute;
	inset: 0;
	background: rgba(3, 12, 28, .62);
	opacity: 0;
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	transition: opacity .35s ease;
	cursor: pointer;
}

.mxsc-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(1600px, calc(100vw - 48px));
	background: linear-gradient(160deg, #0a2142, #050f22);
	box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .65), -1px 0 0 rgba(104, 181, 255, .35);
	transform: translateX(104%);
	transition: transform .45s cubic-bezier(.22, .8, .24, 1);
	outline: none;
}

.mxsc-drawer.is-open .mxsc-drawer__scrim {
	opacity: 1;
}

.mxsc-drawer.is-open .mxsc-drawer__panel {
	transform: none;
}

/* Świecąca krawędź panelu. */
.mxsc-drawer__panel::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 2px;
	background: linear-gradient(180deg, transparent, #68b5ff 30%, #2f80d9 70%, transparent);
	opacity: .8;
	pointer-events: none;
}

.mxsc-drawer__bar {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 14px;
	min-height: 56px;
	padding: 8px 14px 8px 22px;
	border-bottom: 1px solid rgba(104, 181, 255, .2);
	background: rgba(5, 15, 34, .92);
	color: #e8f4fb;
	font-family: var(--mxsb-font-ui, var(--mxsb-font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif));
}

.mxsc-drawer__name {
	display: flex;
	flex: 1;
	align-items: center;
	gap: 10px;
	min-width: 0;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .02em;
}

.mxsc-drawer__name svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: #68b5ff;
	stroke-width: 2;
	stroke-linecap: round;
}

.mxsc-drawer a.mxsc-drawer__full {
	color: #9dceff !important;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}

.mxsc-drawer a.mxsc-drawer__full:hover {
	color: #fff !important;
}

.mxsc-drawer .mxsc-drawer__close {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 0 14px !important;
	border: 1px solid rgba(104, 181, 255, .45) !important;
	border-radius: 12px !important;
	background: rgba(104, 181, 255, .1) !important;
	color: #e8f4fb !important;
	font: inherit !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background .2s, border-color .2s;
}

.mxsc-drawer .mxsc-drawer__close:hover,
.mxsc-drawer .mxsc-drawer__close:focus-visible {
	border-color: #68b5ff !important;
	background: rgba(104, 181, 255, .24) !important;
	color: #fff !important;
}

.mxsc-drawer .mxsc-drawer__close svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
}

.mxsc-drawer__body {
	flex: 1;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* Konfigurator w panelu: bez zaokrągleń i marginesów strony. */
.mxsc-drawer .mxsc.mxsc.mxsc--drawer {
	min-height: 100% !important;
	margin: 0 !important;
	padding: clamp(16px, 2vw, 28px) clamp(14px, 2vw, 28px) 28px !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* Zanim dojdzie pełny CSS konfiguratora. */
.mxsc-drawer .mxsc-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	min-height: 60vh;
	color: #8fb0c3;
	font-family: var(--mxsb-font-ui, system-ui, sans-serif);
}

.mxsc-drawer .mxsc-loading__ring {
	width: 56px;
	height: 56px;
	border: 3px solid rgba(104, 181, 255, .15);
	border-top-color: #68b5ff;
	border-radius: 50%;
	box-shadow: 0 0 22px -4px rgba(104, 181, 255, .6);
	animation: mxsc-spin .9s linear infinite;
}

/* ---------- Szeroki pasek nad listą (opcjonalny) ---------- */

.mxsc-promo {
	position: relative;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 20px !important;
	padding: 14px 18px !important;
	overflow: hidden;
	border: 1px solid rgba(104, 181, 255, .52) !important;
	border-radius: 14px !important;
	background: linear-gradient(110deg, #071731 0%, #0b2b57 58%, #12477f 100%) !important;
	color: #e8f4fb !important;
	text-decoration: none !important;
	box-shadow: 0 12px 32px -18px rgba(4, 31, 70, .92);
	transition: transform .25s, box-shadow .25s;
}

body .mxsc-promo:hover {
	color: #fff !important;
	transform: translateY(-2px);
	box-shadow: 0 0 28px -6px rgba(104, 181, 255, .62);
}

body .mxsc-promo::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -40%;
	width: 30% !important;
	background: linear-gradient(100deg, transparent, rgba(157, 206, 255, .28), transparent) !important;
	transform: skewX(-20deg);
	animation: mxsc-shine 4.5s ease-in-out infinite;
}

body .mxsc-promo__ico {
	flex: 0 0 46px;
	width: 46px !important;
	height: 46px !important;
}

body .mxsc-promo__ico svg {
	width: 100% !important;
	height: 100% !important;
	fill: none;
	stroke: #68b5ff;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

body .mxsc-promo__ico .a {
	fill: rgba(104, 181, 255, .2);
}

body .mxsc-promo__txt {
	flex: 1;
	min-width: 0;
}

body .mxsc-promo__txt strong {
	display: block;
	font-size: 17px !important;
	line-height: 1.2 !important;
}

body .mxsc-promo__txt span {
	color: #b4cce6 !important;
	font-size: 13.5px !important;
}

body .mxsc-promo__go {
	flex: 0 0 auto;
	padding: 9px 16px !important;
	border: 1px solid #68b5ff !important;
	border-radius: 10px !important;
	background: rgba(104, 181, 255, .16) !important;
	color: #f5f9ff !important;
	font-size: 14px !important;
	font-weight: 800 !important;
	white-space: nowrap;
}

/* ---------- Responsywność ---------- */

@media (max-width: 900px) {
	.mxsc-drawer__panel {
		width: 100vw;
	}

	.mxsc-drawer__bar {
		padding-left: 14px;
	}

	.mxsc-drawer a.mxsc-drawer__full {
		display: none;
	}
}

@media (max-width: 640px) {
	body a.mxsc-tile__link {
		padding: 20px 16px 16px !important;
	}

	body .mxsc-tile__ico {
		width: 56px !important;
		height: 56px !important;
		border-radius: 16px;
	}

	body .mxsc-tile__ico svg {
		width: 34px !important;
		height: 34px !important;
	}

	body a.mxsc-tb span {
		display: none;
	}

	body a.mxsc-tb {
		padding: 0 12px !important;
	}

	.mxsc-drawer .mxsc-drawer__close span {
		display: none;
	}

	body .mxsc-promo {
		flex-wrap: wrap;
	}

	body .mxsc-promo__go {
		flex: 1 1 100%;
		text-align: center !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body a.mxsc-tile__link::after,
	body .mxsc-tile__ico,
	body .mxsc-promo::after {
		animation: none !important;
	}

	.mxsc-drawer__panel,
	.mxsc-drawer__scrim {
		transition: none !important;
	}
}
