

/* Styling for the category badge */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px;
   background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0 0 4px 4px;
}

.category-badge {
    font-size: 0.8rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

/* Support for RTL languages (Arabic) */
[dir="rtl"] .carousel-caption {
    text-align: right;
}

/* Adjust carousel height and card styling */
.card .carousel {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.card .carousel-item img {
    height: 300px;
    object-fit: contain;
    background-color: #f8f9fa;
}

/* Custom styling for carousel controls */
.card .carousel-control-prev,
.card .carousel-control-next {
    width: 15%;
    opacity: 0.7;
}

.card .carousel-control-prev-icon,
.card .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    padding: 10px;
}

/* Fade animation for carousel transitions */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: .6s;
    transition-property: opacity;
}

    .carousel-fade .carousel-item.active {
        opacity: 1;
    }