/* ==========================================================================
   Промо-картки (sp_promo_cards)
   Візуальна мова — як у карток переваг і товарів сайту: біла картка,
   радіус 12px, тонка рамка. Колір картки — лише у тлі та іконці.
   ========================================================================== */
.sppc {
	--sppc-gap: 10px;
	--sppc-per: 2.5;           /* скільки карток видно в ряду (дробове — видно край наступної) */
	--sppc-ink: #111;
	--sppc-muted: #6b7280;
	--sppc-line: rgba(0, 0, 0, .06);
	position: relative;
	margin: 10px 0 30px;
}
@media (min-width: 480px)  { .sppc { --sppc-per: 3.2; } }
@media (min-width: 640px)  { .sppc { --sppc-per: 4.2; } }
@media (min-width: 768px)  { .sppc { --sppc-gap: 12px; --sppc-per: 5; } }
@media (min-width: 992px)  { .sppc { --sppc-per: 6; } }
@media (min-width: 1200px) { .sppc { --sppc-per: 7; } }
@media (min-width: 1400px) { .sppc { --sppc-per: 8; } }

/* Swiper: рамки/тінь карток не обрізаються */
.sppc-swiper {
	padding: 2px;
	margin: -2px;
}
.sppc-swiper .swiper-wrapper {
	align-items: stretch;
}
/* до ініціалізації Swiper — той самий відступ між картками */
.sppc:not(.is-ready) .sppc-card + .sppc-card {
	margin-left: var(--sppc-gap);
}

/* ---- картка ---- */
.sppc .sppc-card {
	--a: #1060c1;
	flex-shrink: 0;
	width: calc((100% - (var(--sppc-per) - 1) * var(--sppc-gap)) / var(--sppc-per));
	height: auto;
	min-width: 0;
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--sppc-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
	color: var(--sppc-ink);
	text-decoration: none;
	user-select: none;
	-webkit-user-drag: none;
	transition: border-color .2s ease;
	-webkit-tap-highlight-color: transparent;
}
a.sppc-card:hover,
a.sppc-card:focus {
	color: var(--sppc-ink);
	text-decoration: none;
}
a.sppc-card:hover {
	border-color: color-mix(in srgb, var(--a) 45%, transparent);
}
a.sppc-card:focus-visible {
	outline: 2px solid var(--a);
	outline-offset: 2px;
}

/* ---- зона іконки ---- */
.sppc-media {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	background: color-mix(in srgb, var(--a) 7%, #f7f8fb);
}
.sppc-art {
	display: block;
	width: 50%;
	aspect-ratio: 1;
}
.sppc-art svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

/* ---- текст ---- */
.sppc-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 12px 12px 14px;
}
.sppc-label {
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--a);
}
.sppc-big {
	margin-bottom: 2px;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.02em;
	color: var(--a);
	white-space: nowrap;
}
.sppc-title {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sppc-ink);
	text-wrap: balance;
	hyphens: auto;
}
.sppc-title em {
	font-style: normal;
}
.sppc-sub {
	margin-top: 3px;
	font-size: 12px;
	line-height: 1.35;
	color: var(--sppc-muted);
}

/* ==========================================================================
   Розширений вигляд (.sppc--rich) — вмикається в адмінці «Вид карточек».
   Замість іконки — повна ілюстрація-сцена (system/library/sp_promo_cards/illustrations.php).
   Простий вигляд вище не змінюється: щоб відкотити — перемкнути назад.
   ========================================================================== */
.sppc-scene {
	display: block;
	width: 100%;
	height: 100%;
}
.sppc-scene svg {
	display: block;
	width: 100%;
	height: 100%;
}
/* тони ілюстрацій рахуються від кольору картки (--a) */
.sppc-il .a   { fill: var(--a); }
.sppc-il .d   { fill: color-mix(in srgb, var(--a) 62%, #0b1430); }
.sppc-il .m   { fill: color-mix(in srgb, var(--a) 55%, #fff); }
.sppc-il .l   { fill: color-mix(in srgb, var(--a) 24%, #fff); }
.sppc-il .t   { fill: color-mix(in srgb, var(--a) 10%, #fff); }
.sppc-il .w   { fill: #fff; }
.sppc-il .bg  { fill: #fff; opacity: .6; }
.sppc-il .sh  { fill: color-mix(in srgb, var(--a) 50%, #0b1430); opacity: .14; }
.sppc-il .led { fill: #34d399; }
.sppc-il .nf  { fill: none; }
.sppc-il .sa  { stroke: var(--a); }
.sppc-il .sd  { stroke: color-mix(in srgb, var(--a) 62%, #0b1430); }
.sppc-il .sm  { stroke: color-mix(in srgb, var(--a) 55%, #fff); }
.sppc-il .sl  { stroke: color-mix(in srgb, var(--a) 24%, #fff); }
.sppc-il .sw  { stroke: #fff; }
.sppc-il text { font-family: Montserrat, Arial, sans-serif; }

/* вузькі картки (телефони, планшети): компактніший текст, щоб довгі слова вміщались */
@container (max-width: 150px) {
	.sppc-body { padding: 10px 10px 12px; }
	.sppc-title { font-size: 13px; }
	.sppc-big { font-size: 22px; }
}

/* ---- скролбар (можна тягнути) ---- */
.sppc .sppc-scrollbar.swiper-scrollbar {
	position: relative;
	left: auto;
	bottom: auto;
	width: 100%;
	max-width: 320px;
	height: 4px;
	margin: 16px auto 0;
	border-radius: 4px;
	background: rgba(0, 0, 0, .06);
}
.sppc .sppc-scrollbar .swiper-scrollbar-drag {
	border-radius: 4px;
	background: rgba(0, 0, 0, .28);
	cursor: grab;
}
.sppc .sppc-scrollbar.swiper-scrollbar-lock {
	display: none;
}

/* ---- кнопки прокрутки (лише для миші) ---- */
.sppc-nav {
	position: absolute;
	top: calc(50% - 10px); /* центр карток, без скролбара */
	z-index: 2;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	display: none;
	place-items: center;
	padding: 0;
	border: 1px solid var(--sppc-line);
	border-radius: 50%;
	background: #fff;
	color: var(--sppc-ink);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
	cursor: pointer;
}
.sppc-nav svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.sppc-prev { left: -16px; }
.sppc-next { right: -16px; }
.sppc-nav:disabled,
.sppc-nav.swiper-button-disabled { visibility: hidden; }
.sppc-nav.swiper-button-lock { display: none !important; }
.sppc:not(.is-ready) .sppc-nav { display: none; }
@media (hover: hover) and (min-width: 768px) {
	.sppc-nav { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
	.sppc-card { transition: none; }

}
