/* اطمینان از پوزیشن نسبی والد */
.product-image-link, 
.woocommerce-LoopProduct-link,
.product-element-top {
    position: relative !important;
    display: block;
}

.wdm-ajax-cart-buttons {
    position: absolute;
    bottom: 5px;
    right: 5px;
    z-index: 20;
    
    /* استایل شیشه‌ای نارنجی */
    background: #ff00008f; /* نارنجی شفاف */
    backdrop-filter: blur(10px);
    border-radius: 50px; /* کاملا گرد */
    padding: 3px;
    
    display: flex;
    align-items: center;
    justify-content: flex-end; /* محتوا به سمت راست هل داده می‌شود */
    gap: 2px;
    
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* ارتفاع ثابت */
    height: 34px;
    box-sizing: border-box;
}

/* دکمه‌های + و - */
button.wdm-decrease,
button.wdm-increase,
button.wdm-btn-plus {
    width: 28px;
    height: 28px;
    border-radius: 100%;
    background: #fff; /* دکمه سفید برای کنتراست روی نارنجی */
    border: none;
    color: #ff0000; /* متن نارنجی */
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

/* هاور دکمه‌ها */
button.wdm-decrease:hover,
button.wdm-increase:hover,
button.wdm-btn-plus:hover {
    transform: scale(1.1);
    background: #fff;
}

/* دکمه غیرفعال (وقتی موجودی پر شد) */
button.wdm-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: #eee !important;
    color: #aaa !important;
}

/* عدد وسط */
.wdm-qty {
    color: #fff; /* عدد سفید روی پس زمینه نارنجی */
    font-family: iransansx, sans-serif;
    font-weight: 700;
    font-size: 14px;
    min-width: 24px;
    text-align: center;
    padding: 0 2px;
}

/* انیمیشن باز شدن */
.wdm-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    /* انیمیشن ورود */
    animation: wdm-slide-in 0.3s ease-out forwards;
}

.wdm-ajax-cart-buttons.processing {
    opacity: 0.7;
    /* میتوانید یک انیمیشن نبض خیلی ریز هم بدهید */
    transition: opacity 0.3s;
}

@keyframes wdm-slide-in {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ریسپانسیو */
@media (max-width: 480px) {
    .wdm-ajax-cart-buttons {
        bottom: 8px;
        right: 8px;
    }
    button.wdm-decrease,
    button.wdm-increase,
    button.wdm-btn-plus {
        width: 26px;
        height: 26px;
        font-size: 35px;
    }
}