/*
 * Корзина segwaypowersports.com.ua. Перенесена с cfmoto.ua (a9ca536): вёрстка окна та же,
 * палитра и шрифты — Бенды (кнопка #f6d8b8 с тёмным текстом, Heebo/Lato).
 * Классы все свои, от темы не заимствуется ничего: см. `.bcart-modal` ниже.
 */

/* ── плавающая кнопка ─────────────────────────────────────────────────────── */
.bcart-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 97;
  width: 58px; height: 58px; border: none; border-radius: 50%;
  background: #f6d8b8; color: #1d1d1b; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  display: none; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; padding: 0;
  transition: transform .15s ease;
}
.bcart-fab.is-on { display: flex; }
.bcart-fab:hover { transform: scale(1.06); }
.bcart-fab__count {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px;
  border-radius: 11px; background: #e00; color: #fff;
  font: 600 12px/22px Lato, Arial, sans-serif; text-align: center; padding: 0 5px;
}

/* ── всплывающее подтверждение «додано» ───────────────────────────────────── */
.bcart-toast {
  position: fixed; right: 18px; bottom: 86px; z-index: 97;
  max-width: 320px; padding: 12px 16px; border-radius: 8px;
  background: #1c1c1c; color: #fff; font: 400 14px/1.4 Lato, Arial, sans-serif;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.bcart-toast.is-on { opacity: 1; transform: translateY(0); }

/* ── окно корзины ─────────────────────────────────────────────────────────────
   ⚠️ Собственные классы, а не hystmodal темы. Первая версия переиспользовала
      `.hystmodal__window` — на обычных страницах выглядела правильно, а на
      странице запчастей окно оказалось ПРОЗРАЧНЫМ и текст лёг поверх схемы
      детали: туда вместе с фрагментом приезжает вёрстка магазина и перебивает
      классы темы. Видно это было только на снимке — все проверки прошли.
      Поэтому корзина не зависит ни от чьих чужих классов, а цвета и слои
      заданы явно. */
.bcart-shadow {
  position: fixed; inset: 0; z-index: 2147483000;
  background: rgba(0, 0, 0, .6); opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
}
.bcart-shadow.is-open { opacity: 1; pointer-events: auto; }

.bcart-modal {
  position: fixed; inset: 0; z-index: 2147483001;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-flow: column nowrap; justify-content: flex-start;
  visibility: hidden; pointer-events: none;
}
.bcart-modal.is-open { visibility: visible; pointer-events: auto; }
.bcart-modal__wrap {
  flex: 0 0 auto; width: 100%; min-height: 100%; margin: auto;
  display: flex; flex-flow: column nowrap; align-items: center; justify-content: center;
  padding: 24px 12px; box-sizing: border-box;
}
.bcart-modal__window {
  width: 860px; max-width: 100%; padding: 28px 24px; position: relative;
  border-radius: 12px; box-sizing: border-box;
  background: #fff; color: #111;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  transform: scale(.94); opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.bcart-modal.is-open .bcart-modal__window { transform: scale(1); opacity: 1; }
.bcart-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 32px; height: 32px; padding: 0; border: none; background: none;
  cursor: pointer; font: 400 28px/28px Lato, Arial, sans-serif; color: #888;
}
.bcart-close:hover { color: #111; }
.bcart-h { font: 500 28px/1.2 Heebo, Arial, sans-serif; text-transform: uppercase; margin: 0 0 18px; text-align: center; }
.bcart-empty { text-align: center; padding: 24px 0; font: 400 16px/1.5 Lato, Arial, sans-serif; color: #555; }

.bcart-sec { margin: 0 0 6px; font: 500 14px/1.3 Heebo, Arial, sans-serif; text-transform: uppercase; color: #444; letter-spacing: .03em; }
.bcart-sec--warn { color: #a15c00; }

.bcart-line {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #e4e4e8;
}
.bcart-line__body { flex: 1 1 auto; min-width: 0; }
.bcart-line__title { font: 400 15px/1.35 Lato, Arial, sans-serif; color: #111; word-break: break-word; }
.bcart-line__meta { font: 400 12px/1.4 Lato, Arial, sans-serif; color: #777; margin-top: 2px; }
.bcart-line__note { font: 400 12px/1.4 Lato, Arial, sans-serif; margin-top: 3px; }
.bcart-line__note--warn { color: #a15c00; }
.bcart-line__note--stop { color: #c00; }
.bcart-line--off .bcart-line__title { color: #888; text-decoration: line-through; }

.bcart-qty { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.bcart-qty button {
  width: 28px; height: 28px; border: 1px solid #cfcfd6; background: #fff;
  border-radius: 6px; cursor: pointer; font: 600 16px/1 Lato, Arial, sans-serif; color: #333; padding: 0;
}
.bcart-qty button:disabled { opacity: .4; cursor: default; }
.bcart-qty input {
  width: 46px; height: 28px; text-align: center; border: 1px solid #cfcfd6;
  border-radius: 6px; font: 400 14px/1 Lato, Arial, sans-serif; padding: 0;
}
.bcart-line__sum { flex: 0 0 auto; min-width: 116px; text-align: right; font: 600 15px/1.3 Lato, Arial, sans-serif; }
.bcart-line__was { display: block; font: 400 12px/1.3 Lato, Arial, sans-serif; color: #999; text-decoration: line-through; }
.bcart-del {
  flex: 0 0 auto; border: none; background: none; cursor: pointer;
  font: 400 12px/1 Lato, Arial, sans-serif; color: #c00; padding: 6px;
}

.bcart-totals { margin-top: 16px; }
.bcart-total { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font: 400 15px/1.4 Lato, Arial, sans-serif; }
.bcart-total strong { font-weight: 700; }
.bcart-total--est { color: #a15c00; }
.bcart-disclaimer { margin-top: 8px; padding: 10px 12px; border-radius: 8px; background: #fff6e5; color: #7a4a00; font: 400 13px/1.45 Lato, Arial, sans-serif; }

.bcart-form { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.bcart-form label { font: 400 14px/1.3 Lato, Arial, sans-serif; display: block; margin-bottom: 5px; }
.bcart-form .bcart-input {
  width: 100%; box-sizing: border-box; height: 44px; padding: 0 12px;
  border: 1px solid #cfcfd6; border-radius: 6px; background: #fff; color: #111;
  font: 400 16px/1.2 Lato, Arial, sans-serif;
}
.bcart-form .bcart-input:focus { outline: none; border-color: #1d1d1b; }
.bcart-form .bcart-input.is-bad { border-color: #c00; }
.bcart-hint { font: 400 12px/1.3 Lato, Arial, sans-serif; color: #c00; min-height: 15px; }
.bcart-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bcart-status { font: 400 14px/1.4 Lato, Arial, sans-serif; min-height: 20px; text-align: center; }
.bcart-status--bad { color: #c00; }
.bcart-status--ok { color: #0a7d29; }
.bcart-modal .bcart-submit {
  cursor: pointer; display: block; width: 100%; padding: 1rem; border: 0;
  border-radius: 0; background: #f6d8b8; color: #1d1d1b;
  font: 600 16px/1.5rem Heebo, Arial, Helvetica, sans-serif; text-transform: uppercase;
  letter-spacing: .04em; text-align: center;
}
.bcart-modal .bcart-submit:hover { background: #ecc59c; }
.bcart-modal .bcart-submit[disabled] { opacity: .55; cursor: default; }

@media (max-width: 700px) {
  .bcart-modal__window { padding: 20px 14px; }
  .bcart-h { font-size: 22px; }
  .bcart-line { flex-wrap: wrap; }
  .bcart-line__body { flex: 1 1 100%; }
  .bcart-line__sum { min-width: 0; margin-left: auto; }
}

/* ── иконка в шапке (мобильная и десктопная) ─────────────────────────────── */
.bcart-head {
  position: relative; background: none; border: 0; cursor: pointer;
  color: inherit; padding: 0 12px; min-height: inherit;
}
.bcart-head .bcart-ico { display: block; }
.bcart-head:hover, .bcart-head:focus-visible { color: #f6d8b8; }
.bcart-head__count {
  position: absolute; top: 50%; right: 2px; margin-top: -20px;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 4px;
  background: #f6d8b8; color: #1d1d1b; font: 700 11px/18px Lato, Arial, sans-serif; text-align: center;
}
.bcart-head__count[hidden] { display: none; }
