/* ============================================================
   ART-GSM 2026 — PAGES 2  (checkout · thank-you · account · auth · favorites)
   ============================================================ */

/* ---------- CHECKOUT ---------- */
.checkout-grid { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: var(--s-28); align-items: start; }
.co-steps { display: flex; flex-direction: column; gap: var(--s-14); }
.co-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--s-20); }
.co-block > .co-h { display: flex; align-items: center; gap: var(--s-12); margin-bottom: var(--s-16); }
.co-block .co-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 14px; flex: none; }
.co-block .co-h h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea, .field select {
  height: 48px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2);
  padding: 0 14px; font: inherit; font-size: 14.5px; color: var(--ink); transition: border-color .15s, background .15s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 76px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent); }
.field input::placeholder { color: var(--ink-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-12); }
.field-grid { display: grid; gap: var(--s-12); }

/* radio option cards (delivery/payment) */
.opt-cards { display: flex; flex-direction: column; gap: var(--s-10); }
.opt-card { display: flex; align-items: center; gap: var(--s-12); padding: var(--s-14) var(--s-16); border: 1px solid var(--line-2); border-radius: var(--r-md); cursor: pointer; transition: border-color .15s, background .15s; background: var(--surface); }
.opt-card:hover { border-color: var(--accent); }
.opt-card.sel { border-color: var(--accent); background: var(--blue-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.opt-card .oc-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; position: relative; transition: border-color .15s; }
.opt-card.sel .oc-radio { border-color: var(--accent); }
.opt-card.sel .oc-radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.opt-card .oc-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); flex: none; }
.opt-card.sel .oc-ic { background: #fff; }
.opt-card .oc-ic svg { width: 20px; height: 20px; }
.opt-card .oc-main { min-width: 0; }
.opt-card .oc-name { font-weight: 700; font-size: 14px; }
.opt-card .oc-note { font-size: 12.5px; color: var(--ink-3); }
.opt-card .oc-price { margin-left: auto; font-family: var(--mono); font-weight: 700; font-size: 14px; flex: none; }
.opt-card .oc-price.free { color: #16a34a; }

/* bonus toggle / consent */
.co-inline { display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); }
.co-inline .ci-l { font-size: 14px; }
.co-inline .ci-l small { display: block; font-size: 12px; color: var(--ink-3); }
.toggle { width: 46px; height: 27px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .2s; cursor: pointer; border: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(19px); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.consent input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: 5px; flex: none; margin-top: 1px; cursor: pointer; position: relative; }
.consent input:checked { background: var(--accent); border-color: var(--accent); }
.consent input:checked::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.consent a { color: var(--accent); font-weight: 600; }

/* order summary (sticky) */
.order-summary { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: var(--s-20); display: flex; flex-direction: column; gap: var(--s-12); }
.order-summary h3 { font-size: 16px; font-weight: 700; }
.os-items { display: flex; flex-direction: column; gap: var(--s-10); max-height: 220px; overflow-y: auto; }
.os-item { display: flex; gap: 10px; align-items: center; }
.os-item .osi-media { width: 44px; height: 44px; border-radius: 8px; background: var(--photo-bg); border: 1px solid var(--line); position: relative; overflow: hidden; flex: none; }
.os-item .osi-media img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; mix-blend-mode: multiply; }
.os-item .osi-name { font-size: 12.5px; line-height: 1.3; min-width: 0; }
.os-item .osi-qty { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.os-item .osi-price { margin-left: auto; font-family: var(--mono); font-weight: 700; font-size: 13px; white-space: nowrap; }

/* ---------- THANK YOU ---------- */
.thanks { max-width: 640px; margin: 0 auto; text-align: center; padding: var(--s-40) 0; }
.thanks .th-ic { width: 84px; height: 84px; margin: 0 auto var(--s-20); border-radius: 50%; background: #dcfce7; color: #16a34a; display: grid; place-items: center; }
.thanks .th-ic svg { width: 44px; height: 44px; }
.thanks h1 { font-size: clamp(26px, 3.5vw, 36px); font-weight: 800; letter-spacing: -.025em; margin-bottom: var(--s-12); }
.thanks .th-sub { font-size: 15px; color: var(--ink-2); margin-bottom: var(--s-24); }
.thanks .th-order { display: inline-flex; align-items: center; gap: 10px; padding: var(--s-12) var(--s-20); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: var(--s-28); }
.thanks .th-order .lbl { font-size: 13px; color: var(--ink-3); }
.thanks .th-order .num { font-family: var(--mono); font-weight: 700; font-size: 18px; color: var(--accent); }
.thanks .th-next { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--s-20); margin-bottom: var(--s-24); }
.thanks .th-next h3 { font-size: 15px; font-weight: 700; margin-bottom: var(--s-14); }
.th-step { display: flex; gap: var(--s-12); padding: var(--s-10) 0; }
.th-step .ts-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--blue-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.th-step .ts-ic svg { width: 19px; height: 19px; }
.th-step .ts-t { font-weight: 700; font-size: 14px; }
.th-step .ts-d { font-size: 13px; color: var(--ink-3); }
.thanks .th-actions { display: flex; gap: var(--s-12); justify-content: center; flex-wrap: wrap; }

/* ---------- ACCOUNT/FAVORITES прототипные классы удалены (code-15): 0 ссылок в PHP,
   реальный ЛК стилизован через .ag-lk-* в pages3.css ---------- */

/* ---------- AUTH ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: var(--s-40) var(--s-16); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: var(--s-32); }
.auth-card .auth-logo { display: flex; justify-content: center; margin-bottom: var(--s-20); }
.auth-card .auth-logo img { height: 30px; }
.auth-tabs { display: flex; background: var(--surface-2); border-radius: var(--r-md); padding: 4px; margin-bottom: var(--s-20); }
.auth-tabs button { flex: 1; height: 40px; border-radius: var(--r-sm); font-weight: 700; font-size: 14px; color: var(--ink-3); transition: background .15s, color .15s; }
.auth-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; text-align: center; }
.auth-card .auth-sub { font-size: 13.5px; color: var(--ink-3); text-align: center; margin-bottom: var(--s-20); }
.auth-form { display: flex; flex-direction: column; gap: var(--s-14); }
.auth-form .auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.auth-form .auth-row a { color: var(--accent); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; margin: var(--s-4) 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-alt { display: flex; gap: var(--s-10); }
.auth-alt button { flex: 1; height: 48px; border: 1px solid var(--line-2); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 14px; background: var(--surface); }
.auth-alt button:hover { border-color: var(--accent); }
.auth-alt button svg { width: 18px; height: 18px; }

@media (max-width: 1023px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}
@media (max-width: 768px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ---- THANK YOU доп. (Style B, 2026-06-13) ---- */
.thanks .th-actions { display: flex; gap: var(--s-12); justify-content: center; flex-wrap: wrap; margin-top: var(--s-8); }
.thanks .th-actions .btn { min-width: 190px; }
.thanks .btn--ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.thanks .btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.thanks .th-pay { max-width: 420px; margin: 0 auto var(--s-24); padding: var(--s-20); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.thanks .th-pay-head { font-weight: 700; font-size: 14px; color: var(--ink-2); margin-bottom: var(--s-12); }
.thanks .th-pay .btn--primary { width: 100%; }
.thanks .th-pdf { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent); font-weight: 600; }
.thanks .th-pay-buffered { font-size: 14px; }
.thanks .th-payerr { max-width: 420px; margin: 0 auto var(--s-20); padding: 12px 16px; border-radius: var(--r-sm); background: #fef2f2; color: #b42318; font-size: 14px; }
.thanks .th-ic--err { background: #fef2f2; color: #dc2626; }

/* ---- страница результата оплаты /order/result.php — центрирование вывода шлюза (Style B) ---- */
body.ag-styleb[data-cur^="/order/result"] #content .container,
body.ag-styleb[data-cur^="/order/payment"] #content .container { max-width: 640px; margin: 0 auto; }
body.ag-styleb[data-cur^="/order/result"] .sale_order_full_table,
body.ag-styleb[data-cur^="/order/payment"] .sale_order_full_table { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); padding: var(--s-24); margin: var(--s-24) 0; font-size: 15px; }

/* ===== 2026-07-02: симметрия блока оплаты ЮKassa на «Спасибо за заказ» ===== */
.thanks .th-pay { max-width: 520px; }
.thanks .th-pay-buffered { display: flex; flex-direction: column; align-items: center; }
.thanks .th-pay-buffered > * {
	max-width: 100% !important;
	box-sizing: border-box;
	margin-left: auto !important;
	margin-right: auto !important;
	float: none !important;
}
.thanks .th-pay-buffered table { width: 100% !important; }
/* кнопки действий — Style B, без капса */
.thanks .th-actions .btn { text-transform: none; letter-spacing: 0; }
