/**
 * Главная. Размеры, шрифты и цвета сняты с боевого посадика.рф
 * (storefront/css/style.css + вычисленные стили), классы — свои.
 */

@font-face { font-family:"Roboto"; src:url("../fonts/Robotomediumitalic.woff2") format("woff2"),url("../fonts/Robotomediumitalic.woff") format("woff"); font-weight:500; font-style:italic; font-display:swap; }

/* Размеры как в бутстрапе боевого: ширина и высота включают отступы. */
.pos-banner, .pos-banner *, .pos-home-blocks, .pos-home-blocks *, .pos-home-blocks *::before, .pos-home-blocks *::after { box-sizing: border-box; }

/* Содержимое страницы главной не выводится — убираем пустую обёртку. */
.pos-home .site-main > article { display: none; }
.pos-home .site-content { padding-top: 0; }
.pos-home .site-main { margin: 0; }

/* ---------- Заголовок блока: зелёная плашка с цветками ---------- */
.pos-hhead {
	text-align: center;
	padding: 20px 0 40px;
}
.pos-hhead--nursery { padding-bottom: 60px; }
.pos-hhead__title {
	position: relative;
	display: inline-block;
	width: 450px;
	max-width: calc(100% - 140px);
	padding: 2px 0;
	border-radius: 50px;
	background: #4fad10;
	color: #fff;
	font-family: var(--pos-font-body);
	font-weight: 500;
	font-size: 30px;
	line-height: 1.43;
	text-transform: uppercase;
}
.pos-hhead__title::before,
.pos-hhead__title::after {
	content: "";
	position: absolute;
	top: -4px;
	width: 58px;
	height: 51px;
	background: url("../images/home/flower.svg") center / 58px no-repeat;
}
.pos-hhead__title::before { left: -95px; }
.pos-hhead__title::after { right: -95px; }

/* ---------- Баннер ---------- */
.pos-banner { position: relative; overflow: hidden; }
.pos-banner__item { display: none; }
.pos-banner__item.is-active { display: block; }
.pos-banner__item a { display: block; }
.pos-banner__item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1519 / 474;
	object-fit: cover;
}
.pos-banner__nav {
	position: absolute;
	top: 50%;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .8);
	cursor: pointer;
}
.pos-banner__nav::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11px;
	height: 11px;
	border: solid #2f2620;
	border-width: 0 2px 2px 0;
}
.pos-banner__nav--prev { left: 20px; }
.pos-banner__nav--prev::before { transform: translate(-30%, -50%) rotate(135deg); }
.pos-banner__nav--next { right: 20px; }
.pos-banner__nav--next::before { transform: translate(-70%, -50%) rotate(-45deg); }

.pos-home-blocks { padding-top: 40px; }

/* ---------- Лучшие категории ---------- */
.pos-best { margin-bottom: 40px; }
.pos-best__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 25px;
	row-gap: 30px;
}
.pos-best__item {
	position: relative;
	display: block;
	transition: transform .5s;
}
.pos-best__item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 445 / 337;
	object-fit: cover;
}
.pos-best__name {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: block;
	padding: 18px 6px;
	border: 1px solid #e6e6e6;
	background: rgba(255, 255, 255, .76);
	color: #3c3524;
	font-family: var(--pos-font-body);
	font-weight: 500;
	font-size: 18px;
	line-height: 1.43;
	text-align: center;
	text-transform: uppercase;
	transition: color .5s;
}
.pos-best__item:hover .pos-best__name { color: #000; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.pos-best__item:hover { transform: scale(1.1); z-index: 2; }
}

/* ---------- Почему покупают у нас ---------- */
.pos-adv__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 30px;
	padding-bottom: 30px;
}
.pos-adv__item {
	min-height: 327px;
	padding: 60px 10px 20px;
	background: #f5f5f5;
	color: #2f2620;
	text-align: center;
	transition: all .5s;
}
.pos-adv__item img { display: inline-block; max-width: 100%; height: auto; }
.pos-adv__text {
	margin-top: 10px;
	font-family: var(--pos-font-body);
	font-weight: 500;
	font-style: italic;
	font-size: 25px;
	line-height: 1.2;
}
@media (hover: hover) {
	.pos-adv__item:hover {
		position: relative;
		z-index: 2;
		background: #4fad10;
		color: #fff;
		box-shadow: 0 0 13px -2px rgba(120, 119, 120, .65);
	}
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.pos-adv__item:hover { transform: scale(1.1); }
}

/* ---------- Садовый блог ---------- */
.pos-blog { position: relative; margin-top: 40px; }
.pos-blog .pos-container { position: relative; padding-bottom: 65px; }
.pos-blog__viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.pos-blog__viewport::-webkit-scrollbar { display: none; }
.pos-blog__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 26px) / 2);
	column-gap: 26px;
}
.pos-blog__card {
	display: flex;
	scroll-snap-align: start;
	border: 1px solid #e6e6e6;
	background: #fff;
}
.pos-blog__img {
	flex: 0 0 300px;
	height: 300px;
	overflow: hidden;
	background: #dfdcdc;
}
.pos-blog__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.pos-blog__img img.is-empty { width: 100px; height: 100px; margin: 100px auto; object-fit: contain; }
.pos-blog__body {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 400px;
	padding: 30px 20px 20px 25px;
	font-family: var(--pos-font-body);
	font-weight: 500;
}
.pos-blog__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	padding-bottom: 10px;
	margin-bottom: 15px;
	border-bottom: 1px solid #eee;
	font-size: 14px;
	line-height: 1.43;
}
.pos-blog__title {
	max-width: 250px;
	color: #6fa91c;
	text-transform: uppercase;
}
.pos-blog__title:hover { color: #4fad10; text-decoration: underline; }
.pos-blog__date { flex: none; color: #2f2620; }
.pos-blog__text {
	margin: 0;
	color: #2f2620;
	font-size: 14px;
	line-height: 1.43;
}
.pos-blog__foot {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	height: 50px;
	margin-top: 20px;
	border: 1px solid #e9e9e9;
	border-radius: 50px;
	text-align: center;
}
.pos-blog__cat {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 190px;
	padding: 0 10px;
	border-radius: 50px;
	color: #4fad10;
	font-size: 16px;
	line-height: 1.2;
	text-transform: uppercase;
}
.pos-blog__more {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 150px;
	margin: -1px -1px -1px auto;
	border-radius: 50px;
	background: #4fad10;
	color: #fff;
	font-weight: 400;
	font-size: 14px;
}
.pos-blog__more:hover { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
	.pos-blog__more:hover { animation: posPulse 1s infinite; }
}
.pos-blog__nav {
	margin: 30px 0 0;
	text-align: center;
}
.pos-blog__arrow {
	padding: 0 40px;
	border: 0;
	background: none;
	cursor: pointer;
	line-height: 0;
}
.pos-blog__arrow:disabled { opacity: .3; cursor: default; }
.pos-blog .pos-blog__arrow:hover,
.pos-blog .pos-blog__arrow:focus,
.pos-blog .pos-blog__arrow:active { background: none; box-shadow: none; }
.pos-blog .pos-blog__arrow:focus-visible { outline: 2px solid #4fad10; outline-offset: 4px; }
.pos-banner .pos-banner__nav:hover, .pos-banner .pos-banner__nav:focus { background: #fff; }
.pos-blog__all {
	position: absolute;
	right: 25px;
	bottom: 66px;
	z-index: 2;
	color: #2f2620;
	font-family: var(--pos-font-head);
	font-weight: 700;
	font-size: 20px;
	text-transform: uppercase;
}
.pos-blog__all img { margin: -4px 0 0 25px; vertical-align: middle; }
.pos-blog__all:hover { color: #4fad10; }

/* ---------- Подписка ---------- */
.pos-sub {
	height: 370px;
	margin-bottom: 30px;
	padding-top: 60px;
	background: url("../images/home/bg-form.jpg") center / cover no-repeat;
	background-image: image-set(url("../images/home/bg-form.avif") type("image/avif"), url("../images/home/bg-form.jpg") type("image/jpeg"));
}
.pos-sub__text {
	font-family: var(--pos-font-body);
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
}
.pos-sub__t1 { padding-left: 52px; color: #333; font-size: 40px; line-height: 1.43; }
.pos-sub__t2 { padding: 3px 0 0 150px; color: #2f2620; font-size: 25px; line-height: 1.43; }
.pos-sub__t3 { padding-left: 320px; color: #1a0f0b; font-size: 40px; line-height: 1.43; }
.pos-sub__t3 span { color: #00c939; font-size: 50px; }
.pos-sub__form {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	width: 856px;
	max-width: 100%;
	margin: 20px auto 0;
}
.pos-sub .pos-sub__input {
	width: 250px;
	height: 70px;
	margin-right: 30px;
	padding: 1px 35px;
	border: 0;
	border-radius: 50px;
	background: #fff;
	color: #2f2620;
	font-family: var(--pos-font-head);
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	outline: none;
}
.pos-sub .pos-sub__input:focus { box-shadow: 0 0 24px -2px rgba(120, 119, 120, .3); }
.pos-sub .pos-sub__btn {
	width: 250px;
	height: 70px;
	margin-left: 45px;
	border: 0;
	border-radius: 70px;
	background: #ffb400;
	color: #fff;
	font-family: var(--pos-font-body);
	font-weight: 700;
	font-size: 20px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .2s;
}
.pos-sub .pos-sub__btn:hover, .pos-sub .pos-sub__btn:focus { background: #4fad10; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
	.pos-sub__btn:hover { animation: posPulse 1s infinite; }
}
.pos-sub__btn:disabled { opacity: .7; cursor: wait; animation: none; }
.pos-sub__note {
	flex: 0 0 100%;
	margin: 10px 0 0;
	color: #5c534b;
	font-size: 12px;
	line-height: 1.4;
	text-align: center;
}
.pos-sub__note a { color: inherit; text-decoration: underline; }
.pos-sub__msg {
	flex: 0 0 100%;
	min-height: 20px;
	margin: 4px 0 0;
	color: #3b8a0b;
	font-family: var(--pos-font-body);
	font-weight: 500;
	font-size: 15px;
	text-align: center;
}
.pos-sub__msg.is-error { color: #d0021b; }
.pos-sub__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pos-sub .pos-sub__input::placeholder { color: #2f2620; opacity: 1; }

/* ---------- Наш питомник ---------- */
.pos-nursery { margin-bottom: 120px; }
.pos-nursery__photos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	justify-items: center;
}
.pos-nursery__photos img { display: block; max-width: 100%; height: auto; }
.pos-nursery__descr {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px 40px;
	padding-left: 15px;
}
.pos-nursery__title {
	flex: 0 0 100%;
	margin: 40px 0 10px;
	color: #4fad10;
	font-family: var(--pos-font-body);
	font-weight: 500;
	font-size: 16px;
	line-height: 1.1;
	text-transform: uppercase;
}
.pos-nursery__text {
	flex: 0 1 875px;
	color: #2f2620;
	font-family: var(--pos-font-body);
	font-size: 16px;
	line-height: 1.43;
}
.pos-nursery__more {
	display: block;
	flex: 0 0 350px;
	height: 50px;
	margin: 15px 40px 0 0;
	border: 1px solid #ff444d;
	border-radius: 50px;
	color: #ff444d;
	font-family: var(--pos-font-body);
	font-weight: 500;
	font-size: 16px;
	line-height: 48px;
	text-align: center;
	text-transform: uppercase;
	transition: background .2s, color .2s;
}
.pos-nursery__more:hover { background: #ff444d; color: #fff; }

@keyframes posPulse {
	0% { box-shadow: 0 0 0 0 rgba(79, 173, 16, .5); }
	70% { box-shadow: 0 0 0 12px rgba(79, 173, 16, 0); }
	100% { box-shadow: 0 0 0 0 rgba(79, 173, 16, 0); }
}

/* Широкие экраны: сетки выходят за контейнер, как ряды бутстрапа на боевом. */
@media (min-width: 1480px) {
	.pos-best__grid { margin: 0 -17.5px; }
	.pos-adv__grid { margin: 0 -15px; }
	.pos-blog__viewport { margin: 0 -30px; }
}

@media (max-width: 1440px) {
	.pos-blog__body { max-width: 311px; padding: 30px 15px 20px 20px; }
	.pos-blog__title { max-width: 200px; font-size: 12px; }
	.pos-blog__text { font-size: 13px; }
	.pos-blog__cat { width: 50%; font-size: 12px; }
	.pos-blog__more { width: 50%; font-size: 13px; }
}

@media (max-width: 1240px) {
	.pos-blog__img { flex-basis: 270px; height: 270px; }
	.pos-blog__body { max-width: 290px; padding-top: 20px; }
	.pos-blog__head { font-size: 12px; }
	.pos-blog__text { font-size: 12px; }
	.pos-blog__foot { margin-top: 10px; }
}

@media (max-width: 1120px) {
	.pos-hhead__title { width: 400px; font-size: 26px; }
	.pos-best__name { font-size: 15px; padding: 14px 6px; }
	.pos-adv__item { min-height: 259px; padding-top: 45px; }
	.pos-adv__text { font-size: 20px; }
	.pos-blog__card { flex-direction: column; }
	.pos-blog__img { flex-basis: auto; height: auto; max-height: 300px; aspect-ratio: 3 / 2; }
	.pos-blog__body { max-width: none; }
	.pos-blog__head, .pos-blog__text { font-size: 14px; }
	.pos-blog__title { max-width: none; }
	.pos-blog__foot { margin: 10px 0 0; }
	.pos-sub__t2 { padding-left: 105px; }
	.pos-sub__btn { margin-left: 0; }
	.pos-sub__form { width: 810px; }
}

@media (max-width: 991px) {
	.pos-best__grid,
	.pos-adv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pos-best__name { font-size: 17px; }
	.pos-sub { height: auto; padding: 30px 0 20px; }
	.pos-sub__t1, .pos-sub__t2, .pos-sub__t3 { padding-left: 0; }
	.pos-sub__form { width: 600px; flex-direction: column; gap: 14px; }
	.pos-sub .pos-sub__input, .pos-sub .pos-sub__btn { width: 100%; margin: 0; }
	.pos-sub__note { padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .85); }
}

@media (max-width: 767px) {
	.pos-home-blocks { padding-top: 20px; }
	.pos-hhead { padding: 10px 0 24px; }
	.pos-hhead--nursery { padding-bottom: 30px; }
	.pos-hhead__title { width: auto; max-width: calc(100% - 90px); padding: 4px 22px; font-size: 20px; }
	.pos-hhead__title::before, .pos-hhead__title::after { top: -2px; width: 36px; height: 36px; background-size: 36px; }
	.pos-hhead__title::before { left: -48px; }
	.pos-hhead__title::after { right: -48px; }
	.pos-best__grid { column-gap: 12px; row-gap: 14px; }
	.pos-best__name { padding: 10px 4px; font-size: 14px; line-height: 1.25; }
	.pos-adv__grid { gap: 12px; }
	.pos-adv__item { min-height: 0; padding: 24px 8px 20px; }
	.pos-adv__item img { width: 80px; }
	.pos-adv__text { font-size: 17px; }
	.pos-blog__track { grid-auto-columns: 100%; column-gap: 12px; }
	.pos-blog .pos-container { padding-bottom: 30px; }
	.pos-blog__nav { margin-top: 20px; }
	.pos-blog__all { display: none; }
	.pos-sub__t1 { font-size: 21px; }
	.pos-sub__t2 { font-size: 14px; }
	.pos-sub__t3 { font-size: 30px; }
	.pos-sub__t3 span { font-size: 37px; }
	.pos-sub__form { width: 100%; }
	.pos-sub .pos-sub__input, .pos-sub .pos-sub__btn { height: 44px; }
	.pos-sub .pos-sub__btn { font-size: 15px; }
	.pos-nursery { margin-bottom: 50px; }
	.pos-nursery__photos { grid-template-columns: 1fr; }
	.pos-nursery__photos img:not(:last-child) { display: none; }
	.pos-nursery__photos img { width: 100%; }
	.pos-nursery__descr { padding-left: 0; }
	.pos-nursery__title { margin-top: 24px; }
	.pos-nursery__more { flex-basis: 100%; margin: 0; }
}

@media (max-width: 510px) {
	.pos-hhead__title { max-width: calc(100% - 76px); padding: 4px 14px; font-size: 17px; }
	.pos-hhead__title::before, .pos-hhead__title::after { top: 0; width: 28px; height: 28px; background-size: 28px; }
	.pos-hhead__title::before { left: -36px; }
	.pos-hhead__title::after { right: -36px; }
}

@media (max-width: 376px) {
	.pos-sub {
		background-image: url("../images/home/bg-form-mobile.jpg");
		background-image: image-set(url("../images/home/bg-form-mobile.avif") type("image/avif"), url("../images/home/bg-form-mobile.jpg") type("image/jpeg"));
	}
}
