/*
Theme Name: Баракат Молия
Theme URI: https://example.tj/
Author: Barakat Moliya
Description: Тема для сайта ТАҚХ «Баракат Молия»: главная со слайдером, курсами валют, кредитным калькулятором и новостями; формы заявок с сохранением в админке; готовые блоки для страниц. Цвета и тексты — Внешний вид → Настроить → «Баракат Молия».
Version: 1.2.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: barakat
*/

/* =========================================================
   1. Переменные
   ========================================================= */
:root {
	--bm-blue: #005099;
	--bm-red: #DA211A;
	--bm-blue-dark: color-mix(in srgb, var(--bm-blue) 72%, #000);
	--bm-blue-deep: color-mix(in srgb, var(--bm-blue) 55%, #001020);
	--bm-red-dark: color-mix(in srgb, var(--bm-red) 85%, #000);
	--bm-blue-10: color-mix(in srgb, var(--bm-blue) 10%, #fff);
	--bm-blue-5: color-mix(in srgb, var(--bm-blue) 5%, #fff);
	--bm-bg: #f3f7fc;
	--bm-line: #dfe6ef;
	--bm-text: #0f1b2d;
	--bm-muted: #5b6878;
	--bm-ok: #1f8a4c;
	--bm-r: 24px;
	--bm-r-md: 16px;
	--bm-r-sm: 12px;
	--bm-shadow: 0 10px 30px rgba(0, 40, 90, .08);
	--bm-shadow-lg: 0 20px 50px rgba(0, 40, 90, .16);
	--bm-font: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;
	--bm-gutter: 20px;
	--bm-max: 1240px;
	--bm-header-h: 80px;
}

/* =========================================================
   2. Основа
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bm-header-h) + 16px); }
body {
	margin: 0;
	font-family: var(--bm-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--bm-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--bm-blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--bm-red); }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; color: var(--bm-text); letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--bm-blue) 45%, transparent); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.bm-skip:focus {
	clip: auto; width: auto; height: auto; z-index: 1000; top: 8px; left: 8px;
	background: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--bm-shadow);
}
.bm-container { width: 100%; max-width: calc(var(--bm-max) + var(--bm-gutter) * 2); margin: 0 auto; padding: 0 var(--bm-gutter); }
.bm-ico { width: 24px; height: 24px; flex: none; }
.bm-ico--sm { width: 16px; height: 16px; }

/* =========================================================
   3. Кнопки
   ========================================================= */
.bm-btn,
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 24px;
	border: 2px solid transparent; border-radius: var(--bm-r-sm);
	background: var(--bm-blue); color: #fff;
	font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center;
	cursor: pointer; text-decoration: none;
	transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.bm-btn:hover, .wp-block-button__link:hover { background: var(--bm-blue-dark); color: #fff; }
.bm-btn:active { transform: translateY(1px); }
.bm-btn--accent { background: var(--bm-red); }
.bm-btn--accent:hover { background: var(--bm-red-dark); }
.bm-btn--white,
.is-style-white .wp-block-button__link { background: #fff; color: var(--bm-blue); }
.bm-btn--white:hover,
.is-style-white .wp-block-button__link:hover { background: var(--bm-blue-10); color: var(--bm-blue-dark); }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--bm-blue); border-color: var(--bm-blue); }
.is-style-outline .wp-block-button__link:hover { background: var(--bm-blue); color: #fff; }
.bm-btn--block { width: 100%; }
.bm-btn[disabled] { opacity: .6; cursor: wait; }
.bm-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* =========================================================
   4. Верхняя полоса и шапка
   ========================================================= */
.bm-topbar { background: var(--bm-bg); font-size: 13px; color: var(--bm-muted); }
.bm-topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.bm-topbar__left, .bm-topbar__right { display: flex; align-items: center; gap: 22px; }
.bm-topbar a { color: var(--bm-text); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.bm-topbar a:hover { color: var(--bm-blue); }
.bm-topbar .bm-ico { color: var(--bm-blue); }
.bm-topbar__hours { display: inline-flex; align-items: center; gap: 6px; }
.bm-topbar__phone { font-weight: 700 !important; }
.bm-topbar__menu, .bm-langs { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; }
.bm-langs { gap: 4px; }
.bm-langs a { padding: 2px 6px; border-radius: 6px; text-transform: uppercase; font-weight: 600; }
.bm-langs .current-lang a { background: var(--bm-blue); color: #fff; }

.bm-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 1px solid transparent;
	transition: box-shadow .2s, border-color .2s;
}
.admin-bar .bm-header { top: 32px; }
.bm-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 40, 90, .08); border-color: var(--bm-line); }
.bm-header__in { display: flex; align-items: center; gap: 28px; min-height: var(--bm-header-h); }
.bm-logo { display: block; flex: none; }
.bm-logo__img { height: 34px; width: auto; }
.bm-header__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.bm-header__phone {
	display: inline-flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; border-radius: 50%;
	background: var(--bm-blue-10); color: var(--bm-blue);
}
.bm-header__phone:hover { background: var(--bm-blue); color: #fff; }
.bm-header__phone .bm-ico { width: 20px; height: 20px; }
.bm-burger {
	display: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: var(--bm-r-sm);
	background: var(--bm-bg); color: var(--bm-text); cursor: pointer;
	align-items: center; justify-content: center;
}
.bm-burger__close { display: none; }
.bm-menu-open .bm-burger__open { display: none; }
.bm-menu-open .bm-burger__close { display: block; }

/* Меню — десктоп */
.bm-nav { flex: 1; }
.bm-menu { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.bm-menu li { position: relative; list-style: none; }
.bm-menu > li > a {
	display: flex; align-items: center; gap: 4px;
	padding: 10px 12px; border-radius: 10px;
	color: var(--bm-text); font-weight: 600; font-size: 15px; white-space: nowrap;
}
.bm-menu > li > a:hover,
.bm-menu > .current-menu-item > a,
.bm-menu > .current-menu-ancestor > a,
.bm-menu > .current_page_item > a { color: var(--bm-blue); background: var(--bm-blue-5); }
.bm-menu > .menu-item-has-children > a::after {
	content: ""; width: 7px; height: 7px; margin: -3px 0 0 4px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg); opacity: .6;
}
.bm-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 240px;
	margin: 0; padding: 8px; list-style: none;
	background: #fff; border-radius: var(--bm-r-md); box-shadow: var(--bm-shadow-lg); border: 1px solid var(--bm-line);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.bm-menu li:hover > .sub-menu,
.bm-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.bm-menu .sub-menu a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--bm-text); font-weight: 500; font-size: 15px; }
.bm-menu .sub-menu a:hover { background: var(--bm-bg); color: var(--bm-blue); }
.bm-nav__mobile-extra { display: none; }

/* Иконки и описания пунктов меню (Внешний вид → Меню → «Иконка») */
.bm-mi-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.bm-mi-ico svg, .bm-mi-ico img { width: 18px; height: 18px; object-fit: contain; }
.bm-mi-text { display: flex; flex-direction: column; min-width: 0; }
.bm-mi-desc { font-size: 12.5px; font-weight: 400; line-height: 1.35; color: var(--bm-muted); margin-top: 2px; white-space: normal; }
.bm-menu > li > a .bm-mi-ico { color: var(--bm-blue); }
.bm-menu .sub-menu { min-width: 300px; }
.bm-menu .sub-menu a { display: flex; align-items: center; gap: 12px; }
.bm-menu .sub-menu .bm-mi-ico {
	width: 38px; height: 38px; border-radius: 10px;
	background: var(--bm-blue-10); color: var(--bm-blue); transition: background .15s, color .15s;
}
.bm-menu .sub-menu .bm-mi-ico svg, .bm-menu .sub-menu .bm-mi-ico img { width: 20px; height: 20px; }
.bm-menu .sub-menu a:hover .bm-mi-ico { background: var(--bm-blue); color: #fff; }
.bm-menu .sub-menu a:hover .bm-mi-ico:has(img) { background: var(--bm-blue-10); }
.bm-menu .sub-menu .bm-mi-title { font-weight: 600; }
.bm-footer__menu a, .bm-topbar__menu a { display: inline-flex; align-items: center; gap: 8px; }
.bm-footer__menu .bm-mi-ico svg, .bm-footer__menu .bm-mi-ico img { width: 16px; height: 16px; }

/* =========================================================
   5. Общие секции
   ========================================================= */
.bm-main { min-height: 50vh; }
.bm-section { padding: 28px 0; }
.bm-section:last-of-type { padding-bottom: 72px; }
.bm-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.bm-section__head h2 { margin: 0; }
.bm-grid { display: grid; gap: 24px; }
.bm-grid--3 { grid-template-columns: repeat(3, 1fr); }
.bm-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.bm-split--single { grid-template-columns: 1fr; }
.bm-app--no-media { grid-template-columns: 1fr; }

/* =========================================================
   6. Главная: плитки
   ========================================================= */
.bm-hero { padding: 24px 0 12px; }
.bm-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.bm-tile {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 18px 20px; border-radius: var(--bm-r-md);
	background: #fff; border: 1px solid var(--bm-line); color: var(--bm-text);
	font-weight: 600; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.bm-tile:hover { color: var(--bm-blue); border-color: var(--bm-blue); box-shadow: var(--bm-shadow); transform: translateY(-2px); }
.bm-tile__ico {
	width: 48px; height: 48px; border-radius: 14px; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--bm-blue-10); color: var(--bm-blue);
}
.bm-tile:nth-child(even) .bm-tile__ico { background: color-mix(in srgb, var(--bm-red) 10%, #fff); color: var(--bm-red); }

/* =========================================================
   8. Мобильное приложение
   ========================================================= */
.bm-app {
	position: relative; overflow: hidden;
	display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 12px;
	padding: 32px; border-radius: var(--bm-r);
	background: linear-gradient(150deg, var(--bm-blue) 0%, var(--bm-blue-deep) 100%); color: #fff;
}
.bm-app::after {
	content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%;
	right: -80px; bottom: -120px; background: var(--bm-red); opacity: .85;
}
.bm-app__body, .bm-app__media { position: relative; z-index: 1; }
.bm-app__title { color: #fff; }
.bm-app__text { color: rgba(255, 255, 255, .85); }
.bm-app__img { max-height: 340px; width: auto; margin: 0 auto; }
.bm-stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.bm-store {
	display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px;
	background: #0b0f17; color: #fff !important; border-radius: 12px; line-height: 1.15; font-weight: 600;
	transition: transform .15s;
}
.bm-store:hover { transform: translateY(-2px); }
.bm-store small { display: block; font-size: 10px; font-weight: 500; opacity: .75; }
.bm-store .bm-ico { width: 22px; height: 22px; }

.bm-phone {
	width: 190px; height: 340px; margin: 0 auto; padding: 8px;
	border-radius: 34px; background: #0b0f17; box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
	rotate: 6deg;
}
.bm-phone__screen {
	height: 100%; border-radius: 27px; background: #fff; padding: 26px 16px;
	display: flex; flex-direction: column; gap: 12px;
}
.bm-phone__screen img { width: 46px; height: auto; }
.bm-phone__bal { font-weight: 800; color: var(--bm-blue); font-size: 18px; }
.bm-phone__row { display: block; height: 40px; border-radius: 10px; background: var(--bm-bg); }
.bm-phone__row--short { width: 60%; background: color-mix(in srgb, var(--bm-red) 15%, #fff); }

/* =========================================================
   10. Новости и промо-карточки
   ========================================================= */
.bm-post {
	display: flex; flex-direction: column; overflow: hidden;
	background: #fff; border: 1px solid var(--bm-line); border-radius: var(--bm-r-md);
	transition: box-shadow .2s, transform .2s;
}
.bm-post:hover { box-shadow: var(--bm-shadow); transform: translateY(-3px); }
.bm-post__media { display: block; aspect-ratio: 16 / 10; background: var(--bm-bg); overflow: hidden; }
.bm-post__media img { width: 100%; height: 100%; object-fit: cover; }
.bm-post__ph { display: flex; align-items: center; justify-content: center; height: 100%; }
.bm-post__ph img { width: 72px; height: auto; object-fit: contain; opacity: .9; }
.bm-post__body { padding: 18px 20px 22px; }
.bm-post__date { display: block; color: var(--bm-muted); font-size: 13px; margin-bottom: 6px; }
.bm-post__title { font-size: 17px; margin: 0; line-height: 1.35; }
.bm-post__title a { color: var(--bm-text); }
.bm-post__title a:hover { color: var(--bm-blue); }

.bm-promo {
	display: flex; flex-direction: column; overflow: hidden; border-radius: var(--bm-r);
	background: var(--bm-bg); color: var(--bm-text); transition: box-shadow .2s, transform .2s;
}
.bm-promo:hover { color: var(--bm-text); box-shadow: var(--bm-shadow); transform: translateY(-3px); }
.bm-promo__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.bm-promo__media img { width: 100%; height: 100%; object-fit: cover; }
.bm-promo__deco {
	display: flex; align-items: center; justify-content: center; height: 100%; color: #fff;
	background: linear-gradient(135deg, var(--bm-blue), var(--bm-blue-deep));
}
.bm-promo__deco--2 { background: linear-gradient(135deg, var(--bm-red), var(--bm-red-dark)); }
.bm-promo__deco--3 { background: linear-gradient(135deg, var(--bm-blue-deep), var(--bm-blue)); }
.bm-promo__deco .bm-ico { width: 72px; height: 72px; stroke-width: 1.5; }
.bm-promo__body { display: flex; flex-direction: column; gap: 6px; padding: 20px 24px 24px; }
.bm-promo__title { font-weight: 700; font-size: 20px; }
.bm-promo__text { color: var(--bm-muted); font-size: 15px; }
.bm-promo .bm-more { color: var(--bm-blue); margin-top: 4px; }

/* =========================================================
   11. Внутренние страницы
   ========================================================= */
.bm-page-hero {
	position: relative; overflow: hidden;
	padding: 40px 0 48px; color: #fff;
	background: linear-gradient(120deg, var(--bm-blue) 0%, var(--bm-blue-deep) 100%);
}
.bm-page-hero::before, .bm-page-hero::after { content: ""; position: absolute; border-radius: 50%; }
.bm-page-hero::before { width: 360px; height: 360px; right: -80px; top: -140px; background: rgba(255, 255, 255, .07); }
.bm-page-hero::after { width: 180px; height: 180px; right: 220px; bottom: -120px; background: var(--bm-red); opacity: .85; }
.bm-page-hero .bm-container { position: relative; z-index: 1; }
.bm-page-hero__title { color: #fff; margin: 0; max-width: 820px; }
.bm-page-hero__sub { margin: 10px 0 0; font-size: 18px; color: rgba(255, 255, 255, .85); max-width: 720px; }
.bm-crumbs { font-size: 13px; color: rgba(255, 255, 255, .7); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.bm-crumbs a { color: rgba(255, 255, 255, .85); }
.bm-crumbs a:hover { color: #fff; }

.bm-page { padding-top: 40px; padding-bottom: 72px; }
.bm-page--narrow { max-width: 860px; }
.bm-single__thumb { margin: 0 0 28px; border-radius: var(--bm-r); overflow: hidden; }
.bm-postnav { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--bm-line); font-weight: 600; }
.bm-pagination { margin-top: 32px; }
.bm-pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.bm-pagination .page-numbers { min-width: 42px; height: 42px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--bm-bg); color: var(--bm-text); font-weight: 600; }
.bm-pagination .page-numbers.current { background: var(--bm-blue); color: #fff; }
.bm-empty, .bm-404 { color: var(--bm-muted); }

/* Содержимое из редактора */
.bm-content > * + * { margin-top: 0; }
.bm-content > * { margin-bottom: 28px; }
.bm-content > *:last-child { margin-bottom: 0; }
.bm-content h2 { margin-top: 12px; }
.bm-content ul, .bm-content ol { padding-left: 1.3em; }
.bm-content li { margin-bottom: 6px; }
.bm-content .alignfull {
	width: 100vw; max-width: 100vw;
	margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
}
.bm-content .alignwide { width: 100%; }

/* Колонки (запасной вариант, если стили блоков отключены) */
.wp-block-columns { display: flex; flex-wrap: wrap; gap: 24px; }
.wp-block-column { flex: 1 1 0; min-width: 0; }

/* Карточки продуктов */
.bm-cards { gap: 24px !important; align-items: stretch !important; }
.bm-card {
	display: flex; flex-direction: column;
	padding: 28px; border-radius: var(--bm-r);
	background: var(--bm-bg); transition: box-shadow .2s, transform .2s;
}
.bm-band .bm-card { background: #fff; }
.bm-card:hover { box-shadow: var(--bm-shadow); transform: translateY(-3px); }
.bm-card > * { margin: 0 0 12px; }
.bm-card > *:last-child { margin-bottom: 0; }
.bm-card .wp-block-buttons { margin-top: auto; padding-top: 8px; }
.bm-card h3 { margin-bottom: 6px; }
.bm-card-ico {
	display: inline-flex; align-items: center; justify-content: center;
	width: 52px; height: 52px; border-radius: 14px;
	background: var(--bm-blue-10); color: var(--bm-blue);
}
.bm-card:nth-child(3n+2) .bm-card-ico { background: color-mix(in srgb, var(--bm-red) 10%, #fff); color: var(--bm-red); }
.bm-rate { font-size: 30px; font-weight: 800; color: var(--bm-blue); line-height: 1.15; }
.bm-rate span { font-size: 14px; font-weight: 500; color: var(--bm-muted); }

/* Список с галочками */
.bm-checks, .is-style-bm-checks { list-style: none; padding-left: 0 !important; }
.bm-checks li, .is-style-bm-checks li { position: relative; padding-left: 28px; color: var(--bm-muted); }
.bm-checks li::before, .is-style-bm-checks li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
	background: var(--bm-blue-10) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23005099' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='5 12 10 17 19 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.bm-facts { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.bm-facts li { padding: 18px 22px; background: var(--bm-bg); border-radius: var(--bm-r-md); font-size: 17px; margin: 0; }
.bm-facts strong { display: block; font-size: 28px; color: var(--bm-blue); }

/* Полоса со светлым фоном на всю ширину */
.bm-band { background: var(--bm-bg); padding: 48px 0; margin-top: 48px !important; margin-bottom: 48px !important; }
.bm-band > * {
	max-width: calc(var(--bm-max) + var(--bm-gutter) * 2) !important;
	margin-left: auto !important; margin-right: auto !important;
	padding-left: var(--bm-gutter); padding-right: var(--bm-gutter);
}
.bm-band > * + * { margin-top: 20px; }
.bm-band > .wp-block-columns { padding-left: var(--bm-gutter); padding-right: var(--bm-gutter); }
.bm-band > .wp-block-table { padding: 0 var(--bm-gutter); }

/* Шаги */
.bm-steps { counter-reset: step; }
.bm-step > * { margin: 0 0 6px; }
.bm-step-n {
	display: inline-flex !important; align-items: center; justify-content: center;
	width: 46px; height: 46px; border-radius: 50%; margin-bottom: 14px !important;
	background: var(--bm-red); color: #fff; font-weight: 800; font-size: 18px;
}
.bm-step p:not(.bm-step-n) { color: var(--bm-muted); }

/* Призыв */
.bm-cta {
	position: relative; overflow: hidden;
	padding: 36px 40px; border-radius: var(--bm-r); color: #fff;
	background: linear-gradient(120deg, var(--bm-blue) 0%, var(--bm-blue-deep) 100%);
}
.bm-cta::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; right: -60px; top: -80px; background: var(--bm-red); opacity: .85; }
.bm-cta > * { position: relative; z-index: 1; }
.bm-cta h2 { color: #fff; margin-bottom: 6px; }
.bm-cta p { color: rgba(255, 255, 255, .85); margin: 0; }
.bm-cta .wp-block-columns { align-items: center !important; margin: 0; }
.bm-cta__btn { flex: 0 0 auto !important; }
.bm-cta__btn .wp-block-buttons { justify-content: flex-end; }

/* Таблица */
.wp-block-table { margin: 0; overflow-x: auto; }
.wp-block-table table, .is-style-bm table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--bm-r-md); overflow: hidden; border: 1px solid var(--bm-line); }
.wp-block-table th, .wp-block-table td { padding: 14px 18px; text-align: left; border: 0; border-bottom: 1px solid var(--bm-line); }
.wp-block-table thead th { background: var(--bm-blue); color: #fff; font-weight: 600; border-bottom: 0; }
.wp-block-table thead { border: 0; }
.wp-block-table tbody tr:nth-child(even) td { background: var(--bm-blue-5); }
.wp-block-table tbody tr:last-child td { border-bottom: 0; }
.bm-note { font-size: 14px; color: var(--bm-muted); }

/* Аккордеон */
.wp-block-details { border-bottom: 1px solid var(--bm-line); padding: 0; margin-bottom: 0 !important; }
.wp-block-details summary {
	list-style: none; cursor: pointer; padding: 16px 36px 16px 0; position: relative; font-weight: 600;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
	border-right: 2px solid var(--bm-blue); border-bottom: 2px solid var(--bm-blue); transform: rotate(45deg); transition: transform .2s;
}
.wp-block-details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.wp-block-details > *:not(summary) { margin: 0 0 16px; color: var(--bm-muted); }
.wp-block-details + :not(.wp-block-details) { margin-top: 28px; }

/* Контакты и карта */
.bm-contacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bm-contact { display: flex; gap: 14px; align-items: flex-start; padding: 20px; background: var(--bm-bg); border-radius: var(--bm-r-md); }
.bm-contact .bm-card-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; }
.bm-contact__label { font-size: 13px; color: var(--bm-muted); }
.bm-contact__val { font-weight: 600; line-height: 1.4; }
.bm-map iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: var(--bm-r); background: var(--bm-bg); }

/* =========================================================
   12. Форма и окно заявки
   ========================================================= */
.bm-form { display: flex; flex-direction: column; gap: 14px; }
.bm-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.bm-field { display: flex; flex-direction: column; gap: 6px; }
.bm-field > span { font-size: 13px; font-weight: 600; color: var(--bm-muted); }
.bm-field--wide { grid-column: 1 / -1; }
.bm-field input, .bm-field select, .bm-field textarea {
	width: 100%; min-height: 48px; padding: 10px 14px;
	border: 1px solid var(--bm-line); border-radius: var(--bm-r-sm); background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.bm-field textarea { min-height: 88px; resize: vertical; }
.bm-field select {
	appearance: none; padding-right: 40px; cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6878' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
}
.bm-field input:focus, .bm-field select:focus, .bm-field textarea:focus {
	outline: 0; border-color: var(--bm-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bm-blue) 15%, transparent);
}
.bm-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--bm-muted); cursor: pointer; }
.bm-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--bm-blue); flex: none; }
.bm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bm-form__msg p { margin: 0; padding: 12px 16px; border-radius: var(--bm-r-sm); font-weight: 600; font-size: 14px; }
.bm-form__msg .is-ok { background: color-mix(in srgb, var(--bm-ok) 12%, #fff); color: var(--bm-ok); }
.bm-form__msg .is-err { background: color-mix(in srgb, var(--bm-red) 10%, #fff); color: var(--bm-red-dark); }
.bm-form-col { padding: 28px; background: var(--bm-bg); border-radius: var(--bm-r); }

.bm-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.bm-modal[hidden] { display: none; }
.bm-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 22, 42, .6); animation: bm-fade .2s; }
.bm-modal__box {
	position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto;
	padding: 32px; border-radius: var(--bm-r); background: #fff; box-shadow: var(--bm-shadow-lg);
	animation: bm-pop .22s ease-out;
}
.bm-modal__box h2 { margin-right: 40px; }
.bm-modal__sub { color: var(--bm-muted); margin-top: -4px; }
.bm-modal__close {
	position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
	background: var(--bm-bg); color: var(--bm-text);
}
.bm-modal__close:hover { background: var(--bm-line); }
.bm-modal-open { overflow: hidden; }
@keyframes bm-fade { from { opacity: 0; } }
@keyframes bm-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* Contact Form 7 */
.bm-cf7 .wpcf7-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.bm-cf7 .wpcf7-form > p { margin: 0; }
.bm-cf7 .hidden-fields-container { display: none; border: 0; padding: 0; margin: 0; }
.bm-cf7 .wpcf7-form-control-wrap { display: block; }
.bm-cf7 .bm-field .wpcf7-form-control:not(.wpcf7-acceptance) {
	width: 100%; min-height: 48px; padding: 10px 14px; margin: 0;
	border: 1px solid var(--bm-line); border-radius: var(--bm-r-sm); background: #fff; font: inherit;
	transition: border-color .15s, box-shadow .15s;
}
.bm-cf7 .bm-field textarea.wpcf7-form-control { min-height: 88px; resize: vertical; }
.bm-cf7 .bm-field select.wpcf7-form-control:not(.wpcf7-acceptance) {
	appearance: none; padding-right: 40px; cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6878' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
}
.bm-cf7 .bm-field .wpcf7-form-control:focus { outline: 0; border-color: var(--bm-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bm-blue) 15%, transparent); }
.bm-cf7 .bm-field .wpcf7-not-valid { border-color: var(--bm-red); }
.bm-cf7 .bm-form__grid { row-gap: 20px; }
.bm-cf7 .wpcf7-form-control-wrap { position: relative; }
/* Подсказка об ошибке не сдвигает форму (иначе клик по галочке может «промахнуться»). */
.bm-cf7 .wpcf7-not-valid-tip { position: absolute; left: 2px; top: 100%; margin-top: 2px; font-size: 12px; line-height: 1.3; font-weight: 500; color: var(--bm-red-dark); white-space: nowrap; }
.bm-cf7 .bm-check .wpcf7-not-valid-tip { position: static; margin-top: 4px; }
.bm-cf7 .bm-check { display: block; }
.bm-cf7 .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.bm-cf7 .wpcf7-acceptance label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.bm-cf7 .wpcf7-acceptance input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--bm-blue); flex: none; }
.bm-cf7 .wpcf7-submit { width: 100%; font: inherit; font-weight: 600; }
.bm-cf7 .wpcf7-submit:disabled { opacity: .55; cursor: not-allowed; }
.bm-cf7 .wpcf7-spinner { display: block; margin: -4px auto 0; }
.bm-cf7 .wpcf7 form .wpcf7-response-output { margin: 0; padding: 12px 16px; border: 0; border-radius: var(--bm-r-sm); font-weight: 600; font-size: 14px; }
.bm-cf7 .wpcf7 form.sent .wpcf7-response-output { background: color-mix(in srgb, var(--bm-ok) 12%, #fff); color: var(--bm-ok); }
.bm-cf7 .wpcf7 form.invalid .wpcf7-response-output,
.bm-cf7 .wpcf7 form.unaccepted .wpcf7-response-output,
.bm-cf7 .wpcf7 form.failed .wpcf7-response-output,
.bm-cf7 .wpcf7 form.aborted .wpcf7-response-output,
.bm-cf7 .wpcf7 form.spam .wpcf7-response-output { background: color-mix(in srgb, var(--bm-red) 10%, #fff); color: var(--bm-red-dark); }
.bm-admin-hint { padding: 14px 18px; border: 1px dashed #c9a227; border-radius: var(--bm-r-sm); background: #fffbea; color: #6b5300; font-size: 14px; }

/* Блоки плагина внутри сетки главной */
.bm-split > .bmf-fx { height: 100%; }

/* =========================================================
   13. Подвал
   ========================================================= */
.bm-footer { background: var(--bm-blue-deep); color: rgba(255, 255, 255, .8); font-size: 15px; }
.bm-footer a { color: rgba(255, 255, 255, .85); }
.bm-footer a:hover { color: #fff; }
.bm-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding-top: 56px; padding-bottom: 44px; }
.bm-footer__logo { display: inline-block; padding: 12px 16px; background: #fff; border-radius: var(--bm-r-sm); margin-bottom: 20px; }
.bm-footer__logo .bm-logo__img { height: 28px; }
.bm-footer__phone { display: block; font-size: 22px; font-weight: 800; color: #fff !important; margin-bottom: 4px; }
.bm-footer__mail { display: block; margin-bottom: 8px; }
.bm-footer__addr { margin: 0 0 16px; }
.bm-footer__title { color: #fff; font-size: 16px; margin-bottom: 16px; }
.bm-footer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bm-footer .bm-stores { flex-direction: column; align-items: flex-start; margin: 0 0 16px; }
.bm-footer .bm-store { background: rgba(255, 255, 255, .1); }
.bm-socials { display: flex; gap: 10px; }
.bm-socials a { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1); }
.bm-socials a:hover { background: var(--bm-red); }
.bm-socials .bm-ico { width: 20px; height: 20px; }
.bm-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: rgba(255, 255, 255, .6); }
.bm-footer__bottom-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; }

/* =========================================================
   14. Адаптив
   ========================================================= */
@media (max-width: 1180px) {
	.bm-header__in { gap: 16px; }
	.bm-menu > li > a { padding: 10px 8px; font-size: 14px; }
	.bm-logo__img { height: 30px; }
}

@media (max-width: 1023px) {
	:root { --bm-header-h: 68px; }
	.bm-topbar__hours { display: none; }
	.bm-logo__img { height: 28px; }
	.bm-header__cta { display: none; }
	.bm-burger { display: inline-flex; }
	.bm-header { backdrop-filter: none; background: #fff; }

	.bm-nav {
		position: fixed; left: 0; right: 0; bottom: 0; top: var(--bm-nav-top, 106px);
		background: #fff; overflow-y: auto; padding: 12px var(--bm-gutter) 28px;
		visibility: hidden; opacity: 0; transform: translateY(-8px);
		transition: opacity .2s, transform .2s, visibility .2s;
		border-top: 1px solid var(--bm-line);
	}
	.bm-menu-open .bm-nav { visibility: visible; opacity: 1; transform: none; }
	.bm-menu-open { overflow: hidden; }
	.bm-menu { flex-direction: column; align-items: stretch; gap: 0; }
	.bm-menu > li { border-bottom: 1px solid var(--bm-line); }
	.bm-menu > li > a { padding: 16px 4px; font-size: 17px; justify-content: space-between; border-radius: 0; background: none !important; }
	.bm-menu .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0;
		padding: 0 0 10px 8px; display: none; min-width: 0;
	}
	.bm-menu li.is-open > .sub-menu { display: block; }
	.bm-menu li:hover > .sub-menu { opacity: 1; }
	.bm-menu > .menu-item-has-children.is-open > a::after { transform: rotate(-135deg); margin-top: 4px; }
	.bm-nav__mobile-extra { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
	.bm-nav__phone { text-align: center; font-weight: 700; font-size: 18px; color: var(--bm-text); }


	.bm-tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.bm-split { grid-template-columns: 1fr; }
	.bm-grid--3 { grid-template-columns: repeat(2, 1fr); }
	.bm-contacts { grid-template-columns: repeat(2, 1fr); }
	.bm-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 781px) {
	.wp-block-columns { flex-direction: column; }
	.wp-block-column { flex-basis: 100% !important; }
	.bm-cta { padding: 28px 24px; }
	.bm-cta__btn .wp-block-buttons { justify-content: flex-start; }
	.bm-map iframe { min-height: 300px; }
}

@media (max-width: 600px) {
	:root { --bm-gutter: 16px; --bm-r: 20px; }
	.bm-topbar__in { min-height: 34px; }
	.bm-topbar__left a:not(:first-child) { display: none; }
	.bm-logo__img { height: 22px; }
	.bm-header__in { gap: 10px; }
	.bm-header__phone, .bm-burger { width: 42px; height: 42px; }
	.bm-hero { padding-top: 14px; }
	.bm-tile { padding: 14px; font-size: 14px; }
	.bm-tile__ico { width: 40px; height: 40px; border-radius: 12px; }
	.bm-tile__ico .bm-ico { width: 20px; height: 20px; }
	.bm-app { grid-template-columns: 1fr; }
	.bm-app__media { display: none; }
	.bm-grid--3 { grid-template-columns: 1fr; }
	.bm-contacts { grid-template-columns: 1fr; }
	.bm-form__grid { grid-template-columns: 1fr; }
	.bm-app, .bm-form-col { padding: 20px; }
	.bm-modal__box { padding: 24px 20px; }
	.bm-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
	.bm-page-hero { padding: 28px 0 34px; }
	.bm-page-hero__sub { font-size: 16px; }
	.bm-card { padding: 22px; }
	.bm-section { padding: 20px 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.bm-topbar, .bm-header, .bm-footer, .bm-modal { display: none !important; }
}
