/* Стилизация индикатора количества товаров в корзине */
.cart-contents-count,
.cart-count,
.cart-counter,
.header-cart-count,
.menu-cart-count,
.elementor-button-icon[data-counter]::after,
.elementor-menu-cart__toggle_button[data-counter]::after,
.elementor-button-icon-qty,
.elementor-button-icon-qty[data-counter],
span.count,
span.cart-count,
.cart-icon-count,
.cart-badge {
    /* Позиционирование */
    position: absolute !important;
    top: -8px !important;
    right: -8px !important;

    /* Размеры */
    min-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;

    /* Выравнивание текста - ИДЕАЛЬНОЕ ЦЕНТРИРОВАНИЕ */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;

    /* Стиль */
    background: #ff69b4 !important; /* Розовый цвет */
    color: white !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: bold !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;

    /* Убеждаемся что видно */
    z-index: 9999 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Специально для elementor-button-icon-qty */
.elementor-button-icon-qty,
.elementor-button-icon-qty[data-counter] {
    /* Переопределяем позиционирование */
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;

    /* Фиксированные размеры для круга */
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;

    /* Идеальное центрирование содержимого */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;

    /* Текст */
    line-height: 1 !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: bold !important;

    /* Стиль */
    background: #ff69b4 !important;
    color: white !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;

    /* Убираем любые отступы текста */
    text-indent: 0 !important;
    letter-spacing: 0 !important;
}

/* Для Elementor специфично */
.elementor-button-icon[data-counter]::after,
.elementor-menu-cart__toggle_button[data-counter]::after {
    content: attr(data-counter) !important;
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    min-width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background: #ff69b4 !important;
    color: white !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: bold !important;
    padding: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* Корректировка для родительского элемента */
.site-header-cart,
.header-cart,
.menu-cart,
.cart-icon-wrapper,
.elementor-menu-cart__toggle {
    position: relative !important;
}

/* Убираем старые стили если есть */
.cart-contents-count::before,
.cart-count::before,
.elementor-button-icon[data-counter]::before {
    display: none !important;
}

/* Для двузначных чисел */
.cart-contents-count:not(:empty),
.cart-count:not(:empty) {
    padding: 0 4px !important;
    min-width: 20px !important;
}

/* Анимация при обновлении */
@keyframes cartBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.cart-contents-count.updating,
.cart-count.updating {
    animation: cartBounce 0.3s ease-in-out;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .cart-contents-count,
    .cart-count,
    .elementor-button-icon[data-counter]::after {
        top: -6px !important;
        right: -6px !important;
        min-width: 16px !important;
        height: 16px !important;
        line-height: 16px !important;
        font-size: 10px !important;
    }
}