.product-card .card-footer { width:100%; }
.product-card .hk-purchase { display:block; width:100%; padding:2px 0; }
.product-card .hk-purchase .btn-acquista {
    width:100%; min-width:0; height:44px; min-height:44px; padding:0 8px;
    border:0; border-radius:22px; background:var(--primary-color,#222);
    color:#fff; font-size:.9rem; font-weight:700; font-family:inherit; cursor:pointer;
    text-align:center; position:relative; box-shadow:0 3px 5px #0000001a;
}
.product-card .hk-quantity {
    width:100%; height:44px; align-items:center; border-radius:22px;
    background:#fff; border:1px solid #d8dadd; overflow:visible;
    box-shadow:0 3px 5px #00000012; box-sizing:border-box;
}
.product-card .hk-quantity button {
    display:block; width:36%; min-width:44px; height:100%; margin:0; padding:0;
    border:0; border-radius:0; background:#f0f2f4; color:#20262e;
    font-size:1.6rem; font-weight:700; line-height:1; cursor:pointer;
    touch-action:manipulation; box-shadow:none;
}
.product-card .hk-quantity button:disabled { opacity:.35; cursor:default; }
.product-card .hk-quantity-value { flex:1; text-align:center; font-size:1.08rem; font-weight:800; color:#20262e; }
.product-card .hk-pending { pointer-events:none; }
.product-card .hk-purchase .btn-acquista:disabled { cursor:default; background:#c5c7ca; }
.product-card .hk-purchase .btn-acquista.btn-esaurito { --hk-rest-bg:#e74c3c; background:#e74c3c; color:#fff; }
.hk-purchase .product-highlight {
    --hk-highlight:#268f7f; overflow:hidden; transform-origin:center;
    animation:hkPurchasePulse 3.2s ease-in-out infinite both;
}
.hk-purchase .highlight-consigliato { --hk-highlight:#b9852c; }
.hk-purchase .highlight-scontato { --hk-highlight:#b44737; }
.hk-purchase .highlight-offerta { --hk-highlight:#b46a16; }
.hk-purchase .highlight-promozione { --hk-highlight:#7753a3; }
.hk-purchase .product-highlight::after {
    content:attr(data-highlight-label); position:absolute; inset:0; display:flex;
    align-items:center; justify-content:center; color:#fff; padding:0 4px;
    font-size:clamp(.65rem,2.9vw,.84rem); font-weight:850; pointer-events:none;
    animation:hkPurchaseLabel 3.2s ease-in-out infinite both;
}
.product-card.allergen-blocked .hk-purchase .product-highlight { animation:none; transform:none; }
.product-card.allergen-blocked .hk-purchase .product-highlight::after { display:none; }
@keyframes hkPurchasePulse {
    0%,40%,100% { transform:scale(1.035); background-color:var(--hk-highlight); color:transparent; }
    54%,87% { transform:scale(1); background-color:var(--hk-rest-bg,var(--primary-color,#222)); color:#fff; }
}
@keyframes hkPurchaseLabel { 0%,40%,100% { opacity:1; } 54%,87% { opacity:0; } }
@media (prefers-reduced-motion:reduce) {
    .hk-purchase .product-highlight { animation:none; transform:none; }
    .hk-purchase .product-highlight::after { position:static; animation:none; font-size:.65rem; line-height:1.2; color:inherit; }
}

/* Quantity feedback follows the tablet: a green/red number pulse on confirmed changes. */
.product-card .hk-quantity-value { display:flex; align-items:center; justify-content:center; position:relative; z-index:1; font-variant-numeric:tabular-nums; }
.product-card .hk-quantity-digit { display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:28px; padding:0 2px; box-sizing:border-box; border-radius:50%; transform-origin:center; }
.product-card .hk-quantity .btn-remove { border-radius:22px 0 0 22px; }
.product-card .hk-quantity .hk-quantity-plus { border-radius:0 22px 22px 0; }
.product-card .hk-quantity button { transition:background-color .16s ease, color .16s ease, transform .16s ease; -webkit-tap-highlight-color:transparent; }
.product-card .hk-quantity .btn-remove:active:not(:disabled) { background:#fbd5ce; color:#b91c1c; transform:scale(.9); }
.product-card .hk-quantity .hk-quantity-plus:active:not(:disabled) { background:#c8e6c9; color:#15803d; transform:scale(.9); }
.product-card .hk-quantity-add { animation:hkQuantityAdd .8s ease-out; }
.product-card .hk-quantity-remove { animation:hkQuantityRemove .8s ease-out; }
.product-card .hk-number-add { --hk-number-color:#16a34a; --hk-number-glow:#16a34a55; animation:hkQuantityNumber .85s ease-out; }
.product-card .hk-number-remove { --hk-number-color:#dc2626; --hk-number-glow:#dc262655; animation:hkQuantityNumber .85s ease-out; }
.product-card .hk-purchase-return { animation:hkPurchaseReturn .45s ease-out; }
@keyframes hkQuantityNumber {
    0% { transform:translateY(4px) scale(.9); color:#20262e; background:transparent; }
    30% { transform:translateY(-1px) scale(1.65); color:#fff; background:var(--hk-number-color); box-shadow:0 3px 12px var(--hk-number-glow); }
    66% { transform:scale(1.4); color:#fff; background:var(--hk-number-color); }
    100% { transform:scale(1); color:#20262e; background:transparent; box-shadow:none; }
}
@keyframes hkQuantityAdd {
    0%,100% { transform:scale(1); }
    30% { transform:scale(1.035); border-color:#16a34a; box-shadow:0 0 0 3px #16a34a25,0 4px 12px #16a34a22; }
}
@keyframes hkQuantityRemove {
    0%,100% { transform:scale(1); }
    30% { transform:scale(1.035); border-color:#dc2626; box-shadow:0 0 0 3px #dc262622,0 4px 12px #dc26261c; }
}
@keyframes hkPurchaseReturn {
    0% { transform:scale(.94); opacity:.65; }
    55% { transform:scale(1.025); opacity:1; }
    100% { transform:scale(1); opacity:1; }
}
@media (prefers-reduced-motion:reduce) {
    .product-card .hk-quantity-add,.product-card .hk-quantity-remove,.product-card .hk-number-add,.product-card .hk-number-remove,.product-card .hk-purchase-return { animation:none; }
    .product-card .hk-number-add,.product-card .hk-number-remove { background:var(--hk-number-color); color:#fff; }
    .product-card .hk-quantity button { transition:none; }
    .product-card .hk-quantity button:active:not(:disabled) { transform:none; }
}
