/* Ensure consistent image size */

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background-color: white;
}


/* Ensure consistent width for product details */

.cart-item .product-details {
    width: 250px;
    /* Adjust as needed */
    min-width: 250px;
}


/* Product name styling in cart */

.cart-item .product-name-cart {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 2.6em;
    word-wrap: break-word;
    hyphens: auto;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}


/* Responsive design for cart items */

@media (max-width: 768px) {
    .cart-item .product-details {
        width: 200px;
        min-width: 200px;
    }
    .cart-item .product-name-cart {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        min-height: 3.9em;
    }
    .cart-item img {
        width: 80px;
        height: 80px;
    }
    .cart-item .cart-controls {
        gap: 10px;
    }
    .cart-item input[type="number"] {
        width: 50px;
    }
}

@media (max-width: 576px) {
    .cart-item .product-details {
        width: 150px;
        min-width: 150px;
    }
    .cart-item .product-name-cart {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        min-height: 2.6em;
    }
    .cart-item img {
        width: 70px;
        height: 70px;
    }
    .cart-item .cart-controls {
        flex-direction: column;
        gap: 5px;
    }
    .cart-item input[type="number"] {
        width: 45px;
    }
    .cart-item .remove-btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}


/* Ensure consistent alignment of quantity and price */

.cart-item .cart-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}


/* Fixed width for quantity input */

.cart-item input[type="number"] {
    width: 60px;
    text-align: center;
}


/* Ensure button stays aligned */

.cart-item .remove-btn {
    white-space: nowrap;
}


/* Variant information styling */

.cart-item .variant-info {
    margin-bottom: 0.5rem;
}

.cart-item .variant-info .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.375rem;
}

.cart-item .variant-info .badge i {
    font-size: 0.75rem;
}


/* Toast notification styling */

.toast-container {
    z-index: 1100;
}

.toast {
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 8px;
}

.toast.text-bg-success {
    background-color: #198754 !important;
    color: white !important;
}

.toast.text-bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.toast.text-bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.toast.text-bg-info {
    background-color: #0dcaf0 !important;
    color: white !important;
}

.toast .btn-close {
    filter: invert(1);
}

.toast .toast-body {
    font-weight: 500;
    padding: 1rem;
}


/* Animation for toast appearance */

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

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