/* site-cart.css — шторка корзины (Cart, CartPhone) и шапка оформления (HeaderCheckout). Подключается на всех
   страницах сайта; токены — из site.css. Префиксы: crt- (шторка), hco- (шапка оформления). */

/* ---------- шторка корзины ---------- */
.crt { position: fixed; inset: 0; z-index: 48; font-family: var(--av-font); color: var(--av-text); }
.crt-dim { position: absolute; inset: 0; background: rgba(8,25,64,.45); animation: crt-fade .2s ease-out; }
.crt-box { position: absolute; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100%; background: #FFFFFF; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(8,25,64,.25); outline: none; animation: crt-in .22s ease-out; }
@keyframes crt-fade { from { opacity: 0; } }
@keyframes crt-in { from { transform: translateX(40px); opacity: 0; } }
/* пока открыта шторка, плашка cookies не закрывает кнопку «Оформить заказ» */
html.av-crt .ck-bar { display: none; }

.crt-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px 24px; }
.crt-ttl { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.crt-h { font: 600 22px/28px var(--av-head); color: var(--av-ink); }
.crt-n { font-size: 14px; color: var(--av-muted); white-space: nowrap; }
.crt-x { width: 44px; height: 44px; border-radius: 8px; border: 0; background: transparent; color: var(--av-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.crt-x:hover { background: var(--av-sky); }

.crt-body { flex: 1; overflow-y: auto; padding: 0 24px 16px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.crt-load, .crt-empty, .crt-msg { padding: 40px 0; text-align: center; color: var(--av-muted); font-size: 15px; line-height: 22px; }
.crt-empty a, .crt-msg a { color: var(--av-blue); font-weight: 700; }
.crt-msg p { margin: 0 0 14px; }
.crt-btn { min-height: 44px; border-radius: 12px; border: 0; background: var(--av-blue); color: #FFFFFF; font: 700 15px/1 var(--av-font); padding: 0 20px; cursor: pointer; }
.crt-btn:hover { background: var(--av-blue-hover); }

.crt-note-b { display: flex; gap: 10px; background: var(--av-sky); color: #0B2A6B; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 19px; }
.crt-note-b a { color: #0047D1; font-weight: 700; }

.crt-list { list-style: none; margin: 0; padding: 0; }
.crt-item { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #EEF1F6; }
.crt-cov { width: 64px; height: 64px; border-radius: 12px; flex: none; position: relative; overflow: hidden; display: flex; align-items: flex-start; justify-content: center; }
.crt-cov > span { margin-top: 8px; background: #FFFFFF; border-radius: 4px; padding: 2px 3px; font: 700 8px/10px var(--av-head); letter-spacing: -.02em; text-align: center; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crt-cov-s { width: 56px; height: 56px; }
.crt-cov img { display: block; width: 100%; height: 100%; object-fit: cover; }
.crt-it { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.crt-name { font-weight: 700; font-size: 15px; line-height: 20px; color: var(--av-ink); text-decoration: none; }
a.crt-name:hover { color: var(--av-blue); }
.crt-sub { font-size: 13px; line-height: 18px; color: var(--av-muted); }
.crt-pr { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.crt-pr b { font: 600 16px/20px var(--av-head); color: var(--av-ink); white-space: nowrap; }
.crt-pr s { font-size: 12px; color: #8A93A3; white-space: nowrap; }
.crt-rm { width: 40px; height: 40px; border-radius: 8px; border: 0; background: transparent; color: #8A93A3; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.crt-rm:hover { background: #F6E5E8; color: var(--av-red); }

.crt-up { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid #B9CCF5; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #FFFFFF; }
.crt-glow { position: absolute; inset: 0; background: radial-gradient(120% 80% at 10% 0%, rgba(0,88,255,.14), transparent 60%), radial-gradient(90% 60% at 100% 100%, rgba(115,0,255,.08), transparent 70%); pointer-events: none; }
.crt-up-t { position: relative; display: flex; gap: 12px; align-items: center; }
.crt-up-t > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crt-up-t b { font-weight: 800; font-size: 15px; line-height: 20px; color: var(--av-ink); }
.crt-up-t > div > span { font-size: 13px; line-height: 18px; color: var(--av-muted-2); }
.crt-up-b { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.crt-up-b > span { font-size: 14px; color: #0047D1; font-weight: 800; }
.crt-line { min-height: 42px; border-radius: 12px; border: 0; background: #FFFFFF; color: var(--av-ink); box-shadow: inset 0 0 0 1.5px var(--av-ink); font: 700 14px/1 var(--av-font); padding: 0 16px; cursor: pointer; white-space: nowrap; }
.crt-line:hover { background: var(--av-ink); color: #FFFFFF; }

.crt-foot { padding: 16px 24px 24px; border-top: 1px solid #EEF1F6; display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; }
.crt-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; color: var(--av-muted-2); }
.crt-row s { color: #8A93A3; }
.crt-sum span { font-weight: 800; color: var(--av-ink); font-size: 17px; }
.crt-sum b { font: 600 24px/30px var(--av-head); color: var(--av-ink); }
.crt-go { display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 12px; background: var(--av-blue); color: #FFFFFF !important; font: 700 16px/1 var(--av-font); text-decoration: none; margin-top: 4px; }
.crt-go:hover { background: var(--av-blue-hover); }
.crt-note { font-size: 12px; line-height: 17px; color: var(--av-muted); text-align: center; }
.crt-x:focus-visible, .crt-rm:focus-visible, .crt-btn:focus-visible, .crt-line:focus-visible, .crt-go:focus-visible, .crt-name:focus-visible { outline: 3px solid var(--av-blue); outline-offset: 2px; }

@media (max-width: 640px) {
  .crt-box { width: 100%; animation: crt-up .22s ease-out; box-shadow: none; }
  @keyframes crt-up { from { transform: translateY(24px); opacity: 0; } }
  .crt-top { padding: 10px 8px 6px 16px; border-bottom: 1px solid #EEF1F6; }
  .crt-h { font-size: 20px; line-height: 26px; }
  .crt-body { padding: 4px 16px 16px; gap: 14px; }
  .crt-item { gap: 12px; padding: 12px 0; }
  .crt-cov { width: 56px; height: 56px; border-radius: 10px; }
  .crt-cov > span { margin-top: 7px; font-size: 7px; line-height: 9px; }
  .crt-name { font-size: 14px; line-height: 19px; }
  .crt-sub { display: none; }
  .crt-pr b { font-size: 14px; }
  .crt-up { border-radius: 16px; padding: 14px; gap: 10px; }
  .crt-foot { padding: 12px 16px 20px; box-shadow: 0 -6px 20px rgba(8,25,64,.06); }
  .crt-sum b { font-size: 22px; line-height: 28px; }
  .crt-go { min-height: 52px; margin-top: 0; }
  .crt-note { display: none; }
}

/* ---------- шапка оформления (HeaderCheckout) ---------- */
/* обычные кнопки входа остаются в разметке скрытыми: окно входа открывается из страницы */
.hco .hdr-right { display: none; }
.hco .hdr-left { flex: 1; justify-content: space-between; gap: 16px; }
.hco-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--av-ink); text-decoration: none; min-height: 44px; border-radius: 8px; }
.hco-back:hover { color: var(--av-blue); }
.hco-back:focus-visible { outline: 3px solid var(--av-blue); outline-offset: 2px; }
.hco-m { display: none; }
@media (max-width: 640px) {
  .hco { --av-hdr-h: 60px; }
  .hco-d { display: none; }
  .hco-m { display: inline-flex; }
  .hco .hdr-wrap { padding: 0 12px 0 16px; }
  .hco .hdr-left { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
  .hco .hdr-left .hco-back { justify-self: start; }
  .hco .hdr-left .hdr-logo { grid-column: 2; }
}
