/* Корзина, оформление заказа, личный кабинет — вид нового сайта (этап 6 редизайна).
   Слой поверх index.css: разметка, id и классы, на которые опираются app.js, cart-page.js,
   checkout-delivery.js и account.js, не меняются — меняется только вид (решение: «логика не трогается»).
   Подключается последним в <head> cart.html, checkout.html, account.html, после legacy.css (там токены,
   крошки, кнопки и поля — общие для всех страниц старого вида). */

/* ===== Шаги и карточки: без рамок, серые плашки ===== */
.step-card { border: 0; border-radius: var(--r); background: var(--bg-2); }
.step-card.is-open { border: 0; }
.step-card__num { background: #dfe4e0; color: var(--muted); }
.step-card.is-open .step-card__num,
.step-card.is-completed .step-card__num { background: var(--ink); color: #fff; }
.step-card.is-completed .step-card__num::after { background-color: var(--ink); }
.step-card__title { font: 700 19px/1.25 var(--display); letter-spacing: -0.01em; }
.step-card__edit { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.checkout-summary { border: 0; border-radius: var(--r); background: var(--bg-2); top: 16px; }
.checkout-summary__inner { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.checkout-summary__row--total span:last-child { color: var(--ink); font-size: 24px; }
/* Корзина: товары на белом, каждый — отдельной карточкой (на сером всё сливалось — владелец 01.11.2026) */
.cart-page__list.step-card { background: transparent; }
.cart-page__list .step-card__head { padding: 0 0 14px; }
.cart-page__list .step-card__num { display: none; }
.cart-page__list .step-card__head { grid-template-columns: 1fr auto; }
.cart-page__list .step-card__title { font: 700 22px/1.2 var(--display); }
.cart-page__list .step-card__body { padding: 0; }
#cartPageItems { display: flex; flex-direction: column; gap: 10px; }
.cart-page__item { grid-template-columns: 96px minmax(0, 1fr) auto auto auto; gap: 18px; padding: 14px 16px 14px 14px; border: 0; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 160ms ease; }
.cart-page__item:last-child { border: 0; }
@media (hover: hover) { .cart-page__item:hover { box-shadow: inset 0 0 0 1.5px #cfd6d1; } }
.cart-page__img { width: 96px; height: 96px; border-radius: 12px; background: var(--bg-2); }
.cart-page__img img { padding: 6px; mix-blend-mode: multiply; }
.cart-page__name { font: 700 17px/1.3 var(--display); margin-bottom: 6px; }
.cart-page__badge { margin: 0 6px 6px 0; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink); font-size: 13px; font-weight: 600; }
.cart-page__unit-price { color: var(--muted); font-size: 14px; }
.cart-page__stock-note { margin-top: 2px; font-size: 13px; }
.cart-page__stock-note--mute { color: var(--muted); }
.cart-page__qty { border: 0; border-radius: 999px; background: var(--bg-2); }
.cart-page__qty-btn { width: 38px; height: 38px; color: var(--ink); }
.cart-page__qty-btn:hover:not(:disabled) { background: #e3e8e4; }
.cart-page__qty-val { min-width: 24px; text-align: center; font-weight: 700; }
.cart-page__total { min-width: 96px; text-align: right; font: 800 19px/1.2 var(--display); white-space: nowrap; }
.cart-page__remove { width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
@media (hover: hover) { .cart-page__remove:hover { background: var(--bg-2); color: var(--ink); } }
@media (max-width: 700px) {
  .cart-page__item { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "img info rm" "img qty total"; gap: 8px 12px; padding: 12px; }
  .cart-page__img { grid-area: img; width: 72px; height: 72px; align-self: start; }
  .cart-page__info { grid-area: info; }
  .cart-page__qty { grid-area: qty; }
  .cart-page__total { grid-area: total; min-width: 0; font-size: 17px; align-self: center; }
  .cart-page__remove { grid-area: rm; align-self: start; }
}

/* ===== Поля ===== */
.form-group label { font: 600 14px/1.3 var(--text); color: var(--ink); }
.form-group input, .form-group textarea, .checkout-page input[type="text"], .checkout-page input[type="tel"], .checkout-page input[type="email"] {
  border: 1.5px solid transparent; border-radius: 12px; background: #fff; font: 500 16px/1.3 var(--text); color: var(--ink);
}
.form-group input:focus, .form-group textarea:focus, .checkout-page input:focus { border-color: var(--ink); box-shadow: none; outline: none; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #9aa29c; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }

/* ===== Кнопки: плоские, без свечения и подпрыгивания ===== */
.btn { font-family: var(--text); border-radius: 12px; }
.btn--primary { box-shadow: none !important; }
.btn--primary:hover { transform: none; box-shadow: none; }
.checkout-link, .cart-page__continue { color: var(--ink); }

/* ===== Пустая корзина и экран успеха ===== */
.checkout-empty { border-radius: var(--r); background: var(--bg-2); }
.checkout-empty__icon { background: #fff !important; color: var(--ink) !important; }
.checkout-empty__panda { display: block; width: auto; height: 200px; margin: 0 auto 20px; }
.success-screen__icon { background: var(--ink) !important; }

/* ===== Личный кабинет (стили страницы — в account.html, здесь — новый вид поверх) ===== */
/* бонусная программа приостановлена (01.11.2026) — поле промокода друга на входе не показываем */

@media (max-width: 860px) {
  .checkout-page__title { font-size: 28px; }
}

/* ===== Оформление заказа: шапка с пандой и шагами, белые карточки (02.11.2026) ===== */
.fil2__crumbs-bar:has(+ .checkout-page) .fil2__crumbs { border-radius: var(--r) var(--r) 0 0; }
.co-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin: 0 0 24px; padding: 0 clamp(18px, 2.4vw, 32px) 0; border-radius: 0 0 var(--r) var(--r); background: var(--bg-2); overflow: hidden; }
.co-hero__text { padding: 6px 0 clamp(22px, 2.6vw, 32px); }
.co-hero .checkout-page__title { margin: 0; padding: 0; border-radius: 0; background: none; }
.co-hero__lead { max-width: 560px; margin: 10px 0 18px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.co-hero__steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.co-hero__steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 14px; font-weight: 500; transition: color 200ms ease, box-shadow 200ms ease; }
.co-hero__steps span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-2); color: var(--muted); font-size: 13px; font-weight: 600; transition: background-color 200ms ease, color 200ms ease; }
.co-hero__steps li.is-on { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.co-hero__steps li.is-on span { background: var(--ink); color: #fff; }
.co-hero__steps li.is-done { color: var(--ink); }
.co-hero__steps li.is-done span { background: var(--accent-strong); color: #fff; font-size: 0; }
.co-hero__steps li.is-done span::before { content: '✓'; font-size: 13px; }
.co-hero__panda { display: block; width: auto; height: 190px; margin-top: 12px; animation: co-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes co-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .co-hero__panda { animation: none; } }

/* шаги и итог — белые карточки с рамкой, открытый шаг заметнее (на сером всё сливалось) */
.checkout-page .step-card:not(.cart-page__list) { background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 200ms ease; }
.checkout-page .step-card.is-open:not(.cart-page__list) { box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px rgba(14, 36, 22, 0.07); }
.checkout-page .step-card:not(.is-open):not(.is-completed) .step-card__title { color: var(--muted); }
.checkout-page .form-group input, .checkout-page .form-group textarea { background: var(--bg-2); }
.checkout-page .form-group input:focus, .checkout-page .form-group textarea:focus { background: #fff; }
.checkout-page .checkout-summary { background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px rgba(14, 36, 22, 0.06); }
.checkout-summary__img { width: 64px; height: 64px; border-radius: 12px; background: var(--bg-2); }
.checkout-summary__img img { width: 100%; height: 100%; padding: 4px; object-fit: contain; mix-blend-mode: multiply; }
.checkout-summary__name { font-weight: 500; line-height: 1.3; }
.success-screen__panda { display: block; width: auto; height: 220px; margin: 0 auto 8px; }

@media (max-width: 700px) {
  /* телефон: панда в углу у заголовка, шаги — одной строкой */
  .co-hero { position: relative; display: block; padding-bottom: 18px; }
  .co-hero__text { padding-bottom: 0; }
  .co-hero .checkout-page__title { padding-right: 96px; }
  .co-hero__panda { position: absolute; right: 12px; top: -4px; height: 88px; margin: 0; }
  .co-hero__lead { margin: 10px 0 14px; font-size: 15px; }
  .co-hero__steps { flex-wrap: nowrap; gap: 6px; }
  .co-hero__steps li { flex: 1; justify-content: center; min-width: 0; padding: 5px 8px 5px 5px; gap: 6px; font-size: 13px; }
}
