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

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

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

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

/* Standalone set action also wraps when engraving.css is absent. */
.pcm-pp .pcm-pp-buy {
	flex-wrap: wrap;
}

/* новая карточка: под кнопкой гравировки, на всю ширину */
.pcm-pp-buy > .pcm-set-cta {
	flex: 1 0 100%;
	order: 6;
	min-width: 0;
	margin: 0;
}

.pcm-set-cta .pcm-set-cta__btn,
.pcm-set-cta .pcm-set-cta__btn:focus {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	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;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

/* значок «коробка» перед текстом */
.pcm-set-cta .pcm-set-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='M3.5 8.5h17v12h-17zM2.5 4.5h19v4h-19zM12 4.5v16'/%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='M3.5 8.5h17v12h-17zM2.5 4.5h19v4h-19zM12 4.5v16'/%3E%3C/svg%3E") center / contain no-repeat;
}

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

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

/* стандартная карточка Astra — вторичное текстовое действие, как у гравировки */
body:not(.pcm-pp) .pcm-set-cta .pcm-set-cta__btn,
body:not(.pcm-pp) .pcm-set-cta .pcm-set-cta__btn:focus {
	display: inline-flex;
	width: auto;
	min-height: 44px;
	padding: 10px 0;
	box-shadow: none;
	font-size: 12px;
	text-align: left;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

body:not(.pcm-pp) .pcm-set-cta .pcm-set-cta__btn:hover {
	background: transparent;
	color: #555;
}

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

html.pcm-set-open {
	overflow: hidden;
}

.pcm-set {
	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-set::backdrop {
	background: rgba(17, 17, 17, 0.6);
}

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

.pcm-set__box {
	--pcm-set-panel: clamp(440px, 42vw, 640px);
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--pcm-set-panel);
	grid-template-rows: auto minmax(0, 1fr);
	height: 100%;
	background: #fff;
	font-size: 14px;
	line-height: 1.5;
}

.pcm-set__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-set__heading {
	min-width: 0;
}

.pcm-set .pcm-set__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-set__product {
	margin: 2px 0 0;
	overflow: hidden;
	font-size: 13px;
	color: #6b6b6b;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pcm-set .pcm-set__close,
.pcm-set .pcm-set__close:focus,
.pcm-set .pcm-set__arrow,
.pcm-set .pcm-set__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-set .pcm-set__close:hover,
.pcm-set .pcm-set__arrow:hover {
	background: #f2f2f2;
	color: #111;
}

.pcm-set .pcm-set__arrow:disabled {
	visibility: hidden;
}

/* ---------- слева: состав набора ---------- */

.pcm-set__board {
	grid-column: 1;
	grid-row: 2;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	padding: 20px 32px 24px;
	overflow: auto;
	overscroll-behavior: contain;
}

/*
 * Превью набора: сцена 4:3 на белом фоне, каждый предмет — отдельный слой (вырезка с прозрачным фоном).
 * Размер сцены — по меньшей стороне области (container query units), места предметов — в % сцены (config.php).
 */
.pcm-set__scene {
	position: relative;
	flex: 1 0 auto;
	min-height: max(320px, 56vh); /* превью — главное на экране; список состава под ним прокручивается */
	margin: 0 0 16px;
	overflow: hidden;
	background: #fff; /* белый, как всё окно (владелец 2026-10-28) */
	container-type: size;
}

/* сцена — по ширине/высоте области с соотношением config → preview.ratio (раскладка в ряд, 2,2 : 1) */
.pcm-set__stage {
	position: absolute;
	top: 50%;
	left: 50%;
	width: min(92cqw, calc(var(--pcm-set-ratio, 2.2) * 92cqh));
	height: min(calc(92cqw / var(--pcm-set-ratio, 2.2)), 92cqh);
	transform: translate(-50%, -50%);
}

.pcm-set .pcm-set__layer {
	position: absolute;
	top: calc(var(--y, 50) * 1%);
	left: calc(var(--x, 50) * 1%);
	width: auto;
	max-width: none;
	height: calc(var(--h, 50) * 1%);
	margin: 0;
	transform: translate(-50%, -50%) rotate(var(--r, 0deg));
	/* лёгкая тень — как на образце владельца; отделяет белый пакет от белого фона */
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
	opacity: 1;
	user-select: none;
	pointer-events: none;
	transition: top 0.5s ease, left 0.5s ease, height 0.5s ease, transform 0.45s ease, opacity 0.4s ease;
}

/* фото каталога без вырезки: белый фон растворяется в фоне сцены */
.pcm-set .pcm-set__layer.is-flat {
	filter: none;
	mix-blend-mode: multiply;
}

.pcm-set .pcm-set__layer.is-enter,
.pcm-set .pcm-set__layer.is-leave {
	opacity: 0;
	transform: translate(-50%, -44%) rotate(var(--r, 0deg)) scale(0.94);
}

.pcm-set__board-title {
	flex: none;
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pcm-set .pcm-set__slots {
	flex: none;
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid #e8e8e8;
}

.pcm-set__slot {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 72px;
	margin: 0;
	padding: 8px 0;
	border-bottom: 1px solid #e8e8e8;
}

.pcm-set .pcm-set__slot-main,
.pcm-set .pcm-set__slot-main:focus {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #111;
	font: inherit;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	cursor: pointer;
}

.pcm-set div.pcm-set__slot-main {
	cursor: default;
}

.pcm-set .pcm-set__slot-main:hover b {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pcm-set__pic {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	overflow: hidden;
	background: #fff;
}

.pcm-set .pcm-set__pic img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
}

.pcm-set__pic.is-empty {
	border: 1px dashed #c9c5be;
	background: #faf9f7;
}

.pcm-set__slot-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pcm-set__slot-text small,
.pcm-set__line-text small {
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b6b6b;
}

.pcm-set__slot-text b {
	overflow: hidden;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pcm-set__slot.is-empty .pcm-set__slot-text b {
	color: #8a8a8a;
}

.pcm-set__slot-price {
	flex: none;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.pcm-set .pcm-set__remove,
.pcm-set .pcm-set__remove:focus {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0 -8px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #6b6b6b;
	cursor: pointer;
}

.pcm-set .pcm-set__remove:hover {
	background: #f2f2f2;
	color: #111;
}

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

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

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

.pcm-set .pcm-set__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-set__step-num {
	display: inline-block;
	margin-left: 2px;
	font-size: 13px;
	line-height: 0;
	vertical-align: super;
	color: #8a8a8a;
	font-variant-numeric: tabular-nums;
}

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

/* карточки товаров: две колонки, крупное фото */
.pcm-set .pcm-set__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pcm-set__card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	border: 1px solid #d6d6d6;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.pcm-set__card:hover {
	border-color: #111;
}

.pcm-set__card.is-selected {
	border-color: #111;
	box-shadow: inset 0 0 0 1px #111;
}

.pcm-set__card.is-out {
	cursor: default;
}

.pcm-set__card.is-out:hover {
	border-color: #d6d6d6;
}

.pcm-set__card.is-out .pcm-set__card-img img {
	opacity: 0.45;
}

.pcm-set .pcm-set__card-img {
	position: relative;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	padding: 10px;
}

.pcm-set__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	display: none;
	padding: 3px 8px;
	background: #111;
	color: #fff;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.pcm-set__card.is-selected .pcm-set__badge {
	display: block;
}

.pcm-set__card-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 2px 12px 12px;
}

.pcm-set__variant {
	font-size: 12px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.pcm-set__name {
	display: -webkit-box;
	overflow: hidden;
	font-size: 13px;
	line-height: 1.4;
	color: #4a4a4a;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.pcm-set__price-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	margin: auto 0 4px;
	padding-top: 4px;
}

.pcm-set__price,
.pcm-set__line-price {
	font-size: 16px;
	font-weight: 500;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.pcm-set__price del,
.pcm-set__line-price del {
	font-size: 13px;
	font-weight: 400;
	color: #8a8a8a;
}

.pcm-set__stock {
	font-size: 12px;
	color: #2b6b3c;
}

.pcm-set__stock.is-backorder {
	color: #8a4b00;
}

.pcm-set__stock.is-out {
	color: #a3361f;
}

.pcm-set .pcm-set__pick,
.pcm-set .pcm-set__pick:focus {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 42px;
	margin: 4px 0 0;
	padding: 0 12px;
	border: 0;
	border-radius: 0;
	background: #fff;
	box-shadow: inset 0 0 0 1px #111;
	color: #111;
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.pcm-set .pcm-set__pick:hover {
	background: #111;
	color: #fff;
}

.pcm-set .pcm-set__pick[aria-pressed="true"] {
	background: #111;
	color: #fff;
}

.pcm-set__pick-off {
	display: none;
}

/* выбранный товар: по наведению кнопка предлагает «Убрать» (на сенсорных экранах — повторное нажатие или × слева) */
@media (hover: hover) {
	.pcm-set .pcm-set__pick[aria-pressed="true"]:hover {
		background: #fff;
		color: #111;
	}

	.pcm-set__pick[aria-pressed="true"]:hover .pcm-set__pick-on {
		display: none;
	}

	.pcm-set__pick[aria-pressed="true"]:hover .pcm-set__pick-off {
		display: inline;
	}
}

.pcm-set .pcm-set__pick:disabled {
	box-shadow: inset 0 0 0 1px #d6d6d6;
	background: #fff;
	color: #8a8a8a;
	cursor: default;
}

/* загрузка: серые плитки на месте карточек */
.pcm-set__skeleton {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.pcm-set__skeleton i {
	display: block;
	aspect-ratio: 3 / 4;
	background: linear-gradient(90deg, #f2f1ee 0%, #f8f7f5 50%, #f2f1ee 100%) 0 0 / 200% 100%;
	animation: pcm-set-shimmer 1.2s linear infinite;
}

@keyframes pcm-set-shimmer {
	to {
		background-position: -200% 0;
	}
}

.pcm-set__error {
	padding: 32px 0;
	text-align: center;
}

.pcm-set__error p {
	margin: 0 0 16px;
	color: #3d3d3d;
}

.pcm-set .pcm-set__ghost,
.pcm-set .pcm-set__ghost:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	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-transform: uppercase;
	cursor: pointer;
}

.pcm-set .pcm-set__ghost:hover {
	background: #f2f2f2;
	color: #111;
}

/* ---------- «Итог» ---------- */

.pcm-set .pcm-set__lines {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid #e8e8e8;
}

.pcm-set__line {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	grid-template-areas:
		"pic text price"
		"pic text edit";
	align-items: center;
	gap: 0 14px;
	margin: 0;
	padding: 10px 0;
	border-bottom: 1px solid #e8e8e8;
}

.pcm-set__line .pcm-set__pic {
	grid-area: pic;
	width: 64px;
	height: 64px;
}

.pcm-set__line-text {
	grid-area: text;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pcm-set__line-text b {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
}

.pcm-set__line-text em {
	font-size: 12px;
	font-style: normal;
	color: #6b6b6b;
}

.pcm-set__line-price {
	grid-area: price;
	justify-self: end;
	font-size: 15px;
}

.pcm-set__line .pcm-set__link {
	grid-area: edit;
	justify-self: end;
}

.pcm-set .pcm-set__link,
.pcm-set .pcm-set__link:focus {
	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-set .pcm-set__link:hover {
	background: transparent;
	color: #555;
}

.pcm-set__skipped,
.pcm-set__hint {
	margin: 12px 0 0;
	font-size: 13px;
	color: #4a4a4a;
}

.pcm-set__sum {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 20px 0 0;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pcm-set__sum b {
	font-size: 24px;
	font-weight: 500;
	letter-spacing: 0;
	font-variant-numeric: tabular-nums;
}

/* ---------- «Готово» ---------- */

.pcm-set__done {
	padding: 16px 0;
	text-align: center;
}

.pcm-set__done-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1px solid #111;
	border-radius: 50%;
}

.pcm-set__done-title {
	margin: 12px 0 16px;
	font-size: 20px;
}

.pcm-set .pcm-set__done-list {
	max-width: 420px;
	margin: 0 auto 24px;
	padding: 0;
	list-style: none;
	border-top: 1px solid #e8e8e8;
	text-align: left;
}

.pcm-set__done-list li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 8px 0;
	border-bottom: 1px solid #e8e8e8;
	font-size: 13px;
}

.pcm-set__done-list b {
	flex: none;
	font-weight: 500;
}

/* ---------- низ панели: статус, прогресс, сумма и кнопка ---------- */

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

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

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

.pcm-set__status[data-kind="error"],
.pcm-set__status[data-kind="warn"] {
	color: #a3361f;
}

.pcm-set .pcm-set__progress {
	display: flex;
	gap: 4px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.pcm-set .pcm-set__progress li {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.pcm-set .pcm-set__progress-btn,
.pcm-set .pcm-set__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-set .pcm-set__progress-btn:hover {
	background: transparent;
	color: #111;
}

.pcm-set .pcm-set__progress-btn:disabled {
	cursor: default;
}

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

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

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

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

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

.pcm-set__nav {
	display: flex;
	align-items: center;
	gap: 16px;
}

.pcm-set__total {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	line-height: 1.25;
}

.pcm-set__total span {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b6b6b;
}

.pcm-set__total b {
	font-size: 20px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.pcm-set .pcm-set__next,
.pcm-set .pcm-set__next:focus,
.pcm-set .pcm-set__cart,
.pcm-set .pcm-set__cart:focus,
.pcm-set .pcm-set__cart:visited {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 168px;
	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-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.pcm-set .pcm-set__next:hover,
.pcm-set .pcm-set__cart:hover {
	background: #333;
	color: #fff;
}

/* шаг без выбора: «Пропустить» — второстепенная кнопка */
.pcm-set .pcm-set__next.is-skip,
.pcm-set .pcm-set__next.is-skip:focus {
	background: #fff;
	box-shadow: inset 0 0 0 1px #111;
	color: #111;
}

.pcm-set .pcm-set__next.is-skip:hover {
	background: #f2f2f2;
	color: #111;
}

.pcm-set .pcm-set__next:disabled,
.pcm-set .pcm-set__cart:disabled {
	opacity: 0.45;
	cursor: default;
}

.pcm-set .pcm-set__cart[aria-busy="true"] {
	opacity: 0.75;
	cursor: progress;
}

.pcm-set .pcm-set__next:focus-visible,
.pcm-set .pcm-set__cart:focus-visible,
.pcm-set .pcm-set__ghost:focus-visible,
.pcm-set .pcm-set__pick:focus-visible,
.pcm-set .pcm-set__arrow:focus-visible,
.pcm-set .pcm-set__close:focus-visible,
.pcm-set .pcm-set__remove:focus-visible,
.pcm-set .pcm-set__slot-main:focus-visible,
.pcm-set .pcm-set__progress-btn:focus-visible,
.pcm-set .pcm-set__link:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/*
 * ---------- до 900 px: одна колонка ----------
 * Прокручивается всё окно: шапка и полоса состава (миниатюры) прилипают сверху, сумма и «Далее» — снизу.
 */
@media (max-width: 900px) {
	.pcm-set__box {
		display: flex;
		flex-direction: column;
		overflow: auto;
		overscroll-behavior: contain;
	}

	.pcm-set__panel {
		display: contents;
	}

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

	.pcm-set .pcm-set__title {
		font-size: 14px;
	}

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

	/* состав — превью набора под шапкой */
	.pcm-set__board {
		position: sticky;
		top: 56px;
		z-index: 5;
		flex: none;
		order: 1;
		padding: 0 16px;
		overflow: visible;
		border-bottom: 1px solid #e8e8e8;
		background: #fff;
	}

	/* на узком экране состав показывает превью: оно прилипает под шапкой, список миниатюр не нужен */
	.pcm-set__board-title,
	.pcm-set .pcm-set__slots {
		display: none;
	}

	.pcm-set__scene {
		flex: none;
		height: clamp(160px, calc(100vw / var(--pcm-set-ratio, 2.2) + 16px), 300px); /* ряд предметов во всю ширину */
		min-height: 0;
		margin: 0 -16px;
	}

	/* отступ сверху и справа — место для × на углу миниатюры (иначе его обрезает прокрутка полосы) */
	.pcm-set .pcm-set__slots.is-strip {
		display: flex;
		gap: 10px;
		padding: 7px 7px 0 0;
		overflow-x: auto;
		border-top: 0;
		scrollbar-width: none;
	}

	.pcm-set__slot {
		position: relative;
		flex: none;
		min-height: 0;
		padding: 0;
		border: 0;
	}

	.pcm-set__slot-text,
	.pcm-set__slot-price {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}

	.pcm-set .pcm-set__slot-main {
		gap: 0;
	}

	.pcm-set__slot .pcm-set__pic {
		width: 52px;
		height: 52px;
		border: 1px solid #e8e8e8;
	}

	.pcm-set__slot.is-empty .pcm-set__pic {
		border: 1px dashed #c9c5be;
	}

	.pcm-set .pcm-set__remove,
	.pcm-set .pcm-set__remove:focus {
		position: absolute;
		top: -6px;
		right: -6px;
		width: 24px;
		height: 24px;
		margin: 0;
		border-radius: 50%;
		background: #111;
		color: #fff;
	}

	.pcm-set .pcm-set__remove svg {
		width: 12px;
		height: 12px;
	}

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

	.pcm-set .pcm-set__step-title {
		font-size: 17px;
	}

	.pcm-set__steps {
		order: 3;
		flex: none;
		overflow: visible;
		padding: 16px 16px 24px;
	}

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

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

/* ---------- телефон ---------- */
@media (max-width: 600px) {
	.pcm-set .pcm-set__grid,
	.pcm-set__skeleton {
		gap: 8px;
	}

	.pcm-set .pcm-set__card-img {
		padding: 6px;
	}

	.pcm-set__card-body {
		padding: 0 10px 10px;
	}

	.pcm-set__price {
		font-size: 15px;
	}

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

	.pcm-set .pcm-set__progress-btn,
	.pcm-set .pcm-set__progress-btn:focus {
		min-height: 24px;
		padding: 10px 0;
	}

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

	.pcm-set__nav {
		gap: 12px;
	}

	.pcm-set .pcm-set__next,
	.pcm-set .pcm-set__next:focus,
	.pcm-set .pcm-set__cart,
	.pcm-set .pcm-set__cart:focus {
		min-width: 0;
		padding: 0 16px;
		letter-spacing: 0.06em;
	}

	.pcm-set__total b {
		font-size: 18px;
	}

	.pcm-set__line {
		grid-template-columns: 56px minmax(0, 1fr) auto;
		gap: 0 10px;
	}

	.pcm-set__line .pcm-set__pic {
		width: 56px;
		height: 56px;
	}
}

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

/* Separate product actions: preserve spacing for touch targets. */
.pcm-pp-buy > .pcm-set-cta { margin-top: 8px; }

/* Two actions share the footprint of the former engraving button. */
.pcm-pp-buy > .pcm-product-constructors {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    flex: 1 0 100%;
    order: 5;
    min-width: 0;
}
.pcm-product-constructors > .pcm-engr-cta,
.pcm-product-constructors > .pcm-set-cta {
    margin: 0;
    min-width: 0;
}
.pcm-product-constructors .pcm-engr-cta__btn,
.pcm-product-constructors .pcm-engr-cta__btn:focus,
.pcm-product-constructors .pcm-set-cta__btn,
.pcm-product-constructors .pcm-set-cta__btn:focus {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    height: 100%;
    padding: 12px 10px;
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: .04em;
    white-space: normal;
}
@media (max-width: 480px) {
    .pcm-product-constructors .pcm-engr-cta__btn,
.pcm-product-constructors .pcm-engr-cta__btn:focus,
    .pcm-product-constructors .pcm-set-cta__btn,
.pcm-product-constructors .pcm-set-cta__btn:focus {
        min-height: 48px;
        padding: 10px 6px;
        font-size: 11px;
        letter-spacing: .02em;
    }
    .pcm-product-constructors .pcm-set-cta__btn::before { display: none; }
}
