.cart-floating-icon {
    position: fixed;
    bottom: 100px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    color: white;
    font-size: 24px;
}

[dir="rtl"] .cart-floating-icon {
    left: 20px;
}

[dir="ltr"] .cart-floating-icon {
    right: 20px;
}

.cart-floating-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.6);
    color: white;
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -8px;
    min-width: 20px;
    height: 30px !important;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

[dir="rtl"] .cart-badge {
    left: -8px;
}

[dir="ltr"] .cart-badge {
    right: -8px;
}

.cart-total-price {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-floating-icon:hover .cart-total-price {
    opacity: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.offcanvas {
    width: 400px !important;
}

.cart-item {
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f8f9fa;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-footer {
    position: sticky;
    bottom: 0;
    background: white !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.btn-outline-danger:hover {
    transform: scale(1.1);
}

.offcanvas-header {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.toast {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* RTL/LTR specific styles */
[dir="rtl"] .offcanvas-start {
    border-left: none;
    border-right: 1px solid rgba(0, 0, 0, 0.175);
}

[dir="rtl"] .toast {
    text-align: right;
}

[dir="ltr"] .toast {
    text-align: left;
}

[dir="rtl"] .cart-item .col-3:last-child {
    text-align: start !important;
}

[dir="ltr"] .cart-item .col-3:last-child {
    text-align: end !important;
}


@media (max-width: 768px) {
    .offcanvas {
        width: 90% !important;
    }

    .cart-floating-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
