/* У старых плиток разные приоритеты !important. Слой объединяет оформление
   только видимой кнопки корзины, сохраняя штатные состояния hide и show. */
@layer previewPurchase {
  #product .floor-calc .fc-row > label,
  #product .floor-calc .fc-row > span,
  #product .floor-calc .fc-total strong {
    font-size: 15px !important;
  }
  #product :is(.iforest-product-purchase__primary, .iforest-product-purchase__secondary),
  #product :is(.iforest-product-purchase__primary, .iforest-product-purchase__secondary) .button-cart-text {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }
  #product .iforest-product-purchase__secondary {
    background: #ffe033 !important;
    color: #141414 !important;
  }
  #product .iforest-product-purchase__secondary:hover { background: #ffd526 !important; }
  #product .iforest-product-purchase__primary[data-in-basket],
  .button-group .button-basket:not(.hide):not([hidden]) {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
  }
  #product [data-in-basket] .button-cart-text { color: #fff !important; }
  #product [data-in-basket] .iforest-product-purchase__basket-icon { filter: brightness(0) invert(1); }
  .button-group .button-basket:not(.hide):not([hidden]) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: 100% !important;
    flex: 0 1 auto !important;
    padding-inline: 12px !important;
    border-radius: 999px !important;
    text-decoration: none !important;
  }
  .button-group .button-basket:not(.hide) :is(.button-cart-text, .cat-item-basket-text) {
    display: inline !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    color: #fff !important;
    font: 500 13px/1.3 Stolzl, sans-serif !important;
    white-space: nowrap !important;
  }
  .button-group .button-basket:not(.hide) :is(i,svg),
  .button-group .button-basket:not(.hide)::before,
  .button-group .button-basket:not(.hide)::after { display: none !important; }
  .button-group:has(.button-basket:not(.hide)),
  .button-group .cart:has(.button-basket:not(.hide)) { flex-wrap: wrap !important; }
}
