/* Каноничный контрол «в корзину» — компактный, аккуратный, общий для всех тем.
   Цвета берутся из переменных темы с разумными запасными значениями. */
.vt-cc {
  --_acc: var(--vt-accent, var(--e-accent, var(--accent, #16a34a)));
  --_fg:  var(--vt-fg, var(--e-fg, var(--fg, #1a1a1a)));
  --_ln:  var(--vt-line, var(--e-line, rgba(0,0,0,.16)));
  --_bg:  var(--vt-card, var(--e-card, #fff));
  display: inline-block;
  max-width: 100%;
}
.vt-cc__form {
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.vt-cc__qty {
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  border: 1px solid var(--_ln);
  border-radius: 10px;
  overflow: hidden;
  background: var(--_bg);
  height: 40px;
}
.vt-cc__pm {
  width: 32px;
  border: 0;
  background: transparent;
  color: var(--_fg);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.vt-cc__pm:hover { background: var(--_acc); color: #fff; }
.vt-cc__n {
  width: 38px;
  border: 0;
  border-left: 1px solid var(--_ln);
  border-right: 1px solid var(--_ln);
  background: transparent;
  color: var(--_fg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.vt-cc__n::-webkit-outer-spin-button,
.vt-cc__n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vt-cc__btn {
  flex: 1 1 auto;
  min-width: 116px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--_acc);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: filter .15s, transform .08s, background .15s;
}
.vt-cc__btn:hover { filter: brightness(1.07); }
.vt-cc__btn:active { transform: translateY(1px); }
.vt-cc__btn.is-busy { opacity: .6; pointer-events: none; }
.vt-cc__btn.is-done { animation: vt-pop .5s ease; }
@keyframes vt-pop { 0%{transform:scale(1)} 40%{transform:scale(1.06)} 100%{transform:scale(1)} }
/* состояние «уже в корзине» — кнопка вторичная, контурная */
.vt-cc.is-incart .vt-cc__btn {
  background: transparent;
  color: var(--_acc);
  box-shadow: inset 0 0 0 1px var(--_acc);
}
.vt-cc__note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--_acc);
  text-decoration: none;
  font-weight: 600;
}
.vt-cc__note[hidden] { display: none; }
.vt-cc__note:hover { text-decoration: underline; }

/* счётчик в шапке: прячем, когда пусто */
[data-cart-wrap].is-empty [data-cart-count],
[data-cart-wrap].is-empty .vt-cart-badge { display: none; }

/* ── Доступность фокуса (общая для всех тем) ───────────────────────────── */
/* видимый фокус на контролах корзины */
.vt-cc__pm:focus-visible,
.vt-cc__btn:focus-visible { outline: 2px solid var(--_acc); outline-offset: 2px; }

/* низкоспецифичный общий фокус — не перекрывает кастомные стили тем */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* чекбокс-хак бургер-меню: визуально скрыт, но остаётся в tab-порядке
   (заменяет атрибут hidden, который убирал чекбокс из фокуса) */
.nav-toggle-cb { position: absolute; opacity: 0; width: 1px; height: 1px; }
/* видимый фокус на бургере, когда чекбокс получает фокус с клавиатуры */
.nav-toggle-cb:focus-visible + * [class$="burger"],
.nav-toggle-cb:focus-visible ~ * [class$="burger"] { outline: 2px solid currentColor; outline-offset: 2px; }

/* ───── Пагинация каталога (.vt-pg) — общая для всех тем ───── */
.vt-pg {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 32px 0 8px; flex-wrap: wrap;
}
.vt-pg__a {
  --_acc: var(--vt-accent, var(--e-accent, var(--accent, #16a34a)));
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--_acc);
  color: var(--_acc); background: transparent; text-decoration: none;
  font-weight: 700; font-size: 16px; transition: background .15s, color .15s;
}
.vt-pg__a:hover { background: var(--_acc); color: #fff; }
.vt-pg__info { font-size: 14px; opacity: .8; }
