/*
 * VCO Basket Quantity — Aspro Max
 *
 * В корзине:
 * [ − 5 + ] [ ✓ В КОРЗИНЕ ]
 *
 * После удаления:
 * [ − 1 + ] [ В КОРЗИНУ ]
 */

/* ==========================================
   1. Наш счётчик корзины
   ========================================== */

.catalog_block.items .catalog_item .vco-basket-qty {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 88px;
  width: 88px;
  min-width: 0;
  height: 44px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid #e3eaf3;
  border-radius: 9px;
  background: #f7f9fc;
  color: #17385f;
}

.catalog_block.items
.catalog_item .vco-basket-qty button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 27px;
  width: 27px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #17385f;
  font-size: 16px;
  cursor: pointer;
}

.catalog_block.items
.catalog_item .vco-basket-qty button:hover {
  color: #2379df;
}

.catalog_block.items
.catalog_item .vco-basket-qty__count {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.catalog_block.items
.catalog_item .vco-basket-qty--busy {
  opacity: 0.5;
  pointer-events: none;
}

/* ==========================================
   2. Товар уже в корзине
   ========================================== */

.catalog_block.items
.catalog_item.vco-basket-has-qty
.footer_button .counter_block {
  display: none !important;
}

.catalog_block.items
.catalog_item.vco-basket-has-qty
.footer_button .button_block {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between;
  gap: 7px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  float: none !important;
  box-sizing: border-box;
}

.catalog_block.items
.catalog_item.vco-basket-has-qty
.footer_button .button_block > a.in-cart {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 44px;
  min-height: 44px;
  padding: 0 5px !important;
  margin: 0 !important;
  box-sizing: border-box;
  border-radius: 9px;
  font-size: 10px !important;
  text-align: center;
  white-space: nowrap;
}

/* ==========================================
   3. После удаления товара до нуля
   ========================================== */

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .counter_wrapp {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 7px;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Штатный счётчик количества слева */

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .counter_wrapp > .counter_block {
  display: block !important;
  position: relative !important;
  flex: 0 0 88px;
  width: 88px;
  min-width: 0;
  float: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}

/* Контейнер синей кнопки справа */

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .counter_wrapp > .button_block {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center;
  flex: 1 1 0;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  float: none !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .button_block > .btn-exlg.to-cart {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 44px;
  min-height: 44px;
  padding: 0 5px !important;
  margin: 0 !important;
  box-sizing: border-box;
  border-radius: 9px;
  font-size: 10px !important;
  text-align: center;
  white-space: nowrap;
}

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .button_block > a.in-cart {
  display: none !important;
}

/* ==========================================
   4. Постоянная видимость добавленных товаров
   ========================================== */

@media (min-width: 992px) and (hover: hover) {
  .catalog_block.items
  .catalog_item.vco-basket-has-qty
  .footer_button.inner_content {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    max-height: 160px !important;
    overflow: visible !important;
    padding: 10px !important;
  }
}

/* ==========================================
   5. Торговые предложения
   ========================================== */

.catalog_block.items
.catalog_item.vco-choose-options.vco-basket-sku-in-cart
.vco-choose-options__action {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  width: 100%;
  box-sizing: border-box;
}

.catalog_block.items
.catalog_item.vco-choose-options.vco-basket-sku-in-cart
.vco-choose-options__action .vco-basket-qty {
  flex: 0 0 88px;
  width: 88px;
}

.catalog_block.items
.catalog_item.vco-choose-options.vco-basket-sku-in-cart
.vco-choose-options__link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  width: auto !important;
  min-width: 0 !important;
  height: 44px;
  min-height: 44px;
  padding: 0 5px !important;
  margin: 0 !important;
  box-sizing: border-box;
  border-radius: 9px;
  font-size: 10px !important;
  white-space: nowrap;
}

@media (min-width: 992px) and (hover: hover) {
  .catalog_block.items
  .catalog_item.vco-choose-options.vco-basket-sku-in-cart
  .vco-choose-options__action {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    max-height: 100px !important;
  }
}

/* ==========================================
   6. Мобильные устройства
   ========================================== */

@media (max-width: 450px) {
  .catalog_block.items
  .catalog_item .vco-basket-qty {
    flex-basis: 74px;
    width: 74px;
    height: 40px;
  }

  .catalog_block.items
  .catalog_item .vco-basket-qty button {
    flex-basis: 23px;
    width: 23px;
    height: 38px;
    font-size: 14px;
  }

  .catalog_block.items
  .catalog_item.vco-ready-to-add
  .footer_button .counter_wrapp > .counter_block {
    flex-basis: 74px;
    width: 74px;
  }

  .catalog_block.items
  .catalog_item.vco-ready-to-add
  .footer_button .button_block > .btn-exlg.to-cart,
  .catalog_block.items
  .catalog_item.vco-basket-has-qty
  .footer_button .button_block > a.in-cart {
    height: 40px;
    min-height: 40px;
    font-size: 9px !important;
  }

  .catalog_block.items
  .catalog_item.vco-ready-to-add
  .footer_button .counter_wrapp,
  .catalog_block.items
  .catalog_item.vco-basket-has-qty
  .footer_button .button_block {
    gap: 5px;
  }
}

/* ==========================================
   7. Единый стиль кнопок и счётчиков
   ========================================== */

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .counter_wrapp {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
}

/* Штатный счётчик — оформление как у товара в корзине */

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .counter_wrapp > .counter_block {
  flex: 0 0 88px !important;
  width: 88px !important;
  min-width: 88px !important;
  height: 44px !important;
  position: relative !important;
  display: block !important;
  background: #f7f9fc !important;
  border: 1px solid #e3eaf3 !important;
  border-radius: 9px !important;
  box-sizing: border-box !important;
  float: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .counter_block input {
  color: #17385f !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-align: center !important;
}

/* Одинаковые габариты синих кнопок */

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .button_block > .btn-exlg.to-cart,
.catalog_block.items
.catalog_item.vco-basket-has-qty
.footer_button .button_block > a.in-cart {
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 9px !important;
  padding: 0 5px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

/* Одинаковая ширина элементов */

/* Товар отсутствует в корзине */

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .counter_wrapp > .button_block {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: auto !important;
}

/* Товар уже находится в корзине */

.catalog_block.items
.catalog_item.vco-basket-has-qty
.footer_button .counter_wrapp > .button_block {
  flex: 1 1 100% !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Фиксированная ширина нашего счётчика */

.catalog_block.items
.catalog_item.vco-basket-has-qty
.footer_button .button_block > .vco-basket-qty {
  flex: 0 0 88px !important;
  width: 88px !important;
  min-width: 88px !important;
}

/* Одинаковая высота обоих блоков */

.catalog_block.items
.catalog_item.vco-ready-to-add
.footer_button .counter_wrapp,
.catalog_block.items
.catalog_item.vco-basket-has-qty
.footer_button .button_block {
  min-height: 44px;
}
/* Единый вид счётчика для всех обычных товаров,
   которые ещё не находятся в корзине */

.catalog_block.items
.catalog_item:not(.vco-basket-has-qty):not(.vco-choose-options)
.footer_button .counter_wrapp {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 7px !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* Штатный счётчик слева */
.catalog_block.items
.catalog_item:not(.vco-basket-has-qty):not(.vco-choose-options)
.footer_button .counter_wrapp > .counter_block {
  display: block !important;
  position: relative !important;
  flex: 0 0 88px !important;
  width: 88px !important;
  min-width: 88px !important;
  height: 44px !important;
  margin: 0 !important;
  float: none !important;
  background: #f7f9fc !important;
  border: 1px solid #e3eaf3 !important;
  border-radius: 9px !important;
  box-sizing: border-box !important;
}

/* Синяя кнопка справа */
.catalog_block.items
.catalog_item:not(.vco-basket-has-qty):not(.vco-choose-options)
.footer_button .counter_wrapp > .button_block {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  float: none !important;
}

/* Оформление кнопки "В корзину" */
.catalog_block.items
.catalog_item:not(.vco-basket-has-qty):not(.vco-choose-options)
.footer_button .button_block > .btn-exlg.to-cart {
  height: 44px !important;
  min-height: 44px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9px !important;
  box-sizing: border-box !important;
  font-size: 10px !important;
  white-space: nowrap;
}
/* Выравнивание цифры в штатном счётчике Аспро */
.catalog_block.items
.catalog_item:not(.vco-basket-has-qty)
.footer_button .counter_block input {
  position: relative !important;
  top: -7px !important;
}/* Штатный счётчик Аспро: разделяем области нажатия */
.catalog_block.items
.catalog_item:not(.vco-basket-has-qty)
.footer_button .counter_block {
  position: relative !important;
}

/* Поле количества — только в центре */
.catalog_block.items
.catalog_item:not(.vco-basket-has-qty)
.footer_button .counter_block input {
  position: absolute !important;
  left: 27px !important;
  top: 0 !important;
  width: 34px !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

/* Области нажатия минуса и плюса */
.catalog_block.items
.catalog_item:not(.vco-basket-has-qty)
.footer_button .counter_block .minus {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 27px !important;
  height: 100% !important;
  z-index: 2 !important;
}

.catalog_block.items
.catalog_item:not(.vco-basket-has-qty)
.footer_button .counter_block .plus {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  width: 27px !important;
  height: 100% !important;
  z-index: 2 !important;
}