/* Єдина кнопка покупки для товарних сіток WooCommerce на всьому сайті. */
.woocommerce ul.products li.product .price {
    display: inline-flex !important;
    align-items: center;
    min-height: 42px;
    margin: 0 7px 0 0 !important;
    vertical-align: middle;
}

/* Недоступний товар не повинен показувати оманливу кнопку кошика. */
.woocommerce ul.products li.product.outofstock .button,
.woocommerce ul.products li.product.out-of-stock .button {
    display: none !important;
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button {
    position: relative;
    display: inline-grid !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    place-items: center;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: 12px !important;
    color: #168ca8 !important;
    background: #e9f9fc !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-indent: 0 !important;
    vertical-align: middle;
    transition: color .15s ease, background-color .15s ease, transform .15s ease !important;
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button::before {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    display: block !important;
    width: 20px;
    height: 20px;
    margin: 0 !important;
    opacity: 1;
    background: currentColor;
    content: "" !important;
    transform: translate(-50%, -50%) !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h2l2 11h10l3-8H7.5l.5 2h9.1l-1.5 4H8.7L7 4H3Zm6 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm8 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h2l2 11h10l3-8H7.5l.5 2h9.1l-1.5 4H8.7L7 4H3Zm6 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm8 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button:hover,
.woocommerce ul.products li.product .product_type_simple.add_to_cart_button:focus-visible {
    color: #fff !important;
    background: var(--ast-global-color-0, #2fa9c4) !important;
    transform: translateY(-2px) rotate(-3deg);
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button.loading::before {
    opacity: 0;
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button.loading {
    opacity: 1 !important;
    cursor: wait;
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button.loading::after {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px !important;
    border: 2px solid rgba(47, 169, 196, .28);
    border-top-color: var(--ast-global-color-0, #2fa9c4);
    border-radius: 50%;
    opacity: 1 !important;
    content: "" !important;
    animation: novaova-card-cart-spin .7s linear infinite;
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button.added {
    color: #16a34a !important;
    background: #ecfdf3 !important;
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button.added::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E");
}

.woocommerce ul.products li.product .product_type_simple.add_to_cart_button.added::after {
    content: none !important;
}

@keyframes novaova-card-cart-spin {
    to {
        transform: rotate(360deg);
    }
}

.woocommerce ul.products li.product .added_to_cart {
    margin-left: 7px;
    color: var(--ast-global-color-0, #2fa9c4);
    font-size: 12px;
    font-weight: 600;
}

/* Сторінка окремого товару: та сама візуальна мова, але помітна текстова дія. */
.woocommerce div.product form.cart .single_add_to_cart_button {
    display: inline-flex !important;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 22px !important;
    border: 1.5px solid var(--ast-global-color-0, #2fa9c4) !important;
    border-radius: 10px !important;
    color: #fff !important;
    background: var(--ast-global-color-0, #2fa9c4) !important;
    box-shadow: none !important;
    font-family: Montserrat, sans-serif !important;
    font-weight: 600 !important;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button::before {
    position: static !important;
    display: block !important;
    width: 19px;
    height: 19px;
    margin: 0 !important;
    background: currentColor;
    content: "" !important;
    transform: none !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h2l2 11h10l3-8H7.5l.5 2h9.1l-1.5 4H8.7L7 4H3Zm6 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm8 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 4h2l2 11h10l3-8H7.5l.5 2h9.1l-1.5 4H8.7L7 4H3Zm6 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm8 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover,
.woocommerce div.product form.cart .single_add_to_cart_button:focus-visible {
    border-color: #168ca8 !important;
    background: #168ca8 !important;
    transform: translateY(-1px);
}

@media (max-width: 760px) {
    .woocommerce ul.products li.product .price {
        min-height: 38px;
        margin-right: 5px !important;
    }

    .woocommerce ul.products li.product .product_type_simple.add_to_cart_button {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
    }

    .woocommerce ul.products li.product .product_type_simple.add_to_cart_button::before {
        width: 18px;
        height: 18px;
    }
}
