.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    visibility: hidden;
}

.cart-sidebar.active {
    transform: translateX(0);
    visibility: visible;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
}

.cart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-title i {
    color: #3b82f6;
}

.cart-close {
    width: 32px;
    height: 32px;
    background: white;
    border: none;
    border-radius: 50%;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cart-close:hover {
    color: #111827;
    transform: rotate(90deg);
    background: #f8fafc;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transform-origin: top;
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease, height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: #3b82f6;
    font-weight: 600;
}

.cart-item-remove {
    color: #ef4444;
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.cart-item-remove:hover {
    background-color: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.cart-item-remove:active {
    transform: scale(0.95);
}

.cart-item-remove i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.cart-item-remove:hover i {
    transform: rotate(90deg);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: #e5e7eb;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #111827;
}

.whatsapp-order-btn {
    width: 100%;
    padding: 1rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.whatsapp-order-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.2);
}

.whatsapp-order-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-header {
        padding: 1rem;
    }

    .cart-items {
        padding: 0.75rem;
    }

    .cart-item {
        padding: 0.75rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .cart-footer {
        padding: 1rem;
    }

    .whatsapp-order-btn {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }

    /* Improve touch targets on mobile */
    .cart-close,
    .quantity-btn {
        min-width: 36px;
        min-height: 36px;
    }
}