/* =========================================================================
   HORECA FOOD — THÀNH PHẦN DÙNG CHUNG TOÀN WEBSITE (11/2026)
   Nạp ở mọi trang (elements/footer.php).

   Nút icon "Thêm vào giỏ" (xe đẩy + dấu cộng xanh: /front/images/svg/cart-add.svg)
   và "Liên hệ" (điện thoại), thay cho nút chữ ở mọi thẻ sản phẩm / combo.

   style.css + custom.css có nhiều rule toàn cục (kèm !important) cho
   .btn-add-to-cart / .btn-add-to-contact với độ ưu tiên tới (0,4,2), nên
   selector dưới đây cố ý lặp class (:root + 4 lần .hf-cart-btn = (0,5,1))
   để chắc chắn thắng mà không phải sửa các file cũ.
   ========================================================================= */

:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e1e5df !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #2f6b45 !important;
    font-size: 17px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(29, 36, 32, .06) !important;
    cursor: pointer;
    transform: none;
    filter: none !important;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease !important;
    vertical-align: middle;
}

:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn:hover,
:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn:focus-visible {
    border-color: #3bb54a !important;
    background: #f1faf2 !important;
    color: #2f6b45 !important;
    box-shadow: 0 8px 18px rgba(59, 181, 74, .2) !important;
    transform: translateY(-1px) !important;
    outline: none;
}

:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn img {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    max-width: none !important;
    margin: 0 !important;
    filter: none !important;
    pointer-events: none;
}

:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn i {
    margin: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
}

/* Chữ còn sót trong nút (nếu có) chỉ dành cho trình đọc màn hình. */
:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn > span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

/* Liên hệ: điện thoại xanh */
:root .hf-cart-btn--call.hf-cart-btn.hf-cart-btn.hf-cart-btn:hover,
:root .hf-cart-btn--call.hf-cart-btn.hf-cart-btn.hf-cart-btn:focus-visible {
    border-color: #2f6b45 !important;
    background: #eef6f0 !important;
    box-shadow: 0 8px 18px rgba(47, 107, 69, .18) !important;
}

/* Đang xử lý / bị khoá */
:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn.is-loading {
    opacity: .55 !important;
    pointer-events: none !important;
}

:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn:disabled,
:root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn.disabled {
    opacity: .4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Đã thêm vào giỏ: cart.js hiện bộ tăng/giảm số lượng thay cho nút. */
:root .hf-home-cart-control.is-active > .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn {
    display: none !important;
}

/* Bản lớn: nút cạnh "Mua ngay" ở trang chi tiết sản phẩm / combo */
:root .hf-cart-btn--lg.hf-cart-btn.hf-cart-btn.hf-cart-btn {
    width: 52px !important;
    min-width: 52px !important;
    max-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    border-radius: 14px !important;
}

:root .hf-cart-btn--lg.hf-cart-btn.hf-cart-btn.hf-cart-btn img {
    width: 34px !important;
    height: 34px !important;
}

/* Bản nhỏ: ô gợi ý tìm kiếm trên header */
:root .hf-cart-btn--sm.hf-cart-btn.hf-cart-btn.hf-cart-btn {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
}

:root .hf-cart-btn--sm.hf-cart-btn.hf-cart-btn.hf-cart-btn img {
    width: 26px !important;
    height: 26px !important;
}

@media (max-width: 767.98px) {
    :root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn:not(.hf-cart-btn--lg) {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
    }

    :root .hf-cart-btn.hf-cart-btn.hf-cart-btn.hf-cart-btn:not(.hf-cart-btn--lg) img {
        width: 27px !important;
        height: 27px !important;
    }
}

/* Bản vừa: cạnh nút "Mua ngay" ở trang chi tiết sản phẩm (khung cao 42px) */
:root .hf-cart-btn--md.hf-cart-btn.hf-cart-btn.hf-cart-btn,
:root .hf-cart-btn--md.hf-cart-btn.hf-cart-btn.hf-cart-btn:not(.hf-cart-btn--lg) {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    border: 2px solid #3bb54a !important;
}

:root .hf-cart-btn--md.hf-cart-btn.hf-cart-btn.hf-cart-btn img,
:root .hf-cart-btn--md.hf-cart-btn.hf-cart-btn.hf-cart-btn:not(.hf-cart-btn--lg) img {
    width: 28px !important;
    height: 28px !important;
}
