/* Общие карточки: без поля количества и без второй цены за рулон. */
.product-card-footer .product-card-roll-note {
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.2;
    border-left: 3px solid #f17e00;
    padding-left: 5px;
    color: #566062;
    overflow-wrap: anywhere;
}

.product-card-footer .tehnol-add-to-cart {
    /* Цвет, размер, тень и hover наследуются от product-card-order-btn в текущем листинге. */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
    line-height: normal;
    text-align: center;
    text-decoration: none;
    white-space: normal;
}

.product-card-footer .tehnol-add-to-cart:focus-visible {
    outline: 2px solid #444;
    outline-offset: 3px;
}

.product-card-footer .tehnol-add-to-cart.loading {
    opacity: .65;
}

.product-card-footer .added_to_cart {
    display: block;
    min-height: 48px;
    padding: 10px;
    box-sizing: border-box;
    font-size: 16px;
    text-align: center;
}

/* Штатная ссылка WooCommerce после AJAX не раздвигает основные CTA деталки. */
.product-hero__buttons:has(> .tehnol-product-add-to-cart) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-hero__buttons > .added_to_cart {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 4px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #a95300;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-hero__buttons > .added_to_cart:hover {
    color: #794000;
}

.product-hero__buttons > .added_to_cart:focus-visible {
    outline: 2px solid #f27e00;
    outline-offset: 3px;
}

/* .loading выставляет/снимает сам wc-add-to-cart. Размер кнопки не меняется. */
.product-hero__buttons .tehnol-product-add-to-cart[aria-disabled="true"],
.product-hero__buttons .tehnol-product-add-to-cart[aria-disabled="true"]:hover {
    background: #f2b777;
    color: #fff;
    cursor: default;
    box-shadow: none;
    transform: none;
}

:is(.product-hero__buttons, .product-card-footer) .tehnol-add-to-cart.loading {
    position: relative;
    color: transparent !important;
    text-shadow: none;
    background: #f27e00;
    opacity: 1;
    cursor: progress;
}

:is(.product-hero__buttons, .product-card-footer) .tehnol-add-to-cart.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    box-sizing: border-box;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tehnol-cart-loading .7s linear infinite;
}

@keyframes tehnol-cart-loading {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    :is(.product-hero__buttons, .product-card-footer) .tehnol-add-to-cart.loading::after {
        animation: none;
    }
}

@media (max-width: 767px) {
    .product-hero__buttons:has(> .tehnol-product-add-to-cart) {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-hero__buttons > .added_to_cart {
        grid-row: 3;
    }
}
