/* Wrapper آیکون */
.wc-cart-icon-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

/* SVG آیکون */
.wc-cart-svg {
    width: 32px;
    height: 32px;
    fill: #394AB6; /* رنگ عادی */
    transition: fill 0.25s ease;
}

/* رنگ هاور */
.wc-cart-icon-wrapper:hover .wc-cart-svg {
    fill: #29B473;
}

/* Badge تعداد - اصلاح موقعیت و اندازه پویا */
.wc-cart-badge {
    position: absolute;          /* روی آیکون */
    top: -10px;                  /* کمی بالاتر */
    left: -10px;                 /* کمی چپ‌تر */
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #d32f2f;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;          /* همیشه دایره */
    display: flex;
    align-items: center;         /* وسط عمودی */
    justify-content: center;     /* وسط افقی */
    line-height: 1;
    white-space: nowrap;         /* جلوگیری از شکست عدد */
    text-align: center;
    box-sizing: content-box;
}

/* افزایش سایز دایره برای دو یا سه رقم */
.wc-cart-badge:only-child {
    min-width: 20px;  /* عدد تک رقمی */
}
.wc-cart-badge[data-count]:not([data-count="0"]) {
    content: attr(data-count);
}

.wc-cart-badge[data-count]:after {
    content: attr(data-count);
}

/* جاوااسکریپت به راحتی می‌تواند این attribute را اضافه کند */
