/* Корзина и избранное */

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(20px, 3vw, 40px); align-items: start; }
.cart-list { display: flex; flex-direction: column; gap: 14px; }

.crow { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px; border-radius: var(--radius-m); background: var(--card-bg); border: 1px solid var(--card-border); }
.crow-thumb { display: grid; place-items: center; width: 96px; height: 124px; border-radius: 14px; background: var(--bg-secondary); overflow: hidden; }
.crow-thumb img { width: 100%; height: 100%; object-fit: contain; }
.crow-name { display: block; font-size: 17px; font-weight: 600; line-height: 1.3; }
a.crow-name:hover { color: var(--accent-orange); }
.crow-sub { margin-top: 4px; font-size: 13px; color: var(--text-muted); }
.crow-warn { margin-top: 6px; font-size: 13px; color: var(--accent-red); }
.crow-controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.crow-qty { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--bg-secondary); }
.crow-qty button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--bg-primary); font-size: 18px; line-height: 1; }
.crow-qty span { min-width: 28px; text-align: center; font-weight: 700; }
.crow-side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.crow-sum { font-size: 18px; font-weight: 700; white-space: nowrap; }
.crow-unit { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.crow-remove { border: 0; background: none; font-size: 13px; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.crow-remove:hover { color: var(--accent-red); }

.cart-summary { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius-l); background: var(--bg-secondary); border: 1px solid var(--card-border); }
.cart-summary h2 { font-size: 22px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; color: var(--text-secondary); }
.sum-row b { color: var(--text-primary); }
.sum-total { padding-top: 14px; border-top: 1px solid var(--border-color); font-size: 17px; }
.sum-total b { font-size: 26px; }
.cart-summary .btn { width: 100%; min-height: 54px; }
.cart-summary .btn[disabled] { opacity: 0.6; pointer-events: none; }
.cart-error { padding: 10px 14px; border-radius: 14px; background: rgba(211, 47, 47, 0.1); color: var(--accent-red); font-size: 14px; }
.cart-note { font-size: 13px; line-height: 1.55; color: var(--text-muted); }

.cart-empty { max-width: 520px; padding: 56px 24px; margin: 0 auto; text-align: center; border: 2px dashed var(--border-color); border-radius: var(--radius-l); }
.cart-empty h2 { margin-bottom: 10px; }
.cart-empty p { margin-bottom: 24px; color: var(--text-secondary); }

.cart-done { max-width: 620px; margin: 0 auto; padding: clamp(28px, 5vw, 56px); text-align: center; border-radius: var(--radius-l); background: var(--header-bg); color: var(--header-text); background-image: radial-gradient(90% 120% at 100% 0%, rgba(251, 192, 45, 0.28), transparent 60%); }
.cart-done .eyebrow { margin-bottom: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.cart-done h2 { font-size: clamp(22px, 3vw, 30px); }
.done-number { margin: 14px 0 18px; font-size: clamp(48px, 9vw, 84px); font-weight: 700; letter-spacing: 0.06em; line-height: 1; color: var(--accent); }
.done-lead { opacity: 0.85; }
.done-phone { display: inline-block; margin: 20px 0 12px; padding: 12px 28px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: clamp(22px, 3.4vw, 32px); font-weight: 700; transition: transform var(--speed) var(--ease); }
.done-phone:hover { transform: translateY(-2px); }
.done-hours { margin-bottom: 8px; font-size: 14px; opacity: 0.7; }
.done-note { margin: 18px 0 26px; font-size: 14px; opacity: 0.7; }
.cart-done .btn-ghost { color: var(--header-text); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3); }

/* Выход из аккаунта: кнопка под сводкой заказа и окно подтверждения */
.account-row { margin-top: 6px; }
.account-row .btn { width: 100%; min-height: 46px; }
.cart-empty .account-row, .cart-done .account-row { margin-top: 18px; }
.cart-done .account-row .btn { color: var(--header-text); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3); }
.confirm { width: min(380px, calc(100vw - 32px)); padding: 28px; border: 0; border-radius: var(--radius-l); background: var(--bg-primary); color: var(--text-primary); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); }
.confirm::backdrop { background: var(--overlay-bg); }
.confirm h2 { margin-bottom: 22px; font-size: 20px; line-height: 1.25; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; min-height: 46px; padding: 0 12px; }


@media (max-width: 900px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}

@media (max-width: 768px) {
    .crow { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .crow-thumb { width: 72px; height: 94px; }
    .crow-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .crow-name { font-size: 15px; }
}
