/* =====================================================================
   Cart + checkout, Kanon pass (18.11.2026).
   The checkout markup and its JS stay as on prod; this layer only re-skins it
   on top of legacy-keep.css: left-aligned page head, hairline rows instead of
   boxed cards, numbered steps (CSS counter, so a collapsed step 2 is skipped),
   square controls, no red hover, one sticky summary.
   ===================================================================== */

.checkout-page {
	--ck-pad: clamp(20px, 2.4vw, 32px);
	--ck-label: 11px;
	color: var(--ink);
}

/* ---------- head ---------- */
.checkout-page .checkout-hero { text-align: left !important; margin: 0 0 var(--space-6) !important; padding: 0 !important; }
.checkout-page .checkout-hero .checkout-eyebrow {
	display: block !important; margin: 0 0 var(--space-3) !important; padding: 0 !important; background: none !important;
	font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.checkout-page .checkout-page__title {
	margin: 0 !important; font-family: var(--font-display); font-weight: 400 !important; text-align: left !important;
	font-size: clamp(2.4rem, 1.6rem + 2.6vw, 4rem) !important; line-height: 1 !important;
}
.checkout-page .checkout-page__lead { margin: var(--space-4) 0 0 !important; padding: 0 !important; max-width: 52ch; text-align: left !important; color: var(--ink-2); font-size: 16px; }

/* «Очистить корзину» (29.11.2026): sits at the right end of the head row, on the lead's baseline.
   Armed, it reads «Отменить» at the same width (both labels stacked in one grid cell) and the border
   runs out clockwise from the top-left corner over --undo (= checkoutUndoDelay in the script). */
.checkout-page .checkout-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-6); }
.checkout-page .checkout-hero > :not(.checkout-clear) { grid-column: 1; }
.checkout-page .checkout-clear {
	grid-column: 2; grid-row: 1 / span 3; align-self: end; justify-self: end;
	position: relative; display: inline-grid; place-items: center; height: 44px; padding: 0 20px; margin: 0;
	border: 1px solid var(--line-strong); border-radius: 0; background: var(--paper); color: var(--ink); cursor: pointer;
	font: 500 12px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
	transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.checkout-page .checkout-clear__label { grid-area: 1 / 1; transition: opacity var(--dur-fast) var(--ease), visibility 0s; }
.checkout-page .checkout-clear__label--undo, .checkout-page .checkout-clear.is-running .checkout-clear__label--idle { opacity: 0; visibility: hidden; }
.checkout-page .checkout-clear.is-running .checkout-clear__label--undo { opacity: 1; visibility: visible; }
@media (hover: hover) { .checkout-page .checkout-clear:hover { border-color: var(--ink); } }
.checkout-page .checkout-clear:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.checkout-page .checkout-clear__timer { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); overflow: visible; pointer-events: none; }
.checkout-page .checkout-clear__timer rect {
	x: 1px; y: 1px; width: calc(100% - 2px); height: calc(100% - 2px);
	fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 100 100; stroke-dashoffset: 100; opacity: 0;
}
.checkout-page .checkout-clear.is-running .checkout-clear__timer rect { opacity: 1; animation: k-clear-run var(--undo, 5s) linear forwards; }
@keyframes k-clear-run { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
/* while the countdown runs the cart and the form step back and do not take clicks */
.checkout-page :is(.checkout-card--cart, .checkout-form, .checkout-hero > :not(.checkout-clear)) { transition: opacity var(--dur) var(--ease); }
.checkout-page .checkout-card--cart > :not(.checkout-clear-slot) { transition: opacity var(--dur) var(--ease); }
/* the card itself stays lit: on phones the button lives inside it (.checkout-clear-slot) and must stay clickable */
.checkout-page.is-clearing :is(.checkout-card--cart > :not(.checkout-clear-slot), .checkout-form) { opacity: .4; pointer-events: none; }

/* ---------- cart lines ---------- */
.checkout-page .checkout-card--cart { padding: 0 !important; border: 0 !important; background: none !important; margin: 0 0 var(--space-7) !important; width: auto !important; max-width: none !important; }
.checkout-page .checkout-table-wrap { overflow: visible; }
.checkout-page table#order_block { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-strong); }
.checkout-page table#order_block thead { display: none; }
.checkout-page table#order_block tbody { display: block; }
.checkout-page table#order_block tr.checkout-item {
	display: grid !important; grid-template-columns: 96px minmax(0, 1fr) auto 140px 44px; align-items: center; column-gap: var(--space-5);
	padding: var(--space-4) 0 !important; margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; background: none !important; box-shadow: none !important;
	transition: opacity var(--dur) var(--ease);
}
.checkout-page table#order_block tr.checkout-item > td { display: block; padding: 0 !important; border: 0 !important; background: none !important; text-align: left; }
.checkout-page .checkout-mobile-label { display: none !important; }
.checkout-page .checkout-item__image { display: block; width: 96px; height: 96px; background: var(--tile, var(--paper-2)); }
.checkout-page .checkout-item__image img { width: 100% !important; height: 100% !important; object-fit: contain; padding: 8%; mix-blend-mode: var(--tile-blend, multiply); }
/* gifts (certificates): the picture is a full square card, no tile around it */
.checkout-page .checkout-item__image--full img { padding: 0; object-fit: cover; mix-blend-mode: normal; }
.checkout-page .checkout-item__title {
	color: var(--ink) !important; text-decoration: none; font-size: 16px; line-height: 1.4; font-weight: 400 !important;
	/* two layers: [0] hover underline at the bottom, [1] removal strike through the middle.
	   Inline + box-decoration-break: clone paints both on every line fragment, so 1, 2 or 3 lines all work. */
	background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat; background-position: left bottom, left 56%; background-size: 0 1px, 0 1px;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
	transition: background-size var(--dur) var(--ease);
}
@media (hover: hover) { .checkout-page a.checkout-item__title:hover { background-size: 100% 1px, 0 1px; } }
/* the item's second line: certificate card text, gift box contents (order item field item_note) */
.checkout-page .checkout-item__note {
	display: block; margin-top: 6px; max-width: none;
	font-size: 13px; line-height: 1.45; color: var(--ink-3, #8a8580); overflow-wrap: anywhere;
	transition: opacity var(--dur) var(--ease);
}
.checkout-page .checkout-item.is-removing .checkout-item__note { opacity: .45; }
.checkout-page .checkout-item.is-removing .checkout-item__title,
.checkout-page .checkout-item.is-removing .checkout-item__title:hover { background-size: 0 1px, 100% 1px; }
.checkout-page .checkout-item__total { text-align: right !important; }
.checkout-page .checkout-item__value--total { font-size: 17px; font-weight: 500 !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.checkout-page .checkout-item__remove { text-align: right !important; }

/* stepper: same square language as the cards */
.checkout-page .checkout-qty {
	display: inline-grid !important; grid-template-columns: 40px 44px 40px; height: 40px; padding: 0 !important; gap: 0 !important;
	border: 1px solid var(--line-strong) !important; background: var(--paper) !important; box-shadow: none !important;
}
.checkout-page .checkout-qty__btn {
	width: 40px !important; height: 38px !important; padding: 0; border: 0 !important; background: none !important; color: var(--ink) !important;
	font-size: 18px; line-height: 1; cursor: pointer; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.checkout-page .checkout-qty__btn::before, .checkout-page .checkout-qty__btn::after { display: none !important; }
@media (hover: hover) { .checkout-page .checkout-qty__btn:hover { background: var(--ink) !important; color: var(--paper) !important; } }
.checkout-page .checkout-qty__btn:disabled { color: var(--ink-3) !important; background: none !important; cursor: default; }
.checkout-page .checkout-qty__value { display: block; border-left: 1px solid var(--line) !important; border-right: 1px solid var(--line) !important; }
.checkout-page .checkout-qty__value input {
	width: 100% !important; height: 38px !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
	text-align: center; font: 500 15px/1 var(--font-ui); color: var(--ink); font-variant-numeric: tabular-nums;
}

/* remove: a quiet ×, inverts like every other square control — no red */
.checkout-page table#order_block a.delete, .checkout-page .checkout-item__delete {
	width: 44px !important; height: 44px !important; border: 1px solid transparent !important; background: none !important;
	color: var(--ink-3) !important; font-size: 22px !important; font-weight: 300; text-decoration: none;
}
@media (hover: hover) {
	.checkout-page table#order_block a.delete:hover, .checkout-page .checkout-item__delete:hover {
		border-color: var(--ink) !important; background: var(--ink) !important; color: var(--paper) !important;
	}
}
/* removal with undo (one rule for the whole cart): the × opens out leftwards into «↺ Вернуть» (clip from the right edge,
   where the × was), the qty and price step back, and the time left runs as an ink line along the row's bottom rule,
   shrinking right to left. No digits: the button says what can be done, the line says for how long. The length comes
   from the script (--undo = checkoutUndoDelay), so there is one number. */
.checkout-page table#order_block tr.checkout-item { position: relative; }
.checkout-page .checkout-item__remove, .checkout-page .checkout-remove-slot { position: static !important; }
.checkout-page .checkout-remove-slot { display: block; width: 44px; height: 44px; margin-left: auto; }
.checkout-page .checkout-remove-slot > .checkout-item__delete { position: relative !important; inset: auto !important; display: grid !important; place-items: center; transition: opacity var(--dur) var(--ease), border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease) !important; transform: none !important; }
.checkout-page .checkout-item.is-removing .checkout-remove-slot > .checkout-item__delete { opacity: 0; visibility: hidden; transition: opacity var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast) !important; }
.checkout-page .checkout-undo {
	position: absolute !important; z-index: 2; right: 0; top: 50%; left: auto !important; bottom: auto !important; width: auto !important; height: 44px !important;
	display: inline-flex !important; align-items: center; gap: 8px; padding: 0 16px 0 14px !important; margin-top: -22px;
	border: 1px solid var(--ink) !important; background: var(--paper) !important; color: var(--ink) !important; cursor: pointer;
	font: 500 12px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
	opacity: 0; visibility: hidden; transform: none !important; clip-path: inset(0 0 0 calc(100% - 44px));
	transition: clip-path var(--dur) var(--ease), opacity var(--dur-fast) var(--ease), visibility 0s linear var(--dur),
		background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease) !important;
}
.checkout-page .checkout-item.is-removing .checkout-undo { opacity: 1; visibility: visible; clip-path: inset(0); transition: clip-path var(--dur) var(--ease), opacity var(--dur-fast) var(--ease), visibility 0s, background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease) !important; }
@media (hover: hover) { .checkout-page .checkout-undo:hover { background: var(--ink) !important; color: var(--paper) !important; } }
.checkout-page .checkout-undo:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.checkout-page .checkout-undo__icon { position: static !important; display: block !important; width: 16px !important; height: 16px !important; opacity: 1 !important; transform: none !important; flex: none; }
.checkout-page .checkout-undo__ring, .checkout-page .checkout-undo__count { display: none !important; }
/* what is being removed steps back */
.checkout-page .checkout-item.is-removing :is(.checkout-item__photo, .checkout-item__name) { opacity: .4 !important; }
/* the counter and the price go away while the item is on its way out; «Вернуть» brings them back the same way */
.checkout-page .checkout-item.is-removing :is(.checkout-item__qty, .checkout-item__total) { opacity: 0 !important; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur) !important; }
.checkout-page .checkout-item :is(.checkout-item__photo, .checkout-item__name, .checkout-item__qty, .checkout-item__total) { transition: opacity var(--dur) var(--ease), visibility 0s !important; }
/* the time line: on the row's bottom rule, full width, runs out right to left */
.checkout-page table#order_block tr.checkout-item::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink);
	transform: scaleX(0); transform-origin: left center; pointer-events: none;
}
.checkout-page table#order_block tr.checkout-item.is-removing::after { animation: k-undo-run var(--undo, 5s) linear forwards; }
@keyframes k-undo-run { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* gone for good: the row fades before it leaves */
.checkout-page table#order_block tr.checkout-item.is-gone { opacity: 0; transition: opacity var(--dur) var(--ease); }
.checkout-page table#order_block tr.checkout-item.is-gone::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
	.checkout-page .checkout-undo { clip-path: none; }
}

/* the in-cart totals box duplicated the summary on the right: the summary stays, this one goes
   (its .checkout-js-* nodes are still updated by the script, just not shown) */
.checkout-page .checkout-cart-summary { display: none !important; }

/* ---------- layout ---------- */
.checkout-page .checkout-layout { grid-template-columns: minmax(0, 1fr) 360px !important; gap: var(--space-7) !important; }
.checkout-page .checkout-layout__main { counter-reset: ck-step; display: flex; flex-direction: column; gap: 0; }

/* ---------- steps ---------- */
.checkout-page .checkout-section {
	position: relative; padding: var(--space-6) 0 var(--space-6) !important; margin: 0 !important; width: auto !important; max-width: none !important;
	border: 0 !important; border-top: 1px solid var(--line-strong) !important; background: none !important; box-shadow: none !important;
}
.checkout-page .checkout-step2-reveal { margin: 0 !important; }
.checkout-page .checkout-step2-reveal .checkout-section { border-top-color: var(--line-strong) !important; }
/* step 1 sits right under the cart table, which already ends on a strong line: no second rule above it (28.11.2026) */
.checkout-page .checkout-section--delivery { border-top: 0 !important; }
/* …and without the rule its top padding was a bare 32px gap: step 1 now starts level with the summary box (29.11.2026) */
.checkout-page .checkout-layout__main > .checkout-section--delivery:first-child { padding-top: 0 !important; }
.checkout-page .checkout-layout__main .checkout-section { counter-increment: ck-step; }
.checkout-page .checkout-step2-reveal.is-collapsed .checkout-section { counter-increment: none; }
.checkout-page .checkout-section__head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 var(--space-5) !important; text-align: left !important; }
.checkout-page .checkout-section__eyebrow {
	display: flex !important; align-items: baseline; gap: 14px; margin: 0 !important; padding: 0 !important; background: none !important; border-radius: 0 !important;
	font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + .8vw, 1.9rem); line-height: 1.1; letter-spacing: 0; text-transform: none; color: var(--ink);
}
.checkout-page .checkout-section__eyebrow::before {
	content: counter(ck-step, decimal-leading-zero); flex: none; font-family: var(--font-ui); font-size: 12px; font-weight: 500;
	letter-spacing: .12em; color: var(--ink-3); transform: translateY(-.35em);
}

/* options (delivery / payment / pickup points): hairline cards, ink when chosen */
.checkout-page .checkout-options { display: grid; gap: 8px; margin: 0; padding: 0; }
.checkout-page .checkout-options--delivery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkout-page .checkout-option { position: relative; margin: 0 !important; }
.checkout-page .checkout-option label {
	display: flex !important; flex-direction: column; gap: 4px; height: 100%; margin: 0 !important; padding: 16px 18px 16px 50px !important;
	border: 1px solid var(--line-strong) !important; background: var(--paper) !important; box-shadow: none !important; cursor: pointer;
	transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
@media (hover: hover) { .checkout-page .checkout-option label:hover { border-color: var(--ink) !important; } }
.checkout-page .checkout-option input:checked + label { border-color: var(--ink) !important; background: var(--paper-2) !important; box-shadow: inset 0 0 0 1px var(--ink) !important; }
.checkout-page .checkout-option__title { font-size: 15px !important; font-weight: 500 !important; line-height: 1.35; color: var(--ink); }
.checkout-page .checkout-option__meta { font-size: 13px !important; color: var(--ink-2) !important; }
.checkout-page .checkout-option input[type="radio"] { top: 17px !important; left: 18px !important; margin: 0 !important; }

/* fields */
/* contacts: name | phone, then e-mail and comment full width */
.checkout-page .checkout-form .checkout-personal-table { display: block !important; width: 100% !important; border-spacing: 0 !important; }
.checkout-page .checkout-form .checkout-personal-table tbody { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.checkout-page .checkout-form .checkout-personal-table tr { display: block !important; margin: 0 !important; min-width: 0; }
.checkout-page .checkout-form .checkout-personal-table tr:nth-child(n+3) { grid-column: 1 / -1; }
.checkout-page .checkout-form .checkout-personal-table td { display: block !important; width: auto !important; padding: 0 !important; border: 0 !important; }
.checkout-page .checkout-form .checkout-personal-fields .checkout-field { margin: 0 !important; }
.checkout-page .checkout-field input, .checkout-page .checkout-field textarea, .checkout-page .checkout-section input[type="text"], .checkout-page .checkout-section textarea {
	border: 1px solid var(--line-strong) !important; border-radius: 0 !important; background: var(--paper) !important; box-shadow: none !important; font-size: 16px !important;
	transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.checkout-page .checkout-field input:focus, .checkout-page .checkout-field textarea:focus, .checkout-page .checkout-section input[type="text"]:focus, .checkout-page .checkout-section textarea:focus {
	outline: none; border-color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink) !important;
}
.checkout-page .is-invalid input, .checkout-page input.is-invalid, .checkout-page textarea.is-invalid { border-color: var(--danger, #b3261e) !important; box-shadow: inset 0 0 0 1px var(--danger, #b3261e) !important; }
.checkout-page .checkout-inline-message { border-radius: 0 !important; border: 0 !important; border-left: 2px solid var(--danger, #b3261e) !important; background: var(--paper-2) !important; color: var(--ink) !important; padding: 12px 16px !important; margin: 0 0 var(--space-4) !important; font-size: 14px; }
.checkout-page .checkout-helper-link {
	display: inline-block !important; width: auto !important; text-align: left !important; border: 0 !important; margin-top: var(--space-3); font-size: 14px; color: var(--ink-2) !important; text-decoration: none;
	background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; padding-bottom: 2px; transition: color var(--dur-fast) var(--ease);
}
.checkout-page .checkout-helper-link:hover { color: var(--ink) !important; }

/* consents: plain lines under the contacts, no boxes */
.checkout-page .checkout-agree {
	display: flex; gap: 12px; align-items: flex-start; width: auto !important; max-width: 62ch !important; margin: 0 0 var(--space-3) !important; padding: 0 !important;
	border: 0 !important; background: none !important; box-shadow: none !important; font-size: 13px; line-height: 1.5; color: var(--ink-2);
}
.checkout-page .checkout-layout__main > .checkout-agree:not(.checkout-agree--optional) { padding-top: var(--space-5) !important; border-top: 1px solid var(--line) !important; max-width: none !important; }
.checkout-page .checkout-agree label { margin: 0 !important; padding: 0 !important; color: inherit; }
.checkout-page .checkout-agree a { color: var(--ink) !important; }
.checkout-page .checkout-layout__main { display: flex; flex-direction: column; }
.checkout-page .checkout-layout__main > .checkout-agree:not(.checkout-agree--optional) { order: 10; }
.checkout-page .checkout-layout__main > .checkout-agree--optional { order: 11; }

/* ---------- summary ---------- */
.checkout-page .checkout-card--sticky {
	position: sticky; top: calc(var(--header-h) + 24px) !important; width: auto !important; max-width: none !important; margin: 0 !important;
	padding: var(--ck-pad) !important; border: 1px solid var(--line-strong) !important; background: var(--paper) !important; box-shadow: none !important;
}
.checkout-page .checkout-card--sticky .checkout-eyebrow {
	display: block !important; margin: 0 0 var(--space-4) !important; padding: 0 !important; background: none !important;
	font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.checkout-page .checkout-order-meta__row {
	display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin: 0 !important; padding: 10px 0 !important;
	border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); text-transform: none; letter-spacing: 0;
}
.checkout-page .checkout-order-meta__row strong { color: var(--ink); font-weight: 500 !important; font-variant-numeric: tabular-nums; }
.checkout-page .checkout-order-meta__row--total { border-bottom: 0; padding: var(--space-4) 0 var(--space-5) !important; align-items: baseline; }
.checkout-page .checkout-order-meta__row--total span { color: var(--ink); font-weight: 400 !important; }
.checkout-page .checkout-order-meta__row--total strong { font-family: var(--font-display); font-weight: 400 !important; font-size: 2rem; line-height: 1; }
.checkout-page .checkout-button {
	transform: none !important;
	width: 100%; min-height: 56px; margin: 0 !important; border: 1px solid var(--ink) !important; background: var(--ink) !important; color: var(--paper) !important;
	font: 500 13px/1 var(--font-ui) !important; letter-spacing: .12em !important; text-transform: uppercase; cursor: pointer; box-shadow: none !important;
	transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease) !important;
}
@media (hover: hover) { .checkout-page .checkout-button:hover { background: var(--paper) !important; color: var(--ink) !important; box-shadow: none !important; transform: none !important; } }
.checkout-page .checkout-order-offer { margin: var(--space-3) 0 0 !important; text-align: left !important; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.checkout-page .checkout-order-offer a { color: var(--ink-2) !important; }
.checkout-page .checkout-card--sticky .checkout-agree { margin: 0 0 var(--space-4) !important; max-width: none !important; }

/* ---------- empty cart ---------- */
.x-cart-empty { padding: var(--space-5) 0 var(--space-4); }
.x-cart-empty__k { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--space-3); }
.x-cart-empty__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 1.6rem + 3.4vw, 5rem); line-height: .95; margin: 0; }
.x-cart-empty__lead { margin: var(--space-5) 0 0; max-width: 46ch; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.x-cart-empty__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-6); }
.x-cart-empty__actions .x-btn { min-width: 240px; }
.x-cart-empty__actions .x-link { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; color: var(--ink); }
.x-qcats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--space-8); border-top: 1px solid var(--line-strong); }
.x-qcats__item {
	position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: var(--space-4); min-height: 220px; padding: var(--space-5) var(--space-5) var(--space-4);
	color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
	transition: background-color var(--dur-slow) var(--ease), color var(--dur-slow) var(--ease);
}
.x-qcats__item + .x-qcats__item { border-left: 1px solid var(--line); }
.x-qcats__num { font-size: 11px; letter-spacing: .12em; color: var(--ink-3); font-variant-numeric: tabular-nums; transition: color var(--dur-slow) var(--ease); }
/* engravings (images/icons-a, built by tools/balance_icons.py): the 320 canvas keeps air around the drawing, so the box is larger than the old pictograms */
.x-qcats__icon { width: 104px; height: 104px; align-self: center; background: currentColor; -webkit-mask: var(--icon) no-repeat center / contain; mask: var(--icon) no-repeat center / contain; transition: transform var(--dur-slow) var(--ease); }
.x-qcats__name { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); font-family: var(--font-display); font-size: 1.35rem; line-height: 1.15; }
.x-qcats__name i { flex: none; position: relative; width: 18px; height: 1px; background: currentColor; transform: translateY(-.3em); transition: width var(--dur) var(--ease); }
.x-qcats__name i::after { content: ""; position: absolute; right: 0; top: -3.5px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
@media (hover: hover) {
	/* light hover, no inversion: on black the engraving would turn into a negative (black caviar reads as white pearls) */
	.x-qcats__item:hover { background: var(--paper-2); }
	.x-qcats__item:hover .x-qcats__num { color: var(--ink); }
	.x-qcats__item:hover .x-qcats__icon { transform: translateY(-6px); }
	.x-qcats__item:hover .x-qcats__name i { width: 30px; }
}
.x-qcats__item:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
	.checkout-page .checkout-layout { grid-template-columns: minmax(0, 1fr) !important; gap: var(--space-5) !important; }
	.checkout-page .checkout-card--sticky { position: static; }
	.x-qcats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.x-qcats__item:nth-child(3) { border-left: 0; }
}
@media (max-width: 768px) {
	/* legacy phone rules boxed every block at calc(100% - 24px) and centred the headings */
	.checkout-page { padding: 0 !important; }
	.checkout-page .checkout-hero, .checkout-page .checkout-page__lead { padding: 0 !important; text-align: left !important; margin-left: 0 !important; margin-right: 0 !important; }
	.checkout-page .checkout-section__eyebrow, .checkout-page .checkout-eyebrow { margin-left: 0 !important; margin-right: 0 !important; }
	.checkout-page .checkout-card, .checkout-page .checkout-section, .checkout-page .checkout-agree, .checkout-page .checkout-card--sticky { width: auto !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
	.checkout-page .checkout-order-meta__row { margin: 0 !important; }
	.checkout-page table#order_block tr.checkout-item {
		grid-template-columns: 80px minmax(0, 1fr) auto 38px !important;
		grid-template-areas: "photo name name remove" "photo qty total total" !important; row-gap: 12px !important; column-gap: 14px !important;
		align-items: start !important;
	}
	.checkout-page table#order_block tbody td.checkout-item__qty { align-self: end !important; }
	.checkout-page table#order_block tbody td.checkout-item__total { align-self: end !important; justify-self: end; text-align: right !important; padding-bottom: 9px !important; }
	.checkout-page table#order_block tbody td.checkout-item__remove { align-self: start !important; justify-self: end; margin: -8px 0 0 0; }
	.checkout-page .checkout-undo { top: auto !important; bottom: 16px !important; margin-top: 0; }
	.checkout-page table#order_block td.photo { width: 80px !important; }
	.checkout-page .checkout-remove-slot { width: 38px; height: 38px; margin-right: 0; }
	.checkout-page table#order_block a.delete, .checkout-page .checkout-item__delete { width: 38px !important; height: 38px !important; }
	.checkout-page .checkout-qty { grid-template-columns: 36px 40px 36px; }
	.checkout-page .checkout-qty__btn { width: 36px !important; }
	.checkout-page .checkout-item__image { width: 80px; height: 80px; }
	.checkout-page .checkout-item__title { font-size: 15px; }
	.checkout-page .checkout-options--delivery { grid-template-columns: minmax(0, 1fr); }
	.checkout-page .checkout-card--sticky { padding: var(--space-5) var(--space-4) !important; }
	.checkout-page .checkout-form .checkout-personal-table tbody { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.x-cart-empty__actions { flex-direction: column; align-items: stretch; gap: var(--space-4); }
	.x-cart-empty__actions .x-btn { min-width: 0; }
	.x-cart-empty__actions .x-link { align-self: center; }
	.x-qcats__item { min-height: 172px; padding: var(--space-4) var(--space-4) var(--space-3); }
	.x-qcats__icon { width: 80px; height: 80px; }
	.x-qcats__name { font-size: 1.1rem; }
}

/* the empty cart renders inside the page prose: hide the page h1 (the block has its own) and the prose link styling */
.x-inner:has(.x-cart-empty) > .x-h1 { display: none; }
.x-inner .x-prose:has(.x-cart-empty) { max-width: none; }
.x-prose .x-cart-empty a { text-decoration: none; }
.x-prose .x-cart-empty .x-btn--action { color: var(--action-ink, #fff); }

/* fixes after the first pass */
.checkout-page table#order_block td.photo, .checkout-page table#order_block td.photo a, .checkout-page .checkout-item__image { margin: 0 !important; padding: 0 !important; }
.checkout-page .checkout-qty__value { padding: 0 !important; display: flex !important; align-items: center; }
.checkout-page .checkout-qty__value input { line-height: 38px !important; }

/* step 2, courier: address = street full width, then entrance / floor / flat in one row */
.checkout-page .checkout-options--address { display: block; }
.checkout-page .checkout-address-form { list-style: none; }
.checkout-page .checkout-form .checkout-address-form__body { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.checkout-page .checkout-form table.adress { display: block !important; width: 100% !important; border-spacing: 0 !important; }
.checkout-page .checkout-form table.adress tbody { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.checkout-page .checkout-form table.adress tr { display: block !important; margin: 0 !important; min-width: 0; }
.checkout-page .checkout-form table.adress tr:first-child { grid-column: 1 / -1; }
/* the comment spans the whole row too (hotfix 28.11.2026: it sat in the first of three columns) */
.checkout-page .checkout-form table.adress tr:has(textarea), .checkout-page .checkout-form table.adress tr:nth-child(5) { grid-column: 1 / -1; }
.checkout-page .checkout-form table.adress td { display: block !important; width: auto !important; padding: 0 !important; border: 0 !important; }
.checkout-page .checkout-form .checkout-address-form__body .checkout-field { margin: 0 !important; }

/* step 2, pickup: address left, map pin as an attached square */
.checkout-page .checkout-options--pickup { gap: 8px; }
.checkout-page .checkout-option--pickup { display: grid !important; grid-template-columns: minmax(0, 1fr) 56px; gap: 0 !important; }
.checkout-page .checkout-option--pickup label { justify-content: center; align-items: flex-start !important; text-align: left !important; min-height: 56px; }
.checkout-page .checkout-option--pickup .checkout-option__title { text-align: left !important; }
.checkout-page .checkout-pickup-map {
	display: grid !important; place-items: center; width: auto !important; height: auto !important; margin: 0 !important; border: 1px solid var(--line-strong) !important; border-left: 0 !important;
	border-radius: 0 !important; background: var(--paper) !important; color: var(--ink) !important; box-shadow: none !important;
	transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.checkout-page .checkout-pickup-map svg { width: 20px; height: 20px; }
@media (hover: hover) { .checkout-page .checkout-pickup-map:hover { background: var(--ink) !important; color: var(--paper) !important; } }
.checkout-page .checkout-option--pickup input:checked ~ .checkout-pickup-map { border-color: var(--ink) !important; box-shadow: inset -1px 0 0 0 var(--ink), inset 0 1px 0 0 var(--ink), inset 0 -1px 0 0 var(--ink) !important; }
@media (max-width: 640px) {
	.checkout-page .checkout-form table.adress tbody { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =====================================================================
   404 (content/not_found/default.tpl): "4 [tin] 4", copy, actions, the same quick-category tiles as the empty cart.
   ===================================================================== */
.x-inner:has(.x-nf) > .x-h1 { display: none; }
.x-inner .x-prose:has(.x-nf) { max-width: none; }
.x-prose .x-nf a { text-decoration: none; }
.x-prose .x-nf .x-btn--action { color: var(--action-ink, #fff); }
/* the two white-text rules above outrank the generic .x-btn--action:hover (x-base.css), so the hover
   turned the button white with white text; give the inverted hover its ink back (29.11.2026) */
@media (hover: hover) { .x-prose :is(.x-cart-empty, .x-nf) .x-btn--action:hover { color: var(--action); } }
.x-nf { --nf-size: clamp(150px, 24vw, 340px); padding: var(--space-4) 0 0; }
.x-nf__code { display: flex; align-items: center; justify-content: center; gap: calc(var(--nf-size) * .06); margin: 0 auto var(--space-7); }
.x-nf__digit { font-family: var(--font-display); font-weight: 400; font-size: calc(var(--nf-size) * 1.36); line-height: .74; letter-spacing: 0; color: var(--ink); padding-top: .04em; }
.x-nf__zero { flex: none; width: var(--nf-size); aspect-ratio: 1; border-radius: 50%; transform: rotate(var(--nf-lean, 0deg)); }
.x-nf__zero img { display: block; width: 100%; height: 100%; max-width: none; border-radius: 50%; box-shadow: 0 calc(var(--nf-size) * .05) calc(var(--nf-size) * .12) -.04em rgba(20, 20, 20, .28); }
.x-nf__zero.is-rolling img { animation: x-nf-roll calc(var(--dur-slow) * 2.4) var(--ease) both; }
@keyframes x-nf-roll {
	from { transform: translateX(-60vw) rotate(-300deg); opacity: 0; }
	30% { opacity: 1; }
	to { transform: none; opacity: 1; }
}
.x-nf__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4) var(--space-7); align-items: end; padding-top: var(--space-6); border-top: 1px solid var(--line-strong); }
.x-nf__k { grid-column: 1 / -1; margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.x-nf__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 1.4rem + 2vw, 3.4rem); line-height: 1.04; text-wrap: balance; }
.x-nf__text { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 48ch; }
.x-nf__actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-3); }
.x-nf__actions .x-btn { min-width: 240px; }
.x-nf__actions .x-link { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 2px; color: var(--ink); }
.x-nf .x-qcats { margin-top: var(--space-8); }
@media (max-width: 1023px) {
	.x-nf__body { grid-template-columns: minmax(0, 1fr); }
	.x-nf__actions { grid-column: 1; }
}
@media (max-width: 640px) {
	.x-nf { --nf-size: 31vw; }
	.x-nf__code { margin-bottom: var(--space-6); }
	.x-nf__actions { flex-direction: column; align-items: stretch; gap: var(--space-4); }
	.x-nf__actions .x-btn { min-width: 0; }
	.x-nf__actions .x-link { align-self: center; }
}
@media (prefers-reduced-motion: reduce) { .x-nf__zero.is-rolling img { animation: none; } }

/* =====================================================================
   18.11.2026, round 2
   ===================================================================== */
/* cart stepper = the card stepper (.x-step): one 44px box, full-height hairlines around the number,
   drawn − / +, the same faint hover. The legacy half-height ticks (::before/::after) were the "double lines". */
.checkout-page .checkout-qty { grid-template-columns: 44px 52px 44px !important; height: 44px !important; border-color: var(--line-strong) !important; overflow: hidden; }
.checkout-page .checkout-qty__value { border: 0 !important; border-inline: 1px solid var(--line) !important; justify-content: center; }
.checkout-page .checkout-qty__value::before, .checkout-page .checkout-qty__value::after { content: none !important; display: none !important; }
.checkout-page .checkout-qty__value input, .checkout-page table#order_block input.value_tovar { width: 100% !important; height: 42px !important; line-height: 42px !important; font: 500 15px/42px var(--font-ui) !important; color: var(--ink) !important; }
.checkout-page .checkout-qty__btn { position: relative; width: 44px !important; height: 42px !important; font-size: 0 !important; color: var(--ink) !important; }
.checkout-page .checkout-qty__btn::before, .checkout-page .checkout-qty__btn[data-qty-step="1"]::after {
	content: "" !important; display: block !important; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%);
}
.checkout-page .checkout-qty__btn[data-qty-step="1"]::after { transform: translate(-50%, -50%) rotate(90deg); }
@media (hover: hover) { .checkout-page .checkout-qty__btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent) !important; color: var(--ink) !important; } }
.checkout-page .checkout-qty__btn:disabled { color: var(--ink-3) !important; }
.checkout-page .checkout-qty__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
@media (max-width: 768px) {
	.checkout-page .checkout-qty { grid-template-columns: 44px 48px 44px !important; }
	.checkout-page .checkout-qty__btn { width: 44px !important; }
	.checkout-page table#order_block tbody td.checkout-item__total { padding-bottom: 11px !important; }
}

/* consents live in the summary now, right above the button */
.checkout-page .checkout-card--sticky .checkout-agree { margin: 0 0 var(--space-3) !important; }
.checkout-page .checkout-card--sticky .checkout-agree:not(.checkout-agree--optional) { margin-bottom: var(--space-4) !important; padding-top: 0 !important; border-top: 0 !important; }

/* product page: the related block sits inside .x-prose, whose h2 top margin stacked on the section padding */
.x-product__addons .x-h2 { margin: 0; }
.checkout-page .checkout-page__title { color: var(--ink) !important; }

/* the list is framed top and bottom by the same strong rule; only the dividers between items are pale */
.checkout-page table#order_block tbody tr.checkout-item:last-child { border-bottom-color: var(--line-strong) !important; }

/* ---------- «Цена от» in the cart (cena_ot, ported from prod 27.11.2026) ----------
   The notes and the «от» before the sums show only while the cart holds a flagged line that is not being removed. */
.checkout-page p.checkout-price-from-note {
	display: none; max-width: none !important; width: auto !important; margin: var(--space-4) 0 0 !important; padding: 12px 16px !important;
	border-left: 2px solid var(--ink); background: var(--paper-2); color: var(--ink-2);
	font: 400 14px/1.45 var(--font-ui) !important; text-align: left !important;
}
.checkout-page p.checkout-price-from-note--aside { margin: var(--space-3) 0 0 !important; }
body:has(.checkout-item.is-price-from:not(.is-removing)) .checkout-page p.checkout-price-from-note,
.checkout-page:has(.checkout-item.is-price-from:not(.is-removing)) p.checkout-price-from-note { display: block; }
.checkout-item.is-price-from .checkout-item__value--total::before,
body:has(.checkout-item.is-price-from:not(.is-removing)) :is(.checkout-js-cart-total, .checkout-js-subtotal, .checkout-js-total)::before {
	content: "от\00a0"; font-weight: 400; font-size: .8em; color: var(--ink-3);
}

/* phones: «Очистить корзину» is moved by JS under the cart lines and centred (29.11.2026) */
.checkout-page .checkout-clear-slot { display: none; }
@media (max-width: 640px) {
	.checkout-page .checkout-hero { grid-template-columns: minmax(0, 1fr); }
	.checkout-page .checkout-clear-slot { display: flex; justify-content: center; margin: var(--space-5) 0 var(--space-6); }
	.checkout-page .checkout-clear-slot:empty { display: none; }
	.checkout-page .checkout-clear-slot .checkout-clear { grid-column: auto; grid-row: auto; margin: 0; }
}

/* a single cart line: no «Очистить корзину» (the line's own × does the job), desktop and phones (29.11.2026).
   Lines being removed (.is-removing) do not count, so the button goes away as soon as the second-last line is deleted. */
.checkout-page:not(:has(.checkout-item:not(.is-removing) ~ .checkout-item:not(.is-removing))) :is(.checkout-clear, .checkout-clear-slot) { display: none; }

/* =====================================================================
   02.12.2026: final fixes
   ===================================================================== */
/* summary card: the frame is one inset shadow instead of four borders; the top edge of a 1px border
   at a fractional y (the card follows the cart table) was dropped by some browsers / zoom levels */
.checkout-page .checkout-card--sticky { border: 0 !important; box-shadow: inset 0 0 0 1px var(--line-strong) !important; }

/* consent: the error lives on the checkbox only, no legacy pink box around the line */
.checkout-page .checkout-form .checkout-agree.is-invalid {
	background: none !important; box-shadow: none !important; border: 0 !important; outline: 0 !important; padding: 0 !important;
}
.checkout-page .checkout-agree.is-invalid input[type="checkbox"] {
	border-color: var(--danger, #b3261e) !important; box-shadow: inset 0 0 0 1px var(--danger, #b3261e) !important;
	animation: ck-nudge .42s var(--ease) 1;
}
.checkout-page .checkout-agree.is-invalid label { color: var(--ink); }
.checkout-page .checkout-agree__error {
	display: block; margin-top: 6px; color: var(--danger, #b3261e); font-size: 12px; line-height: 1.4;
	animation: ck-hint var(--dur) var(--ease) both;
}
.checkout-page .checkout-agree__error[hidden] { display: none; }
@keyframes ck-nudge { 0%, 100% { transform: none; } 20% { transform: translateX(-3px); } 45% { transform: translateX(3px); } 70% { transform: translateX(-2px); } }
@keyframes ck-hint { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
	.checkout-page .checkout-agree.is-invalid input[type="checkbox"], .checkout-page .checkout-agree__error { animation: none; }
}

/* =====================================================================
   Order placed (emarket/default.tpl purchase_successful + emarket orderDone macro), 02.12.2026
   ===================================================================== */
.x-inner:has(.x-done) > .x-h1 { display: none; }
.x-inner .x-prose:has(.x-done) { max-width: none; }
.x-prose .x-done a { text-decoration: none; }
.x-prose .x-done .x-btn--action { color: var(--action-ink, #fff); }
@media (hover: hover) { .x-prose .x-done .x-btn--action:hover { color: var(--action); } }
.x-prose .x-done p { margin: 0; }

.x-done { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: var(--space-7) var(--space-8); align-items: start; padding: var(--space-5) 0 var(--space-8); }
.x-done__main { min-width: 0; }

/* the seal: the tin from the hero with a drawn check stamped over its edge */
.x-done__seal { position: relative; width: 112px; height: 112px; margin: 0 0 var(--space-6); }
.x-done__seal img { display: block; width: 100%; height: 100%; max-width: none; border-radius: 50%; box-shadow: 0 6px 14px -4px rgba(20, 20, 20, .28); animation: x-done-tin .7s var(--ease) both; }
.x-done__check { position: absolute; right: -14px; bottom: -6px; width: 48px; height: 48px; overflow: visible; }
.x-done__check circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 100; stroke-dashoffset: 100; animation: x-done-draw .5s var(--ease) .45s forwards; }
.x-done__check path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: x-done-draw .35s var(--ease) .85s forwards; }
@keyframes x-done-tin { from { opacity: 0; transform: translateY(10px) rotate(-40deg) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes x-done-draw { to { stroke-dashoffset: 0; } }

.x-done__k { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.x-done__k b { color: var(--ink); font-weight: 500; }
.x-done__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.6rem); line-height: 1.04; text-wrap: balance; color: var(--ink); }
.x-prose .x-done .x-done__lead { margin-top: var(--space-5); max-width: 52ch; color: var(--ink-2); font-size: 17px; line-height: 1.55; }
.x-done__lead b { color: var(--ink); font-weight: 500; white-space: nowrap; }
.x-prose .x-done .x-done__fix { margin-top: var(--space-3); font-size: 14px; color: var(--ink-3); }
.x-prose .x-done .x-done__fix a { color: var(--ink-2); border-bottom: 1px solid currentColor; white-space: nowrap; }

/* what happens next: three stops on one rule, the rule fills up to the current stop */
.x-done__steps { --n: 3; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: var(--space-5); margin: var(--space-7) 0 0 !important; padding: 0 !important; list-style: none; counter-reset: none; }
.x-done__steps::before, .x-done__steps::after { content: ""; position: absolute; left: 6px; top: 6px; height: 1px; background: var(--line-strong); right: calc((100% - 2 * var(--space-5)) / 3 - 6px); }
.x-done__steps::after { background: var(--ink); right: auto; width: calc((100% - 2 * var(--space-5)) / 3 + var(--space-5)); transform-origin: left; transform: scaleX(0); animation: x-done-fill .9s var(--ease) 1.1s forwards; }
@keyframes x-done-fill { to { transform: scaleX(1); } }
.x-done__step { position: relative; z-index: 1; margin: 0 !important; padding: 28px 0 0 !important; list-style: none; }
.x-done__step::before { display: none !important; }
.x-done__dot { position: absolute; left: 0; top: 0; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--paper); }
.x-done__step.is-done .x-done__dot { background: var(--ink); border-color: var(--ink); }
.x-done__step.is-now .x-done__dot { border-color: var(--ink); background: var(--paper); }
.x-done__step.is-now .x-done__dot::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink); }
.x-done__step.is-now .x-done__dot::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--ink); animation: x-done-ping 2.4s var(--ease) 2s infinite; }
@keyframes x-done-ping { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.4); opacity: 0; } }
.x-done__n { display: block; font-size: 12px; letter-spacing: .12em; color: var(--ink-3); }
.x-done__step b { display: block; margin-top: 4px; font-weight: 500; font-size: 15px; color: var(--ink); }
.x-done__step > span:last-child { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.x-done__step:not(.is-done):not(.is-now) b { color: var(--ink-2); }

.x-done__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-7); }
.x-done__actions .x-btn { min-width: 240px; }
/* 05.12.2026: the site-wide underline (.x-uline): drawn left to right on hover */
.x-done__actions .x-link { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding-bottom: 2px; color: var(--ink);
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; transition: background-size var(--dur) var(--ease); }
.x-done__actions .x-link:hover, .x-done__actions .x-link:focus-visible { background-size: 100% 1px; }

/* the receipt: the same card as «Ваш заказ» in the cart */
.x-done__receipt { padding: var(--space-6); box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--paper); animation: x-done-rise .6s var(--ease) .2s both; }
@keyframes x-done-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.x-done__rk { margin-bottom: var(--space-4) !important; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.x-done__items { margin: 0 !important; padding: 0 !important; list-style: none; border-top: 1px solid var(--line); }
.x-done__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--space-4); margin: 0 !important; padding: 12px 0 !important; border-bottom: 1px solid var(--line); list-style: none; font-size: 14px; line-height: 1.4; color: var(--ink); }
.x-done__item::before { display: none !important; }
.x-done__item i { font-style: normal; color: var(--ink-3); white-space: nowrap; }
.x-done__item strong { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.x-done__note { grid-column: 1 / -1; font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.x-done__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.x-done__row strong { color: var(--ink); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.x-done__row--total { border-bottom: 0; padding: var(--space-4) 0 0; color: var(--ink); }
.x-done__row--total strong { font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1; }
.x-prose .x-done .x-done__from { margin-top: var(--space-3); font-size: 12px; line-height: 1.5; color: var(--ink-3); }

@media (max-width: 1023px) {
	/* one column: the receipt goes right after the steps, the buttons close the page */
	.x-done { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
	.x-done__main { display: contents; }
	.x-done__receipt { order: 1; max-width: 560px; margin-top: var(--space-7); }
	.x-done__actions { order: 2; }
}
@media (max-width: 640px) {
	.x-done { padding-top: var(--space-3); }
	.x-done__seal { width: 88px; height: 88px; margin-bottom: var(--space-5); }
	.x-done__check { width: 40px; height: 40px; right: -12px; }
	.x-done__steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
	/* vertical: one segment per stop, from its dot down to the next one; the done segment fills */
	.x-done__steps::before, .x-done__steps::after { display: none; }
	.x-done__step:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 13px; bottom: calc(-1 * var(--space-5)); width: 1px; background: var(--line-strong); }
	.x-done__step.is-done::after { background: var(--ink); transform-origin: top; transform: scaleY(0); animation: x-done-fill-v .7s var(--ease) 1.1s forwards; }
	@keyframes x-done-fill-v { to { transform: scaleY(1); } }
	.x-done__step { padding: 0 0 0 32px !important; }
	.x-done__receipt { padding: var(--space-5) var(--space-4); }
	.x-done__actions { flex-direction: column; align-items: stretch; gap: var(--space-4); }
	.x-done__actions .x-btn { min-width: 0; }
	.x-done__actions .x-link { align-self: center; }
}
@media (prefers-reduced-motion: reduce) {
	.x-done__seal img, .x-done__receipt { animation: none; }
	.x-done__check circle, .x-done__check path { animation: none; stroke-dashoffset: 0; }
	.x-done__steps::after, .x-done__step.is-done::after { animation: none; transform: none; }
	.x-done__step.is-now .x-done__dot::after { animation: none; display: none; }
}

/* required fields: our own error state (02.12.2026) instead of the legacy pink fill + grey 3px ring.
   Same language as the consent checkbox: a red 1px frame doubled inside, the label turns red,
   the message sits under the field. */
.checkout-page .checkout-form .checkout-personal-fields .checkout-field.is-invalid .checkout-field__input,
.checkout-page .checkout-form .checkout-field.is-invalid .checkout-field__input,
.checkout-page .checkout-form table.adress tr.is-invalid :is(input, textarea) {
	border-color: var(--danger, #b3261e) !important; box-shadow: inset 0 0 0 1px var(--danger, #b3261e) !important; background: var(--paper) !important;
}
.checkout-page .checkout-form .checkout-field.is-invalid { background: none !important; box-shadow: none !important; outline: 0 !important; }
.checkout-page .checkout-field.is-invalid .checkout-field__label { color: var(--danger, #b3261e) !important; }
.checkout-page .checkout-field__error {
	display: block; margin-top: 6px; color: var(--danger, #b3261e); font-size: 12px; line-height: 1.4; text-align: left;
	animation: ck-hint var(--dur) var(--ease) both;
}
@media (prefers-reduced-motion: reduce) { .checkout-page .checkout-field__error { animation: none; } }

/* the error span lives inside .checkout-field, so the wrapper grows and the resting label (top: 50%)
   dropped below the input on blur. Anchor it to the middle of the 56px input instead (02.12.2026). */
.checkout-page .checkout-field:not(.checkout-field--textarea):has(> .checkout-field__error) .checkout-field__label { top: 28px; }
.checkout-page .checkout-field:not(.checkout-field--textarea):has(> .checkout-field__error) .checkout-field__input:is(:focus, :not(:placeholder-shown)) ~ .checkout-field__label { top: 11px; }
