/* Product detail — Add button OR qty stepper via .knp-qty-mode */

.catalog_detail .counter_wrapp {
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  white-space: normal !important;
  width: 100%;
}

.catalog_detail .counter_wrapp > .counter_block {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.catalog_detail .counter_wrapp > .button_block {
  flex: 1 1 auto;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  min-width: 0;
  display: block !important;
}

.catalog_detail .counter_wrapp > .button_block .to-cart,
.catalog_detail .counter_wrapp > .button_block .in-cart {
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  text-align: center;
  border-radius: 100px;
}

.catalog_detail .counter_wrapp > .button_block .to-cart i,
.catalog_detail .counter_wrapp > .button_block .in-cart i {
  display: none !important;
}

/* Only knp-qty-mode forces the stepper — do not override Aspro show/hide otherwise */
.catalog_detail .counter_wrapp > .button_block.knp-qty-mode .to-cart {
  display: none !important;
}

.catalog_detail .counter_wrapp > .button_block.knp-qty-mode .in-cart {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 8px 12px !important;
  cursor: default;
  text-decoration: none;
  pointer-events: auto;
  background: #ff6bb5 !important;
  -webkit-tap-highlight-color: transparent;
}

/* Theme .button:hover lightens to #eba2c5 — disable for qty stepper (sticky on touch) */
.catalog_detail .counter_wrapp > .button_block.knp-qty-mode .in-cart:hover,
.catalog_detail .counter_wrapp > .button_block.knp-qty-mode .in-cart:focus,
.catalog_detail .counter_wrapp > .button_block.knp-qty-mode .in-cart:active {
  background: #ff6bb5 !important;
  opacity: 1 !important;
}

@media (hover: none), (pointer: coarse) {
  .catalog_detail .counter_wrapp > .button_block.knp-qty-mode .in-cart,
  .catalog_detail .counter_wrapp > .button_block.knp-qty-mode .in-cart:hover,
  .catalog_detail .counter_wrapp > .button_block.knp-qty-mode .in-cart:focus,
  .catalog_detail .counter_wrapp > .button_block.knp-qty-mode .in-cart:active {
    background: #ff6bb5 !important;
    opacity: 1 !important;
  }
}

.catalog_detail .knp-qty-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.catalog_detail .knp-qty-btn {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.catalog_detail .knp-qty-btn:hover {
  background: transparent !important;
  opacity: 1;
}

.catalog_detail .knp-qty-btn:active {
  opacity: 0.7;
}

.catalog_detail .knp-qty-value {
  flex: 1 1 auto;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  text-transform: uppercase;
}

.catalog_detail .offer_buy_block.btn_fix {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.catalog_detail .offer_buy_block.btn_fix > .cost.prices {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}

.catalog_detail .offer_buy_block.btn_fix > .counter_wrapp {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
}

@media (max-width: 768px) {
  .wrapper_inner .info_item .middle_info .buy_block .counter_wrapp,
  .catalog_detail .offer_buy_block.btn_fix > .counter_wrapp,
  .catalog_detail .buy_block .counter_wrapp {
    display: flex !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    width: 100%;
  }

  .catalog_detail .offer_buy_block.btn_fix > .cost.prices .price {
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
  }

  .catalog_detail .offer_buy_block.btn_fix > .counter_wrapp {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .catalog_detail .knp-qty-btn {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
}
