/* =========================================================
   MAER — Modern theme stylesheet
   Palette & fonts reproduce the previous maer-rus.ru site.
   ========================================================= */

:root {
	--c-primary: #3E4CA8;
	--c-primary-dark: #2f3b86;
	--c-primary-light: #5a68c4;
	--c-accent: #2395F6;
	--c-heading: #3C424F;
	--c-text: #6B7C93;
	--c-muted: #98a2b3;
	--c-border: #e5e8f1;
	--c-bg: #ffffff;
	--c-bg-alt: #f6f7fb;
	--c-dark: #1f2440;
	--c-white: #ffffff;

	--f-sans: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	--f-accent: 'Mulish', 'Helvetica Neue', Arial, sans-serif;

	--radius: 16px;
	--radius-sm: 10px;
	--shadow-sm: 0 2px 10px rgba(31, 36, 64, 0.06);
	--shadow-md: 0 12px 30px rgba(31, 36, 64, 0.1);
	--shadow-lg: 0 24px 60px rgba(31, 36, 64, 0.16);
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--container: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--f-sans);
	color: var(--c-text);
	background: var(--c-bg);
	font-size: 16px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; transition: color .25s var(--ease); }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--f-sans);
	color: var(--c-heading);
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}
.skip-link {
	position: fixed; top: -60px; left: 10px; z-index: 10000;
	background: var(--c-primary); color: #fff; padding: 12px 20px;
	border-radius: var(--radius-sm); transition: top .2s var(--ease);
}
.skip-link:focus { top: 10px; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }
.section { padding: 88px 0; }
.eyebrow {
	display: inline-block; font-family: var(--f-sans); font-weight: 700;
	font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
	color: var(--c-accent); margin-bottom: 14px;
}
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity .8s var(--ease), transform .8s var(--ease);
	transition-delay: var(--delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 15px 32px; border-radius: 100px; border: 2px solid transparent;
	font-weight: 700; font-size: .95rem; letter-spacing: .03em; text-transform: uppercase;
	cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
	white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-white { background: #fff; color: var(--c-primary); }
.btn-white:hover { background: var(--c-bg-alt); color: var(--c-primary-dark); }
.btn-buy { background: var(--c-accent); color: #fff; padding: 12px 22px; font-size: .82rem; }
.btn-buy:hover { background: var(--c-primary); color: #fff; }
.btn-sm { padding: 10px 20px; font-size: .78rem; }
.btn-lg { padding: 18px 40px; font-size: 1rem; }
.btn .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 500;
	background: transparent;
	transition: background .35s var(--ease), box-shadow .35s var(--ease), padding .35s var(--ease);
}
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 24px; }
.site-header.is-scrolled {
	background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
	box-shadow: var(--shadow-sm);
}
.site-header.is-scrolled .site-header-inner { padding: 14px 24px; }

.site-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; color: var(--c-heading); text-transform: uppercase; }
.custom-logo-link img { max-height: 52px; width: auto; }
.logo-mark {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary); color: #fff;
	font-family: var(--f-accent); font-weight: 700;
}
.home .site-header:not(.is-scrolled) .site-logo { color: #fff; }

.main-menu { display: flex; align-items: center; gap: 6px; }
.main-menu > li { position: relative; }
.main-menu > li > a {
	display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 100px;
	font-weight: 600; font-size: .92rem; letter-spacing: .02em; text-transform: uppercase;
	color: var(--c-heading); transition: background .25s var(--ease), color .25s var(--ease);
}
.home .site-header:not(.is-scrolled) .main-menu > li > a { color: #fff; }
.main-menu > li > a:hover, .main-menu > li.current-menu-item > a { background: var(--c-bg-alt); color: var(--c-primary); }
.home .site-header:not(.is-scrolled) .main-menu > li > a:hover,
.home .site-header:not(.is-scrolled) .main-menu > li.current-menu-item > a { background: rgba(255,255,255,.15); color: #fff; }

.main-menu li.menu-item-has-children > a::after {
	content: ''; width: 7px; height: 7px; margin-left: 2px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg); transition: transform .25s var(--ease);
}
.main-menu li.menu-item-has-children:hover > a::after { transform: rotate(225deg); }
.main-menu .sub-menu {
	position: absolute; top: calc(100% + 10px); left: 0; min-width: 260px;
	background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
	padding: 10px; opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.main-menu li.menu-item-has-children:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-menu .sub-menu a { display: block; padding: 11px 16px; border-radius: 8px; color: var(--c-heading); font-size: .88rem; font-weight: 500; text-transform: none; }
.main-menu .sub-menu a:hover { background: var(--c-bg-alt); color: var(--c-primary); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--c-heading); }
.home .site-header:not(.is-scrolled) .header-phone { color: #fff; }
.header-cta { display: none; }
@media (min-width: 900px) { .header-cta { display: inline-flex; } }

.menu-toggle {
	position: relative; width: 44px; height: 44px; border: none; background: transparent;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
	z-index: 20;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--c-heading); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.home .site-header:not(.is-scrolled) .menu-toggle span { background: #fff; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 960px) { .main-menu { display: none; } }

.mobile-menu {
	position: fixed; top: 0; right: -100%; width: min(360px, 88vw); height: 100vh; z-index: 900;
	background: #fff; box-shadow: var(--shadow-lg); transition: right .4s var(--ease);
	overflow-y: auto;
}
.mobile-menu.is-open { right: 0; }
.mobile-menu-inner { padding: 100px 32px 40px; }
.mobile-menu-list li { border-bottom: 1px solid var(--c-border); }
.mobile-menu-list > li > a { display: block; padding: 16px 0; font-weight: 700; font-size: 1.05rem; color: var(--c-heading); text-transform: uppercase; }
.mobile-menu-list .sub-menu { padding: 0 0 12px 16px; }
.mobile-menu-list .sub-menu a { display: block; padding: 8px 0; color: var(--c-text); font-weight: 500; }
.mobile-menu-contact { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.mobile-menu-contact a { font-weight: 700; color: var(--c-primary); font-size: 1.1rem; }
.mobile-menu-socials { display: flex; gap: 14px; }
.mobile-menu-backdrop {
	position: fixed; inset: 0; background: rgba(20,24,45,.55); z-index: 800;
	opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.mobile-menu-backdrop.is-open { opacity: 1; visibility: visible; }
.social-link {
	display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
	border-radius: 50%; background: var(--c-bg-alt); color: var(--c-primary);
	transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.social-link:hover { background: var(--c-primary); color: #fff; transform: translateY(-3px); }

/* ---------- Hero ---------- */
.hero {
	position: relative; min-height: 92vh; display: flex; align-items: center;
	background: linear-gradient(135deg, var(--c-dark), var(--c-primary-dark)) center/cover;
	background-size: cover; background-position: center; overflow: hidden;
	margin-top: -104px; padding-top: 104px;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,24,45,.55), rgba(20,24,45,.78)); }
.hero-inner { position: relative; z-index: 2; max-width: 780px; padding-top: 60px; padding-bottom: 60px; }
.hero-title { font-family: var(--f-accent); font-weight: 300; font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; line-height: 1.2; letter-spacing: .01em; }
.hero-subtitle { font-family: var(--f-accent); font-size: 1.25rem; color: rgba(255,255,255,.88); max-width: 620px; }
.hero .eyebrow { color: #bcd2ff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; }
.hero-scroll-cue {
	position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 2;
	width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.6); border-radius: 20px;
}
.hero-scroll-cue span {
	position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
	border-radius: 2px; background: #fff; animation: cueScroll 1.8s infinite;
}
@keyframes cueScroll { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; } }

/* ---------- About / factory ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-media { position: relative; min-height: 420px; }
.about-media-frame { position: absolute; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-media-frame img, .about-media-frame .media-placeholder { width: 100%; height: 100%; object-fit: cover; }
.frame-1 { width: 78%; top: 0; left: 0; aspect-ratio: 4/5; z-index: 1; }
.frame-2 { width: 55%; bottom: -30px; right: 0; aspect-ratio: 1/1; z-index: 2; border: 6px solid #fff; }
.media-placeholder { background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); }
.about-text { color: var(--c-text); }
.about-copy .btn { margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-section { background: linear-gradient(120deg, var(--c-primary), var(--c-primary-dark)); color: #fff; padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; margin-bottom: 8px; }
.cta-inner p { color: rgba(255,255,255,.85); margin: 0; }

/* ---------- Media / brand section ---------- */
.media-section { background: var(--c-bg-alt); }
.media-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.media-text { font-size: 1.1rem; }

/* ---------- Products grid ---------- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px; }
.product-card {
	background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
	transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.product-media { position: relative; display: block; aspect-ratio: 3/4; overflow: hidden; background: var(--c-bg-alt); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.08); }
.product-media-placeholder {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	font-family: var(--f-accent); font-size: 3rem; color: #fff;
	background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
}
.product-media-overlay {
	position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 20px;
	background: linear-gradient(180deg, rgba(31,36,64,0) 40%, rgba(31,36,64,.75));
	opacity: 0; transition: opacity .35s var(--ease);
}
.product-card:hover .product-media-overlay { opacity: 1; }
.product-info { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.product-name { font-weight: 700; color: var(--c-heading); font-size: .95rem; }
.product-sku { font-size: .82rem; color: var(--c-muted); }
.products-cta { text-align: center; margin-top: 48px; }

/* ---------- Contact form ---------- */
.contact-section { background: var(--c-bg-alt); }
.contact-form-wrap { max-width: 720px; margin: 0 auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 56px; }
.contact-form-head { text-align: center; margin-bottom: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { position: relative; margin-bottom: 22px; }
.form-field input, .form-field textarea {
	width: 100%; border: 2px solid var(--c-border); border-radius: var(--radius-sm);
	padding: 18px 16px 8px; background: transparent; transition: border-color .25s var(--ease);
	resize: vertical;
}
.form-field label {
	position: absolute; left: 17px; top: 16px; color: var(--c-muted); pointer-events: none;
	transition: transform .2s var(--ease), font-size .2s var(--ease), color .2s var(--ease);
	transform-origin: left top;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--c-accent); }
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
	transform: translateY(-11px) scale(.78); color: var(--c-accent);
}
.btn-submit { width: 100%; position: relative; }
.btn-spinner {
	width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4);
	border-top-color: #fff; display: none; animation: spin .7s linear infinite;
}
.btn-submit.is-loading .btn-spinner { display: inline-block; }
.btn-submit.is-loading .btn-text { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-response { text-align: center; margin: 16px 0 0; font-weight: 600; min-height: 1.4em; }
.form-response.is-success { color: #1b9c63; }
.form-response.is-error { color: #d1443d; }

/* ---------- Inner page banner ---------- */
.page-banner { padding: 64px 0 40px; background: var(--c-bg-alt); }
.page-banner h1 { margin-bottom: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: var(--c-muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs .current { color: var(--c-heading); font-weight: 600; }
.breadcrumbs .sep { opacity: .6; }

.page-featured-image { border-radius: var(--radius); overflow: hidden; margin-bottom: 40px; box-shadow: var(--shadow-md); }
.page-content { font-size: 1.05rem; }
.page-content h2, .page-content h3 { margin-top: 1.4em; }
.page-content ul, .page-content ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content ol li, .page-content ul li { margin-bottom: .5em; }
.page-content a:not(.btn) { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.page-content img { border-radius: var(--radius-sm); }
.page-content figure { margin: 0 0 1.4em; }
.page-content .btn-buy { text-decoration: none; margin: 6px 6px 6px 0; }

/* Style core Gutenberg blocks used inside existing catalog pages as cards */
.maer-gallery.reveal, .maer-columns.reveal { margin: 0 0 2em; }
.maer-gallery .blocks-gallery-item, .wp-block-gallery .wp-block-image {
	border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm);
	transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.maer-gallery .blocks-gallery-item:hover, .wp-block-gallery .wp-block-image:hover {
	transform: translateY(-6px); box-shadow: var(--shadow-md);
}
.maer-columns .wp-block-column {
	background: #fff; border-radius: var(--radius); padding: 8px;
}

/* =========================================================
   Legacy content compatibility layer
   The existing About / Catalog / category pages store their
   markup as raw HTML from the previous theme's section builder
   (classes like row/col-xs-*/card/contentswap-effect/button).
   That grid CSS doesn't ship with this theme, so we recreate
   the same class names here with the new visual language —
   the old page content keeps working without being re-entered.
   ========================================================= */
.page-content .gridContainer { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 8px; }
.page-content .row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.page-content .row > [class*="col-"] { padding: 0 12px; box-sizing: border-box; }
.page-content [class*="col-xs-"] { flex: 0 0 100%; max-width: 100%; }
.page-content .col-xs-1 { flex-basis: 8.333%; max-width: 8.333%; }
.page-content .col-xs-2 { flex-basis: 16.666%; max-width: 16.666%; }
.page-content .col-xs-3 { flex-basis: 25%; max-width: 25%; }
.page-content .col-xs-4 { flex-basis: 33.333%; max-width: 33.333%; }
.page-content .col-xs-5 { flex-basis: 41.666%; max-width: 41.666%; }
.page-content .col-xs-6 { flex-basis: 50%; max-width: 50%; }
.page-content .col-xs-7 { flex-basis: 58.333%; max-width: 58.333%; }
.page-content .col-xs-8 { flex-basis: 66.666%; max-width: 66.666%; }
.page-content .col-xs-9 { flex-basis: 75%; max-width: 75%; }
.page-content .col-xs-10 { flex-basis: 83.333%; max-width: 83.333%; }
.page-content .col-xs-11 { flex-basis: 91.666%; max-width: 91.666%; }
.page-content .col-xs-12 { flex-basis: 100%; max-width: 100%; }
@media (min-width: 768px) {
	.page-content .col-sm-1 { flex-basis: 8.333%; max-width: 8.333%; }
	.page-content .col-sm-2 { flex-basis: 16.666%; max-width: 16.666%; }
	.page-content .col-sm-3 { flex-basis: 25%; max-width: 25%; }
	.page-content .col-sm-4 { flex-basis: 33.333%; max-width: 33.333%; }
	.page-content .col-sm-5 { flex-basis: 41.666%; max-width: 41.666%; }
	.page-content .col-sm-6 { flex-basis: 50%; max-width: 50%; }
	.page-content .col-sm-7 { flex-basis: 58.333%; max-width: 58.333%; }
	.page-content .col-sm-8 { flex-basis: 66.666%; max-width: 66.666%; }
	.page-content .col-sm-9 { flex-basis: 75%; max-width: 75%; }
	.page-content .col-sm-10 { flex-basis: 83.333%; max-width: 83.333%; }
	.page-content .col-sm-11 { flex-basis: 91.666%; max-width: 91.666%; }
	.page-content .col-sm-12 { flex-basis: 100%; max-width: 100%; }
}
@media (min-width: 1024px) {
	.page-content .col-md-1 { flex-basis: 8.333%; max-width: 8.333%; }
	.page-content .col-md-2 { flex-basis: 16.666%; max-width: 16.666%; }
	.page-content .col-md-3 { flex-basis: 25%; max-width: 25%; }
	.page-content .col-md-4 { flex-basis: 33.333%; max-width: 33.333%; }
	.page-content .col-md-5 { flex-basis: 41.666%; max-width: 41.666%; }
	.page-content .col-md-6 { flex-basis: 50%; max-width: 50%; }
	.page-content .col-md-7 { flex-basis: 58.333%; max-width: 58.333%; }
	.page-content .col-md-8 { flex-basis: 66.666%; max-width: 66.666%; }
	.page-content .col-md-9 { flex-basis: 75%; max-width: 75%; }
	.page-content .col-md-10 { flex-basis: 83.333%; max-width: 83.333%; }
	.page-content .col-md-11 { flex-basis: 91.666%; max-width: 91.666%; }
	.page-content .col-md-12 { flex-basis: 100%; max-width: 100%; }
}
@media (min-width: 1200px) {
	.page-content [class*="col-lg-"] { flex-basis: auto; }
	.page-content .col-lg-3 { flex-basis: 25%; max-width: 25%; }
	.page-content .col-lg-4 { flex-basis: 33.333%; max-width: 33.333%; }
}

/* Alignment / flow utilities used throughout the old section markup */
.page-content .text-center { text-align: center; }
.page-content .middle-xs, .page-content .full-height-row { align-items: center; }
.page-content .top-xs { align-items: flex-start; }
.page-content .bottom-xs { align-items: flex-end; }
.page-content .start-xs { justify-content: flex-start; }
.page-content .center-xs { justify-content: center; }
.page-content .end-xs { justify-content: flex-end; }
.page-content .around-xs { justify-content: space-around; }
.page-content .between-xs { justify-content: space-between; }
@media (min-width: 768px) {
	.page-content .middle-sm { align-items: center; }
	.page-content .center-sm { justify-content: center; }
}
.page-content .space-top { margin-top: 28px; }
.page-content .space-bottom { margin-bottom: 28px; }
.page-content .no-padding { padding: 0; }
.page-content .small { font-size: .85rem; }
.page-content .italic { font-style: italic; color: var(--c-muted); }

/* Section wrappers (content-section / gridContainer) get the same rhythm as new sections */
.page-content .content-section { padding: 48px 0; }
.page-content .content-section-spacing { padding: 64px 0; }
.page-content .content-section + .content-section { border-top: 1px solid var(--c-border); }

/* Product "card" grid (catalog category pages) restyled to match the new product cards */
.page-content .card {
	background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
	transition: box-shadow .35s var(--ease), transform .35s var(--ease); height: 100%;
}
.page-content .card:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.page-content .contentswap-effect { position: relative; display: block; overflow: hidden; }
.page-content .initial-image { background: var(--c-bg-alt); aspect-ratio: 3 / 4; overflow: hidden; }
.page-content .initial-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s var(--ease); }
.page-content .card:hover .initial-image img { transform: scale(1.08); }
.page-content .overlay { display: none; }
.page-content .swap-inner {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(180deg, rgba(31,36,64,0) 40%, rgba(31,36,64,.65));
	opacity: 0; transition: opacity .35s var(--ease);
}
.page-content .card:hover .swap-inner { opacity: 1; }
.page-content .portfolio-icon { color: #fff !important; font-size: 22px !important; }
.page-content h4 { font-size: 1rem; margin: 0 0 4px; }

/* "Buy on Wildberries" buttons — both the theme's own .btn-buy and the legacy .button classes */
.page-content .button,
.page-content a.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 22px; border-radius: 100px; background: var(--c-accent); color: #fff;
	font-weight: 700; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase;
	text-decoration: none; transition: background .25s var(--ease), transform .25s var(--ease);
}
.page-content .button:hover, .page-content a.button:hover { background: var(--c-primary); color: #fff; transform: translateY(-2px); }

/* The "Каталог продукции" landing page only has 6 cards — the legacy col-md-2
   markup crams all of them into one tight row on wide screens, so give it its
   own responsive column count. (Aspect ratio/crop now match the shared rule
   above, since every product photo on the site is a portrait model shot.) */
.catalog-landing .row {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 28px;
}
.catalog-landing .row > [class*="col-"] {
	flex-basis: auto; max-width: none; width: auto; padding: 0;
}

/* ---------- Catalog landing (category tiles) ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-bottom: 40px; }
.category-tile {
	display: flex; align-items: center; gap: 20px; padding: 28px; background: #fff;
	border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
	transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.category-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.category-tile-media {
	flex-shrink: 0; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
}
.category-tile-glyph { font-family: var(--f-accent); color: #fff; font-size: 1.6rem; }
.category-tile-title { font-weight: 700; color: var(--c-heading); font-size: 1.05rem; flex: 1; }
.category-tile-arrow { color: var(--c-accent); font-size: 1.3rem; transition: transform .3s var(--ease); }
.category-tile:hover .category-tile-arrow { transform: translateX(6px); }

/* ---------- Contacts page ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 40px 0 56px; }
.contact-card { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); text-align: center; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.contact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.contact-card-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--c-bg-alt); color: var(--c-primary); margin-bottom: 14px; }
.contact-card h3 { font-size: 1rem; margin-bottom: 6px; }
.contact-card a { font-weight: 600; color: var(--c-primary); }

/* ---------- Blog ---------- */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-card-media { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--c-bg-alt); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card-media img { transform: scale(1.06); }
.post-card-media-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--f-accent); font-size: 2.4rem; color: #fff; background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); }
.post-card-body { padding: 24px; }
.post-card-date { font-size: .8rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }
.post-card-title { font-size: 1.2rem; margin: 8px 0 10px; }
.post-card-title a { color: var(--c-heading); }
.post-card-title a:hover { color: var(--c-primary); }
.post-card-excerpt { font-size: .95rem; }
.post-card-more { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.post-meta { color: var(--c-muted); }

.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 48px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px;
	border-radius: 50%; background: var(--c-bg-alt); color: var(--c-heading); font-weight: 600; padding: 0 8px;
	transition: background .25s var(--ease), color .25s var(--ease);
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--c-primary); color: #fff; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 56px; }
.comment-list .comment { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--c-border); }
.comment-form input, .comment-form textarea { width: 100%; border: 2px solid var(--c-border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 16px; }
.comment-form textarea { min-height: 140px; }

/* ---------- 404 ---------- */
.error-404-section { text-align: center; padding: 140px 0; }
.error-code { font-family: var(--f-accent); font-size: 6rem; color: var(--c-primary); font-weight: 300; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-dark); color: rgba(255,255,255,.68); padding-top: 72px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer-col h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 20px; }
.footer-brand .site-logo { color: #fff; }
.footer-brand p { margin: 16px 0; max-width: 320px; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials .social-link { background: rgba(255,255,255,.08); color: #fff; }
.footer-socials .social-link:hover { background: var(--c-accent); }
.footer-menu li, .footer-contacts li { margin-bottom: 12px; }
.footer-menu a, .footer-contacts a { color: rgba(255,255,255,.68); }
.footer-menu a:hover, .footer-contacts a:hover { color: #fff; }
.footer-contacts .muted { color: rgba(255,255,255,.5); font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 24px 0; }
.footer-bottom p { margin: 0; font-size: .85rem; text-align: center; color: rgba(255,255,255,.5); }

.back-to-top {
	position: fixed; bottom: 28px; right: 28px; z-index: 400;
	width: 48px; height: 48px; border-radius: 50%; background: var(--c-primary); color: #fff;
	display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md);
	opacity: 0; visibility: hidden; transform: translateY(12px);
	transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background .3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--c-primary-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.about-grid { grid-template-columns: 1fr; gap: 48px; }
	.about-media { min-height: 340px; margin-bottom: 20px; }
	.footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.section { padding: 64px 0; }
	.hero { min-height: 100vh; }
	.form-row { grid-template-columns: 1fr; }
	.contact-form-wrap { padding: 32px 20px; }
	.cta-inner { flex-direction: column; align-items: flex-start; }
	.footer-inner { grid-template-columns: 1fr; }
	.frame-1, .frame-2 { position: relative; width: 100%; bottom: auto; right: auto; margin-bottom: 16px; }
	.about-media { min-height: auto; }
}
