/* Мишины Игрушки — шторка корзины. Разметка: templates/cart/partials/cart_drawer_body.html.
   Цвета только из tokens*.css: одна форма для тёмной и светлой темы. */

#cart-drawer-content { overflow: hidden; display: flex; flex-direction: column; }
.cd { display: flex; flex-direction: column; flex: 1; min-height: 0; color: var(--text); }
.cd * { min-width: 0; }

/* ---------- Общие мелочи ---------- */
.cd-pill {
    flex: none; padding: 3px 10px; border-radius: 999px;
    background: var(--accent-a14); border: 1px solid var(--accent-a40);
    color: var(--accent-hot); font-size: .72rem; font-weight: 700; white-space: nowrap;
}
.cd-pill.is-accent { background: var(--accent-a28); }
.cd-price { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; color: var(--text); white-space: nowrap; }
.cd-price.is-opt { color: var(--ok-text); }
.cd-opt-badge {
    font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .04em; padding: 2px 6px; margin-left: 4px;
    border-radius: 6px; background: var(--ok-a16); color: var(--ok-text); border: 1px solid var(--ok-a40); vertical-align: 2px;
}
.cd-thumb {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; overflow: hidden;
    background: radial-gradient(90% 60% at 50% 100%, var(--accent-a28), transparent 70%), var(--well-a60);
    border: 1px solid var(--line); color: var(--accent-hot); font-size: 1.1rem;
}
.cd-thumb.is-big { width: 68px; height: 68px; border-radius: 16px; font-size: 1.6rem; }
.cd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Полоса до опта: общий компонент static/css/filament.css ---------- */
.cd-opt { margin: 0; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cd-opt .opt-head { margin-bottom: 10px; }
.cd-opt .opt-title { font-size: 15px; }
.cd-opt .opt-note { margin-top: 10px; font-size: 12.5px; }

/* ---------- Подсказка по теме у порога опта ---------- */
.cd-similar { margin: 14px 18px 0; padding: 10px 12px 12px; border-radius: 18px; background: linear-gradient(160deg, var(--surface-high), var(--glass-to)); border: 1px solid var(--line); }
.cd-similar-head { margin-bottom: 8px; font-weight: 700; font-size: .82rem; color: var(--accent-hot); }
.cd-similar-head i { margin-right: 4px; }
.cd-similar .cd-sug { flex-direction: row; align-items: center; gap: 10px; padding: 6px 0; border: 0; background: transparent; }
.cd-similar .cd-sug + .cd-sug { border-top: 1px solid var(--line); }
.cd-similar .cd-sug-text { flex: 1; }
.cd-sug { position: relative; display: flex; }
.cd-sug-text { display: flex; flex-direction: column; }
.cd-sug-text b { font-size: .8rem; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cd-sug-text small { color: var(--muted); font-size: .7rem; }
.cd-add {
    display: inline-grid; place-items: center; padding: 0; border-radius: 50%; border: 0; width: 32px; height: 32px; flex: none;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: var(--white); font-size: .9rem;
    box-shadow: 0 4px 12px var(--brand-a35); cursor: pointer;
}
.cd-add:hover { filter: brightness(1.12); }

/* ---------- Список товаров ---------- */
.cd-list { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0; padding: 14px 18px; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cd-item { display: flex; gap: 12px; padding: 12px; border-radius: 18px; background: linear-gradient(160deg, var(--surface-high), var(--glass-to)); border: 1px solid var(--line); }
.cd-item-main { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cd-item-title { margin: 0; font-size: .88rem; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text); }
.cd-item-sub { color: var(--muted); font-size: .74rem; }
.cd-item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.cd-stepper { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); }
.cd-stepper button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: .85rem; cursor: pointer; }
.cd-stepper button:hover { background: var(--accent-a14); color: var(--accent-hot); }
.cd-stepper span { min-width: 22px; text-align: center; font-weight: 800; font-size: .88rem; }
.cd-remove { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--danger-text); font-size: .95rem; cursor: pointer; }
.cd-remove:hover { background: var(--danger-a12); border-color: var(--danger-a45); }

/* ---------- Итог ---------- */
.cd-foot { padding: 14px 18px 16px; border-top: 1px solid var(--line-strong); background: var(--surface); }
.cd-line { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: .84rem; font-weight: 600; }
.cd-line.is-ok { color: var(--ok-text); }
.cd-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-weight: 600; }
.cd-total b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--text); }
.cd-checkout {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 16px; font-weight: 800; font-size: .98rem;
    color: var(--white); background: linear-gradient(135deg, var(--btn-ok-from), var(--btn-ok-to)); box-shadow: 0 8px 22px var(--ok-a40); text-decoration: none;
}
.cd-checkout:hover { color: var(--white); filter: brightness(1.1); }
.cd-checkout.is-compact { display: inline-flex; padding: 0 24px; height: 46px; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); box-shadow: 0 8px 22px var(--brand-a35); }
.cd-ship { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: .76rem; }
.cd-ship i { color: var(--ok-text); margin-right: 4px; }

/* ---------- Пустая корзина ---------- */
.cd-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 32px 24px; text-align: center; }
.cd-empty-icon { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--accent-a14); border: 1px solid var(--accent-a40); color: var(--accent-hot); font-size: 2.4rem; box-shadow: 0 0 28px var(--accent-a25); }
.cd-empty h5 { margin: 8px 0 0; font-weight: 800; color: var(--text); }
.cd-empty p { margin: 0 0 12px; color: var(--muted); font-size: .88rem; max-width: 260px; }

/* ---------- Статус опта на странице оформления ---------- */
.co-opt { margin-bottom: 14px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.co-opt b { color: var(--text); }
.co-opt.is-on { background: var(--ok-a16); border-color: var(--ok-a40); color: var(--ok-text); }
.co-opt.is-on b { color: var(--ok-text); }
