/*
 * „Продукти“, „Най-продавани“ и лентата с карти (470-produkti.php).
 * Стойностите — от 400-dizayn/dizayn.css. Картите са от 440.
 */

/* ---------- Avada: без заглавната лента и страничната колона ---------- */

html body.sp-produkti-str .avada-page-titlebar-wrapper,
html body.sp-produkti-str .fusion-page-title-bar,
html body.sp-produkti-str #sidebar {
	display: none !important;
}

html body.sp-produkti-str #main {
	padding-top: var(--sp-6) !important;
	padding-bottom: var(--sp-16) !important;
	background-color: var(--sp-fon) !important;
}

html body.sp-produkti-str #main #content {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
}

html body.sp-produkti-str .post-content,
html body.sp-produkti-str #content > .post,
html body.sp-produkti-str #content > article {
	margin: 0 !important;
	padding: 0 !important;
}

/* ---------- Общото на двете страници ---------- */

.sp-pr {
	display: flex;
	flex-direction: column;
	gap: var(--sp-8);
	color: var(--sp-mastilo);
	font-family: var(--sp-shrift);
}

.sp-pr__glava {
	display: flex;
	flex-direction: column;
	gap: var(--sp-2);
}

html body .sp-pr .sp-pr__ime {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--sp-mastilo) !important;
	font-family: var(--sp-shrift) !important;
	font-size: 34px !important;
	line-height: 40px !important;
	font-weight: 800 !important;
	letter-spacing: -0.02em !important;
	text-transform: none !important;
}

.sp-pr__pod {
	margin: 0 !important;
	color: var(--sp-grafit);
	font-size: 16px;
	line-height: 24px;
}

.sp-pr .sp-kat-put {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
	color: var(--sp-sivo);
	font-size: 14px;
	line-height: 20px;
}

.sp-pr .sp-kat-put a {
	color: var(--sp-marka) !important;
}

/* ---------- „Продукти“: бързите връзки ---------- */

.sp-pr__skok {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
}

html body .sp-pr__skok a {
	height: 36px;
	box-sizing: border-box;
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--sp-linia);
	border-radius: 18px;
	background: var(--sp-byalo);
	color: var(--sp-mastilo) !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
}

html body .sp-pr__skok a:hover {
	border-color: var(--sp-marka);
	color: var(--sp-marka) !important;
}

/* ---------- „Продукти“: категориите по две ---------- */

.sp-pr__mreja {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--sp-6);
	align-items: start;
}

.sp-pr-kat {
	scroll-margin-top: 140px;
	box-sizing: border-box;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: var(--sp-byalo);
	border: 1px solid var(--sp-linia);
	border-radius: var(--sp-ugal-karta);
}

html body .sp-pr-kat__glava {
	display: flex;
	align-items: center;
	gap: var(--sp-4);
	color: var(--sp-mastilo) !important;
	text-decoration: none !important;
}

.sp-pr-kat__snimka {
	width: 72px !important;
	height: 72px !important;
	flex-shrink: 0;
	box-sizing: border-box;
	border: 1px solid var(--sp-linia-svetla);
	border-radius: var(--sp-ugal);
	background: var(--sp-byalo);
	object-fit: contain;
}

.sp-pr-kat__tekst {
	flex-grow: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

html body .sp-pr-kat .sp-pr-kat__ime {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--sp-mastilo) !important;
	font-family: var(--sp-shrift) !important;
	font-size: 20px !important;
	line-height: 26px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
}

.sp-pr-kat__broy {
	color: var(--sp-sivo);
	font-size: 14px;
	line-height: 20px;
}

.sp-pr-kat__vsichki {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--sp-marka);
	font-size: 15px;
	font-weight: 600;
}

html body .sp-pr-kat__glava:hover .sp-pr-kat__ime {
	color: var(--sp-marka) !important;
}

.sp-pr-kat__vidove {
	margin: 0 !important;
	padding: 14px 0 0 !important;
	list-style: none !important;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	border-top: 1px solid var(--sp-linia-svetla);
}

.sp-pr-kat__vidove li {
	margin: 0 !important;
	padding: 0 !important;
}

.sp-pr-kat__vidove li::before {
	display: none !important;
}

html body .sp-pr-kat__vidove a {
	height: 32px;
	box-sizing: border-box;
	padding: 0 11px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--sp-linia);
	border-radius: var(--sp-ugal);
	background: var(--sp-byalo);
	color: var(--sp-mastilo) !important;
	font-size: 14px;
	line-height: 18px;
	text-decoration: none !important;
	white-space: nowrap;
}

html body .sp-pr-kat__vidove a:hover {
	border-color: var(--sp-marka);
}

.sp-pr-kat__vidove a span {
	color: var(--sp-sivo);
	font-size: 12px;
}

/* ---------- „Не намирате нужното?“ ---------- */

.sp-pr__pomosht {
	padding: 24px 28px;
	display: flex;
	align-items: center;
	gap: 20px;
	background: var(--sp-byalo);
	border: 1px solid var(--sp-linia);
	border-radius: var(--sp-ugal-karta);
}

.sp-pr__pomosht-ikona {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 24px;
	background: var(--sp-marka-svetlo);
	color: var(--sp-marka);
}

.sp-pr__pomosht-tekst {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 15px;
	line-height: 22px;
	color: var(--sp-grafit);
}

.sp-pr__pomosht-tekst strong {
	color: var(--sp-mastilo);
	font-size: 18px;
	line-height: 24px;
}

html body .sp-pr__pomosht-buton {
	height: 48px;
	box-sizing: border-box;
	padding: 0 20px;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	border: 1px solid var(--sp-mastilo);
	border-radius: var(--sp-ugal);
	color: var(--sp-mastilo) !important;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none !important;
}

/* ---------- „Най-продавани“: мрежата на цялата ширина — по 5 на ред ---------- */

html body ul.products.sp-k-mreja.sp-pr__vse {
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

/* ---------- Лентата с карти за плъзгане (и на началната) ---------- */

.sp-lenta {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	font-family: var(--sp-shrift);
}

.sp-lenta__glava {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--sp-4);
}

html body .sp-lenta .sp-lenta__zaglavie {
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--sp-mastilo) !important;
	font-family: var(--sp-shrift) !important;
	font-size: 30px !important;
	line-height: 36px !important;
	font-weight: 800 !important;
	letter-spacing: -0.02em !important;
	text-transform: none !important;
}

.sp-lenta__ikona {
	display: inline-flex;
	color: var(--sp-marka);
}

.sp-lenta__kvadrat {
	width: 10px;
	height: 10px;
	flex-shrink: 0;
	background: var(--sp-deystvie);
}

html body .sp-lenta__vsichki {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--sp-marka) !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
}

html body .sp-lenta__vsichki:hover {
	text-decoration: underline !important;
}

.sp-lenta__vsichki-kratko {
	display: none;
}

.sp-lenta__ramka {
	position: relative;
	min-width: 0;
}

/* Редът: една линия карти, които се плъзгат. */
html body ul.products.sp-k-mreja.sp-lenta__red {
	display: grid !important;
	grid-auto-flow: column;
	grid-template-columns: none !important;
	grid-auto-columns: 248px;
	gap: 20px;
	margin: 0 !important;
	padding: 2px 0 6px !important;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

html body ul.products.sp-k-mreja.sp-lenta__red::-webkit-scrollbar {
	display: none;
}

html body ul.products.sp-k-mreja.sp-lenta__red > li.product {
	scroll-snap-align: start;
}

.sp-lenta__strelka {
	position: absolute;
	top: 102px;
	z-index: 2;
	width: 44px;
	height: 44px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--sp-linia);
	border-radius: 22px;
	background: var(--sp-byalo);
	color: var(--sp-mastilo);
	box-shadow: 0 2px 8px rgba(22, 24, 27, 0.12);
	cursor: pointer;
}

.sp-lenta__strelka--nazad {
	left: -22px;
}

.sp-lenta__strelka--napred {
	right: -22px;
}

.sp-lenta__strelka:disabled {
	opacity: 0;
	pointer-events: none;
}

.sp-lenta__strelka:focus-visible {
	outline: 2px solid var(--sp-marka);
	outline-offset: 2px;
}

/* Без JS стрелките са безполезни. */
html:not(.sp-lenta-js) .sp-lenta__strelka {
	display: none;
}

/* ---------- Телефон ---------- */

@media (max-width: 1023px) {
	html body.sp-produkti-str #main {
		padding: var(--sp-3) var(--sp-4) var(--sp-8) !important;
	}

	.sp-pr {
		gap: var(--sp-6);
	}

	html body .sp-pr .sp-pr__ime {
		font-size: 26px !important;
		line-height: 32px !important;
	}

	.sp-pr__pod {
		font-size: 14px;
		line-height: 20px;
	}

	/* Бързите връзки — в един ред, плъзгат се. */
	.sp-pr__skok {
		flex-wrap: nowrap;
		margin: 0 calc(-1 * var(--sp-4));
		padding: 0 var(--sp-4);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.sp-pr__skok a {
		flex-shrink: 0;
	}

	.sp-pr__mreja {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--sp-3);
		margin: 0 calc(-1 * var(--sp-4));
	}

	.sp-pr-kat {
		padding: 12px 0;
		gap: 10px;
		border-left: 0;
		border-right: 0;
		border-radius: 0;
	}

	.sp-pr-kat__glava {
		padding: 0 var(--sp-3) 0 var(--sp-4);
	}

	.sp-pr-kat__snimka {
		width: 88px !important;
		height: 88px !important;
	}

	html body .sp-pr-kat .sp-pr-kat__ime {
		font-size: 17px !important;
		line-height: 22px !important;
	}

	.sp-pr-kat__vsichki {
		font-size: 0;
		color: var(--sp-ramka);
	}

	/* Видовете — в един ред, плъзгат се. */
	.sp-pr-kat__vidove {
		flex-wrap: nowrap;
		padding: 0 var(--sp-4) 2px !important;
		border-top: 0;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.sp-pr-kat__vidove li {
		flex-shrink: 0;
	}

	html body .sp-pr-kat__vidove a {
		height: 34px;
	}

	html body ul.products.sp-k-mreja.sp-pr__vse {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sp-pr__pomosht {
		flex-direction: column;
		align-items: flex-start;
		padding: 20px;
	}

	html body .sp-pr__pomosht-buton {
		width: 100%;
		justify-content: center;
	}

	/* Лентата — по 156 px, до ръба на екрана. */
	.sp-lenta {
		gap: 14px;
	}

	html body .sp-lenta .sp-lenta__zaglavie {
		gap: 8px;
		font-size: 22px !important;
		line-height: 28px !important;
	}

	.sp-lenta__vsichki-dalgo {
		display: none;
	}

	.sp-lenta__vsichki-kratko {
		display: inline;
	}

	html body ul.products.sp-k-mreja.sp-lenta__red {
		grid-auto-columns: 156px;
		gap: 12px;
		margin: 0 calc(-1 * var(--sp-4)) !important;
		padding: 2px var(--sp-4) 6px !important;
		scroll-padding: 0 var(--sp-4);
	}

	.sp-lenta__strelka {
		display: none !important;
	}
}
