/**
 * Конструктор макета гравировки (inc/engraving.php, assets/js/engraving.js).
 * Все селекторы — с префиксом pcm-engr; файл подключается только на странице ручки.
 */

/* @font-face шрифтов макета выводит inc/engraving.php (только для файлов, которые есть в assets/fonts/engraving). */

/* ---------- кнопка на карточке ---------- */

.pcm-engr-cta[hidden],
.pcm-engr-cta [hidden],
.pcm-engr [hidden] {
	display: none !important;
}

.pcm-engr-cta {
	margin: 12px 0 0;
}

/* новая карточка (product-page.css): [ корзина ][ ♡ ] — кнопка гравировки второй строкой на всю ширину */
.pcm-pp-buy {
	flex-wrap: wrap;
}

/* с переносом строк «Перейти в корзину» (width: 100%) иначе вытесняет ♡ на отдельную строку */
.pcm-pp .pcm-pp-buy > form.cart,
.pcm-pp .pcm-pp-buy > .pcm-pp-to-cart {
	flex: 1 1 0;
}

.pcm-pp-buy > .pcm-engr-cta {
	flex: 1 0 100%;
	order: 5;
	min-width: 0;
	margin: 0;
}

.pcm-engr-cta .pcm-engr-cta__btn,
.pcm-engr-cta .pcm-engr-cta__btn:focus {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 14px 20px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: inset 0 0 0 1px #111;
	color: #111;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
	white-space: normal;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.pcm-engr-cta .pcm-engr-cta__btn:hover,
.pcm-engr-cta .pcm-engr-cta__btn:focus-visible {
	background: #111;
	color: #fff;
}

.pcm-engr-cta .pcm-engr-cta__btn:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.pcm-engr-cta__saved {
	margin: 6px 0 0;
	overflow: hidden;
	font-size: 12px;
	line-height: 1.4;
	color: #6b6b6b;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/*
 * Стандартная карточка Astra: «В корзину» там маленькая серая кнопка темы, поэтому конструктор — вторичное
 * текстовое действие (подчёркнутая ссылка-кнопка), а не крупная кнопка с рамкой, которая перетягивала внимание.
 */
body:not(.pcm-pp) .pcm-engr-cta .pcm-engr-cta__btn,
body:not(.pcm-pp) .pcm-engr-cta .pcm-engr-cta__btn:focus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: auto;
	min-height: 44px;
	padding: 10px 0;
	background: transparent;
	box-shadow: none;
	color: #111;
	font-size: 12px;
	text-align: left;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

body:not(.pcm-pp) .pcm-engr-cta .pcm-engr-cta__btn:hover,
body:not(.pcm-pp) .pcm-engr-cta .pcm-engr-cta__btn:focus-visible {
	background: transparent;
	color: #555;
	text-decoration-thickness: 2px;
}

body:not(.pcm-pp) .pcm-engr-cta .pcm-engr-cta__btn::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M4 20l1-4L16 5l3 3L8 19z'/%3E%3Cpath d='M14 7l3 3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M4 20l1-4L16 5l3 3L8 19z'/%3E%3Cpath d='M14 7l3 3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- окно ---------- */

/*
 * Мастер (владелец, 2026-10-26, по образцу конструктора колец): окно на весь экран, слева — ручка с надписью,
 * справа — шаги «Место → Текст → Шрифт → Размер → Положение», внизу справа — прогресс и «Далее».
 * До 900 px — одна колонка: сверху прилипает ручка, снизу — панель с «Далее».
 */
html.pcm-engr-open {
	overflow: hidden;
}

.pcm-engr {
	box-sizing: border-box;
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: #fff;
	color: #111;
	overflow: hidden;
}

.pcm-engr::backdrop {
	background: rgba(17, 17, 17, 0.6);
}

.pcm-engr *,
.pcm-engr *::before,
.pcm-engr *::after {
	box-sizing: border-box;
}

.pcm-engr__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
	white-space: nowrap;
}

.pcm-engr__box {
	--pcm-engr-panel: clamp(380px, 34vw, 500px);
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--pcm-engr-panel);
	grid-template-rows: auto minmax(0, 1fr);
	height: 100%;
	background: #fff;
	font-size: 14px;
	line-height: 1.5;
}

.pcm-engr__head {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-width: 0;
	padding: 12px 16px 12px 32px;
	border-bottom: 1px solid #e8e8e8;
	background: #fff;
}

.pcm-engr__heading {
	min-width: 0;
}

.pcm-engr .pcm-engr__title {
	margin: 0;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #111;
}

.pcm-engr__product {
	margin: 2px 0 0;
	overflow: hidden;
	font-size: 13px;
	color: #6b6b6b;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pcm-engr .pcm-engr__close,
.pcm-engr .pcm-engr__close:focus {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #111;
	cursor: pointer;
}

.pcm-engr .pcm-engr__close:hover,
.pcm-engr .pcm-engr__close:focus-visible {
	background: #f2f2f2;
	color: #111;
}

/* ---------- слева: ручка ---------- */

.pcm-engr__preview {
	grid-column: 1;
	grid-row: 2;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	padding: 20px 32px 24px;
}

.pcm-engr__stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 180px;
	overflow: hidden;
	background: #fff;
}

.pcm-engr__info {
	flex: none;
	padding-top: 12px;
	border-top: 1px solid #eeece8;
}

.pcm-engr__summary {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #111;
}

/* на шаге «Проверка» сводка не нужна — там всё перечислено */
.pcm-engr__box[data-step="check"] .pcm-engr__summary,
.pcm-engr__summary:empty {
	display: none;
}

.pcm-engr__info-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 4px 16px;
	margin-top: 6px;
}

.pcm-engr .pcm-engr__img {
	position: absolute;
	top: 0;
	left: 0;
	max-width: none !important;
	margin: 0;
	transform-origin: 0 0;
	user-select: none;
	pointer-events: none;
}

.pcm-engr__stage.is-loading .pcm-engr__img,
.pcm-engr__stage.is-loading .pcm-engr__zone {
	visibility: hidden;
}

.pcm-engr__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	font-size: 13px;
	color: #6b6b6b;
}

.pcm-engr__zone {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 2px;
	pointer-events: none;
}

/* без пунктирной рамки (владелец, 2026-10-26); пустую зону видно по подложке .is-empty */

.pcm-engr__zone[data-position="left"] {
	justify-content: flex-start;
}

.pcm-engr__zone[data-position="right"] {
	justify-content: flex-end;
}

/* ---------- схема корпуса (фото ручки только в упаковке) ---------- */

.pcm-engr__stage[data-mode="schema"] {
	background: #fff;
}

.pcm-engr__barrel {
	position: absolute;
	border: 1px solid #b9b5ae;
	border-radius: 0 999px 999px 0;
	background: #e9e7e3;
}

/* наконечник — плоский конус слева, без теней и бликов: это схема, а не изображение ручки */
.pcm-engr__barrel::before {
	content: "";
	position: absolute;
	top: 18%;
	right: 100%;
	width: 28px;
	height: 64%;
	background: #b9b5ae;
	clip-path: polygon(100% 0, 100% 100%, 0 55%, 0 45%);
}

.pcm-engr__badge {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 3px 8px;
	border: 1px solid #b9b5ae;
	background: #fff;
	color: #3d3d3d;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* подписи концов ручки: где наконечник, где верх */
.pcm-engr__end {
	position: absolute;
	bottom: 8px;
	padding: 2px 6px;
	background: rgba(255, 255, 255, 0.9);
	color: #4a4a4a;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	pointer-events: none;
}

.pcm-engr__end--tip {
	left: 0;
}

.pcm-engr__end--cap {
	right: 0;
}

/* фото «Справа»: наконечник справа */
.pcm-engr__stage.is-mirror .pcm-engr__end--tip {
	right: 0;
	left: auto;
}

.pcm-engr__stage.is-mirror .pcm-engr__end--cap {
	right: auto;
	left: 0;
}

.pcm-engr__stage[data-mode="schema"] .pcm-engr__end--tip {
	left: var(--pcm-engr-tip-x, 8px);
}

.pcm-engr__stage.is-loading .pcm-engr__end,
.pcm-engr__stage:not([data-mode]) .pcm-engr__end {
	visibility: hidden;
}

/* надпись: одна или две строки; выравнивание строк — как у положения в зоне */
.pcm-engr__text {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
	white-space: pre;
	font-weight: 400;
	letter-spacing: 0.02em;
}

.pcm-engr__zone[data-lines="2"] .pcm-engr__text {
	line-height: 1.08;
}

.pcm-engr__zone[data-position="left"] .pcm-engr__text {
	align-items: flex-start;
}

.pcm-engr__zone[data-position="right"] .pcm-engr__text {
	align-items: flex-end;
}

.pcm-engr__line {
	display: block;
}

/*
 * картинка в строке (смайлик, сердечко…): значок цвета надписи чуть выше прописной буквы (0,95 кегля, владелец
 * 2026-10-26: «чуть увеличим»), середина значка — на середине прописных (≈ 0,35 кегля над базовой линией)
 */
.pcm-engr__glyph {
	display: inline-block;
	width: 0.95em;
	height: 0.95em;
	margin: 0 0.08em;
	overflow: visible;
	vertical-align: -0.13em;
	filter: drop-shadow(0 0 0.02em var(--pcm-engr-halo, transparent));
}

/*
 * Надпись — плоская: плотная заливка + тонкий симметричный ореол контрастного цвета без смещения и размытия.
 * Ореол отделяет буквы от бликов (хром: светлые края, тёмная полоса посередине) и не изображает рельеф.
 */
.pcm-engr__zone.is-dark .pcm-engr__text {
	--pcm-engr-halo: rgba(0, 0, 0, 0.55);
	color: #f3efe6;
}

.pcm-engr__zone.is-light .pcm-engr__text {
	--pcm-engr-halo: rgba(255, 255, 255, 0.62);
	color: #161616;
}

.pcm-engr__zone .pcm-engr__text {
	text-shadow:
		0.028em 0 0 var(--pcm-engr-halo), -0.028em 0 0 var(--pcm-engr-halo),
		0 0.028em 0 var(--pcm-engr-halo), 0 -0.028em 0 var(--pcm-engr-halo),
		0.02em 0.02em 0 var(--pcm-engr-halo), -0.02em -0.02em 0 var(--pcm-engr-halo),
		0.02em -0.02em 0 var(--pcm-engr-halo), -0.02em 0.02em 0 var(--pcm-engr-halo);
}

/*
 * Цвет гравировки по материалу (правило владельца): золотая (латунь), серая (сталь), чёрная (чернение).
 * Оттенок зависит от тона корпуса: на тёмном лаке — светлее, на светлой стали — темнее. Без цвета
 * (материал неизвестен) остаётся нейтральная надпись по тону корпуса — правила выше.
 */
/* по образцу владельца на латуни (IM Black GT): светлое «шампанское» золото */
.pcm-engr__zone.is-dark[data-color="gold"] .pcm-engr__text {
	--pcm-engr-halo: rgba(0, 0, 0, 0.25);
	color: #e6c487;
}

.pcm-engr__zone.is-light[data-color="gold"] .pcm-engr__text {
	color: #94701f;
}

.pcm-engr__zone.is-dark[data-color="grey"] .pcm-engr__text {
	color: #cfcfcf;
}

/*
 * По образцам владельца (2026-10-23): серая гравировка на стали — светлая, почти белая (лазер осветляет металл);
 * чёрная (чернение) — сплошной тёмный текст. Контур минимальный: только чтобы надпись не терялась на бликах фото.
 */
.pcm-engr__zone.is-light[data-color="grey"] .pcm-engr__text {
	--pcm-engr-halo: rgba(0, 0, 0, 0.28);
	color: #f0f0f0;
}

.pcm-engr__zone[data-color="black"] .pcm-engr__text {
	--pcm-engr-halo: rgba(255, 255, 255, 0.35);
	color: #111;
}

/* пустое поле: на ручке ничего (владелец, 2026-10-26: без подложки «Здесь будет надпись») */

.pcm-engr__more {
	font-size: 12px;
	line-height: 1.5;
	color: #4a4a4a;
}

.pcm-engr__more summary {
	display: inline-block;
	padding: 4px 0;
	color: #111;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	list-style: none;
}

.pcm-engr__more summary::-webkit-details-marker {
	display: none;
}

.pcm-engr__more p {
	max-width: 640px;
	margin: 6px 0 0;
}

.pcm-engr__note,
.pcm-engr__warn {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: #4a4a4a;
}

/* предупреждение — только при реальных отклонениях (схема, другое фото, уменьшенная надпись, резервный шрифт) */
.pcm-engr__warn {
	margin: 8px 0 0;
	padding: 8px 12px 8px 34px;
	border-left: 2px solid #c98a12;
	background: #fff
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a06a0a' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.2v.3'/%3E%3C/svg%3E")
		10px 8px / 16px 16px no-repeat;
	color: #3d3d3d;
}

/* компьютер: предупреждение поверх верхнего края фото — высота фото не меняется, ручка не сдвигается */
@media (min-width: 901px) {
	.pcm-engr__preview {
		position: relative;
	}

	.pcm-engr__warn {
		position: absolute;
		top: 20px;
		left: 32px;
		z-index: 4;
		max-width: min(640px, calc(100% - 240px));
		margin: 0;
	}
}

/* ---------- справа: шаги ---------- */

.pcm-engr__panel {
	grid-column: 2;
	grid-row: 2;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	margin: 0;
	border-left: 1px solid #e8e8e8;
}

.pcm-engr__step-head {
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 12px;
	border-bottom: 1px solid #e8e8e8;
}

.pcm-engr .pcm-engr__step-title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-family: inherit;
	font-size: 19px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0;
	text-align: center;
	text-transform: none;
	color: #111;
	outline: none;
}

.pcm-engr__step-num {
	display: inline-block;
	margin-left: 2px;
	font-size: 13px;
	vertical-align: super;
	line-height: 0;
	color: #8a8a8a;
	font-variant-numeric: tabular-nums;
}

.pcm-engr .pcm-engr__arrow,
.pcm-engr .pcm-engr__arrow:focus {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #111;
	cursor: pointer;
}

.pcm-engr .pcm-engr__arrow:hover {
	background: #f2f2f2;
	color: #111;
}

.pcm-engr .pcm-engr__arrow:disabled {
	visibility: hidden;
}

.pcm-engr__steps {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	padding: 24px 28px 28px;
	scroll-padding: 16px;
}

.pcm-engr__field {
	margin: 0 0 18px;
}

.pcm-engr .pcm-engr__group {
	min-width: 0;
	margin: 0 0 24px;
	padding: 0;
	border: 0;
}

.pcm-engr__step > .pcm-engr__group:last-child {
	margin-bottom: 0;
}

.pcm-engr .pcm-engr__label {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 8px;
	padding: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #111;
}

.pcm-engr__label-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.pcm-engr .pcm-engr__input,
.pcm-engr .pcm-engr__input:focus {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #cfcfcf;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	color: #111;
	font-family: inherit;
	font-size: 16px; /* меньше 16px — iOS увеличивает страницу при фокусе */
	line-height: 46px;
}

/* фокус поля — рамка 2 px (1 px рамки + 1 px внутренней тени), а не только смена цвета */
.pcm-engr .pcm-engr__input:focus {
	border-color: #111;
	box-shadow: inset 0 0 0 1px #111;
	outline: none;
}

.pcm-engr__meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 6px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #6b6b6b;
}

.pcm-engr__msg.is-error {
	color: #a3361f;
}

.pcm-engr__count {
	flex: none;
	font-variant-numeric: tabular-nums;
}

.pcm-engr__count.is-limit {
	color: #111;
	font-weight: 500;
}

/* текстовые кнопки: «Убрать строку», «Сбросить макет» */
.pcm-engr .pcm-engr__link,
.pcm-engr .pcm-engr__link:focus {
	flex: none;
	min-height: 32px;
	margin: 0;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #111;
	font-family: inherit;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.pcm-engr .pcm-engr__link:hover {
	background: transparent;
	color: #555;
}

.pcm-engr .pcm-engr__add,
.pcm-engr .pcm-engr__add:focus {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	margin: 0 0 26px;
	padding: 0 16px;
	border: 1px dashed #a9a59e;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #111;
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.pcm-engr .pcm-engr__add:hover {
	border-style: solid;
	border-color: #111;
	background: transparent;
	color: #111;
}

.pcm-engr .pcm-engr__add span {
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
}

/* «Популярные фразы»: кнопки-чипсы, фраза встаёт в строку */
.pcm-engr__phrases {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pcm-engr .pcm-engr__phrase,
.pcm-engr .pcm-engr__phrase:focus {
	min-height: 40px;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid #d6d6d6;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	color: #111;
	font-family: inherit;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.pcm-engr .pcm-engr__phrase:hover {
	border-color: #111;
	background: #fff;
	color: #111;
}

.pcm-engr .pcm-engr__phrase:active {
	background: #111;
	color: #fff;
}

.pcm-engr .pcm-engr__phrase:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.pcm-engr__pictos {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pcm-engr .pcm-engr__picto,
.pcm-engr .pcm-engr__picto:focus {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0;
	padding: 0;
	border: 1px solid #d6d6d6;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	color: #111;
	cursor: pointer;
}

.pcm-engr .pcm-engr__picto:hover {
	border-color: #111;
	background: #fff;
	color: #111;
}

.pcm-engr .pcm-engr__picto:active {
	background: #111;
	color: #fff;
}

/* варианты-строки: место, размер, положение */
.pcm-engr__options {
	display: grid;
	gap: 8px;
}

.pcm-engr__options--row {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pcm-engr__option {
	position: relative;
	display: block;
	min-width: 0;
	margin: 0;
	cursor: pointer;
}

.pcm-engr__option input,
.pcm-engr__chip input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.pcm-engr__option > span {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 60px;
	padding: 12px 18px;
	border: 1px solid #d6d6d6;
	background: #fff;
	color: #111;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.pcm-engr__option b {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.pcm-engr__options--row .pcm-engr__option > span {
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	min-height: 76px;
	padding: 10px 6px;
	text-align: center;
}

.pcm-engr__options--row .pcm-engr__option b {
	font-size: 12px;
}

.pcm-engr__size-sample {
	flex: none;
	font-family: "Times New Roman", Times, serif;
	font-style: normal;
	line-height: 1;
}

.pcm-engr__option:hover > span,
.pcm-engr__chip:hover > span {
	border-color: #111;
}

.pcm-engr__option input:checked + span,
.pcm-engr__chip input:checked + span {
	border-color: #111;
	background: #111;
	color: #fff;
}

.pcm-engr__option input:focus-visible + span,
.pcm-engr__chip input:focus-visible + span {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.pcm-engr__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pcm-engr__chips--fonts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.pcm-engr__chip {
	position: relative;
	display: block;
	min-width: 0;
	margin: 0;
	cursor: pointer;
}

.pcm-engr__chip > span {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 42px;
	padding: 9px 14px;
	border: 1px solid #d6d6d6;
	background: #fff;
	color: #111;
	font-size: 13px;
	line-height: 1.3;
	transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

/* цвет гравировки: образец цвета + название (+ пометка «чернение, +200 ₽») */
.pcm-engr__chip--color > span {
	flex-direction: row;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 8px;
}

.pcm-engr__chip--color small {
	flex-basis: 100%;
	padding-left: 22px;
	font-size: 11px;
	opacity: 0.8;
}

.pcm-engr__swatch {
	flex: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.pcm-engr__swatch--gold {
	background: #c9a24a;
}

.pcm-engr__swatch--grey {
	background: #9c9c9c;
}

.pcm-engr__swatch--black {
	background: #111;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.pcm-engr__hint {
	margin: 10px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: #4a4a4a;
}

.pcm-engr__chip--font > span {
	align-items: center;
	min-height: 72px;
	padding: 10px 8px;
	text-align: center;
}

/* образец шрифта — текстом первой строки посетителя (engraving.js), пока строки нет — «Гравировка» */
.pcm-engr__sample {
	display: block;
	max-width: 100%;
	overflow: hidden;
	font-size: 22px;
	font-weight: 400;
	line-height: 1.45;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.pcm-engr__chip--font small {
	display: block;
	margin: 2px 0 0;
	font-size: 11px;
	line-height: 1.3;
	opacity: 0.75;
}

/* шаг «Проверка»: параметр — значение — «Изменить» */
.pcm-engr .pcm-engr__review {
	margin: 0;
	padding: 0;
	border-top: 1px solid #e8e8e8;
}

.pcm-engr__review-row {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 4px 12px;
	padding: 12px 0;
	border-bottom: 1px solid #e8e8e8;
}

.pcm-engr .pcm-engr__review dt {
	margin: 0;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b6b6b;
}

.pcm-engr .pcm-engr__review dd {
	min-width: 0;
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: #111;
	overflow-wrap: anywhere;
}

.pcm-engr__review-line {
	display: block;
	font-size: 20px;
	line-height: 1.3;
	white-space: pre-wrap;
}

.pcm-engr .pcm-engr__review dd.is-empty {
	color: #a3361f;
}

/* ---------- низ панели: статус, прогресс, «Далее» / «Сохранить» ---------- */

.pcm-engr__footer {
	flex: none;
	padding: 10px 20px 16px;
	border-top: 1px solid #e8e8e8;
	background: #fff;
}

.pcm-engr__status {
	min-height: 1.45em;
	margin: 0 0 8px;
	font-size: 12px;
	line-height: 1.45;
	color: #3d3d3d;
}

.pcm-engr__status[data-kind="ok"] {
	color: #2b6b3c;
}

.pcm-engr__status[data-kind="ok"]::before {
	content: "✓ ";
	font-weight: 600;
}

/* «Открыть макет» после сохранения (страница макета — в новой вкладке) */
.pcm-engr .pcm-engr__status-link {
	color: #111;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pcm-engr__status[data-kind="warn"] {
	color: #8a4b00;
}

.pcm-engr__status[data-kind="warn"]::before {
	content: "! ";
	font-weight: 700;
}

/* прогресс с подписями шагов — отдельной строкой над кнопкой (6 подписей рядом с кнопкой не помещаются) */
.pcm-engr__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

.pcm-engr .pcm-engr__nav > .pcm-engr__progress {
	flex-basis: 100%;
}

/* и в фокусе (после нажатия): иначе правило :focus ниже сжимало кнопку до ширины текста */
.pcm-engr .pcm-engr__nav > .pcm-engr__next,
.pcm-engr .pcm-engr__nav > .pcm-engr__next:focus,
.pcm-engr .pcm-engr__nav > .pcm-engr__save,
.pcm-engr .pcm-engr__nav > .pcm-engr__save:focus {
	flex: 1 1 auto;
}

.pcm-engr .pcm-engr__progress {
	flex: 1 1 auto;
	display: flex;
	gap: 4px;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pcm-engr .pcm-engr__progress li {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.pcm-engr .pcm-engr__progress-btn,
.pcm-engr .pcm-engr__progress-btn:focus {
	display: block;
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 0 4px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #8a8a8a;
	font-family: inherit;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-align: center;
	text-transform: none;
	cursor: pointer;
}

.pcm-engr .pcm-engr__progress-btn:hover {
	background: transparent;
	color: #111;
}

.pcm-engr__progress-btn i {
	display: block;
	height: 3px;
	margin: 0 0 7px;
	border-radius: 2px;
	background: #e2e0dc;
}

.pcm-engr__progress-btn span {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pcm-engr__progress-btn.is-done i {
	background: #8a8a8a;
}

.pcm-engr .pcm-engr__progress-btn.is-current {
	color: #111;
	font-weight: 500;
}

.pcm-engr__progress-btn.is-current i {
	background: #111;
}

.pcm-engr .pcm-engr__next,
.pcm-engr .pcm-engr__next:focus,
.pcm-engr .pcm-engr__save,
.pcm-engr .pcm-engr__save:focus {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 132px;
	min-height: 48px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: 0;
	background: #111;
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.pcm-engr .pcm-engr__next:hover,
.pcm-engr .pcm-engr__next:focus-visible,
.pcm-engr .pcm-engr__save:hover,
.pcm-engr .pcm-engr__save:focus-visible {
	background: #333;
	color: #fff;
}

/* «В корзину с гравировкой» — основная кнопка шага «Проверка»; «Сохранить макет» рядом — второстепенная */
.pcm-engr .pcm-engr__cart,
.pcm-engr .pcm-engr__cart:focus {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 0;
	background: #111;
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
}

.pcm-engr .pcm-engr__cart:hover,
.pcm-engr .pcm-engr__cart:focus-visible {
	background: #333;
	color: #fff;
}

.pcm-engr .pcm-engr__cart:disabled {
	opacity: 0.7;
	cursor: default;
}

.pcm-engr .pcm-engr__cart:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.pcm-engr .pcm-engr__save.is-secondary,
.pcm-engr .pcm-engr__save.is-secondary:focus {
	background: #fff;
	box-shadow: inset 0 0 0 1px #111;
	color: #111;
}

.pcm-engr .pcm-engr__save.is-secondary:hover {
	background: #f2f2f2;
	color: #111;
}

/* шаг «Проверка»: две кнопки — полоски прогресса отдельной строкой и на телефоне */
.pcm-engr__box[data-step="check"] .pcm-engr__nav {
	flex-wrap: wrap;
}

.pcm-engr .pcm-engr__box[data-step="check"] .pcm-engr__nav > .pcm-engr__progress {
	flex-basis: 100%;
}

.pcm-engr .pcm-engr__box[data-step="check"] .pcm-engr__nav > .pcm-engr__save,
.pcm-engr .pcm-engr__box[data-step="check"] .pcm-engr__nav > .pcm-engr__cart {
	flex: 1 1 0;
	min-width: 0;
}

/* сохранено: галочка + «Сохранено» (не только цвет); до следующего изменения настроек */
.pcm-engr__save-icon {
	display: none;
	flex: none;
}

.pcm-engr .pcm-engr__save.is-saved .pcm-engr__save-icon {
	display: block;
}

.pcm-engr .pcm-engr__save.is-saved,
.pcm-engr .pcm-engr__save.is-saved:focus {
	background: #fff;
	box-shadow: inset 0 0 0 1px #111;
	color: #111;
}

.pcm-engr .pcm-engr__save.is-saved:hover {
	background: #f2f2f2;
	color: #111;
}

.pcm-engr .pcm-engr__next:focus-visible,
.pcm-engr .pcm-engr__save:focus-visible,
.pcm-engr .pcm-engr__arrow:focus-visible,
.pcm-engr .pcm-engr__close:focus-visible,
.pcm-engr .pcm-engr__progress-btn:focus-visible,
.pcm-engr .pcm-engr__picto:focus-visible,
.pcm-engr .pcm-engr__add:focus-visible,
.pcm-engr .pcm-engr__link:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/*
 * ---------- до 900 px: одна колонка ----------
 * Прокручивается всё окно: шапка и ручка прилипают сверху (высоту ручки — не выше 30 % окна — задаёт
 * engraving.js), панель с прогрессом и «Далее» — снизу. Порядок: ручка → шаг → пояснения к макету.
 */
@media (max-width: 900px) {
	.pcm-engr__box {
		display: flex;
		flex-direction: column;
		overflow: auto;
		overscroll-behavior: contain;
		scroll-padding-top: calc(var(--pcm-engr-sticky-top, 0px) + 8px);
		scroll-padding-bottom: 120px;
	}

	.pcm-engr__preview,
	.pcm-engr__panel {
		display: contents;
	}

	.pcm-engr__head {
		position: sticky;
		top: 0;
		z-index: 6;
		flex: none;
		height: 56px;
		padding: 6px 6px 6px 16px;
	}

	.pcm-engr .pcm-engr__title {
		font-size: 14px;
	}

	.pcm-engr__product {
		font-size: 12px;
	}

	.pcm-engr__stage {
		position: sticky;
		top: 56px;
		z-index: 5;
		order: 1;
		flex: none;
		min-height: 0;
		box-shadow: 0 1px 0 #e6e4e0;
	}

	.pcm-engr__step-head {
		order: 2;
		padding: 8px 4px;
	}

	.pcm-engr .pcm-engr__step-title {
		font-size: 17px;
	}

	.pcm-engr__steps {
		order: 3;
		flex: none;
		overflow: visible;
		padding: 18px 16px 20px;
	}

	.pcm-engr__info {
		order: 4;
		margin: 0 16px;
		padding: 12px 0 20px;
	}

	.pcm-engr__footer {
		position: sticky;
		bottom: 0;
		z-index: 6;
		order: 5;
		margin-top: auto;
		padding: 8px 16px 12px;
	}

	.pcm-engr__status:empty {
		display: none;
	}
}

/* ---------- телефон ---------- */
@media (max-width: 600px) {
	/* в прогрессе — только полоски: названия шагов есть в заголовке шага */
	.pcm-engr__progress-btn span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.pcm-engr .pcm-engr__progress-btn,
	.pcm-engr .pcm-engr__progress-btn:focus {
		min-height: 44px;
		padding: 20px 0;
	}

	.pcm-engr__progress-btn i {
		margin: 0;
	}

	.pcm-engr .pcm-engr__next,
	.pcm-engr .pcm-engr__next:focus,
	.pcm-engr .pcm-engr__save,
	.pcm-engr .pcm-engr__save:focus {
		min-width: 0;
		padding: 0 18px;
	}

	/* телефон: полоски и кнопка в одной строке, как на образце владельца */
	.pcm-engr__nav {
		flex-wrap: nowrap;
		gap: 12px;
	}

	.pcm-engr .pcm-engr__nav > .pcm-engr__progress {
		flex-basis: auto;
	}

	.pcm-engr .pcm-engr__nav > .pcm-engr__next,
	.pcm-engr .pcm-engr__nav > .pcm-engr__next:focus,
	.pcm-engr .pcm-engr__nav > .pcm-engr__save,
	.pcm-engr .pcm-engr__nav > .pcm-engr__save:focus {
		flex: none;
	}

	.pcm-engr__sample {
		font-size: 19px;
	}

	.pcm-engr__option > span {
		min-height: 54px;
		padding: 10px 14px;
	}

	.pcm-engr .pcm-engr__picto,
	.pcm-engr .pcm-engr__picto:focus {
		width: 48px;
		height: 48px;
	}
}

/* ---------- страница макета: /maket-gravirovki/<ID>/#<код> (inc/engraving/maket-page.php) ---------- */

.pcm-maket [hidden] {
	display: none !important;
}

.pcm-maket {
	padding: 32px 0 56px;
	color: #111;
}

.pcm-maket__inner {
	box-sizing: border-box;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 16px;
}

.pcm-maket__kicker {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #6b6b6b;
}

.pcm-maket .pcm-maket__title {
	margin: 0 0 20px;
	font-size: 26px;
	font-weight: 400;
	line-height: 1.25;
	color: #111;
}

/*
 * Слева — картинка и под ней кнопки (сохранить, изменить, отправить на согласование), справа — таблица параметров
 * (владелец 2026-10-26 / 27). Блок с таблицей и кнопками в разметке общий (data-pcm-maket-body) — на широком экране
 * он «растворяется» (display: contents), и его части встают в свои ячейки сетки. На телефоне — друг под другом.
 */
@media (min-width: 900px) {
	/* картинка крупнее (владелец 2026-10-27): шире страница и левая колонка */
	.pcm-maket__inner {
		max-width: 1200px;
	}

	.pcm-maket__main {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
		grid-template-areas:
			"fig     review"
			"actions ."
			"share   ."
			"status  .";
		align-items: start;
		column-gap: 32px;
	}

	.pcm-maket__main > .pcm-maket__body {
		display: contents;
	}

	/* рамка картинки — по высоте таблицы (верх и низ на одной линии), ручка внутри по центру */
	.pcm-maket__main .pcm-maket__figure {
		grid-area: fig;
		align-self: stretch;
		margin-bottom: 0;
	}

	.pcm-maket__main .pcm-maket__row {
		padding: 9px 0;
	}

	.pcm-maket__main .pcm-maket__error {
		grid-column: 1;
	}

	.pcm-maket__main .pcm-maket__review {
		grid-area: review;
		margin: 0;
	}

	.pcm-maket__main .pcm-maket__actions {
		grid-area: actions;
		margin-top: 20px; /* отступ — у кнопок, не у рамки: низ рамки ровно по низу таблицы */
	}

	.pcm-maket__main .pcm-maket__share {
		grid-area: share;
		margin-top: 20px;
	}

	.pcm-maket__main .pcm-maket__status {
		grid-area: status;
	}
}

.pcm-maket__figure {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 24px;
	border: 1px solid #eeece8;
	background: #fff;
}

.pcm-maket__img {
	display: block;
	width: 100%;
	height: auto;
}

/* место под картинку — только пока она готовится */
.pcm-maket__loading {
	min-height: 160px;
	display: flex;
	align-items: center;
}

.pcm-maket__loading,
.pcm-maket__error {
	margin: 0;
	padding: 24px 0;
	font-size: 14px;
	color: #6b6b6b;
}

.pcm-maket__error a {
	color: #111;
	text-decoration: underline;
}

.pcm-maket .pcm-maket__review {
	margin: 0 0 24px;
	padding: 0;
	border-top: 1px solid #e8e8e8;
}

.pcm-maket__row {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	align-items: baseline;
	gap: 4px 16px;
	padding: 12px 0;
	border-bottom: 1px solid #e8e8e8;
}

.pcm-maket .pcm-maket__row dt {
	margin: 0;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b6b6b;
}

.pcm-maket .pcm-maket__row dd {
	min-width: 0;
	margin: 0;
	font-size: 15px;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.pcm-maket__line {
	display: block;
	font-size: 22px;
	line-height: 1.3;
	white-space: pre-wrap;
}

/* как .pcm-engr__glyph в окне */
.pcm-maket__glyph {
	display: inline-block;
	width: 0.95em;
	height: 0.95em;
	margin: 0 0.08em;
	vertical-align: -0.13em;
}

.pcm-maket__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pcm-maket .pcm-maket__btn,
.pcm-maket .pcm-maket__btn:focus,
.pcm-maket .pcm-maket__btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: inset 0 0 0 1px #111;
	color: #111;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
}

.pcm-maket .pcm-maket__btn:hover {
	background: #f2f2f2;
	color: #111;
}

.pcm-maket .pcm-maket__btn--primary,
.pcm-maket .pcm-maket__btn--primary:focus {
	background: #111;
	box-shadow: none;
	color: #fff;
}

.pcm-maket .pcm-maket__btn--primary:hover {
	background: #333;
	color: #fff;
}

.pcm-maket .pcm-maket__btn:disabled {
	opacity: 0.5;
	cursor: default;
}

.pcm-maket .pcm-maket__btn:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/* отправка клиенту: Telegram / WhatsApp / MAX / копия ссылки */
.pcm-maket__share {
	margin: 24px 0 0;
}

.pcm-maket__share-title {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #111;
}

.pcm-maket__share-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pcm-maket .pcm-maket__share-btn,
.pcm-maket .pcm-maket__share-btn:focus {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid #d6d6d6;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	color: #111;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}

.pcm-maket .pcm-maket__share-btn:hover {
	border-color: #111;
	background: #fff;
	color: #111;
}

.pcm-maket .pcm-maket__share-btn:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.pcm-maket__share-icon {
	display: block;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	color: currentColor;
}

.pcm-maket__short {
	margin: 10px 0 0;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	color: #111;
	overflow-wrap: anywhere;
	user-select: all;
}

.pcm-maket__status {
	min-height: 1.45em;
	margin: 10px 0 0;
	font-size: 13px;
	color: #2b6b3c;
}

.pcm-maket__status.is-error {
	color: #a3361f;
}

.pcm-maket__note {
	max-width: 720px;
	margin: 20px 0 12px;
	font-size: 13px;
	line-height: 1.5;
	color: #4a4a4a;
}

.pcm-maket .pcm-maket__back {
	font-size: 13px;
	color: #111;
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 600px) {
	.pcm-maket {
		padding: 20px 0 40px;
	}

	.pcm-maket .pcm-maket__title {
		font-size: 21px;
	}

	.pcm-maket__row {
		grid-template-columns: 1fr;
	}

	.pcm-maket .pcm-maket__btn,
	.pcm-maket .pcm-maket__btn:focus,
	.pcm-maket .pcm-maket__btn:visited {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pcm-engr *,
	.pcm-engr-cta * {
		transition: none !important;
	}
}
