#js--msg-added-to-cart {
    position: absolute;
    z-index: 3;
    top: 150%;
    right: 0;

    border-radius: 8px;
    background: #000;
    padding: 12px 24px;
    color: #fff;

    display: flex;
    align-items: center;
    column-gap: 24px;
    white-space: nowrap;

    opacity: 0;
    visibility: hidden; /* Hides it visually and from interaction */
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out; /* Define transition properties */
}

#js--msg-added-to-cart.active {
    opacity: 1;
    visibility: visible;
}

#js--msg-added-to-cart.sticky {
    position: fixed;
    top: 30px;
}

body.toolbar-fixed #js--msg-added-to-cart.sticky {
	top: 100px;
}

.btn-red {
    background: #911504;
    text-decoration: none;
    color: #fff;
    border-radius: 4px;
    padding: 10px 15px;
}

.btn-red:hover, .btn-red:focus, .btn-red:active {
    opacity: 0.5;
}

.msg-cart__products-item.removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 575px) {
    #js--msg-added-to-cart {
        width: 100%;
        flex-wrap: wrap;
        row-gap: 12px;
    }

    #js--msg-added-to-cart .btn-red {
        margin-left: auto;
    }
}

/* Корзиа в окне */
#js--msg-cart-body {
    position: absolute;
    z-index: 3;
    top: 150%;
    right: 0;

    width: 355px;
    padding: 20px;

    display: flex;
    flex-direction: column;
    row-gap: 20px;

    background-color: #fff;
    box-shadow: 0 0 32px 0 rgba(0, 0, 0, 0.08);
    border-radius: 8px;

    opacity: 0;
    visibility: hidden; /* Hides it visually and from interaction */
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out; /* Define transition properties */
}

#js--msg-cart-body.active {
    opacity: 1;
    visibility: visible;
}

#js--msg-cart-body .btn-red {
    text-align: center;
}

.msg-cart__products {
    overflow-x: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.msg-cart__products-item {
    display: grid;
    grid-template-columns: 70px auto;
    column-gap: 12px;

    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f2f2;

    padding-right: 10px;
}

.msg-cart__products-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0 none;
}

.msg-cart__product-image {
    aspect-ratio: 70 / 100;

}

.msg-cart__product-image img {
    width: auto;
    margin: auto;
    max-width: 100%;
}

.msg-cart__product-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    row-gap: 12px;
}

.msg-cart__product-name {
    font-size: 14px;
}

.msg-cart__product-name a {
    text-decoration: none;
}

.msg-cart__product-name a:hover, .msg-cart__product-name a:focus, .msg-cart__product-name a:active {
    text-decoration: underline;
}

.msg-cart__product-controls {
    display: flex;
    justify-content: space-between;
}

.product-counter {
  display: flex;
  align-items: center;

  background: #f2f2f2;
  border-radius: 4px;
  overflow: hidden;
}

.product-counter button {
    padding: 0;
    cursor: pointer;
    width: 28px;
    height: 28px;
    text-indent: -999px;
    overflow: hidden;

    background-repeat: no-repeat;
    background-size: 60%;
    background-position: center;

    border: 0 none;
    background-color: transparent;
}

.product-counter button.decrement {
    background-image: url(../icons/minus-fill.svg);
}

.product-counter button.increment {
    background-image: url(../icons/plus-fill.svg);
}

.product-counter input {
    width: 40px;
    text-align: center;
    margin: 0;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;

    height: 28px;
    border: 0;
    background: transparent;
}

.product-counter input::-webkit-inner-spin-button,
.product-counter input::-webkit-outer-spin-button {
    appearance: none;
    -webkit-appearance: none; /* Скрывает кнопки */
    margin: 0; /* Сбрасывает отступы */
}

.msg-cart__btn-remove {
    border: 0 none;
    background-color: transparent;
    padding: 0;
    cursor: pointer;

    font-size: 16px;
    color: #911504;
}

.js--msg-cart-arrow {
    width: 16px;
    height: 12px;

    position: absolute;
    top: -12px;
    right: 50%;

    background-image: url(../images/msg-arrow.png);
    background-repeat: no-repeat;
    background-size: contain;
}

@media (max-width: 575px) {
    #js--msg-cart-body {
        width: 100%;
    }
}