/* == Category Badges Styles == */

/* Container for badges under title */
.cb-category-badge-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    direction: rtl;
}

/* Badge base style */
.cb-category-badge {
    background: linear-gradient(135deg, #0061ff, #44c9d8);
    color: white;
    font-size: 13px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    /*white-space: nowrap;*/
    white-space: normal;       /* بجای nowrap */
    word-break: break-word;    /* شکستن کلمات طولانی */
    text-overflow: unset;      /* حذف ... */
    overflow: visible; 
    pointer-events: auto;
    /*text-align: right;*/
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    width: max-content;
}

.cb-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}


/* ========================= */
/* Badge on Image */
/* ========================= */

.cb-badge-image {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    /*align-items: flex-end;*/
    align-items: flex-start;
    z-index: 9;
    margin: 0;
}


/* Ensure correct positioning inside product category image */
ul.products li.product-category .box-image {
    position: relative;
}


/* ========================= */
/* Responsive */
/* ========================= */

@media (max-width: 768px) {

    .cb-category-badge {
        font-size: 10px;
        padding: 4px 10px;
    }

    .cb-category-badge-container {
        position: relative;
        margin-bottom: 8px;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
 /* ... کدهای قبلی ... */

    /* Fix badge on image for mobile */
    .cb-badge-image {
        position: absolute;
        top: 5px;
        right: 5px;
        z-index: 10;
        
    }

    ul.products li.product-category .box-image {
        position: relative;
        overflow: visible;
    }
}
