/**
 * Контакты + Где купить pages - built from native Gutenberg core blocks
 * (Group/Heading/Paragraph/Buttons/HTML), so every address, phone number and
 * map embed is directly editable in the block editor.
 */

.page-title {
	margin: 32px 0 32px;
}

.section-heading {
	position: relative;
	margin: 0 0 28px;
	padding-bottom: 14px;
	font-size: 22px;
	font-weight: 600;
}

.section-heading::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 64px;
	height: 3px;
	background: #d81f1f;
}

.contacts-subheading {
	margin: 32px 0 16px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6b6b6b;
}

/*
 * A Group block without layout:{"type":"flex"|"grid"} always wraps its
 * children in an auto-generated .wp-block-group__inner-container div (core
 * WordPress behavior, not something our markup controls) - so the grid/flex
 * rules that need to see the direct children target that inner wrapper,
 * not the group's own class.
 */
.contacts-layout > .wp-block-group__inner-container {
	display: grid;
	gap: 40px;
	padding-bottom: 60px;
}

@media ( min-width: 900px ) {
	.contacts-layout > .wp-block-group__inner-container {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}

	.contacts-map {
		position: sticky;
		top: 96px;
	}
}

.contact-card {
	padding: 20px 0;
	border-bottom: 1px solid #ececec;
}

.contact-card:last-child {
	border-bottom: 0;
}

.contact-card__eyebrow {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #d81f1f;
}

.contact-card__name {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 600;
}

.contact-card__address {
	margin: 0 0 6px;
	color: #4a4a4a;
}

.contact-card__phones {
	margin: 0 0 12px;
	line-height: 1.6;
}

.contact-card__phones a {
	color: inherit;
	text-decoration: none;
}

.contact-card__phones a:hover,
.contact-card__phones a:focus-visible {
	color: #d81f1f;
	text-decoration: underline;
}

/*
 * Route / "open in Maps" buttons are core/button blocks - the className
 * lands on the wrapping .wp-block-button div, and the link itself gets
 * .wp-block-button__link automatically, so we style through that.
 */
.wp-block-button.route-btn > a,
.wp-block-button.map-open-btn > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid #e3e3e3;
	border-radius: 999px;
	background: #fff;
	color: #1a1a1a;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-button.route-btn > a::before,
.wp-block-button.map-open-btn > a::before {
	content: "↗";
	font-size: 13px;
}

.wp-block-button.route-btn > a:hover,
.wp-block-button.route-btn > a:focus-visible,
.wp-block-button.map-open-btn > a:hover,
.wp-block-button.map-open-btn > a:focus-visible {
	border-color: #d81f1f;
	color: #d81f1f;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.06 );
}

.map-frame {
	border: 1px solid #ececec;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	margin-bottom: 16px;
}

.map-frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Где купить: showroom cards with an embedded 320x240 Yandex widget each */

.showrooms-grid > .wp-block-group__inner-container {
	display: grid;
	grid-template-columns: minmax( 0, 1fr );
	gap: 32px;
	padding-bottom: 60px;
}

@media ( min-width: 720px ) {
	.showrooms-grid > .wp-block-group__inner-container {
		grid-template-columns: repeat( auto-fit, minmax( 300px, 1fr ) );
	}
}

.showroom-card {
	padding: 24px;
	border: 1px solid #ececec;
}

.showroom-card > .wp-block-group__inner-container {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.showroom-card__name {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 600;
}

.showroom-card__address {
	margin: 0 0 6px;
	color: #4a4a4a;
}

.showroom-card__phones {
	margin: 0 0 16px;
	line-height: 1.6;
}

.showroom-card__phones a {
	color: inherit;
	text-decoration: none;
}

.showroom-card__phones a:hover,
.showroom-card__phones a:focus-visible {
	color: #d81f1f;
	text-decoration: underline;
}

.showroom-card__map {
	width: 320px;
	max-width: 100%;
	height: 240px;
	margin-bottom: 16px;
	border: 1px solid #ececec;
	background: #f4f4f4;
	overflow: hidden;
}

.showroom-card__map iframe {
	max-width: 100%;
}

.showroom-card .wp-block-buttons {
	align-self: flex-start;
}

.contact-card .wp-block-buttons,
.contact-card__phones {
	margin-top: 0;
}

/**
 * Матрасы: individual brand pages (the /catalog/matrasy/ landing itself
 * now reuses the standard mekom/catalog-grid + catalog-tile pattern, same
 * as every other catalog listing page - no bespoke grid needed here).
 */

.mattress-brand-page__logo {
	margin: 0 0 24px;
}

.mattress-brand-page__logo img {
	max-height: 80px;
	width: auto;
}

.mattress-brand-page .mekom-product-block {
	margin: 24px 0 0;
}

.mattress-brand-page .mekom-product-block .container {
	padding: 0;
}

.about-page__photo {
	margin: 24px 0 32px;
}

.about-page__photo img {
	display: block;
	width: 100%;
	max-width: 760px;
	height: auto;
	border: 1px solid #e8e2d8;
}

/**
 * Plain content pages (О нас, Партнерам, …) - style the default list block
 * to match the site instead of plain browser bullets.
 */

.container .wp-block-list {
	margin: 0 0 24px;
	padding-left: 0;
	list-style: none;
}

.container .wp-block-list li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 12px;
	line-height: 1.6;
}

.container .wp-block-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	width: 8px;
	height: 8px;
	background: #d81f1f;
}
