.if-mini-cart {
    display: inline-flex;
    position: relative;
    /* The count bubble is positioned at top/right: -8px, i.e. it deliberately
       overhangs the button. When the header container has no right padding the
       button sits flush against the page edge and that overhang lands outside
       the viewport, giving every page an 8px horizontal scrollbar. Reserving the
       overhang here keeps the badge where the design puts it without letting it
       widen the document. Remove this if the header itself is given side
       padding in Elementor. */
    margin-right: 8px;
    margin-top: 8px;
}

.if-mini-cart__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: #ffffff;
    color: #111827;
    border-radius: 9999px;
    border: none;
    text-decoration: none;
    font-family: var(--if-font-heading, inherit);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.if-mini-cart__btn:hover {
    text-decoration: none;
}

.if-mini-cart__count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    background-color: #e3000f;
    color: #ffffff;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--if-font-heading, inherit);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.if-mini-cart__count.is-hidden {
    display: none;
}

/* Pulse animation when count updates */
.if-mini-cart__count.if-count-updated {
    animation: if-badge-pop 0.3s ease;
}

@keyframes if-badge-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}
