/* S-M Limited - начална страница. Спецификация: makets/final/nachalna-desktop.html, nachalna-mobile.html
   (inline стиловете), design/dc/Начална.dc.html (hover). Всички правила са с префикс на секцията си
   (.sm-hero, .sm-home-*, .sm-why, .sm-materials) - .sm-why и .sm-materials се ползват и извън началната
   (за нас, продукт), затова нямат зависимост от обвивка. */

/* ---------- Общи за началната: заглавие на секция + линк с жълта черта ---------- */
.sm-home-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 24px;
}

.sm-home-h2 {
	margin: 0;
	font-size: 28px;
	font-weight: 800;
	line-height: normal;
}

.sm-home-link {
	font-size: 14px;
	font-weight: 600;
	border-bottom: 2px solid var(--sm-accent);
	white-space: nowrap;
}

/* ---------- Hero ---------- */
.sm-hero {
	position: relative;
	background: #F2EFEA;
}

.sm-hero__media {
	position: relative;
	height: 560px;
}

.sm-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 70% 42%;
}

.sm-hero__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(255, 255, 255, .88) 0%, rgba(255, 255, 255, .6) 34%, rgba(255, 255, 255, 0) 58%);
	pointer-events: none;
}

.sm-hero__inner {
	position: absolute;
	inset: 0;
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	pointer-events: none;
	box-sizing: border-box;
}

.sm-hero__content {
	max-width: 470px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	pointer-events: auto;
}

.sm-hero__title {
	margin: 0;
	font-size: 48px;
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.sm-hero__text {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
	color: var(--sm-ink);
	text-wrap: pretty;
}

.sm-hero__pills {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 6px;
}

.sm-hero__pill {
	height: 46px;
	padding: 0 22px;
	border-radius: 23px;
	background: #FFFFFF;
	color: var(--sm-ink);
	font-weight: 700;
	display: flex;
	align-items: center;
	box-shadow: inset 0 0 0 1px var(--sm-line);
	box-sizing: border-box;
}

.sm-hero__pill:hover,
.sm-hero__pill:focus-visible {
	box-shadow: inset 0 0 0 2px var(--sm-accent);
}

/* ---------- Категории: снимка на цяла ширина + ред „Най-харесвани …" ---------- */
.sm-home-cats {
	padding: 80px 0;
	display: flex;
	flex-direction: column;
	gap: 72px;
}

.sm-home-cat {
	display: flex;
	flex-direction: column;
}

.sm-home-cat__banner {
	position: relative;
	height: 520px;
	overflow: hidden;
	background: var(--sm-img);
}

.sm-home-cat__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 32%;
}

.sm-home-cat--2 .sm-home-cat__img {
	object-position: 50% 30%;
}

.sm-home-cat--3 .sm-home-cat__img {
	object-position: 50% 22%;
}

.sm-home-cat--4 .sm-home-cat__img {
	object-position: 50% 62%;
}

.sm-home-cat__shade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 60%;
	background: linear-gradient(0deg, rgba(0, 0, 0, .42), rgba(0, 0, 0, 0));
	pointer-events: none;
}

.sm-home-cat__body {
	position: absolute;
	left: 40px;
	right: 40px;
	bottom: 40px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	pointer-events: none;
}

.sm-home-cat__title {
	margin: 0;
	font-size: 52px;
	line-height: 1;
	font-weight: 800;
	color: #FFFFFF;
}

.sm-home-cat__title a,
.sm-home-cat__title a:hover {
	color: #FFFFFF;
	pointer-events: auto;
}

.sm-home-cat__subs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	pointer-events: auto;
}

.sm-home-cat__sub {
	height: 48px;
	padding: 0 24px;
	border-radius: var(--sm-radius);
	background: var(--sm-ink);
	color: #FFFFFF;
	font-size: 15px;
	font-weight: 700;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	transition: background .2s, color .2s;
}

.sm-home-cat__sub:focus-visible,
.sm-home-cat__sub:hover {
	background: #FFFFFF;
	color: var(--sm-ink);
}

.sm-home-cat__row {
	width: 100%;
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: 32px 20px 0;
	box-sizing: border-box;
}

.sm-home-head--row {
	margin-bottom: 20px;
}

.sm-home-cat__label {
	font-size: 15px;
	font-weight: 700;
}

.sm-home-cat__rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 48px) / 4);
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.sm-home-cat__rail::-webkit-scrollbar,
.sm-home-promo__rail::-webkit-scrollbar {
	display: none;
}

.sm-home-cat__item {
	min-width: 0;
	scroll-snap-align: start;
}

/* ---------- Нова колекция ---------- */
.sm-home-new {
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: 0 20px 80px;
	box-sizing: border-box;
}

.sm-home-new__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px 16px;
}

.sm-home-new__item {
	min-width: 0;
}

.sm-home-new__more {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.sm-home-new__btn {
	height: 48px;
	padding: 0 28px;
	border: 1px solid var(--sm-ink);
	border-radius: var(--sm-radius);
	display: flex;
	align-items: center;
	font-weight: 700;
	box-sizing: border-box;
}

/* ---------- „Защо не сме по-скъпи?" ---------- */
.sm-why {
	border-top: 1px solid var(--sm-line);
	font-size: 15px;
}

.sm-why__inner {
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: 80px 20px;
	box-sizing: border-box;
}

.sm-why__title {
	margin: 0 0 32px;
	font-size: 28px;
	font-weight: 800;
	line-height: normal;
	text-align: center;
}

.sm-why__cols {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}

.sm-why__col {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sm-why__icon {
	display: block;
	color: var(--sm-ink);
}

.sm-why__h3 {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	line-height: normal;
}

.sm-why__text {
	margin: 0;
	color: var(--sm-muted);
	line-height: 1.5;
}

.sm-why__bottom {
	margin: 40px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--sm-line);
	font-size: 16px;
	font-weight: 600;
	line-height: normal;
	text-align: center;
	text-wrap: balance;
}

.sm-why__bottom mark {
	background: linear-gradient(transparent 62%, var(--sm-accent) 62%);
	color: inherit;
}

/* ---------- „Материите на първо място" (+ Oeko-Tex) ---------- */
.sm-materials {
	background: var(--sm-surface);
	font-size: 15px;
}

.sm-materials__inner {
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: 56px 20px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 28px;
}

.sm-materials__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-width: 560px;
}

.sm-materials__title {
	margin: 0;
	font-size: 28px;
	font-weight: 800;
	line-height: normal;
}

.sm-materials__text {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	text-wrap: balance;
}

.sm-materials__badges {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
	text-align: left;
}

.sm-materials__badge {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #FFFFFF;
	border-radius: var(--sm-radius);
	padding: 14px 18px;
}

.sm-materials__mark {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	color: var(--sm-ink);
}

.sm-materials__mark--oeko {
	border: 1.5px solid var(--sm-ink);
	font-size: 9px;
	font-weight: 800;
	letter-spacing: .02em;
}

.sm-materials__mark--ok {
	background: var(--sm-mint);
}

.sm-materials__lines {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.sm-materials__b {
	font-size: 14px;
	font-weight: 700;
}

.sm-materials__s {
	font-size: 13px;
	color: var(--sm-muted);
}

/* ---------- Промоции (карусел) ---------- */
.sm-home-promo {
	position: relative;
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: 80px 20px;
	box-sizing: border-box;
}

.sm-home-head--promo {
	align-items: center;
}

.sm-home-promo__rail {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.sm-home-promo__item {
	flex: none;
	width: calc((100% - 48px) / 4);
	min-width: 0;
	scroll-snap-align: start;
}

/* Стрелките от макета без JS: CSS ::scroll-button() на релсата (Chromium 135+).
   Браузър без поддръжка - без стрелки, релсата се скролва с тъчпад/Shift+колелце. */
@supports selector(::scroll-button(*)) {
	@media (min-width: 768px) {
		/* Редът със заглавието е висок колкото стрелките (40px), място за тях вдясно от линка. */
		.sm-home-head--promo {
			min-height: 40px;
		}

		.sm-home-head--promo .sm-home-link {
			margin-right: 104px;
		}

		.sm-home-promo__rail::scroll-button(*) {
			position: absolute;
			top: 80px;
			width: 40px;
			height: 40px;
			border: 1px solid var(--sm-line);
			border-radius: var(--sm-radius);
			background: #FFFFFF;
			color: var(--sm-ink);
			display: flex;
			align-items: center;
			justify-content: center;
			padding: 0;
			box-sizing: border-box;
			cursor: pointer;
		}

		.sm-home-promo__rail::scroll-button(left) {
			content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 22 22' fill='none' stroke='%231F1F1F' stroke-width='1.5'%3E%3Cpath d='M14 5l-6 6 6 6'/%3E%3C/svg%3E") / attr(data-prev);
			right: 72px;
		}

		.sm-home-promo__rail::scroll-button(right) {
			content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 22 22' fill='none' stroke='%231F1F1F' stroke-width='1.5'%3E%3Cpath d='M8 5l6 6-6 6'/%3E%3C/svg%3E") / attr(data-next);
			right: 20px;
		}

		.sm-home-promo__rail::scroll-button(*):hover {
			border-color: var(--sm-ink);
		}

		.sm-home-promo__rail::scroll-button(*):focus-visible {
			outline: 2px solid var(--sm-ink);
			outline-offset: 2px;
		}

		.sm-home-promo__rail::scroll-button(*):disabled {
			opacity: .4;
			cursor: default;
		}
	}
}

/* ---------- Отзиви ---------- */
.sm-home-reviews {
	max-width: var(--sm-container);
	margin: 0 auto;
	padding: 0 20px 80px;
	box-sizing: border-box;
}

.sm-home-reviews__title {
	margin-bottom: 24px;
}

.sm-home-reviews__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.sm-home-review {
	margin: 0;
	background: var(--sm-surface);
	border-radius: var(--sm-radius);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sm-home-review__stars {
	display: flex;
	align-items: center;
	gap: 3px;
	min-height: 22px;
	color: var(--sm-accent);
}

.sm-home-review__stars svg {
	display: block;
	flex: none;
}

.sm-home-review__text {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	text-wrap: pretty;
}

.sm-home-review__name {
	font-size: 14px;
	font-weight: 700;
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
}

.sm-home-review__img {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 30%;
	flex: none;
}

/* ---------- 768-1279: desktop клонът с флуидна мрежа (3 карти на ред) ---------- */
@media (min-width: 768px) and (max-width: 1279px) {
	.sm-home-new__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sm-home-cat__rail {
		grid-auto-columns: calc((100% - 32px) / 3);
	}

	.sm-home-promo__item {
		width: calc((100% - 32px) / 3);
	}
}

/* ---------- Мобилно (390px клонът на макета) ---------- */
@media (max-width: 767px) {
	.sm-home-h2 {
		font-size: 22px;
	}

	/* Hero: снимка 420px, текстът под нея на бяло. */
	.sm-hero__media {
		height: 420px;
	}

	.sm-hero__img {
		object-position: 58% 50%;
	}

	.sm-hero__shade {
		display: none;
	}

	.sm-hero__inner {
		position: static;
		display: block;
		max-width: none;
		padding: 0;
		pointer-events: auto;
	}

	.sm-hero__content {
		max-width: none;
		background: #FFFFFF;
		padding: 28px 16px 8px;
		gap: 14px;
	}

	.sm-hero__title {
		font-size: 32px;
		line-height: 1.12;
		letter-spacing: 0;
	}

	.sm-hero__text {
		font-size: 15px;
	}

	.sm-hero__pills {
		flex-wrap: nowrap;
		gap: 8px;
		overflow-x: auto;
		margin: 4px -16px 0;
		padding: 0 16px;
		scrollbar-width: none;
	}

	.sm-hero__pill {
		flex: none;
		height: 44px;
		padding: 0 18px;
		border-radius: 22px;
		background: transparent;
		border: 1px solid var(--sm-ink);
		box-shadow: none;
	}

	.sm-hero__pill:hover,
	.sm-hero__pill:focus-visible {
		box-shadow: none;
	}

	/* Категории. */
	.sm-home-cats {
		padding: 48px 0;
		gap: 48px;
	}

	.sm-home-cat__banner {
		height: 480px;
	}

	.sm-home-cat--1 .sm-home-cat__img {
		object-position: 38% 40%;
	}

	.sm-home-cat--2 .sm-home-cat__img {
		object-position: 62% 40%;
	}

	.sm-home-cat--3 .sm-home-cat__img {
		object-position: 50% 30%;
	}

	.sm-home-cat--4 .sm-home-cat__img {
		object-position: 72% 60%;
	}

	.sm-home-cat__body {
		left: 16px;
		right: 16px;
		bottom: 16px;
		gap: 14px;
	}

	.sm-home-cat__title {
		font-size: 34px;
	}

	.sm-home-cat__sub {
		height: 44px;
		padding: 0 16px;
		font-size: 14px;
	}

	.sm-home-cat__row {
		padding: 24px 16px 0;
	}

	.sm-home-cat__rail {
		grid-auto-columns: 44%;
		gap: 12px;
		margin: 0 -16px;
		padding: 0 16px;
		scroll-padding-inline: 16px;
	}

	/* Нова колекция. */
	.sm-home-new {
		padding: 0 16px 48px;
	}

	.sm-home-new__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Защо не сме по-скъпи? */
	.sm-why__inner {
		padding: 48px 16px;
	}

	.sm-why__title {
		font-size: 22px;
		text-align: left;
	}

	.sm-why__cols {
		grid-template-columns: minmax(0, 1fr);
	}

	.sm-why__bottom {
		text-align: left;
	}

	/* Материите. */
	.sm-materials__inner {
		padding: 40px 16px;
	}

	.sm-materials__title {
		font-size: 22px;
	}

	/* Промоции. */
	.sm-home-promo {
		padding: 48px 16px;
	}

	.sm-home-promo__rail {
		margin: 0 -16px;
		padding: 0 16px;
		scroll-padding-inline: 16px;
	}

	.sm-home-promo__item {
		width: 62%;
	}

	/* Отзиви. */
	.sm-home-reviews {
		padding: 0 16px 48px;
	}

	.sm-home-reviews__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
