/*
 * Main page (page-main.php) — the blocks in template-parts/main/. Loaded only on that template.
 * slick's own CSS prints later (in the footer), so slider rules here always carry the block class.
 */

/* ---------------------------------------------------------------- shared */

.mp-section {
	padding: 8rem 0;
}

/* From tablets up the blocks run the full width of the page; the theme's 1200px cap is for inner pages. */
.mp-container {
	--mp-gutter: 4vw;
}

@media (min-width: 768px) {
	.container.mp-container {
		max-width: none !important;
		padding-right: var(--mp-gutter);
		padding-left: var(--mp-gutter);
	}
}

.mp-title {
	margin: 0 0 4rem;
	font-size: 3.2rem;
	font-weight: 400;
	line-height: 1.25;
	color: #000;
	text-align: center;
	text-transform: uppercase;
}

.mp-title--left {
	text-align: left;
}

/* "Переглянути ›" */
.mp-more {
	display: inline-flex;
	align-items: center;
	gap: 1.2rem;
	font-size: 1.6rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.06em;
	color: var(--svarga-accent, #734866);
	text-transform: uppercase;
	text-decoration: none;
}

.mp-more::after {
	content: "";
	flex: 0 0 auto;
	width: 0.9rem;
	height: 0.9rem;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg);
}

.mp-more:hover,
.mp-more:focus {
	color: #000;
	text-decoration: none;
}

.mp-more--underline {
	padding-bottom: 0.4rem;
	border-bottom: 1px solid currentColor;
}

.mp-button {
	display: inline-block;
	min-width: 22rem;
	padding: 1.3rem 3rem;
	border: 1px solid #5a3550;
	font-size: 1.6rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.06em;
	color: #1a1a1a;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.mp-button:hover,
.mp-button:focus {
	border-color: var(--svarga-accent, #734866);
	background: var(--svarga-accent, #734866);
	color: #fff;
	text-decoration: none;
}

/* ---------------------------------------------------------------- hero */

.mp-hero {
	position: relative;
	overflow: hidden;
}

/* --mp-hero-ratio(-mobile): the first slide's proportions, set inline by hero.php. */
.mp-hero__media {
	display: block;
	aspect-ratio: var(--mp-hero-ratio, auto);
}

.mp-hero__media picture {
	display: block;
	height: 100%;
}

.mp-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Until slick starts, only the first slide. */
.mp-hero__slider:not(.slick-initialized) .mp-hero__slide + .mp-hero__slide {
	display: none;
}

.mp-hero .mp-hero__slider.slick-dotted {
	margin-bottom: 0;
}

.mp-hero .slick-prev,
.mp-hero .slick-next {
	z-index: 2;
	width: 5rem;
	height: 5rem;
}

.mp-hero .slick-prev {
	left: 2.4rem;
}

.mp-hero .slick-next {
	right: 2.4rem;
}

.mp-hero .slick-prev::before,
.mp-hero .slick-next::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 2.2rem;
	height: 2.2rem;
	border-top: 2px solid #fff;
	border-left: 2px solid #fff;
	opacity: 1;
	filter: drop-shadow(0 0 0.2rem rgba(0, 0, 0, 0.4));
}

.mp-hero .slick-prev::before {
	transform: translate(-25%, -50%) rotate(-45deg);
}

.mp-hero .slick-next::before {
	transform: translate(-75%, -50%) rotate(135deg);
}

.mp-hero .slick-dots {
	bottom: 2.4rem;
	display: flex;
	justify-content: center;
	gap: 1.2rem;
	line-height: 0;
}

.mp-hero .slick-dots li {
	width: auto;
	height: auto;
	margin: 0;
}

.mp-hero .slick-dots li button {
	width: 4rem;
	height: 1.4rem;
	padding: 0.6rem 0;
	background: transparent;
}

/* The visible line is the button's middle 2px; the padding keeps it easy to hit. */
.mp-hero .slick-dots li button::before {
	content: "";
	position: static;
	display: block;
	width: 100%;
	height: 2px;
	background: #fff;
	opacity: 0.5;
}

.mp-hero .slick-dots li.slick-active button::before {
	opacity: 1;
}

/* ---------------------------------------------------------------- categories */

.mp-cats__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4rem 8vw;
}

.mp-cats__item {
	display: block;
	color: inherit;
	text-align: center;
	text-decoration: none;
}

.mp-cats__item:hover,
.mp-cats__item:focus {
	text-decoration: none;
}

.mp-cats__image {
	display: block;
	aspect-ratio: 11 / 12;
	overflow: hidden;
	background: #f7f7f7;
}

.mp-cats__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transition: transform 0.4s ease;
}

a.mp-cats__item:hover .mp-cats__image img,
a.mp-cats__item:focus-visible .mp-cats__image img {
	transform: scale(1.03);
}

.mp-cats__name {
	display: block;
	margin-top: 1.6rem;
	font-size: 1.8rem;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0.04em;
	color: var(--svarga-accent, #734866);
	text-transform: uppercase;
}

/* ---------------------------------------------------------------- mission */

/*
 * The mark is not part of the grid: it hangs off the band's right edge, about a quarter of it cut
 * off by overflow, level with the title. The inner row is at least as tall as the mark, so the
 * link (bottom of the aside) never runs into it whatever the text length.
 */
.mp-mission {
	--mp-mark-size: min(17vw, 36rem);
	position: relative;
	padding: 8rem 0;
	overflow: hidden;
	background: #f7f7f7;
}

.mp-mission__inner {
	display: grid;
	grid-template-columns: minmax(0, 58%) minmax(0, 1fr);
	gap: 6rem;
	min-height: calc(var(--mp-mark-size) + 4rem);
}

.mp-mission__title {
	margin: 0 0 3rem;
	font-size: 2.2rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.02em;
	color: var(--svarga-accent, #734866);
	text-transform: uppercase;
}

.mp-mission__text {
	font-size: 1.6rem;
	line-height: 1.7;
	color: #1a1a1a;
	text-align: justify;
}

.mp-mission__text p {
	margin: 0 0 1.6rem;
}

.mp-mission__text p:last-child {
	margin-bottom: 0;
}

.mp-mission__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: 3rem;
}

.mp-mission__mark {
	position: absolute;
	top: 8rem;
	right: calc(var(--mp-mark-size) * -0.28);
	display: block;
	width: var(--mp-mark-size);
	height: auto;
	pointer-events: none;
}

.mp-mission__aside .mp-more {
	margin-top: auto;
}

/* ---------------------------------------------------------------- products */

.mp-products__slider {
	margin: 0 -1rem;
}

.mp-products__slide {
	padding: 0 1rem;
}

/* The theme hangs the sale sticker 1rem above the card; slick's clipping box would cut it off. */
.mp-products__slider .slick-list {
	padding-top: 1rem;
}

/* Until slick starts, one row of 4 (2 below 992 px) instead of a column of cards. */
.mp-products__slider:not(.slick-initialized) {
	display: flex;
	overflow: hidden;
}

.mp-products__slider:not(.slick-initialized) .mp-products__slide {
	flex: 0 0 25%;
	max-width: 25%;
}

.mp-products .product-item .product-title {
	min-height: 0;
}

.mp-products .product-item .product-material {
	margin: 0.4rem 0 1rem;
	font-size: 1.6rem;
	line-height: 2rem;
	color: #8c8c8c;
}

.mp-products .product-item .product-price {
	margin-top: 1rem;
}

.mp-products .slick-prev,
.mp-products .slick-next {
	top: 38%;
	width: 4rem;
	height: 4rem;
}

.mp-products .slick-prev {
	left: -2.4rem;
}

.mp-products .slick-next {
	right: -2.4rem;
}

.mp-products .slick-prev::before,
.mp-products .slick-next::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.4rem;
	height: 1.4rem;
	border-top: 1.5px solid #8c8c8c;
	border-left: 1.5px solid #8c8c8c;
	opacity: 1;
}

.mp-products .slick-prev::before {
	transform: translate(-25%, -50%) rotate(-45deg);
}

.mp-products .slick-next::before {
	transform: translate(-75%, -50%) rotate(135deg);
}

.mp-products .slick-prev.slick-disabled::before,
.mp-products .slick-next.slick-disabled::before {
	opacity: 0.3;
}

/* Lines, like the banner's. They wrap when a long slider has more of them than the row can hold. */
.mp-products .slick-dots {
	position: static;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 1.2rem;
	margin-top: 2.4rem;
	line-height: 0;
}

.mp-products .slick-dots li {
	width: auto;
	height: auto;
	margin: 0;
}

/* The visible line is the button's middle 2px; the padding keeps it easy to hit. */
.mp-products .slick-dots li button {
	width: 2.4rem;
	height: 1.4rem;
	padding: 0.6rem 0;
	background: transparent;
}

.mp-products .slick-dots li button::before {
	content: "";
	position: static;
	display: block;
	width: 100%;
	height: 2px;
	background: #cfc8d5;
	opacity: 1;
}

.mp-products .slick-dots li.slick-active button::before {
	background: var(--svarga-accent, #734866);
}

.mp-products .mp-products__slider.slick-dotted {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------- stores */

.mp-stores {
	padding: 4rem 0;
	background: #f7f7f7;
}

.mp-stores__inner {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: 6rem;
	align-items: center;
}

.mp-stores--no-image .mp-stores__inner {
	grid-template-columns: minmax(0, 1fr);
}

.mp-stores__image img {
	display: block;
	width: 100%;
	height: auto;
}

/* The column stretches to the photo's height: the heading group stays centred, the
   "all locations" link is pinned to the bottom edge. */
.mp-stores__content {
	display: flex;
	flex-direction: column;
	align-self: stretch;
	text-align: center;
}

.mp-stores__content > :first-child {
	margin-top: auto;
}

.mp-stores__icon {
	display: block;
	width: 6.4rem;
	height: auto;
	margin: 0 auto 2rem;
}

.mp-stores .mp-title {
	margin-bottom: 1.6rem;
}

.mp-stores__text {
	max-width: 40rem;
	margin: 0 auto 4rem;
	font-size: 1.6rem;
	line-height: 1.5;
	color: #1a1a1a;
}

.mp-stores__cities {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: 1.6rem;
	margin: 0 0 4rem;
	padding: 0;
	list-style: none;
}

.mp-stores__city {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	min-height: 4.4rem;
	padding: 0.8rem 1.2rem;
	border: 1px solid #cfcfcf;
	background: #fff;
	font-size: 1.6rem;
	line-height: 1.3;
	color: #1a1a1a;
	text-decoration: none;
	transition: border-color 0.2s, color 0.2s;
}

.mp-stores__city svg {
	flex: 0 0 auto;
}

a.mp-stores__city:hover,
a.mp-stores__city:focus {
	border-color: var(--svarga-accent, #734866);
	color: var(--svarga-accent, #734866);
	text-decoration: none;
}

.mp-stores__all {
	margin-top: auto;
	text-align: right;
}

/* ---------------------------------------------------------------- instagram */

.mp-instagram .mp-title {
	margin-bottom: 1.2rem;
}

.mp-instagram__handle {
	display: table;
	margin: 0 auto 4rem;
	font-size: 1.8rem;
	color: var(--svarga-accent, #734866);
	text-decoration: none;
}

.mp-instagram__handle:hover,
.mp-instagram__handle:focus {
	color: #000;
	text-decoration: none;
}

.mp-instagram__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2.4rem 5vw;
}

.mp-instagram__tile {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: #f2efea;
}

.mp-instagram__tile img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.mp-instagram__tile:hover img,
.mp-instagram__tile:focus-visible img {
	transform: scale(1.04);
}

.mp-instagram__badge {
	position: absolute;
	top: 1rem;
	right: 1rem;
	color: #fff;
	line-height: 0;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.mp-instagram__cta {
	margin-top: 4rem;
	text-align: center;
}

/* ---------------------------------------------------------------- SEO text */

.mp-seo__body {
	position: relative;
}

/* Set by main-page.js only when the text is longer than this. */
.mp-seo__body.is-collapsed {
	max-height: 24rem;
	overflow: hidden;
}

.mp-seo__body.is-collapsed::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 8rem;
	background: linear-gradient(rgba(255, 255, 255, 0), #fff);
	pointer-events: none;
}

.mp-seo__toggle {
	display: inline-flex;
	align-items: center;
	gap: 1.2rem;
	margin-top: 1.6rem;
	padding: 0;
	border: 0;
	background: none;
	font-size: 1.8rem;
	line-height: 1.4;
	color: #000;
	cursor: pointer;
}

.mp-seo__toggle[hidden] {
	display: none;
}

.mp-seo__toggle::after {
	content: "";
	width: 0.9rem;
	height: 0.9rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-25%) rotate(45deg);
}

.mp-seo__toggle[aria-expanded="true"]::after {
	transform: translateY(25%) rotate(-135deg);
}

.mp-seo__toggle:hover,
.mp-seo__toggle:focus-visible {
	color: var(--svarga-accent, #734866);
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 991.98px) {
	.mp-products__slider:not(.slick-initialized) .mp-products__slide {
		flex-basis: 50%;
		max-width: 50%;
	}

	.mp-stores__inner {
		gap: 3rem;
	}
}

@media (max-width: 767.98px) {
	.mp-section {
		padding: 6rem 0;
	}

	.mp-title {
		margin-bottom: 2.4rem;
		font-size: 2.2rem;
	}

	.mp-hero__media {
		aspect-ratio: var(--mp-hero-ratio-mobile, auto);
	}

	.mp-hero .slick-arrow {
		display: none !important;
	}

	.mp-hero .slick-dots {
		bottom: 1.2rem;
	}

	.mp-hero .slick-dots li button {
		width: 2.4rem;
	}

	.mp-cats__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.4rem 1.2rem;
	}

	.mp-cats__name {
		margin-top: 1rem;
		font-size: 1.6rem;
	}

	.mp-mission {
		--mp-mark-size: 14rem;
		padding: 5rem 0;
	}

	.mp-mission__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 2.4rem;
		min-height: 0;
	}

	.mp-mission__title {
		margin-bottom: 2rem;
		font-size: 1.8rem;
	}

	.mp-mission__text {
		text-align: left;
	}

	.mp-mission__aside {
		position: relative;
		flex-direction: row;
		align-items: center;
		justify-content: flex-end;
	}

	/* The ornament is hidden on phones. */
	.mp-mission__mark {
		display: none;
	}

	.mp-mission__aside .mp-more {
		margin-top: 0;
	}

	.mp-products__slider {
		margin: 0 -0.6rem;
	}

	.mp-products__slide {
		padding: 0 0.6rem;
	}

	.mp-stores {
		padding: 5rem 0;
	}

	.mp-stores__icon {
		width: 5rem;
		margin-bottom: 1.6rem;
	}

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

	.mp-stores__text {
		margin-bottom: 2.4rem;
	}

	.mp-stores__cities {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1rem;
		margin-bottom: 3rem;
	}

	.mp-stores__all {
		text-align: center;
	}

	.mp-stores__all .mp-more {
		gap: 0.8rem;
		font-size: 1.3rem;
	}

	.mp-instagram__handle {
		margin-bottom: 2.4rem;
	}

	.mp-instagram__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.8rem;
	}

	.mp-instagram__cta {
		margin-top: 3rem;
	}
}
